feat: add mobile bottom action bar with reply and email navigation

- Move Reply, Reply All, Forward from toolbar to fixed bottom bar on mobile
- Add Next/Previous email navigation buttons to the bottom bar
- Style bottom bar to match existing NavigationRail horizontal pattern
- Add onNavigateNext/onNavigatePrev props to EmailViewer
- Wire up email list index-based navigation in page.tsx
- Add padding to email content area to prevent bottom bar overlap
This commit is contained in:
Linus Rath
2026-03-15 02:23:09 +01:00
parent 05f02402e3
commit cb74e3bf73
3 changed files with 323 additions and 56 deletions
+13
View File
@@ -808,6 +808,17 @@ export default function Home() {
setActiveView("list");
};
// Navigate to next/previous email in the list
const selectedEmailIndex = selectedEmail ? emails.findIndex(e => e.id === selectedEmail.id) : -1;
const handleNavigateNext = selectedEmailIndex >= 0 && selectedEmailIndex < emails.length - 1
? () => handleEmailSelect(emails[selectedEmailIndex + 1])
: undefined;
const handleNavigatePrev = selectedEmailIndex > 0
? () => handleEmailSelect(emails[selectedEmailIndex - 1])
: undefined;
// Handle opening conversation view on mobile
const handleOpenConversation = async (thread: ThreadGroup) => {
if (!client) return;
@@ -1403,6 +1414,8 @@ export default function Home() {
setTabletListVisible(true);
selectEmail(null);
}}
onNavigateNext={handleNavigateNext}
onNavigatePrev={handleNavigatePrev}
onShowShortcuts={() => setShowShortcutsModal(true)}
currentUserEmail={client?.["username"]}
currentUserName={client?.["username"]?.split("@")[0]}