feat: add toolbar position setting and update email viewer layout

- Introduced a new setting for toolbar position in appearance settings, allowing users to choose between 'top' and 'below-subject'.
- Updated the EmailViewer component to conditionally render the toolbar based on the selected position.
- Enhanced the UI for the toolbar with action buttons for replying, archiving, and deleting emails.
- Added translations for the new toolbar position setting in multiple languages.
This commit is contained in:
Linus Rath
2026-03-11 22:42:21 +01:00
parent 288205fbac
commit cc8195209b
11 changed files with 524 additions and 309 deletions
+8
View File
@@ -26,6 +26,7 @@ export type DateFormat = 'regional' | 'iso' | 'custom';
export type TimeFormat = '12h' | '24h';
export type FirstDayOfWeek = 0 | 1; // 0 = Sunday, 1 = Monday
export type ExternalContentPolicy = 'ask' | 'block' | 'allow';
export type ToolbarPosition = 'top' | 'below-subject';
export interface KeywordDefinition {
id: string; // Used as JMAP keyword suffix: $label:<id>
@@ -91,6 +92,9 @@ interface SettingsState {
calendarNotificationsEnabled: boolean;
calendarNotificationSound: boolean;
// Layout
toolbarPosition: ToolbarPosition;
// Experimental
senderFavicons: boolean;
@@ -166,6 +170,9 @@ const DEFAULT_SETTINGS = {
calendarNotificationsEnabled: true,
calendarNotificationSound: true,
// Layout
toolbarPosition: 'top' as ToolbarPosition,
// Experimental
senderFavicons: true,
@@ -232,6 +239,7 @@ export const useSettingsStore = create<SettingsState>()(
sessionTimeout: state.sessionTimeout,
calendarNotificationsEnabled: state.calendarNotificationsEnabled,
calendarNotificationSound: state.calendarNotificationSound,
toolbarPosition: state.toolbarPosition,
senderFavicons: state.senderFavicons,
folderIcons: state.folderIcons,
emailKeywords: state.emailKeywords,