update auto login

This commit is contained in:
xkeyC 2023-10-29 11:04:22 +08:00
parent ef6abbb525
commit 3a63f1acfa
2 changed files with 3 additions and 4 deletions

View File

@ -105,7 +105,7 @@ Widget _defaultWebviewTitleBar(BuildContext context) {
) )
: const SizedBox(width: 24), : const SizedBox(width: 24),
const SizedBox(width: 12), const SizedBox(width: 12),
SelectableText("${state.url}"), SelectableText(state.url ?? ""),
const Spacer() const Spacer()
], ],
)); ));

View File

@ -55,9 +55,6 @@ class WebViewModel {
userDataFolderWindows: userDataFolderWindows:
"${AppConf.applicationSupportDir}/webview_data", "${AppConf.applicationSupportDir}/webview_data",
title: title)); title: title));
if (loginMode) {
await webview.setWebviewWindowVisibility(false);
}
// webview.openDevToolsWindow(); // webview.openDevToolsWindow();
webview.isNavigating.addListener(() async { webview.isNavigating.addListener(() async {
if (!webview.isNavigating.value && localizationResource.isNotEmpty) { if (!webview.isNavigating.value && localizationResource.isNotEmpty) {
@ -157,6 +154,8 @@ class WebViewModel {
webview.close(); webview.close();
} }
}); });
Future.delayed(const Duration(seconds: 1))
.then((value) => {webview.setWebviewWindowVisibility(false)});
} }
} catch (e) { } catch (e) {
showToast(context, "初始化失败:$e"); showToast(context, "初始化失败:$e");