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:
@@ -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];
|
||||
Reference in New Issue
Block a user