mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
@@ -315,7 +315,7 @@ class SDe extends S {
|
|||||||
String get noSavedPrivateKey => 'Keine gespeicherten Private Keys';
|
String get noSavedPrivateKey => 'Keine gespeicherten Private Keys';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get noSavedSnippet => 'Keine gespeicherten snippets.';
|
String get noSavedSnippet => 'Keine gespeicherten Snippets.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get noServerAvailable => 'Kein Server verfügbar.';
|
String get noServerAvailable => 'Kein Server verfügbar.';
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
"noInterface": "Kein Interface",
|
"noInterface": "Kein Interface",
|
||||||
"noResult": "Kein Ergebnis",
|
"noResult": "Kein Ergebnis",
|
||||||
"noSavedPrivateKey": "Keine gespeicherten Private Keys",
|
"noSavedPrivateKey": "Keine gespeicherten Private Keys",
|
||||||
"noSavedSnippet": "Keine gespeicherten snippets.",
|
"noSavedSnippet": "Keine gespeicherten Snippets.",
|
||||||
"noServerAvailable": "Kein Server verfügbar.",
|
"noServerAvailable": "Kein Server verfügbar.",
|
||||||
"noUpdateAvailable": "Kein Update verfügbar",
|
"noUpdateAvailable": "Kein Update verfügbar",
|
||||||
"notSelected": "Nicht ausgewählt",
|
"notSelected": "Nicht ausgewählt",
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ class SettingPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _SettingPageState extends State<SettingPage> {
|
class _SettingPageState extends State<SettingPage> {
|
||||||
|
final themeKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
|
final startPageKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
|
final updateIntervalKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
|
final termThemeKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
|
final maxRetryKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
|
|
||||||
late final SettingStore _setting;
|
late final SettingStore _setting;
|
||||||
late final ServerProvider _serverProvider;
|
late final ServerProvider _serverProvider;
|
||||||
late MediaQueryData _media;
|
late MediaQueryData _media;
|
||||||
@@ -148,7 +154,6 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
_s.onServerDetailPage,
|
_s.onServerDetailPage,
|
||||||
style: grey,
|
style: grey,
|
||||||
),
|
),
|
||||||
contentPadding: const EdgeInsets.only(left: 17, right: 11),
|
|
||||||
trailing: buildSwitch(context, _setting.showDistLogo),
|
trailing: buildSwitch(context, _setting.showDistLogo),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -186,6 +191,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
),
|
),
|
||||||
growable: false,
|
growable: false,
|
||||||
).toList();
|
).toList();
|
||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
_s.updateServerStatusInterval,
|
_s.updateServerStatusInterval,
|
||||||
@@ -194,10 +200,14 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
_s.willTakEeffectImmediately,
|
_s.willTakEeffectImmediately,
|
||||||
style: grey,
|
style: grey,
|
||||||
),
|
),
|
||||||
trailing: PopupMenu<int>(
|
onTap: () {
|
||||||
items: items,
|
updateIntervalKey.currentState?.showButtonMenu();
|
||||||
|
},
|
||||||
|
trailing: PopupMenuButton(
|
||||||
|
key: updateIntervalKey,
|
||||||
|
itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _updateInterval,
|
initialValue: _updateInterval,
|
||||||
onSelected: (val) {
|
onSelected: (int val) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_updateInterval = val;
|
_updateInterval = val;
|
||||||
});
|
});
|
||||||
@@ -261,14 +271,19 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
_s.launchPage,
|
_s.launchPage,
|
||||||
),
|
),
|
||||||
trailing: PopupMenu<int>(
|
onTap: () {
|
||||||
items: items,
|
startPageKey.currentState?.showButtonMenu();
|
||||||
|
},
|
||||||
|
trailing: PopupMenuButton(
|
||||||
|
key: startPageKey,
|
||||||
|
itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _launchPageIdx,
|
initialValue: _launchPageIdx,
|
||||||
onSelected: (idx) {
|
onSelected: (int idx) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_launchPageIdx = idx;
|
_launchPageIdx = idx;
|
||||||
});
|
});
|
||||||
@@ -298,10 +313,14 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
title: Text(
|
title: Text(
|
||||||
_s.termTheme,
|
_s.termTheme,
|
||||||
),
|
),
|
||||||
trailing: PopupMenu<int>(
|
onTap: () {
|
||||||
items: items,
|
termThemeKey.currentState?.showButtonMenu();
|
||||||
|
},
|
||||||
|
trailing: PopupMenuButton(
|
||||||
|
key: termThemeKey,
|
||||||
|
itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _termThemeIdx,
|
initialValue: _termThemeIdx,
|
||||||
onSelected: (idx) {
|
onSelected: (int idx) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_termThemeIdx = idx;
|
_termThemeIdx = idx;
|
||||||
});
|
});
|
||||||
@@ -325,15 +344,21 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
).toList();
|
).toList();
|
||||||
final help =
|
final help =
|
||||||
_maxRetryCount == 0 ? _s.maxRetryCountEqual0 : _s.canPullRefresh;
|
_maxRetryCount == 0 ? _s.maxRetryCountEqual0 : _s.canPullRefresh;
|
||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
_s.maxRetryCount,
|
_s.maxRetryCount,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
),
|
),
|
||||||
trailing: PopupMenu<int>(
|
subtitle: Text(help, style: grey),
|
||||||
items: items,
|
onTap: () {
|
||||||
|
maxRetryKey.currentState?.showButtonMenu();
|
||||||
|
},
|
||||||
|
trailing: PopupMenuButton(
|
||||||
|
key: maxRetryKey,
|
||||||
|
itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _maxRetryCount,
|
initialValue: _maxRetryCount,
|
||||||
onSelected: (val) {
|
onSelected: (int val) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_maxRetryCount = val;
|
_maxRetryCount = val;
|
||||||
});
|
});
|
||||||
@@ -343,7 +368,6 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
'${_maxRetryCount.toInt()} ${_s.times}',
|
'${_maxRetryCount.toInt()} ${_s.times}',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
subtitle: Text(help, style: grey),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,15 +381,22 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
).toList();
|
).toList();
|
||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
_s.themeMode,
|
_s.themeMode,
|
||||||
),
|
),
|
||||||
trailing: PopupMenu<int>(
|
onTap: () {
|
||||||
items: items,
|
themeKey.currentState?.showButtonMenu();
|
||||||
|
},
|
||||||
|
trailing: PopupMenuButton(
|
||||||
|
key: themeKey,
|
||||||
|
itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _nightMode,
|
initialValue: _nightMode,
|
||||||
onSelected: (idx) {
|
onSelected: (int idx) {
|
||||||
|
setState(() {
|
||||||
_nightMode = idx;
|
_nightMode = idx;
|
||||||
|
});
|
||||||
_setting.themeMode.put(_nightMode);
|
_setting.themeMode.put(_nightMode);
|
||||||
},
|
},
|
||||||
child: Text(_buildThemeModeStr(_nightMode)),
|
child: Text(_buildThemeModeStr(_nightMode)),
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
|||||||
node: _scriptNode,
|
node: _scriptNode,
|
||||||
minLines: 3,
|
minLines: 3,
|
||||||
maxLines: 10,
|
maxLines: 10,
|
||||||
type: TextInputType.text,
|
type: TextInputType.multiline,
|
||||||
label: _s.snippet,
|
label: _s.snippet,
|
||||||
icon: Icons.code,
|
icon: Icons.code,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user