fix: update changelog & backup restore

This commit is contained in:
lollipopkit
2023-04-19 20:52:02 +08:00
parent 20d2817c8d
commit e709262477
11 changed files with 39 additions and 24 deletions

View File

@@ -128,8 +128,7 @@ class BackupPage extends StatelessWidget {
showSnackBar(context, Text(s.fieldMustNotEmpty));
return;
}
_importBackup(text, context, s);
Navigator.of(context).pop();
await _importBackup(text, context, s);
}
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) {
_dockerHosts.setDockerHost(k, backup.dockerHosts[k]!);
}
Navigator.of(context).pop();
showSnackBarWithAction(
showRoundDialog(
context,
s.restoreSuccess,
s.restart,
() => rebuildAll(context),
s.attention,
Text(s.restoreSuccess),
[
TextButton(
onPressed: () => rebuildAll(context),
child: Text(s.restart),
),
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(s.cancel),
),
],
);
},
child: Text(s.ok),