diff --git a/lib/data/store/setting.dart b/lib/data/store/setting.dart index 8d6b981e..d1950665 100644 --- a/lib/data/store/setting.dart +++ b/lib/data/store/setting.dart @@ -163,7 +163,7 @@ class SettingStore extends PersistentStore { /// Otherwise, display them on the top of server detail page late final moveOutServerTabFuncBtns = property( 'moveOutServerTabFuncBtns', - true, + false, ); /// Whether use `rm -r` to delete directory on SFTP @@ -199,10 +199,6 @@ class SettingStore extends PersistentStore { /// Show tip of suspend late final showSuspendTip = property('showSuspendTip', true); - /// Server func btns display name - late final serverFuncBtnsDisplayName = - property('serverFuncBtnsDisplayName', false); - /// Webdav sync late final webdavSync = property('webdavSync', false); late final webdavUrl = property('webdavUrl', ''); diff --git a/lib/view/page/setting/entry.dart b/lib/view/page/setting/entry.dart index 0cdc6ef8..df5a598a 100644 --- a/lib/view/page/setting/entry.dart +++ b/lib/view/page/setting/entry.dart @@ -151,7 +151,9 @@ class _SettingPageState extends State { _buildSFTP(), _buildTitle(l10n.editor), _buildEditor(), - if (isDesktop) _buildTitle(l10n.fullScreen), + /// Fullscreen Mode is designed for old mobile phone which can be + /// used as a status screen, so it's only available on mobile phone. + if (!isDesktop) _buildTitle(l10n.fullScreen), if (!isDesktop) _buildFullScreen(), const SizedBox(height: 37), ], @@ -901,7 +903,9 @@ class _SettingPageState extends State { title: Text(l10n.choose), child: SingleChildScrollView( child: StatefulBuilder(builder: (ctx, setState) { - final all = Stores.server.box.keys.map( + final keys = Stores.server.box.keys.toList(); + keys.removeWhere((element) => element == BoxX.lastModifiedKey); + final all = keys.map( (e) => TextButton( onPressed: () => context.showRoundDialog( title: Text(l10n.attention), @@ -978,24 +982,10 @@ class _SettingPageState extends State { } Widget _buildServerFuncBtns() { - return ExpandTile( - title: Text(l10n.serverFuncBtns), - subtitle: Text( - '${l10n.location} / ${l10n.displayName}', - style: UIs.textSize13Grey, - ), - children: [ - ListTile( - title: Text(l10n.location), - subtitle: - Text(l10n.moveOutServerFuncBtnsHelp, style: UIs.textSize13Grey), - trailing: StoreSwitch(prop: _setting.moveOutServerTabFuncBtns), - ), - ListTile( - title: Text(l10n.displayName), - trailing: StoreSwitch(prop: _setting.serverFuncBtnsDisplayName), - ), - ], + return ListTile( + title: Text(l10n.location), + subtitle: Text(l10n.moveOutServerFuncBtnsHelp, style: UIs.textSize13Grey), + trailing: StoreSwitch(prop: _setting.moveOutServerTabFuncBtns), ); } diff --git a/lib/view/widget/server_func_btns.dart b/lib/view/widget/server_func_btns.dart index 4ded59d0..98357eca 100644 --- a/lib/view/widget/server_func_btns.dart +++ b/lib/view/widget/server_func_btns.dart @@ -14,7 +14,6 @@ import 'package:toolbox/data/model/pkg/manager.dart'; import 'package:toolbox/data/model/server/dist.dart'; import 'package:toolbox/data/res/path.dart'; import 'package:toolbox/data/res/provider.dart'; -import 'package:toolbox/data/res/store.dart'; import '../../core/route.dart'; import '../../core/utils/server.dart'; @@ -100,16 +99,7 @@ class ServerFuncBtns extends StatelessWidget { onPressed: () => _onTapMoreBtns(e, spi, context), padding: EdgeInsets.zero, tooltip: e.name, - icon: Stores.setting.serverFuncBtnsDisplayName.fetch() - ? Column( - children: [ - Icon(e.icon, size: iconSize ?? 15), - Text(e.toStr, - style: const TextStyle( - fontSize: 7, color: Colors.grey)) - ], - ) - : Icon(e.icon, size: iconSize ?? 15), + icon: Icon(e.icon, size: iconSize ?? 15), ), ) .toList(),