added guardian login with views for their assigned childs
This commit is contained in:
@@ -6,8 +6,8 @@ import 'package:background_downloader/background_downloader.dart' as bd;
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import '../../api/marianumcloud/webdav/webdav_api.dart';
|
||||
import '../../model/account_data.dart';
|
||||
import '../../notification/notification_service.dart';
|
||||
import '../../session/session_manager.dart';
|
||||
import '../../share_intent/remote_file_ref.dart';
|
||||
import 'download_job.dart';
|
||||
|
||||
@@ -116,7 +116,7 @@ class DownloadManager {
|
||||
final encodedPath = Uri.encodeComponent(remotePath).replaceAll('%2F', '/');
|
||||
final task = bd.DownloadTask(
|
||||
url: '${WebdavApi.buildWebdavUrl()}$encodedPath',
|
||||
headers: AccountData().authHeaders(),
|
||||
headers: SessionManager().requireNextcloud().authHeaders,
|
||||
filename: name,
|
||||
baseDirectory: bd.BaseDirectory.temporary,
|
||||
directory: _directory,
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import 'dart:math';
|
||||
|
||||
/// Random hex id from a cryptographic RNG, e.g. for per-install identifiers.
|
||||
String randomHexId({int bytes = 16}) {
|
||||
final random = Random.secure();
|
||||
return List<int>.generate(
|
||||
bytes,
|
||||
(_) => random.nextInt(256),
|
||||
).map((b) => b.toRadixString(16).padLeft(2, '0')).join();
|
||||
}
|
||||
Reference in New Issue
Block a user