fix(admin): rework email template editor (#667043)

Companion to the bot-side fix: defaults now arrive with {placeholders}
instead of baked-in sample values (example.com links).

- inline preview tab (iframe srcDoc) — works on mobile and in Telegram;
  the separate desktop-only preview page and its route are removed
- preview/test render the CURRENT editor content with sample values
- test email: recipient input + detailed backend error messages
- variable chips insert at cursor instead of copying to clipboard
- 'insert default template' button to migrate broken saved overrides
- fa added to language tabs
This commit is contained in:
c0mrade
2026-06-10 22:53:08 +03:00
parent d7f7bc7c17
commit ac75a806d9
8 changed files with 251 additions and 289 deletions

View File

@@ -1541,9 +1541,13 @@
"resetted": "Template reset to default",
"testSent": "Test email sent",
"variables": "Available Variables",
"clickToCopy": "Click to copy",
"previewDesktopOnly": "Preview is only available in the desktop web version",
"previewNotAvailable": "Preview not available"
"editorTab": "Editor",
"previewHint": "The preview shows the email with sample values in place of variables.",
"clickToInsert": "Click to insert into the text",
"insertDefault": "Insert default template",
"insertDefaultConfirm": "Replace the current content with the default template?",
"testRecipientPlaceholder": "Recipient email (defaults to yours)",
"testHint": "Sends the current editor content with sample values in place of variables."
},
"payments": {
"title": "Payments",

View File

@@ -1414,9 +1414,13 @@
"resetted": "قالب به پیش‌فرض بازگردانده شد",
"testSent": "ایمیل آزمایشی ارسال شد",
"variables": "متغیرهای موجود",
"clickToCopy": "برای کپی کلیک کنید",
"previewDesktopOnly": "پیش‌نمایش فقط در نسخه وب دسکتاپ در دسترس است",
"previewNotAvailable": "پیش‌نمایش در دسترس نیست"
"editorTab": "ویرایشگر",
"previewHint": "پیش‌نمایش ایمیل را با مقادیر نمونه به جای متغیرها نشان می‌دهد.",
"clickToInsert": "برای درج در متن کلیک کنید",
"insertDefault": "درج قالب پیش‌فرض",
"insertDefaultConfirm": "محتوای فعلی با قالب پیش‌فرض جایگزین شود؟",
"testRecipientPlaceholder": "ایمیل گیرنده (پیش‌فرض: ایمیل شما)",
"testHint": "محتوای فعلی ویرایشگر با مقادیر نمونه به جای متغیرها ارسال می‌شود."
},
"wheel": {
"title": "تنظیمات چرخ شانس",

View File

@@ -1563,9 +1563,13 @@
"resetted": "Шаблон сброшен к значению по умолчанию",
"testSent": "Тестовое письмо отправлено",
"variables": "Доступные переменные",
"clickToCopy": "Нажмите для копирования",
"previewDesktopOnly": "Предпросмотр доступен только в веб-версии на десктопе",
"previewNotAvailable": "Предпросмотр недоступен"
"editorTab": "Редактор",
"previewHint": "Превью показывает письмо с примерами значений вместо переменных.",
"clickToInsert": "Нажмите, чтобы вставить в текст",
"insertDefault": "Вставить шаблон по умолчанию",
"insertDefaultConfirm": "Заменить текущее содержимое шаблоном по умолчанию?",
"testRecipientPlaceholder": "Email получателя (по умолчанию — ваш)",
"testHint": "Отправит текущее содержимое редактора с примерами значений вместо переменных."
},
"payments": {
"title": "Платежи",

View File

@@ -1455,9 +1455,13 @@
"resetted": "模板已恢复默认",
"testSent": "测试邮件已发送",
"variables": "可用变量",
"clickToCopy": "点击复制",
"previewDesktopOnly": "预览仅在桌面网页版可用",
"previewNotAvailable": "预览不可用"
"editorTab": "编辑器",
"previewHint": "预览以示例值代替变量显示邮件。",
"clickToInsert": "点击插入到文本中",
"insertDefault": "插入默认模板",
"insertDefaultConfirm": "用默认模板替换当前内容?",
"testRecipientPlaceholder": "收件人邮箱(默认为您的邮箱)",
"testHint": "发送当前编辑器内容,变量将替换为示例值。"
},
"payments": {
"title": "支付",