mirror of
https://github.com/root-fr/jmap-webmail.git
synced 2026-09-24 00:01:14 +00:00
Local-storage templates with dynamic {{variable}} placeholders that auto-fill
from composer context (recipient, sender, date/time). Includes template manager,
category filtering, quick picker in composer toolbar, and settings tab.
48 tests covering placeholder extraction, filling, and variable suggestions.
32 lines
573 B
TypeScript
32 lines
573 B
TypeScript
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];
|