feat: add keyboard shortcuts button and show/hide toolbar labels option

- Implemented a keyboard shortcuts button in the navigation rail.
- Added a setting to toggle the visibility of toolbar labels in appearance settings.
- Updated the email context menu to streamline actions for archiving, deleting, and marking emails as read/unread.
- Enhanced the email viewer with improved spam handling and read state toggling.
- Updated localization files to include new strings for keyboard shortcuts and toolbar labels.
This commit is contained in:
Linus Rath
2026-03-16 16:19:51 +01:00
parent f2f3e1d85c
commit 3cd123778e
7 changed files with 329 additions and 205 deletions
+13 -1
View File
@@ -2,7 +2,7 @@
import { useState, useRef, useEffect, useCallback } from "react";
import { createPortal } from "react-dom";
import { Mail, Calendar, BookUser, HardDrive, Settings, LogOut } from "lucide-react";
import { Mail, Calendar, BookUser, HardDrive, Settings, LogOut, Keyboard } from "lucide-react";
import { usePathname, Link } from "@/i18n/navigation";
import { useTranslations } from "next-intl";
import { useCalendarStore } from "@/stores/calendar-store";
@@ -26,6 +26,7 @@ interface NavigationRailProps {
quota?: { used: number; total: number } | null;
isPushConnected?: boolean;
onLogout?: () => void;
onShowShortcuts?: () => void;
}
function StorageQuotaCircle({ quota, usagePercent }: { quota: { used: number; total: number }; usagePercent: number }) {
@@ -136,6 +137,7 @@ export function NavigationRail({
quota,
isPushConnected,
onLogout,
onShowShortcuts,
}: NavigationRailProps) {
const t = useTranslations("sidebar");
const pathname = usePathname();
@@ -263,6 +265,16 @@ export function NavigationRail({
<StorageQuotaCircle quota={quota} usagePercent={quotaUsagePercent} />
)}
{onShowShortcuts && (
<button
onClick={onShowShortcuts}
className="flex items-center justify-center w-10 h-10 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors"
title={t("keyboard_shortcuts")}
>
<Keyboard className="w-[18px] h-[18px]" />
</button>
)}
{isPushConnected != null && (
<span
className="relative group"