diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml
index 7c383d1..f2aed8a 100644
--- a/.idea/libraries/Dart_Packages.xml
+++ b/.idea/libraries/Dart_Packages.xml
@@ -268,6 +268,13 @@
+
+
+
+
+
+
+
@@ -1038,6 +1045,7 @@
+
diff --git a/lib/screen/settings/debug/debugOverview.dart b/lib/screen/settings/debug/debugOverview.dart
index d19e845..9de737f 100644
--- a/lib/screen/settings/debug/debugOverview.dart
+++ b/lib/screen/settings/debug/debugOverview.dart
@@ -1,6 +1,8 @@
import 'dart:convert';
+import 'package:filesize/filesize.dart';
import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
import 'package:jiffy/jiffy.dart';
import 'package:localstore/localstore.dart';
import 'package:marianum_mobile/screen/settings/debug/jsonViewer.dart';
@@ -58,13 +60,35 @@ class _DebugOverviewState extends State {
return ListTile(
leading: const Icon(Icons.text_snippet_outlined),
- title: Text("[$filename]\n(${getValue(index).toString().length} zeichen) ${Jiffy.unixFromMillisecondsSinceEpoch(getValue(index)['lastupdate']).fromNow()}"),
+ title: Text(filename),
+ subtitle: Text("${filesize(getValue(index).toString().length * 8)}, ${Jiffy.unixFromMillisecondsSinceEpoch(getValue(index)['lastupdate']).fromNow()}"),
+ trailing: Icon(Icons.chevron_right),
textColor: Colors.black,
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return JsonViewer(title: filename, data: {"lastupdate": getValue(index)['lastupdate'], "json": jsonDecode(getValue(index)['json'])});
},));
},
+ onLongPress: () {
+ showDialog(context: context, builder: (context) {
+ return SimpleDialog(
+ children: [
+ ListTile(
+ leading: Icon(Icons.delete_forever),
+ title: Text("Diese Datei löschen"),
+ ),
+ ListTile(
+ leading: Icon(Icons.copy),
+ title: Text("Dateitext kopieren"),
+ onTap: () {
+ Clipboard.setData(ClipboardData(text: getValue(index).toString()));
+ Navigator.of(context).pop();
+ },
+ )
+ ],
+ );
+ });
+ },
);
},
),
diff --git a/pubspec.yaml b/pubspec.yaml
index e488db0..61280dd 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -58,6 +58,7 @@ dependencies:
flowder: ^0.2.0
url_launcher: ^6.1.10
flutter_linkify: ^5.0.2
+ filesize: ^2.0.1
dependency_overrides:
xml: ^6.2.2