#146 new: option of server tab old ui

This commit is contained in:
lollipopkit
2023-08-30 15:41:41 +08:00
parent f7278fc890
commit 8004c41094
5 changed files with 198 additions and 128 deletions

View File

@@ -238,7 +238,9 @@ class _ServerPageState extends State<ServerPage>
),
),
height13,
if (_settingStore.moveOutServerTabFuncBtns.fetch())
if (_settingStore.moveOutServerTabFuncBtns.fetch() &&
// Discussion #146
!_settingStore.serverTabUseOldUI.fetch())
SizedBox(
height: 27,
child: ServerFuncBtns(spi: spi, s: _s),
@@ -283,7 +285,13 @@ class _ServerPageState extends State<ServerPage>
)
],
),
_buildTopRightText(ss, cs),
Row(
children: [
_buildTopRightText(ss, cs),
if (_settingStore.serverTabUseOldUI.fetch())
ServerFuncBtnsTopRight(spi: spi, s: _s)
],
)
],
),
);
@@ -446,7 +454,9 @@ class _ServerPageState extends State<ServerPage>
if (cs != ServerState.finished) {
return 23.0;
}
if (_settingStore.moveOutServerTabFuncBtns.fetch()) {
if (_settingStore.moveOutServerTabFuncBtns.fetch() &&
// Discussion #146
!_settingStore.serverTabUseOldUI.fetch()) {
return 132;
}
return 107;

View File

@@ -345,11 +345,12 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
onTap: () => _download(context, file),
),
// Only show decompress option when the file is a compressed file
if (_canDecompress(file.filename)) ListTile(
leading: const Icon(Icons.folder_zip),
title: Text(_s.decompress),
onTap: () => _decompress(context, file),
),
if (_canDecompress(file.filename))
ListTile(
leading: const Icon(Icons.folder_zip),
title: Text(_s.decompress),
onTap: () => _decompress(context, file),
),
]);
}
showRoundDialog(