From 107361bb0f8966c44b5c8503aaa3ed0690610340 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 25 Oct 2026 12:33:33 +0100 Subject: [PATCH] feat(mobile): implement mobile bottom bar with centered quick-add FAB and mobile profile sheet --- frontend/src/App.tsx | 321 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 315 insertions(+), 6 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 5f09e67..5228159 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -12,6 +12,8 @@ import { RotateCcw, Palette, HelpCircle, + Plus, + X, } from 'lucide-react'; import { AuthStatus, DashboardStats, SharedList, Thought, User } from './lib/types'; import { @@ -118,6 +120,10 @@ export const App: React.FC = () => { const [showProfileMenu, setShowProfileMenu] = useState(false); const dropdownRef = useRef(null); + // Mobile Navigation & Quick-Action State + const [showMobileCapture, setShowMobileCapture] = useState(false); + const [showMobileProfile, setShowMobileProfile] = useState(false); + const handleOpenHelp = () => { triggerHaptic(10); setPreviousTab((prev) => (activeTab === 'help' ? prev : activeTab)); @@ -273,8 +279,12 @@ export const App: React.FC = () => { const handleTriggerAddButton = () => { triggerHaptic(20); - window.scrollTo({ top: 0, behavior: 'smooth' }); - setCaptureFocusCount((c) => c + 1); + if (window.innerWidth < 640) { + setShowMobileCapture(true); + } else { + window.scrollTo({ top: 0, behavior: 'smooth' }); + setCaptureFocusCount((c) => c + 1); + } }; const handleLogout = async () => { @@ -322,7 +332,26 @@ export const App: React.FC = () => {
{/* Top Header Bar */}
-
+ {/* Mobile Header: Centered Logo & Instance Title */} +
+
{ + triggerHaptic(10); + setActiveTab('triage'); + }} + className="flex items-center gap-2 cursor-pointer select-none" + > +
+ +
+ + {authStatus.instanceName || 'MindSift'} + +
+
+ + {/* Desktop Header: 3-column Layout (Logo, InstantCaptureBar, Profile Pill) */} +
{/* Logo & Headline */}
{ @@ -471,8 +500,8 @@ export const App: React.FC = () => {
- {/* Navigation tabs attached to header */} -
{/* Main Container */} -
+
setActiveTab('triage')}>
{activeTab === 'triage' && ( @@ -618,6 +647,286 @@ export const App: React.FC = () => {
+ + {/* MOBILE BOTTOM NAVIGATION BAR */} + + + {/* MOBILE QUICK-ADD BOTTOM SHEET / MODAL */} + {showMobileCapture && ( +
setShowMobileCapture(false)} + > +
e.stopPropagation()} + > + {/* Header */} +
+
+
+ +
+

Schnell erfassen

+
+ +
+ + {/* InstantCaptureBar */} +
+ { + handleCaptured(thought, target); + setShowMobileCapture(false); + }} + lists={lists} + autoFocusTrigger={Date.now()} + /> +
+
+
+ )} + + {/* MOBILE USER PROFILE SHEET */} + {showMobileProfile && ( +
setShowMobileProfile(false)} + > +
e.stopPropagation()} + > + {/* User Info Header */} +
+
+
+ {user.displayName ? user.displayName.slice(0, 1).toUpperCase() : 'U'} +
+
+

{user.displayName}

+

{user.email}

+ + {roleLabel} + +
+
+ +
+ + {/* Theme Quick Switcher */} +
+ + + Design-Theme + +
+ {AVAILABLE_THEMES.map((t) => ( + + ))} +
+
+ + {/* Menu Items */} +
+ + + + + {isStaff && ( + + )} +
+ + {/* Logout */} +
+ +
+
+
+ )}
); };