This commit is contained in:
seb
2026-10-04 21:04:40 +02:00
parent 669954b496
commit f765b87336
59 changed files with 1491 additions and 2045 deletions

View File

@@ -6,8 +6,7 @@ import Typography from '@mui/material/Typography';
import GoogleIcon from '@mui/icons-material/Google';
import { enqueueSnackbar } from 'notistack';
import { notifyErrorMessage } from '../utils/notify';
import authAutomat from '../automats/authAutomat';
import { StorageManagerContext } from '../api/storageManagerContext';
import authAutomat, { bootstrapAuthMe } from '../automats/authAutomat';
import {
abortGoogleSignIn,
FEDCM_BLOCKED_MESSAGE,
@@ -20,8 +19,6 @@ import {
import quixposLogo from '../assets/quixpos-logo.png';
class LoginPage extends PureComponent {
static contextType = StorageManagerContext;
constructor(props) {
super(props);
this.state = { ...authAutomat.state, busy: false };
@@ -50,7 +47,7 @@ class LoginPage extends PureComponent {
});
this.setState({ busy: true });
await authAutomat.actions.loginWithGoogle(idToken);
await this.context.updateAuthMe();
await bootstrapAuthMe();
} catch (err) {
if (err instanceof GoogleSignInCancelledError) return;
logError('[login] Google sign-in failed', {