opt.: snippet result

This commit is contained in:
lollipopkit
2023-10-18 19:14:06 +08:00
parent cf231f9fe6
commit cf4f74dcfc
9 changed files with 119 additions and 77 deletions

View File

@@ -45,12 +45,3 @@ class Snippet implements TagPickable {
@override
String get tagName => name;
}
/// Snippet for installing ServerBoxMonitor
const installSBM = Snippet(
name: 'Install ServerBoxMonitor',
script:
'curl -fsSL https://raw.githubusercontent.com/lollipopkit/server_box_monitor/main/install.sh | sh -s -- install',
tags: ['ServerBoxMonitor'],
note: 'One click script to install ServerBoxMonitor',
);

View File

@@ -26,20 +26,9 @@ class SnippetProvider extends ChangeNotifier {
Stores.setting.snippetOrder.put(order);
}
}
_addInternal();
_updateTags();
}
void _addInternal() {
if (!Stores.first.iSSBM.fetch() ||
_snippets.any((e) => e.name == installSBM.name)) {
return;
}
_snippets.add(installSBM);
Stores.snippet.put(installSBM);
Stores.first.iSSBM.put(false);
}
void _updateTags() {
_tags.clear();
final tags = <String>{};

View File

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

View File

@@ -4,9 +4,6 @@ import 'package:toolbox/core/persistant_store.dart';
class FirstStore extends PersistentStore<bool> {
FirstStore() : super('first');
/// Add Snippet `Install ServerBoxMonitor`
late final iSSBM = StoreProperty(box, 'installMonitorSnippet', true);
/// Show tip of suspend
late final showSuspendTip = StoreProperty(box, 'showSuspendTip', true);
}