feat: add email templates with placeholder variables and composer integration

- Reusable email templates with local storage persistence
- Dynamic placeholder variables ({{recipientName}}, {{date}}, etc.) with auto-fill
- Template manager modal with category filtering and search
- Template picker integrated in composer toolbar (Ctrl+Shift+T)
- Settings tab for template management
- 48 unit tests for template utilities
- i18n support for all 8 languages
This commit is contained in:
Matthieu MALVACHE
2026-02-17 01:35:26 +01:00
committed by Matthieu MALVACHE
parent b65b2f26df
commit 2636a88820
23 changed files with 2422 additions and 36 deletions
+31
View File
@@ -0,0 +1,31 @@
export interface EmailTemplate {
id: string;
name: string;
subject: string;
body: string;
category: string;
defaultRecipients?: {
to?: string[];
cc?: string[];
bcc?: string[];
};
identityId?: string;
isFavorite: boolean;
createdAt: string;
updatedAt: string;
}
export interface PlaceholderVariable {
name: string;
value: string;
}
export const BUILT_IN_PLACEHOLDERS = [
'recipient_name',
'company',
'date',
'day_of_week',
'sender_name',
] as const;
export type BuiltInPlaceholder = (typeof BUILT_IN_PLACEHOLDERS)[number];