mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix: update changelog & backup restore
This commit is contained in:
@@ -168,7 +168,7 @@ abstract class S {
|
|||||||
/// No description provided for @backupTip.
|
/// No description provided for @backupTip.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'The exported data is simply encrypted. \nPlease keep it safe.\nRestoring will not overwrite existing data.'**
|
/// **'The exported data is simply encrypted. \nPlease keep it safe.'**
|
||||||
String get backupTip;
|
String get backupTip;
|
||||||
|
|
||||||
/// No description provided for @backupVersionNotMatch.
|
/// No description provided for @backupVersionNotMatch.
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class SEn extends S {
|
|||||||
String get backupAndRestore => 'Backup and Restore';
|
String get backupAndRestore => 'Backup and Restore';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get backupTip => 'The exported data is simply encrypted. \nPlease keep it safe.\nRestoring will not overwrite existing data.';
|
String get backupTip => 'The exported data is simply encrypted. \nPlease keep it safe.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get backupVersionNotMatch => 'Backup version is not match.';
|
String get backupVersionNotMatch => 'Backup version is not match.';
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class SZh extends S {
|
|||||||
String get backupAndRestore => '备份和恢复';
|
String get backupAndRestore => '备份和恢复';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get backupTip => '导出的数据仅进行了简单加密,请妥善保管。\n恢复的数据不会覆盖现有数据。';
|
String get backupTip => '导出的数据仅进行了简单加密,请妥善保管。';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get backupVersionNotMatch => '备份版本不匹配,无法恢复';
|
String get backupVersionNotMatch => '备份版本不匹配,无法恢复';
|
||||||
|
|||||||
@@ -359,7 +359,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 263;
|
CURRENT_PROJECT_VERSION = 268;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -367,7 +367,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.263;
|
MARKETING_VERSION = 1.0.268;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -490,7 +490,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 263;
|
CURRENT_PROJECT_VERSION = 268;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -498,7 +498,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.263;
|
MARKETING_VERSION = 1.0.268;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -515,7 +515,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 263;
|
CURRENT_PROJECT_VERSION = 268;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -523,7 +523,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.263;
|
MARKETING_VERSION = 1.0.268;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ Future<void> doUpdate(BuildContext context, {bool force = false}) async {
|
|||||||
|
|
||||||
showSnackBarWithAction(
|
showSnackBarWithAction(
|
||||||
context,
|
context,
|
||||||
'${s.updateTip(newest)} \n${update.changelog}',
|
'${s.updateTip(newest)} \n${update.changelog.current}',
|
||||||
s.update,
|
s.update,
|
||||||
() => _doUpdate(url, context, s),
|
() => _doUpdate(url, context, s),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import 'package:flutter/widgets.dart';
|
|||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
import 'package:plain_notification_token/plain_notification_token.dart';
|
import 'package:plain_notification_token/plain_notification_token.dart';
|
||||||
import 'package:share_plus/share_plus.dart';
|
import 'package:share_plus/share_plus.dart';
|
||||||
import 'package:toolbox/data/provider/app.dart';
|
|
||||||
import 'package:toolbox/locator.dart';
|
|
||||||
|
|
||||||
|
import '../../data/provider/app.dart';
|
||||||
|
import '../../locator.dart';
|
||||||
import '../../view/widget/rebuild.dart';
|
import '../../view/widget/rebuild.dart';
|
||||||
import 'platform.dart';
|
import 'platform.dart';
|
||||||
|
|
||||||
|
|||||||
8
lib/core/utils/navigator.dart
Normal file
8
lib/core/utils/navigator.dart
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
||||||
|
extension ContextX on BuildContext {
|
||||||
|
void pop<T>([T? result]) {
|
||||||
|
Navigator.of(this).pop(T);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 263;
|
static const int build = 268;
|
||||||
static const String engine = "3.7.11";
|
static const String engine = "3.7.11";
|
||||||
static const String buildAt = "2023-04-18 22:01:22.468457";
|
static const String buildAt = "2023-04-19 20:26:15.641670";
|
||||||
static const int modifications = 3;
|
static const int modifications = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"backDir": "Back",
|
"backDir": "Back",
|
||||||
"backup": "Backup",
|
"backup": "Backup",
|
||||||
"backupAndRestore": "Backup and Restore",
|
"backupAndRestore": "Backup and Restore",
|
||||||
"backupTip": "The exported data is simply encrypted. \nPlease keep it safe.\nRestoring will not overwrite existing data.",
|
"backupTip": "The exported data is simply encrypted. \nPlease keep it safe.",
|
||||||
"backupVersionNotMatch": "Backup version is not match.",
|
"backupVersionNotMatch": "Backup version is not match.",
|
||||||
"bgRun": "Run in backgroud",
|
"bgRun": "Run in backgroud",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"backDir": "返回上一级",
|
"backDir": "返回上一级",
|
||||||
"backup": "备份",
|
"backup": "备份",
|
||||||
"backupAndRestore": "备份和恢复",
|
"backupAndRestore": "备份和恢复",
|
||||||
"backupTip": "导出的数据仅进行了简单加密,请妥善保管。\n恢复的数据不会覆盖现有数据。",
|
"backupTip": "导出的数据仅进行了简单加密,请妥善保管。",
|
||||||
"backupVersionNotMatch": "备份版本不匹配,无法恢复",
|
"backupVersionNotMatch": "备份版本不匹配,无法恢复",
|
||||||
"bgRun": "后台运行",
|
"bgRun": "后台运行",
|
||||||
"cancel": "取消",
|
"cancel": "取消",
|
||||||
|
|||||||
@@ -128,8 +128,7 @@ class BackupPage extends StatelessWidget {
|
|||||||
showSnackBar(context, Text(s.fieldMustNotEmpty));
|
showSnackBar(context, Text(s.fieldMustNotEmpty));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_importBackup(text, context, s);
|
await _importBackup(text, context, s);
|
||||||
Navigator.of(context).pop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _importBackup(String raw, BuildContext context, S s) async {
|
Future<void> _importBackup(String raw, BuildContext context, S s) async {
|
||||||
@@ -163,12 +162,20 @@ class BackupPage extends StatelessWidget {
|
|||||||
for (final k in backup.dockerHosts.keys) {
|
for (final k in backup.dockerHosts.keys) {
|
||||||
_dockerHosts.setDockerHost(k, backup.dockerHosts[k]!);
|
_dockerHosts.setDockerHost(k, backup.dockerHosts[k]!);
|
||||||
}
|
}
|
||||||
Navigator.of(context).pop();
|
showRoundDialog(
|
||||||
showSnackBarWithAction(
|
|
||||||
context,
|
context,
|
||||||
s.restoreSuccess,
|
s.attention,
|
||||||
s.restart,
|
Text(s.restoreSuccess),
|
||||||
() => rebuildAll(context),
|
[
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => rebuildAll(context),
|
||||||
|
child: Text(s.restart),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
|
child: Text(s.cancel),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Text(s.ok),
|
child: Text(s.ok),
|
||||||
|
|||||||
Reference in New Issue
Block a user