fix: bakPath & lib l10n

This commit is contained in:
lollipopkit
2024-05-24 16:29:05 +08:00
parent 5bcb950275
commit 3524b059c6
8 changed files with 41 additions and 36 deletions

View File

@@ -77,11 +77,9 @@ class MyApp extends StatelessWidget {
Widget _buildAppContent(BuildContext ctx) {
//if (Pros.app.isWearOS) return const WearHome();
ctx.setLibL10n();
return const HomePage();
}
// bool _isSmallDevice(BuildContext ctx) =>
// MediaQuery.of(ctx).size.shortestSide < 600;
}
void _setup(BuildContext context) async {

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 910;
static const int build = 911;
static const String engine = "3.22.0";
static const String buildAt = "2024-05-23 19:27:43";
static const String buildAt = "2024-05-23 20:06:43";
static const int modifications = 2;
static const int script = 48;
}

View File

@@ -64,7 +64,7 @@ void _runInZone(void Function() body) {
Future<void> _initApp() async {
WidgetsFlutterBinding.ensureInitialized();
await Paths.init(BuildData.name);
await Paths.init(BuildData.name, bakName: 'srvbox');
await _initData();
_setupDebug();

View File

@@ -159,14 +159,19 @@ class _SnippetEditPageState extends State<SnippetEditPage>
child: ValBuilder(
listenable: _autoRunOn,
builder: (vals) {
final subtitle = vals.isEmpty
? null
: vals
.map((e) => Pros.server.pick(id: e)?.spi.name ?? e)
.join(', ');
return ListTile(
leading: const Icon(Icons.settings_remote, size: 19),
title: Text(l10n.autoRun),
trailing: const Icon(Icons.keyboard_arrow_right),
subtitle: vals.isEmpty
subtitle: subtitle == null
? null
: Text(
vals.join(', '),
subtitle,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
@@ -175,7 +180,9 @@ class _SnippetEditPageState extends State<SnippetEditPage>
final serverIds = await context.showPickDialog(
title: l10n.autoRun,
items: Pros.server.serverOrder,
name: (e) => Pros.server.pick(id: e)?.spi.name ?? e,
initial: vals,
clearable: true,
);
if (serverIds != null) {
_autoRunOn.value = serverIds;