From 73752bffc3808f25b9b4d4f3788fc28bb04dc5d2 Mon Sep 17 00:00:00 2001 From: lollipopkit Date: Sat, 9 Dec 2023 18:48:22 +0800 Subject: [PATCH] opt.: `backup` & `titlebar` --- .vscode/launch.json | 4 +- ios/Podfile.lock | 2 +- lib/core/utils/sync/webdav.dart | 6 +- lib/data/provider/server.dart | 2 +- lib/main.dart | 2 +- lib/view/page/backup.dart | 401 +++++++----------- lib/view/page/debug.dart | 2 +- lib/view/page/docker.dart | 2 +- lib/view/page/editor.dart | 2 +- lib/view/page/home.dart | 2 +- lib/view/page/private_key/edit.dart | 2 +- lib/view/page/private_key/list.dart | 2 +- lib/view/page/process.dart | 2 +- lib/view/page/server/detail.dart | 2 +- lib/view/page/server/edit.dart | 2 +- lib/view/page/setting/android.dart | 2 +- lib/view/page/setting/entry.dart | 2 +- lib/view/page/setting/ios.dart | 2 +- lib/view/page/setting/srv_detail_seq.dart | 2 +- lib/view/page/setting/srv_seq.dart | 2 +- lib/view/page/setting/virt_key.dart | 2 +- lib/view/page/snippet/edit.dart | 2 +- lib/view/page/snippet/result.dart | 2 +- lib/view/page/storage/local.dart | 2 +- lib/view/page/storage/sftp.dart | 2 +- lib/view/page/storage/sftp_mission.dart | 2 +- .../{custom_appbar.dart => appbar.dart} | 0 27 files changed, 191 insertions(+), 266 deletions(-) rename lib/view/widget/{custom_appbar.dart => appbar.dart} (100%) diff --git a/.vscode/launch.json b/.vscode/launch.json index 0de5f1610..bd32747e5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "version": "0.2.0", "configurations": [ { - "name": "toolbox", + "name": "debug", "request": "launch", "type": "dart", // "args": [ @@ -13,7 +13,7 @@ // ] }, { - "name": "toolbox (profile mode)", + "name": "profile", "request": "launch", "type": "dart", "flutterMode": "profile", diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ef084de92..cd011a0d9 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -72,7 +72,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: countly_flutter: d880b352f212d4f6453a87c85f0455f3b4b9c611 - file_picker: 1d63c4949e05e386da864365f8c13e1e64787675 + file_picker: 880e54928ebe4aa405aaf4577f29a76a078341c6 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef icloud_storage: d9ac7a33ced81df08ba7ea1bf3099cc0ee58f60a diff --git a/lib/core/utils/sync/webdav.dart b/lib/core/utils/sync/webdav.dart index 3edde191f..b29caa8bf 100644 --- a/lib/core/utils/sync/webdav.dart +++ b/lib/core/utils/sync/webdav.dart @@ -6,8 +6,7 @@ import 'package:toolbox/data/model/app/backup.dart'; import 'package:toolbox/data/model/app/error.dart'; import 'package:toolbox/data/res/path.dart'; import 'package:toolbox/data/res/store.dart'; -// ignore: implementation_imports -import 'package:webdav_client/src/client.dart'; +import 'package:webdav_client/webdav_client.dart'; abstract final class Webdav { static var _client = WebdavClient( @@ -73,6 +72,9 @@ abstract final class Webdav { static void changeClient(String url, String user, String pwd) { _client = WebdavClient(url: url, user: user, pwd: pwd); + Stores.setting.webdavUrl.put(url); + Stores.setting.webdavUser.put(user); + Stores.setting.webdavPwd.put(pwd); } static Future sync() async { diff --git a/lib/data/provider/server.dart b/lib/data/provider/server.dart index 1224b8c90..5fbd46c3f 100644 --- a/lib/data/provider/server.dart +++ b/lib/data/provider/server.dart @@ -315,7 +315,7 @@ class ServerProvider extends ChangeNotifier { final completer = Completer(); final homePath = (await s.client?.run('echo \$HOME').string)?.trim(); if (homePath == null || homePath.isEmpty) { - throw Exception('Got home path: $homePath'); + throw Exception('Got empty home path'); } final remotePath = ShellFunc.getShellPath(homePath); final reqId = Pros.sftp.add( diff --git a/lib/main.dart b/lib/main.dart index 6e01da4cb..7191622f6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -33,7 +33,7 @@ import 'data/provider/sftp.dart'; import 'data/provider/snippet.dart'; import 'data/res/color.dart'; import 'locator.dart'; -import 'view/widget/custom_appbar.dart'; +import 'view/widget/appbar.dart'; Future main() async { _runInZone(() async { diff --git a/lib/view/page/backup.dart b/lib/view/page/backup.dart index 6a50583d3..4715d3524 100644 --- a/lib/view/page/backup.dart +++ b/lib/view/page/backup.dart @@ -6,6 +6,7 @@ import 'package:toolbox/core/extension/context/common.dart'; import 'package:toolbox/core/extension/context/dialog.dart'; import 'package:toolbox/core/extension/context/locale.dart'; import 'package:toolbox/core/extension/context/snackbar.dart'; +import 'package:toolbox/core/utils/misc.dart'; import 'package:toolbox/core/utils/sync/icloud.dart'; import 'package:toolbox/core/utils/platform/base.dart'; import 'package:toolbox/core/utils/share.dart'; @@ -14,16 +15,14 @@ import 'package:toolbox/data/model/app/backup.dart'; import 'package:toolbox/data/res/logger.dart'; import 'package:toolbox/data/res/path.dart'; import 'package:toolbox/data/res/store.dart'; +import 'package:toolbox/data/res/ui.dart'; +import 'package:toolbox/view/widget/appbar.dart'; import 'package:toolbox/view/widget/expand_tile.dart'; import 'package:toolbox/view/widget/cardx.dart'; import 'package:toolbox/view/widget/input_field.dart'; import 'package:toolbox/view/widget/store_switch.dart'; import 'package:toolbox/view/widget/value_notifier.dart'; -import '../../core/utils/misc.dart'; -import '../../data/res/ui.dart'; -import '../widget/custom_appbar.dart'; - class BackupPage extends StatelessWidget { BackupPage({super.key}); @@ -86,57 +85,7 @@ class BackupPage extends StatelessWidget { ListTile( trailing: const Icon(Icons.restore), title: Text(l10n.restore), - onTap: () async { - final path = await pickOneFile(); - if (path == null) return; - - final file = File(path); - if (!await file.exists()) { - context.showSnackBar(l10n.fileNotExist(path)); - return; - } - - final text = await file.readAsString(); - if (text.isEmpty) { - context.showSnackBar(l10n.fieldMustNotEmpty); - return; - } - - try { - context.showLoadingDialog(); - final backup = - await compute(Backup.fromJsonString, text.trim()); - if (backupFormatVersion != backup.version) { - context.showSnackBar(l10n.backupVersionNotMatch); - return; - } - - await context.showRoundDialog( - title: Text(l10n.restore), - child: Text(l10n.askContinue( - '${l10n.restore} ${l10n.backup}(${backup.date})', - )), - actions: [ - TextButton( - onPressed: () => context.pop(), - child: Text(l10n.cancel), - ), - TextButton( - onPressed: () async { - await backup.restore(force: true); - context.pop(); - }, - child: Text(l10n.ok), - ), - ], - ); - } catch (e, trace) { - Loggers.app.warning('Import backup failed', e, trace); - context.showSnackBar(e.toString()); - } finally { - context.pop(); - } - }, + onTap: () async => _onTapFileRestore(context), ), ], ), @@ -145,92 +94,25 @@ class BackupPage extends StatelessWidget { Widget _buildIcloud(BuildContext context) { return CardX( - ExpandTile( - leading: const Icon(Icons.cloud), + ListTile( title: const Text('iCloud'), - initiallyExpanded: true, - children: [ - ListTile( - title: Text(l10n.auto), - trailing: StoreSwitch( - prop: Stores.setting.icloudSync, - validator: (p0) { - if (p0 && Stores.setting.webdavSync.fetch()) { - context.showSnackBar(l10n.autoBackupConflict); - return false; - } - return true; - }, - callback: (val) async { - if (val) { - icloudLoading.value = true; - await ICloud.sync(); - icloudLoading.value = false; - } - }, - ), - ), - ListTile( - title: Text(l10n.manual), - trailing: ValueBuilder( - listenable: icloudLoading, - build: () { - if (icloudLoading.value) { - return UIs.centerSizedLoadingSmall; - } - return Row( - mainAxisSize: MainAxisSize.min, - children: [ - TextButton( - onPressed: () async { - icloudLoading.value = true; - try { - final result = await ICloud.download( - relativePath: Paths.bakName, - ); - if (result != null) { - Loggers.app - .warning('Download backup failed: $result'); - return; - } - } catch (e, s) { - Loggers.app.warning('Download backup failed', e, s); - context.showSnackBar(e.toString()); - icloudLoading.value = false; - return; - } - final dlFile = - await File(await Paths.bak).readAsString(); - final dlBak = - await compute(Backup.fromJsonString, dlFile); - await dlBak.restore(force: true); - icloudLoading.value = false; - }, - child: Text(l10n.download), - ), - UIs.width7, - TextButton( - onPressed: () async { - icloudLoading.value = true; - await Backup.backup(); - final uploadResult = - await ICloud.upload(relativePath: Paths.bakName); - if (uploadResult != null) { - Loggers.app.warning( - 'Upload iCloud backup failed: $uploadResult'); - } else { - Loggers.app.info('Upload iCloud backup success'); - } - icloudLoading.value = false; - }, - child: Text(l10n.upload), - ), - ], - ); - }, - ), - ), - ], + trailing: StoreSwitch( + prop: Stores.setting.icloudSync, + validator: (p0) { + if (p0 && Stores.setting.webdavSync.fetch()) { + context.showSnackBar(l10n.autoBackupConflict); + return false; + } + return true; + }, + callback: (val) async { + if (val) { + icloudLoading.value = true; + await ICloud.sync(); + icloudLoading.value = false; + } + }, + ), ), ); } @@ -245,67 +127,7 @@ class BackupPage extends StatelessWidget { ListTile( title: Text(l10n.setting), trailing: const Icon(Icons.settings), - onTap: () async { - final urlCtrl = TextEditingController( - text: Stores.setting.webdavUrl.fetch(), - ); - final userCtrl = TextEditingController( - text: Stores.setting.webdavUser.fetch(), - ); - final pwdCtrl = TextEditingController( - text: Stores.setting.webdavPwd.fetch(), - ); - final result = await context.showRoundDialog( - title: const Text('WebDAV'), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Input( - label: 'URL', - hint: 'https://example.com/webdav/', - controller: urlCtrl, - ), - Input( - label: l10n.user, - controller: userCtrl, - ), - Input( - label: l10n.pwd, - controller: pwdCtrl, - ), - ], - ), - actions: [ - TextButton( - onPressed: () { - context.pop(true); - }, - child: Text(l10n.ok), - ), - ], - ); - if (result == true) { - final result = await Webdav.test( - urlCtrl.text, - userCtrl.text, - pwdCtrl.text, - ); - if (result == null) { - context.showSnackBar(l10n.success); - } else { - context.showSnackBar(result); - return; - } - Webdav.changeClient( - urlCtrl.text, - userCtrl.text, - pwdCtrl.text, - ); - Stores.setting.webdavUrl.put(urlCtrl.text); - Stores.setting.webdavUser.put(userCtrl.text); - Stores.setting.webdavPwd.put(pwdCtrl.text); - } - }, + onTap: () async => _onTapWebdavSetting(context), ), ListTile( title: Text(l10n.auto), @@ -347,48 +169,12 @@ class BackupPage extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ TextButton( - onPressed: () async { - webdavLoading.value = true; - try { - final result = await Webdav.download( - relativePath: Paths.bakName, - ); - if (result != null) { - Loggers.app.warning( - 'Download webdav backup failed: $result'); - return; - } - } catch (e, s) { - Loggers.app - .warning('Download webdav backup failed', e, s); - context.showSnackBar(e.toString()); - webdavLoading.value = false; - return; - } - final dlFile = - await File(await Paths.bak).readAsString(); - final dlBak = - await compute(Backup.fromJsonString, dlFile); - await dlBak.restore(force: true); - webdavLoading.value = false; - }, + onPressed: () async => _onTapWebdavDl(context), child: Text(l10n.download), ), UIs.width7, TextButton( - onPressed: () async { - webdavLoading.value = true; - await Backup.backup(); - final uploadResult = - await Webdav.upload(relativePath: Paths.bakName); - if (uploadResult != null) { - Loggers.app.warning( - 'Upload webdav backup failed: $uploadResult'); - } else { - Loggers.app.info('Upload webdav backup success'); - } - webdavLoading.value = false; - }, + onPressed: () async => _onTapWebdavUp(context), child: Text(l10n.upload), ), ], @@ -400,4 +186,141 @@ class BackupPage extends StatelessWidget { ), ); } + + Future _onTapFileRestore(BuildContext context) async { + final path = await pickOneFile(); + if (path == null) return; + + final file = File(path); + if (!await file.exists()) { + context.showSnackBar(l10n.fileNotExist(path)); + return; + } + + final text = await file.readAsString(); + if (text.isEmpty) { + context.showSnackBar(l10n.fieldMustNotEmpty); + return; + } + + try { + context.showLoadingDialog(); + final backup = await compute(Backup.fromJsonString, text.trim()); + if (backupFormatVersion != backup.version) { + context.showSnackBar(l10n.backupVersionNotMatch); + return; + } + + await context.showRoundDialog( + title: Text(l10n.restore), + child: Text(l10n.askContinue( + '${l10n.restore} ${l10n.backup}(${backup.date})', + )), + actions: [ + TextButton( + onPressed: () => context.pop(), + child: Text(l10n.cancel), + ), + TextButton( + onPressed: () async { + await backup.restore(force: true); + context.pop(); + }, + child: Text(l10n.ok), + ), + ], + ); + } catch (e, trace) { + Loggers.app.warning('Import backup failed', e, trace); + context.showSnackBar(e.toString()); + } finally { + context.pop(); + } + } + + Future _onTapWebdavDl(BuildContext context) async { + webdavLoading.value = true; + try { + final result = await Webdav.download( + relativePath: Paths.bakName, + ); + if (result != null) { + Loggers.app.warning('Download webdav backup failed: $result'); + return; + } + } catch (e, s) { + Loggers.app.warning('Download webdav backup failed', e, s); + context.showSnackBar(e.toString()); + webdavLoading.value = false; + return; + } + final dlFile = await File(await Paths.bak).readAsString(); + final dlBak = await compute(Backup.fromJsonString, dlFile); + await dlBak.restore(force: true); + webdavLoading.value = false; + } + + Future _onTapWebdavUp(BuildContext context) async { + webdavLoading.value = true; + await Backup.backup(); + final uploadResult = await Webdav.upload(relativePath: Paths.bakName); + if (uploadResult != null) { + Loggers.app.warning('Upload webdav backup failed: $uploadResult'); + } else { + Loggers.app.info('Upload webdav backup success'); + } + webdavLoading.value = false; + } + + Future _onTapWebdavSetting(BuildContext context) async { + final urlCtrl = TextEditingController( + text: Stores.setting.webdavUrl.fetch(), + ); + final userCtrl = TextEditingController( + text: Stores.setting.webdavUser.fetch(), + ); + final pwdCtrl = TextEditingController( + text: Stores.setting.webdavPwd.fetch(), + ); + final result = await context.showRoundDialog( + title: const Text('WebDAV'), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Input( + label: 'URL', + hint: 'https://example.com/webdav/', + controller: urlCtrl, + ), + Input( + label: l10n.user, + controller: userCtrl, + ), + Input( + label: l10n.pwd, + controller: pwdCtrl, + ), + ], + ), + actions: [ + TextButton( + onPressed: () { + context.pop(true); + }, + child: Text(l10n.ok), + ), + ], + ); + if (result == true) { + final result = + await Webdav.test(urlCtrl.text, userCtrl.text, pwdCtrl.text); + if (result == null) { + context.showSnackBar(l10n.success); + } else { + context.showSnackBar(result); + return; + } + Webdav.changeClient(urlCtrl.text, userCtrl.text, pwdCtrl.text); + } + } } diff --git a/lib/view/page/debug.dart b/lib/view/page/debug.dart index 374440300..9360805b2 100644 --- a/lib/view/page/debug.dart +++ b/lib/view/page/debug.dart @@ -3,7 +3,7 @@ import 'package:provider/provider.dart'; import 'package:toolbox/core/extension/context/common.dart'; import 'package:toolbox/data/provider/debug.dart'; -import '../widget/custom_appbar.dart'; +import '../widget/appbar.dart'; class DebugPage extends StatefulWidget { const DebugPage({super.key}); diff --git a/lib/view/page/docker.dart b/lib/view/page/docker.dart index fc4c6e121..b9aff00ed 100644 --- a/lib/view/page/docker.dart +++ b/lib/view/page/docker.dart @@ -18,7 +18,7 @@ import '../../data/model/app/error.dart'; import '../../data/model/app/menu.dart'; import '../../data/res/ui.dart'; import '../../data/res/url.dart'; -import '../widget/custom_appbar.dart'; +import '../widget/appbar.dart'; import '../widget/popup_menu.dart'; import '../widget/cardx.dart'; import '../widget/two_line_text.dart'; diff --git a/lib/view/page/editor.dart b/lib/view/page/editor.dart index 9e236771a..1de32faf2 100644 --- a/lib/view/page/editor.dart +++ b/lib/view/page/editor.dart @@ -14,7 +14,7 @@ import 'package:toolbox/core/utils/misc.dart'; import 'package:toolbox/data/res/highlight.dart'; import 'package:toolbox/data/res/store.dart'; -import '../widget/custom_appbar.dart'; +import '../widget/appbar.dart'; import '../widget/two_line_text.dart'; class EditorPage extends StatefulWidget { diff --git a/lib/view/page/home.dart b/lib/view/page/home.dart index 941d14e51..3eac45a9e 100644 --- a/lib/view/page/home.dart +++ b/lib/view/page/home.dart @@ -26,7 +26,7 @@ import '../../data/res/build_data.dart'; import '../../data/res/misc.dart'; import '../../data/res/ui.dart'; import '../../data/res/url.dart'; -import '../widget/custom_appbar.dart'; +import '../widget/appbar.dart'; import '../widget/cardx.dart'; import '../widget/url_text.dart'; import '../widget/value_notifier.dart'; diff --git a/lib/view/page/private_key/edit.dart b/lib/view/page/private_key/edit.dart index 01b82151c..da0df1744 100644 --- a/lib/view/page/private_key/edit.dart +++ b/lib/view/page/private_key/edit.dart @@ -16,7 +16,7 @@ import 'package:toolbox/view/widget/input_field.dart'; import '../../../core/utils/server.dart'; import '../../../data/model/server/private_key_info.dart'; import '../../../data/res/ui.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; const _format = 'text/plain'; diff --git a/lib/view/page/private_key/list.dart b/lib/view/page/private_key/list.dart index 294fb4ebf..4a4900172 100644 --- a/lib/view/page/private_key/list.dart +++ b/lib/view/page/private_key/list.dart @@ -14,7 +14,7 @@ import '../../../core/route.dart'; import '../../../data/model/server/private_key_info.dart'; import '../../../data/provider/private_key.dart'; import '../../../data/res/ui.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; import '../../widget/cardx.dart'; class PrivateKeysListPage extends StatefulWidget { diff --git a/lib/view/page/process.dart b/lib/view/page/process.dart index 8d222c078..e9331c3de 100644 --- a/lib/view/page/process.dart +++ b/lib/view/page/process.dart @@ -14,7 +14,7 @@ import '../../data/model/app/shell_func.dart'; import '../../data/model/server/proc.dart'; import '../../data/model/server/server_private_info.dart'; import '../../data/res/ui.dart'; -import '../widget/custom_appbar.dart'; +import '../widget/appbar.dart'; import '../widget/cardx.dart'; import '../widget/two_line_text.dart'; diff --git a/lib/view/page/server/detail.dart b/lib/view/page/server/detail.dart index 549109936..60c7d0084 100644 --- a/lib/view/page/server/detail.dart +++ b/lib/view/page/server/detail.dart @@ -21,7 +21,7 @@ import '../../../data/provider/server.dart'; import '../../../data/res/color.dart'; import '../../../data/res/default.dart'; import '../../../data/res/ui.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; import '../../widget/cardx.dart'; class ServerDetailPage extends StatefulWidget { diff --git a/lib/view/page/server/edit.dart b/lib/view/page/server/edit.dart index d35067298..6975ffebf 100644 --- a/lib/view/page/server/edit.dart +++ b/lib/view/page/server/edit.dart @@ -13,7 +13,7 @@ import '../../../data/model/server/private_key_info.dart'; import '../../../data/model/server/server_private_info.dart'; import '../../../data/provider/private_key.dart'; import '../../../data/res/ui.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; import '../../widget/input_field.dart'; import '../../widget/cardx.dart'; import '../../widget/tag.dart'; diff --git a/lib/view/page/setting/android.dart b/lib/view/page/setting/android.dart index 7d6d9bc61..045cc325e 100644 --- a/lib/view/page/setting/android.dart +++ b/lib/view/page/setting/android.dart @@ -9,7 +9,7 @@ import 'package:toolbox/core/extension/context/snackbar.dart'; import 'package:toolbox/core/utils/platform/auth.dart'; import 'package:toolbox/data/res/store.dart'; import 'package:toolbox/view/page/setting/platform_pub.dart'; -import 'package:toolbox/view/widget/custom_appbar.dart'; +import 'package:toolbox/view/widget/appbar.dart'; import 'package:toolbox/view/widget/input_field.dart'; import 'package:toolbox/view/widget/cardx.dart'; import 'package:toolbox/view/widget/store_switch.dart'; diff --git a/lib/view/page/setting/entry.dart b/lib/view/page/setting/entry.dart index f4f8b4721..480bded22 100644 --- a/lib/view/page/setting/entry.dart +++ b/lib/view/page/setting/entry.dart @@ -29,7 +29,7 @@ import '../../../data/res/color.dart'; import '../../../data/res/path.dart'; import '../../../data/res/ui.dart'; import '../../widget/color_picker.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; import '../../widget/input_field.dart'; import '../../widget/cardx.dart'; import '../../widget/store_switch.dart'; diff --git a/lib/view/page/setting/ios.dart b/lib/view/page/setting/ios.dart index 074df0629..d67d5b0ef 100644 --- a/lib/view/page/setting/ios.dart +++ b/lib/view/page/setting/ios.dart @@ -13,7 +13,7 @@ import 'package:toolbox/data/res/misc.dart'; import 'package:toolbox/data/res/store.dart'; import 'package:toolbox/data/res/ui.dart'; import 'package:toolbox/view/page/setting/platform_pub.dart'; -import 'package:toolbox/view/widget/custom_appbar.dart'; +import 'package:toolbox/view/widget/appbar.dart'; import 'package:toolbox/view/widget/future_widget.dart'; import 'package:toolbox/view/widget/cardx.dart'; import 'package:toolbox/view/widget/store_switch.dart'; diff --git a/lib/view/page/setting/srv_detail_seq.dart b/lib/view/page/setting/srv_detail_seq.dart index ae0e4d9d2..bafc74874 100644 --- a/lib/view/page/setting/srv_detail_seq.dart +++ b/lib/view/page/setting/srv_detail_seq.dart @@ -3,7 +3,7 @@ import 'package:toolbox/core/extension/context/locale.dart'; import 'package:toolbox/data/res/store.dart'; import '../../../core/extension/order.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; import '../../widget/cardx.dart'; class ServerDetailOrderPage extends StatefulWidget { diff --git a/lib/view/page/setting/srv_seq.dart b/lib/view/page/setting/srv_seq.dart index eb80141d8..9630fc9b4 100644 --- a/lib/view/page/setting/srv_seq.dart +++ b/lib/view/page/setting/srv_seq.dart @@ -6,7 +6,7 @@ import 'package:toolbox/data/res/store.dart'; import 'package:toolbox/data/res/ui.dart'; import 'package:toolbox/view/widget/cardx.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; class ServerOrderPage extends StatefulWidget { const ServerOrderPage({super.key}); diff --git a/lib/view/page/setting/virt_key.dart b/lib/view/page/setting/virt_key.dart index 2855a2360..ffd0630e9 100644 --- a/lib/view/page/setting/virt_key.dart +++ b/lib/view/page/setting/virt_key.dart @@ -8,7 +8,7 @@ import 'package:toolbox/data/res/store.dart'; import 'package:toolbox/data/res/ui.dart'; import 'package:toolbox/view/widget/cardx.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; class SSHVirtKeySettingPage extends StatefulWidget { const SSHVirtKeySettingPage({super.key}); diff --git a/lib/view/page/snippet/edit.dart b/lib/view/page/snippet/edit.dart index 45f823514..36f494df0 100644 --- a/lib/view/page/snippet/edit.dart +++ b/lib/view/page/snippet/edit.dart @@ -9,7 +9,7 @@ import 'package:toolbox/view/widget/input_field.dart'; import '../../../data/model/server/snippet.dart'; import '../../../data/res/ui.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; import '../../widget/tag.dart'; class SnippetEditPage extends StatefulWidget { diff --git a/lib/view/page/snippet/result.dart b/lib/view/page/snippet/result.dart index 74d7102bb..a7c612b67 100644 --- a/lib/view/page/snippet/result.dart +++ b/lib/view/page/snippet/result.dart @@ -3,7 +3,7 @@ import 'package:toolbox/core/extension/context/locale.dart'; import 'package:toolbox/data/model/server/snippet.dart'; import 'package:toolbox/data/res/ui.dart'; import 'package:toolbox/view/widget/cardx.dart'; -import 'package:toolbox/view/widget/custom_appbar.dart'; +import 'package:toolbox/view/widget/appbar.dart'; import 'package:toolbox/view/widget/expand_tile.dart'; class SnippetResultPage extends StatelessWidget { diff --git a/lib/view/page/storage/local.dart b/lib/view/page/storage/local.dart index 8e7c884a6..47e63380d 100644 --- a/lib/view/page/storage/local.dart +++ b/lib/view/page/storage/local.dart @@ -20,7 +20,7 @@ import '../../../core/utils/misc.dart'; import '../../../data/model/app/path_with_prefix.dart'; import '../../../data/res/path.dart'; import '../../../data/res/ui.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; import '../../widget/fade_in.dart'; class LocalStoragePage extends StatefulWidget { diff --git a/lib/view/page/storage/sftp.dart b/lib/view/page/storage/sftp.dart index de5ff523a..5f12b3449 100644 --- a/lib/view/page/storage/sftp.dart +++ b/lib/view/page/storage/sftp.dart @@ -25,7 +25,7 @@ import '../../../data/model/sftp/browser_status.dart'; import '../../../data/model/sftp/req.dart'; import '../../../data/res/path.dart'; import '../../../data/res/ui.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; import '../../widget/fade_in.dart'; import '../../widget/input_field.dart'; import '../../widget/two_line_text.dart'; diff --git a/lib/view/page/storage/sftp_mission.dart b/lib/view/page/storage/sftp_mission.dart index 43723f10c..db14bcac0 100644 --- a/lib/view/page/storage/sftp_mission.dart +++ b/lib/view/page/storage/sftp_mission.dart @@ -12,7 +12,7 @@ import '../../../core/extension/numx.dart'; import '../../../data/model/sftp/req.dart'; import '../../../data/provider/sftp.dart'; import '../../../data/res/ui.dart'; -import '../../widget/custom_appbar.dart'; +import '../../widget/appbar.dart'; import '../../widget/cardx.dart'; class SftpMissionPage extends StatefulWidget { diff --git a/lib/view/widget/custom_appbar.dart b/lib/view/widget/appbar.dart similarity index 100% rename from lib/view/widget/custom_appbar.dart rename to lib/view/widget/appbar.dart