Commit 90bc35aa authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: mobile UX — hide Google login on native, fix guest register nav, bigger tab bar

- Hide Google sign-in button in native app (WebView blocks google.com domain)
- Guest "إنشاء حساب" toast now navigates to register screen
- Tab bar height increased 60→64px, items 11px font, 48px min touch target
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 8338a9e1
...@@ -217,16 +217,16 @@ html, body { ...@@ -217,16 +217,16 @@ html, body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 2px; gap: 3px;
padding: var(--s-2) var(--s-3); padding: var(--s-2) var(--s-3);
border-radius: var(--r-md); border-radius: var(--r-md);
color: var(--text-muted); color: var(--text-muted);
font-size: 10px; font-size: 11px;
font-weight: 600; font-weight: 600;
cursor: pointer; cursor: pointer;
transition: color var(--dur-fast), transform var(--dur-fast); transition: color var(--dur-fast), transform var(--dur-fast);
min-width: 44px; min-width: 48px;
min-height: 44px; min-height: 48px;
justify-content: center; justify-content: center;
} }
...@@ -445,3 +445,9 @@ body::before { ...@@ -445,3 +445,9 @@ body::before {
::-webkit-scrollbar { width: 4px; } ::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; } ::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; }
/* Native App Mode — Flutter renders the bottom nav */
.native-app .bottom-nav,
.native-app .tab-bar { display: none !important; }
.native-app #scene-container { bottom: 0 !important; }
.native-app body { padding-bottom: 0 !important; }
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
--shadow-glow: 0 0 20px rgba(228,172,56,0.3); --shadow-glow: 0 0 20px rgba(228,172,56,0.3);
--hud-height: 56px; --hud-height: 56px;
--tab-height: 60px; --tab-height: 64px;
--safe-top: env(safe-area-inset-top, 0px); --safe-top: env(safe-area-inset-top, 0px);
--safe-bottom: env(safe-area-inset-bottom, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
} }
...@@ -127,9 +127,8 @@ function showGuestToast() { ...@@ -127,9 +127,8 @@ function showGuestToast() {
<button class="btn btn-primary" style="font-size:13px;padding:6px 16px;min-height:32px;">${t('guest.create_account')}</button> <button class="btn btn-primary" style="font-size:13px;padding:6px 16px;min-height:32px;">${t('guest.create_account')}</button>
`; `;
toast.querySelector('button').addEventListener('click', () => { toast.querySelector('button').addEventListener('click', () => {
store.set('auth.isGuest', false); toast.remove();
store.set('auth.guestId', null); scene.push('auth-register');
bus.emit('auth:logout');
}); });
container.appendChild(toast); container.appendChild(toast);
setTimeout(() => toast.remove(), 4000); setTimeout(() => toast.remove(), 4000);
......
...@@ -84,7 +84,11 @@ export function mountLogin(el) { ...@@ -84,7 +84,11 @@ export function mountLogin(el) {
scene.replace('auth-register'); scene.replace('auth-register');
}); });
el.querySelector('#google-btn').addEventListener('click', () => { const googleBtn = el.querySelector('#google-btn');
if (window.IS_NATIVE_APP) {
googleBtn.style.display = 'none';
}
googleBtn.addEventListener('click', () => {
audio.play('click'); audio.play('click');
const redirect = encodeURIComponent(window.location.origin + '/'); const redirect = encodeURIComponent(window.location.origin + '/');
window.location.href = `${SUPABASE_URL}/auth/v1/authorize?provider=google&redirect_to=${redirect}`; window.location.href = `${SUPABASE_URL}/auth/v1/authorize?provider=google&redirect_to=${redirect}`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment