feat: multi-media attachments, linkify URLs, shared MessageMediaGrid

- Add media_items array support to ticket messages (types, API clients)
- Create shared MessageMediaGrid component with photo grid, fullscreen
  viewer, keyboard nav, video/document rendering
- Replace per-page AdminMessageMedia/MessageMedia with MessageMediaGrid
- Add linkifyText util (DOMPurify-sanitized) for auto-linking URLs
- Support multi-file upload (up to 10) in AdminTickets and Support pages
- Remove unused ticketsApi import from AdminUserDetail
This commit is contained in:
Fringg
2026-04-29 08:45:15 +03:00
parent 9b1e26d4ec
commit 6d3010b621
8 changed files with 666 additions and 553 deletions

View File

@@ -473,6 +473,12 @@ export interface ReferralTerms {
}
// Ticket types
export interface TicketMediaItem {
type: 'photo' | 'video' | 'document';
file_id: string;
caption?: string | null;
}
export interface TicketMessage {
id: number;
message_text: string;
@@ -481,6 +487,7 @@ export interface TicketMessage {
media_type: string | null;
media_file_id: string | null;
media_caption: string | null;
media_items?: TicketMediaItem[] | null;
created_at: string;
}