Allow change settings in login page

Fix layout
This commit is contained in:
2024-05-30 09:29:14 +08:00
parent 69929d6990
commit fb21e0cd73
7 changed files with 46 additions and 30 deletions

View File

@@ -334,6 +334,8 @@ void clearAllStates(BuildContext context) {
void checkAuth(BuildContext context) {
if (!auth.isAuthed && !auth.checked && !auth.isChecking) {
final state = GoRouterState.of(context);
final router = GoRouter.of(context);
auth.checkAuth().then((re) {
if (!re) {
if (auth.status!.noUser &&
@@ -341,9 +343,8 @@ void checkAuth(BuildContext context) {
return;
}
final loc = auth.status!.noUser ? "/create_root_user" : "/login";
final path = GoRouterState.of(context).path;
if (path != loc) {
context.push(loc);
if (state.path != loc) {
router.push(loc);
}
}
}).catchError((err) {