From c4d867db897eaefd9ff49e9dd1dc990963fb5e4b Mon Sep 17 00:00:00 2001 From: nyne Date: Sat, 2 Nov 2024 20:12:48 +0800 Subject: [PATCH] data exporting & importing --- assets/translation.json | 10 ++- lib/components/button.dart | 16 +++-- lib/foundation/favorites.dart | 4 ++ lib/foundation/history.dart | 6 ++ lib/pages/settings/app.dart | 30 +++++++++ lib/pages/settings/appearance.dart | 3 + lib/pages/settings/setting_components.dart | 2 +- lib/pages/settings/settings_page.dart | 1 + lib/utils/data.dart | 71 ++++++++++++++++++++++ lib/utils/io.dart | 3 +- windows/build.iss | 1 + 11 files changed, 139 insertions(+), 8 deletions(-) create mode 100644 lib/utils/data.dart diff --git a/assets/translation.json b/assets/translation.json index 20be28f..796bab9 100644 --- a/assets/translation.json +++ b/assets/translation.json @@ -152,7 +152,10 @@ "Name": "名称", "Date": "日期", "Date Desc": "日期降序", - "Start": "开始" + "Start": "开始", + "Export App Data": "导出应用数据", + "Import App Data": "导入应用数据", + "Export": "导出" }, "zh_TW": { "Home": "首頁", @@ -307,6 +310,9 @@ "Name": "名稱", "Date": "日期", "Date Desc": "日期降序", - "Start": "開始" + "Start": "開始", + "Export App Data": "匯出應用數據", + "Import App Data": "匯入應用數據", + "Export": "匯出" } } \ No newline at end of file diff --git a/lib/components/button.dart b/lib/components/button.dart index 96f7e15..2a1f6e6 100644 --- a/lib/components/button.dart +++ b/lib/components/button.dart @@ -156,7 +156,7 @@ class _ButtonState extends State