mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-10 10:15:34 +01:00
fix: tag changed without saving
This commit is contained in:
@@ -14,6 +14,19 @@ class PrivateKeyInfo {
|
||||
required this.key,
|
||||
});
|
||||
|
||||
String? get type {
|
||||
final lines = key.split('\n');
|
||||
if (lines.length < 2) {
|
||||
return null;
|
||||
}
|
||||
final firstLine = lines[0];
|
||||
final splited = firstLine.split(RegExp(r'\s+'));
|
||||
if (splited.length < 2) {
|
||||
return null;
|
||||
}
|
||||
return splited[1];
|
||||
}
|
||||
|
||||
PrivateKeyInfo.fromJson(Map<String, dynamic> json)
|
||||
: id = json["id"].toString(),
|
||||
key = json["private_key"].toString();
|
||||
|
||||
@@ -6,10 +6,13 @@ import '../model/app/net_view.dart';
|
||||
import '../res/default.dart';
|
||||
|
||||
class SettingStore extends PersistentStore {
|
||||
/// Convert all settings into json
|
||||
Map<String, dynamic> toJson() => {for (var e in box.keys) e: box.get(e)};
|
||||
|
||||
// ------BEGIN------
|
||||
// These settings are not displayed in the settings page
|
||||
// You can edit them in the settings json editor (by long press the settings
|
||||
// item in the drawer of the server tab page)
|
||||
// item in the drawer of the home page)
|
||||
|
||||
/// Discussion #146
|
||||
late final serverTabUseOldUI = StoreProperty(
|
||||
@@ -31,10 +34,16 @@ class SettingStore extends PersistentStore {
|
||||
'recordHistory',
|
||||
true,
|
||||
);
|
||||
// ------END------
|
||||
|
||||
/// Convert all settings into json
|
||||
Map<String, dynamic> toJson() => {for (var e in box.keys) e: box.get(e)};
|
||||
/// Bigger for bigger font size
|
||||
/// 1.0 means 100%
|
||||
/// Warning: This may cause some UI issues
|
||||
late final textFactor = StoreProperty(
|
||||
box,
|
||||
'textFactor',
|
||||
1.0,
|
||||
);
|
||||
// ------END------
|
||||
|
||||
late final primaryColor = StoreProperty(
|
||||
box,
|
||||
|
||||
Reference in New Issue
Block a user