readd: double column on server page

This commit is contained in:
lollipopkit
2024-03-06 11:35:24 +08:00
parent 44a431c19f
commit 5baf683278
16 changed files with 49 additions and 17 deletions

View File

@@ -43,12 +43,6 @@ class SettingStore extends PersistentStore {
late final diskIgnorePath =
property('diskIgnorePath', Defaults.diskIgnorePath);
/// Use double column servers page on Desktop
late final doubleColumnServersPage = property(
'doubleColumnServersPage',
isDesktop,
);
/// Disk view: amount / IO
late final serverTabPreferDiskAmount = property(
'serverTabPreferDiskAmount',
@@ -245,6 +239,12 @@ class SettingStore extends PersistentStore {
/// Result: use x86pkg_temp's temperature as the temperature
late final preferTemperatureDevs =
listProperty('preferTemperatureDevs', <String>[]);
/// Use double column servers page on Desktop
late final doubleColumnServersPage = property(
'doubleColumnServersPage',
true,
);
// Never show these settings for users
//

View File

@@ -69,6 +69,7 @@
"dockerStatusRunningAndStoppedFmt": "{runningCount} aktiv, {stoppedCount} container gestoppt.",
"dockerStatusRunningFmt": "{count} Container aktiv",
"doubleColumnMode": "Doppelspaltiger Modus",
"doubleColumnTip": "Diese Option aktiviert nur die Funktion, ob sie tatsächlich aktiviert werden kann, hängt auch von der Breite des Geräts ab",
"download": "Download",
"edit": "Bearbeiten",
"editVirtKeys": "Virtuelle Tasten bearbeiten",

View File

@@ -69,6 +69,7 @@
"dockerStatusRunningAndStoppedFmt": "{runningCount} running, {stoppedCount} container stopped.",
"dockerStatusRunningFmt": "{count} container running.",
"doubleColumnMode": "Double column mode",
"doubleColumnTip": "This option only enables the feature, whether it can actually be enabled depends on the width of the device",
"download": "Download",
"edit": "Edit",
"editVirtKeys": "Edit virtual keys",

View File

@@ -69,6 +69,7 @@
"dockerStatusRunningAndStoppedFmt": "{runningCount} en cours d'exécution, {stoppedCount} conteneurs arrêtés.",
"dockerStatusRunningFmt": "{count} conteneurs en cours d'exécution.",
"doubleColumnMode": "Mode double colonne",
"doubleColumnTip": "Cette option ne fait que activer la fonction, sa réalisation dépend également de la largeur de l'appareil.",
"download": "Télécharger",
"edit": "Modifier",
"editVirtKeys": "Modifier les touches virtuelles",

View File

@@ -69,6 +69,7 @@
"dockerStatusRunningAndStoppedFmt": "{runningCount} running, {stoppedCount} container stopped.",
"dockerStatusRunningFmt": "{count} wadah berjalan.",
"doubleColumnMode": "Mode kolom ganda",
"doubleColumnTip": "Opsi ini hanya mengaktifkan fitur, apakah itu benar-benar dapat diaktifkan tergantung pada lebar perangkat",
"download": "Unduh",
"edit": "Edit",
"editVirtKeys": "Edit kunci virtual",

View File

@@ -69,6 +69,7 @@
"dockerStatusRunningAndStoppedFmt": "{runningCount}个正在运行, {stoppedCount}个已停止",
"dockerStatusRunningFmt": "{count}个容器正在运行",
"doubleColumnMode": "双列模式",
"doubleColumnTip": "此选项仅开启功能,实际是否能开启还取决于设备的宽度",
"download": "下载",
"edit": "编辑",
"editVirtKeys": "编辑虚拟按键",

View File

@@ -69,6 +69,7 @@
"dockerStatusRunningAndStoppedFmt": "{runningCount}個正在運行, {stoppedCount}個已停止",
"dockerStatusRunningFmt": "{count}個容器正在運行",
"doubleColumnMode": "雙列模式",
"doubleColumnTip": "此選項僅開啟功能,實際是否能開啟還取決於設備的寬度",
"download": "下載",
"edit": "編輯",
"editVirtKeys": "編輯虛擬按鍵",

View File

@@ -52,7 +52,8 @@ class _ServerPageState extends State<ServerPage>
void didChangeDependencies() {
super.didChangeDependencies();
_media = MediaQuery.of(context);
_useDoubleColumn = _media.useDoubleColumn;
_useDoubleColumn = _media.useDoubleColumn &&
Stores.setting.doubleColumnServersPage.fetch();
}
@override

View File

@@ -191,7 +191,7 @@ class _SettingPageState extends State<SettingPage> {
_buildDeleteServers(),
_buildTextScaler(),
_buildPreferTemperatureDeviceList(),
//if (isDesktop) _buildDoubleColumnServersPage(),
_buildDoubleColumnServersPage(),
].map((e) => CardX(child: e)).toList(),
);
}
@@ -1082,12 +1082,13 @@ class _SettingPageState extends State<SettingPage> {
);
}
// Widget _buildDoubleColumnServersPage() {
// return ListTile(
// title: Text(l10n.doubleColumnMode),
// trailing: StoreSwitch(prop: _setting.doubleColumnServersPage),
// );
// }
Widget _buildDoubleColumnServersPage() {
return ListTile(
title: Text(l10n.doubleColumnMode),
subtitle: Text(l10n.doubleColumnTip, style: UIs.textGrey),
trailing: StoreSwitch(prop: _setting.doubleColumnServersPage),
);
}
Widget _buildPlatformSetting() {
return ListTile(