mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.: server batch delete & fullscreen
This commit is contained in:
@@ -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', '');
|
||||
|
||||
@@ -151,7 +151,9 @@ class _SettingPageState extends State<SettingPage> {
|
||||
_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<SettingPage> {
|
||||
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<SettingPage> {
|
||||
}
|
||||
|
||||
Widget _buildServerFuncBtns() {
|
||||
return ExpandTile(
|
||||
title: Text(l10n.serverFuncBtns),
|
||||
subtitle: Text(
|
||||
'${l10n.location} / ${l10n.displayName}',
|
||||
style: UIs.textSize13Grey,
|
||||
),
|
||||
children: [
|
||||
ListTile(
|
||||
return ListTile(
|
||||
title: Text(l10n.location),
|
||||
subtitle:
|
||||
Text(l10n.moveOutServerFuncBtnsHelp, style: UIs.textSize13Grey),
|
||||
subtitle: Text(l10n.moveOutServerFuncBtnsHelp, style: UIs.textSize13Grey),
|
||||
trailing: StoreSwitch(prop: _setting.moveOutServerTabFuncBtns),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(l10n.displayName),
|
||||
trailing: StoreSwitch(prop: _setting.serverFuncBtnsDisplayName),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user