From 14787cbd744bfefa9915f6f4535b85021025e3f5 Mon Sep 17 00:00:00 2001 From: sebseb7 Date: Wed, 30 Jul 2025 16:02:11 +0200 Subject: [PATCH] feat: add WebSocket URL for client and update GoogleLoginButton text to 'Loading...' for better user feedback --- src/components/GoogleLoginButton.js | 2 +- src/components/LoginComponent.js | 14 +++++++------- webpack.config.js | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/GoogleLoginButton.js b/src/components/GoogleLoginButton.js index 19ced05..5dd38de 100644 --- a/src/components/GoogleLoginButton.js +++ b/src/components/GoogleLoginButton.js @@ -187,7 +187,7 @@ class GoogleLoginButton extends Component { }; render() { - const { disabled, style, className, text = (this.props.t ? this.props.t('auth.loginWithGoogle') : 'Mit Google anmelden') } = this.props; + const { disabled, style, className, text = 'Loading...'} = this.props; const { isInitializing, isPrompting } = this.state; const isLoading = isInitializing || isPrompting || (this.context && !this.context.isLoaded); diff --git a/src/components/LoginComponent.js b/src/components/LoginComponent.js index 5af1196..c2c32a7 100644 --- a/src/components/LoginComponent.js +++ b/src/components/LoginComponent.js @@ -23,6 +23,7 @@ import CartSyncDialog from './CartSyncDialog.js'; import { localAndArchiveServer, mergeCarts } from '../utils/cartUtils.js'; import config from '../config.js'; import { withI18n } from '../i18n/withTranslation.js'; +import GoogleIcon from '@mui/icons-material/Google'; // Lazy load GoogleAuthProvider const GoogleAuthProvider = lazy(() => import('../providers/GoogleAuthProvider.js')); @@ -614,27 +615,26 @@ export class LoginComponent extends Component { )} {showGoogleAuth && ( -
} - sx={{ width: '100%', backgroundColor: '#4285F4', color: 'white' }} + startIcon={} + disabled + fullWidth + style={{backgroundColor: '#4285F4', color: 'white' }} > - Mit Google anmelden + Loading... }> -
)} diff --git a/webpack.config.js b/webpack.config.js index 576b5ce..452b35f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -679,6 +679,7 @@ export default { }, client: { logging: 'verbose', + webSocketURL: 'wss://dev.seedheads.de/ws', overlay: { errors: true, warnings: true, // Disable warnings overlay to reduce noise