fix: watchOS app cfg (#890)

This commit is contained in:
lollipopkit🏳️‍⚧️
2025-09-03 01:41:08 +08:00
committed by GitHub
parent e51804fa70
commit ec4b633889
3 changed files with 20 additions and 24 deletions

View File

@@ -121,7 +121,7 @@ final class _IntroPage extends StatelessWidget {
IntroPage.title(text: l10n.backupPassword, big: true),
SizedBox(height: padTop * 0.5),
Text(
'${l10n.backupTip}\n\n${l10n.backupPasswordTip}',
l10n.backupTip,
style: const TextStyle(fontSize: 16),
textAlign: TextAlign.center,
),
@@ -148,10 +148,7 @@ final class _IntroPage extends StatelessWidget {
),
],
),
actions: [
TextButton(onPressed: () => ctx.pop(false), child: Text(libL10n.cancel)),
TextButton(onPressed: () => ctx.pop(true), child: Text(libL10n.ok)),
],
actions: Btnx.cancelOk,
);
if (result == true) {
final pwd = controller.text.trim();

View File

@@ -108,14 +108,13 @@ class _IosSettingsPageState extends State<IosSettingsPage> {
}
void _onTapWatchApp(Map<String, dynamic> map) async {
final urls = Map<String, String>.from(map['urls'] as Map? ?? {});
final result = await KvEditor.route.go(context, KvEditorArgs(data: urls));
final cfgs = List<String>.from(map['urls'] as List? ?? []);
final result = await JsonListEditor.route.go(context, JsonListEditorArgs(data: cfgs));
if (result == null) return;
final (_, err) = await context.showLoadingDialog(
fn: () async {
final data = {'urls': result};
// Try realtime update (app must be running foreground).
try {
if (await wc.isReachable) {