mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
new: use generated ids for servers (#765)
* new: use generated ids for servers Fixes #743 * fix: deps. * fix: migrate related settings * fix: restore servers from json
This commit is contained in:
@@ -251,7 +251,7 @@ final class _BackupPageState extends State<BackupPage>
|
||||
onTap: () async {
|
||||
final data = await context.showImportDialog(
|
||||
title: l10n.snippet,
|
||||
modelDef: SnippetX.example.toJson(),
|
||||
modelDef: Snippet.example.toJson(),
|
||||
);
|
||||
if (data == null) return;
|
||||
final str = String.fromCharCodes(data);
|
||||
|
||||
@@ -672,6 +672,7 @@ extension on _ServerEditPageState {
|
||||
custom: custom,
|
||||
wolCfg: wol,
|
||||
envs: _env.value.isEmpty ? null : _env.value,
|
||||
id: widget.args?.spi.id ?? ShortId.generate(),
|
||||
);
|
||||
|
||||
if (this.spi == null) {
|
||||
|
||||
@@ -118,7 +118,6 @@ final class _AppSettingsPageState extends State<AppSettingsPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MultiList(
|
||||
thumbVisibility: true,
|
||||
children: [
|
||||
[const CenterGreyTitle('App'), _buildApp()],
|
||||
[CenterGreyTitle(l10n.server), _buildServer()],
|
||||
|
||||
Reference in New Issue
Block a user