mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 15:54:35 +01:00
new: ExpandTile & fix: macos Podfile
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:toolbox/core/route.dart';
|
||||
import 'package:toolbox/data/model/docker/image.dart';
|
||||
import 'package:toolbox/data/res/provider.dart';
|
||||
import 'package:toolbox/data/res/store.dart';
|
||||
import 'package:toolbox/view/widget/expand_tile.dart';
|
||||
import 'package:toolbox/view/widget/input_field.dart';
|
||||
|
||||
import '../../data/model/docker/ps.dart';
|
||||
@@ -220,17 +221,14 @@ class _DockerManagePageState extends State<DockerManagePage> {
|
||||
}
|
||||
|
||||
Widget _buildImage() {
|
||||
final items = <Widget>[
|
||||
ListTile(
|
||||
title: Text(l10n.imagesList),
|
||||
subtitle: Text(
|
||||
l10n.dockerImagesFmt(Pros.docker.images!.length),
|
||||
style: UIs.textGrey,
|
||||
),
|
||||
return ExpandTile(
|
||||
title: Text(l10n.imagesList),
|
||||
subtitle: Text(
|
||||
l10n.dockerImagesFmt(Pros.docker.images!.length),
|
||||
style: UIs.textGrey,
|
||||
),
|
||||
];
|
||||
items.addAll(Pros.docker.images!.map(_buildImageItem));
|
||||
return Column(children: items);
|
||||
children: Pros.docker.images?.map(_buildImageItem).toList() ?? [],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildImageItem(DockerImage e) {
|
||||
|
||||
@@ -15,6 +15,7 @@ import 'package:toolbox/core/utils/platform/base.dart';
|
||||
import 'package:toolbox/core/utils/rebuild.dart';
|
||||
import 'package:toolbox/data/res/provider.dart';
|
||||
import 'package:toolbox/data/res/store.dart';
|
||||
import 'package:toolbox/view/widget/expand_tile.dart';
|
||||
|
||||
import '../../../core/persistant_store.dart';
|
||||
import '../../../core/route.dart';
|
||||
@@ -916,29 +917,24 @@ class _SettingPageState extends State<SettingPage> {
|
||||
}
|
||||
|
||||
Widget _buildServerOrder() {
|
||||
return ListTile(
|
||||
return ExpandTile(
|
||||
title: Text(l10n.serverOrder),
|
||||
subtitle: Text('${l10n.serverOrder} / ${l10n.serverDetailOrder}',
|
||||
style: UIs.textGrey),
|
||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||
onTap: () => context.showRoundDialog(
|
||||
title: Text(l10n.choose),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text(l10n.serverOrder),
|
||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||
onTap: () => AppRoute.serverOrder().go(context),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(l10n.serverDetailOrder),
|
||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||
onTap: () => AppRoute.serverDetailOrder().go(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
subtitle: Text(
|
||||
'${l10n.serverOrder} / ${l10n.serverDetailOrder}',
|
||||
style: UIs.textGrey,
|
||||
),
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text(l10n.serverOrder),
|
||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||
onTap: () => AppRoute.serverOrder().go(context),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(l10n.serverDetailOrder),
|
||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||
onTap: () => AppRoute.serverDetailOrder().go(context),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,6 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
|
||||
future: getToken(),
|
||||
loading: Text(l10n.gettingToken),
|
||||
error: (error, trace) => Text('${l10n.error}: $error'),
|
||||
noData: Text(l10n.nullToken),
|
||||
success: (text) {
|
||||
_pushToken.value = text;
|
||||
return Text(
|
||||
@@ -120,7 +119,6 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
|
||||
onTap: () async => _onTapWatchApp(ctx),
|
||||
);
|
||||
},
|
||||
noData: UIs.placeholder,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,13 @@ class PlatformPublicSettings {
|
||||
success: (can) {
|
||||
return ListTile(
|
||||
title: Text(l10n.bioAuth),
|
||||
subtitle:
|
||||
can ? null : const Text('Not available', style: UIs.textGrey),
|
||||
trailing: can
|
||||
subtitle: can == true
|
||||
? null
|
||||
: const Text(
|
||||
'Not available',
|
||||
style: UIs.textGrey,
|
||||
),
|
||||
trailing: can == true
|
||||
? StoreSwitch(
|
||||
prop: Stores.setting.useBioAuth,
|
||||
func: (val) async {
|
||||
@@ -42,7 +46,6 @@ class PlatformPublicSettings {
|
||||
: null,
|
||||
);
|
||||
},
|
||||
noData: UIs.placeholder,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
||||
if (!Stores.setting.recordHistory.fetch()) {
|
||||
return [];
|
||||
}
|
||||
return Stores.history.sftpPath.all.where(
|
||||
return Stores.history.sftpGoPath.all.where(
|
||||
(element) => element.contains(val.text),
|
||||
);
|
||||
},
|
||||
@@ -232,7 +232,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
||||
_status.path?.update(p);
|
||||
final suc = await _listDir();
|
||||
if (suc && Stores.setting.recordHistory.fetch()) {
|
||||
Stores.history.sftpPath.add(p);
|
||||
Stores.history.sftpGoPath.add(p);
|
||||
}
|
||||
},
|
||||
icon: const Icon(Icons.gps_fixed),
|
||||
|
||||
Reference in New Issue
Block a user