consolidated downloads dir, nextcloud origin, upload route and chat timestamps; added webdav path tests
This commit is contained in:
@@ -94,7 +94,7 @@ class _DiagnosticsPageState extends State<DiagnosticsPage> {
|
||||
rows: await rows({
|
||||
'Marianum Connect': () async => MarianumConnectEndpoint.current(),
|
||||
'Nextcloud': () async =>
|
||||
'https://${EndpointData().nextcloud().full()}',
|
||||
EndpointData().nextcloud().origin(),
|
||||
'Notfall-Nachricht': () async =>
|
||||
settings.devToolsSettings.resolveEmergencyNoticeUrl(),
|
||||
}),
|
||||
|
||||
@@ -121,8 +121,7 @@ class DevToolsSection extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
onTap: () =>
|
||||
MarianumConnectEndpointPicker.show(context, settings),
|
||||
onTap: () => MarianumConnectEndpointPicker.show(context, settings),
|
||||
),
|
||||
BlocBuilder<SettingsCubit, model.Settings>(
|
||||
bloc: settings,
|
||||
@@ -137,8 +136,7 @@ class DevToolsSection extends StatelessWidget {
|
||||
title: const Text('Notfall-Nachrichtenquelle'),
|
||||
subtitle: Text(override.isEmpty ? 'Standardquelle' : override),
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
onTap: () =>
|
||||
_EmergencyNoticeUrlEditor.show(context, settings),
|
||||
onTap: () => _EmergencyNoticeUrlEditor.show(context, settings),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -146,9 +144,8 @@ class DevToolsSection extends StatelessWidget {
|
||||
_StorageTile(
|
||||
icon: Icons.settings_applications_outlined,
|
||||
title: 'Einstellungen',
|
||||
describe: () async => filesize(
|
||||
utf8.encode(jsonEncode(settings.val().toJson())).length,
|
||||
),
|
||||
describe: () async =>
|
||||
filesize(utf8.encode(jsonEncode(settings.val().toJson())).length),
|
||||
onOpen: (_) async => AppRoutes.openJsonViewer(
|
||||
context,
|
||||
settings.val().toJson(),
|
||||
@@ -235,15 +232,16 @@ class DevToolsSection extends StatelessWidget {
|
||||
_StorageTile(
|
||||
icon: Icons.download_outlined,
|
||||
title: 'Downloads',
|
||||
describe: () async =>
|
||||
filesize(await directorySize(await _downloadsDir())),
|
||||
describe: () async => filesize(
|
||||
await directorySize(await DownloadManager.downloadsDirectory()),
|
||||
),
|
||||
clearTitle: 'Downloads löschen',
|
||||
clearContent:
|
||||
'Laufende Downloads werden abgebrochen und heruntergeladene '
|
||||
'Dateien gelöscht.',
|
||||
onClear: () async {
|
||||
DownloadManager.instance.clearAll();
|
||||
final dir = await _downloadsDir();
|
||||
final dir = await DownloadManager.downloadsDirectory();
|
||||
if (!dir.existsSync()) return;
|
||||
// Cancelled tasks can still be flushing into the folder, so deleting
|
||||
// it as a whole races them; whatever survives shows up in the size.
|
||||
@@ -258,9 +256,6 @@ class DevToolsSection extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
static Future<Directory> _downloadsDir() async =>
|
||||
Directory('${(await getTemporaryDirectory()).path}/downloads');
|
||||
}
|
||||
|
||||
/// Storage row: tap opens a detail view ([onOpen]), the trailing button clears
|
||||
|
||||
Reference in New Issue
Block a user