new: icloud manual

This commit is contained in:
lollipopkit
2023-10-17 20:03:55 +08:00
parent 439aa913b6
commit 8ce2cc579c
36 changed files with 260 additions and 172 deletions

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 597;
static const int build = 599;
static const String engine = "3.13.7";
static const String buildAt = "2023-10-15 13:38:49";
static const int modifications = 9;
static const String buildAt = "2023-10-15 21:24:51";
static const int modifications = 4;
static const int script = 21;
}

View File

@@ -1,3 +1,4 @@
import 'package:toolbox/core/persistant_store.dart';
import 'package:toolbox/data/store/docker.dart';
import 'package:toolbox/data/store/first.dart';
import 'package:toolbox/data/store/history.dart';
@@ -17,4 +18,14 @@ class Stores {
static final key = locator<PrivateKeyStore>();
static final snippet = locator<SnippetStore>();
static final first = locator<FirstStore>();
static final List<PersistentStore> all = [
setting,
server,
docker,
history,
key,
snippet,
first,
];
}

View File

@@ -1,6 +1,8 @@
import '../../core/persistant_store.dart';
class DockerStore extends PersistentStore<String> {
DockerStore() : super('docker');
String? fetch(String id) {
return box.get(id);
}

View File

@@ -2,6 +2,8 @@ import 'package:toolbox/core/persistant_store.dart';
/// It stores whether is the first time of some.
class FirstStore extends PersistentStore<bool> {
FirstStore() : super('first');
/// Add Snippet `Install ServerBoxMonitor`
late final iSSBM = StoreProperty(box, 'installMonitorSnippet', true);

View File

@@ -47,6 +47,8 @@ class _MapHistory {
}
class HistoryStore extends PersistentStore {
HistoryStore() : super('history');
/// Paths that user has visited by 'Locate' button
late final sftpGoPath = _ListHistory(box: box, name: 'sftpPath');

View File

@@ -2,6 +2,8 @@ import '../../core/persistant_store.dart';
import '../model/server/private_key_info.dart';
class PrivateKeyStore extends PersistentStore<PrivateKeyInfo> {
PrivateKeyStore() : super('key');
void put(PrivateKeyInfo info) {
box.put(info.id, info);
}

View File

@@ -2,6 +2,8 @@ import '../../core/persistant_store.dart';
import '../model/server/server_private_info.dart';
class ServerStore extends PersistentStore<ServerPrivateInfo> {
ServerStore() : super('server');
void put(ServerPrivateInfo info) {
box.put(info.id, info);
}

View File

@@ -6,6 +6,8 @@ import '../model/app/net_view.dart';
import '../res/default.dart';
class SettingStore extends PersistentStore {
SettingStore() : super('setting');
/// Convert all settings into json
Map<String, dynamic> toJson() => {for (var e in box.keys) e: box.get(e)};

View File

@@ -2,6 +2,8 @@ import '../../core/persistant_store.dart';
import '../model/server/snippet.dart';
class SnippetStore extends PersistentStore<Snippet> {
SnippetStore() : super('snippet');
void put(Snippet snippet) {
box.put(snippet.name, snippet);
}