revert desktop login dialog

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow 2023-07-05 16:15:39 +08:00
parent bf4854a444
commit 4707e0ed2e

View File

@ -434,8 +434,17 @@ Future<bool?> loginDialog() async {
} }
break; break;
case HttpType.kAuthResTypeEmailCheck: case HttpType.kAuthResTypeEmailCheck:
close(true); if (isMobile) {
verificationCodeDialog(resp.user); close(true);
verificationCodeDialog(resp.user);
} else {
setState(() => isInProgress = false);
final res = await verificationCodeDialog(resp.user);
if (res == true) {
close(true);
return;
}
}
break; break;
default: default:
passwordMsg = "Failed, bad response from server"; passwordMsg = "Failed, bad response from server";
@ -508,7 +517,11 @@ Future<bool?> loginDialog() async {
size: 25, size: 25,
// No need to handle the branch of null. // No need to handle the branch of null.
// Because we can ensure the color is not null when debug. // Because we can ensure the color is not null when debug.
color: Theme.of(context).textTheme.titleLarge?.color?.withOpacity(0.55), color: Theme.of(context)
.textTheme
.titleLarge
?.color
?.withOpacity(0.55),
), ),
onTap: onDialogCancel, onTap: onDialogCancel,
hoverColor: Colors.red, hoverColor: Colors.red,