mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
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:
@@ -48,6 +48,12 @@ export interface BroadcastButtonsResponse {
|
||||
buttons: BroadcastButton[];
|
||||
}
|
||||
|
||||
export interface CustomBroadcastButton {
|
||||
label: string;
|
||||
action_type: 'callback' | 'url';
|
||||
action_value: string;
|
||||
}
|
||||
|
||||
export interface BroadcastMedia {
|
||||
type: 'photo' | 'video' | 'document';
|
||||
file_id: string;
|
||||
@@ -73,6 +79,7 @@ export interface CombinedBroadcastCreateRequest {
|
||||
// Telegram fields
|
||||
message_text?: string;
|
||||
selected_buttons?: string[];
|
||||
custom_buttons?: CustomBroadcastButton[];
|
||||
media?: BroadcastMedia;
|
||||
// Email fields
|
||||
email_subject?: string;
|
||||
|
||||
Reference in New Issue
Block a user