mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
opt.: snippet result
This commit is contained in:
@@ -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',
|
||||
);
|
||||
|
||||
@@ -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>{};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user