mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix: disk parse
This commit is contained in:
@@ -67,6 +67,7 @@ extension DialogX on BuildContext {
|
||||
Future<String?> showPwdDialog({
|
||||
String? hostId,
|
||||
String? title,
|
||||
String? label,
|
||||
}) async {
|
||||
if (!mounted) return null;
|
||||
return await showRoundDialog<String>(
|
||||
@@ -82,7 +83,7 @@ extension DialogX on BuildContext {
|
||||
_recoredPwd[hostId] = val;
|
||||
}
|
||||
},
|
||||
label: l10n.pwd,
|
||||
label: label ?? l10n.pwd,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:toolbox/core/extension/context/dialog.dart';
|
||||
import 'package:toolbox/core/extension/context/locale.dart';
|
||||
import 'package:toolbox/data/model/server/server_private_info.dart';
|
||||
import 'package:toolbox/data/res/provider.dart';
|
||||
|
||||
@@ -11,7 +12,10 @@ abstract final class KeybordInteractive {
|
||||
BuildContext? ctx,
|
||||
}) async {
|
||||
try {
|
||||
final res = await (ctx ?? Pros.app.ctx)?.showPwdDialog(title: spi.id);
|
||||
final res = await (ctx ?? Pros.app.ctx)?.showPwdDialog(
|
||||
title: '2FA ${l10n.pwd}',
|
||||
label: spi.id,
|
||||
);
|
||||
return res == null ? null : [res];
|
||||
} catch (e) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user