feat: custom broadcast buttons UI and fix stale mediaType bug

- Add inline custom button editor (no popups): label, type
  (callback/URL), action value with byte-level validation
- Frontend validates callback_data in UTF-8 bytes via TextEncoder
- URLs restricted to https:// and tg:// matching backend
- Form wrapped in <form> for Enter key submit support
- Fix pre-existing stale mediaType bug in file upload handler
- Translations added for ru, en, zh, fa locales
This commit is contained in:
Fringg
2026-03-22 01:54:11 +03:00
parent 3c034d2e70
commit 86d997d01d
6 changed files with 212 additions and 14 deletions

View File

@@ -1336,7 +1336,14 @@
"enableEmail": "Email",
"sendingBoth": "۲ پیام‌رسانی ایجاد خواهد شد",
"bothCreated": "پیام‌رسانی‌ها ایجاد شدند",
"atLeastOneChannel": "حداقل یک کانال را انتخاب کنید"
"atLeastOneChannel": "حداقل یک کانال را انتخاب کنید",
"customButtons": "دکمه‌های سفارشی",
"addCustomButton": "افزودن دکمه",
"customButtonLabelPlaceholder": "متن دکمه",
"customButtonTypeCallback": "Callback",
"customButtonTypeUrl": "لینک",
"customButtonCallbackPlaceholder": "callback_data (مثلاً back_to_menu)",
"customButtonUrlPlaceholder": "https://example.com"
},
"pinnedMessages": {
"title": "Pinned Messages",