From 1e403cb883d1e8d97d08180d863816af49613f68 Mon Sep 17 00:00:00 2001 From: Rodrigo Gomes da Silva Date: Sun, 4 Jan 2026 22:27:24 -0300 Subject: [PATCH 01/15] feat: add multiselect filters for media gallery - Add search functionality to participant filter with search bar - Convert participant and type filters to multiselect with checkboxes - Show selected filter count in options dropdown - Keep filter modals open for multiple selections - Add translations for search placeholder and no match messages - Update filtering logic to support multiple participants and types simultaneously --- messages/de.json | 16 +- messages/en.json | 16 +- messages/es.json | 16 +- messages/fr.json | 16 +- messages/it.json | 16 +- messages/ja.json | 16 +- messages/nl.json | 16 +- messages/pt.json | 16 +- messages/ru.json | 16 +- messages/zh.json | 16 +- src/lib/components/MediaGallery.svelte | 255 ++++++++++++++++++++++++- src/lib/gallery.svelte.ts | 97 +++++++++- 12 files changed, 492 insertions(+), 20 deletions(-) diff --git a/messages/de.json b/messages/de.json index 5e47360..1ee053d 100644 --- a/messages/de.json +++ b/messages/de.json @@ -230,5 +230,19 @@ "stats_hour_6am": "6 Uhr morgens", "stats_hour_12pm": "12 Uhr", "stats_hour_6pm": "18 Uhr", - "stats_hour_11pm": "23 Uhr" + "stats_hour_11pm": "23 Uhr", + "media_gallery_options": "Optionen", + "media_gallery_filter_by_participant": "Nach Teilnehmer filtern", + "media_gallery_filter_by_type": "Nach Typ filtern", + "media_gallery_all_participants": "Alle Teilnehmer", + "media_gallery_all_types": "Alle Arten", + "media_gallery_type_images": "Bilder", + "media_gallery_type_videos": "Videos", + "media_gallery_type_audio": "Audio", + "media_gallery_type_documents": "Unterlagen", + "media_gallery_type_other": "Andere", + "media_gallery_filter_active": "Filter aktiv", + "media_gallery_clear_filter": "Filter löschen", + "media_gallery_participant_search_placeholder": "Suche nach Name oder Nummer...", + "media_gallery_participant_no_match": "Kein Teilnehmer entspricht \" {query} \"" } diff --git a/messages/en.json b/messages/en.json index dc54bab..4465209 100644 --- a/messages/en.json +++ b/messages/en.json @@ -230,5 +230,19 @@ "calendar_weekday_thu": "Th", "calendar_weekday_fri": "Fr", "calendar_weekday_sat": "Sa", - "close": "Close" + "close": "Close", + "media_gallery_options": "Options", + "media_gallery_filter_by_participant": "Filter by participant", + "media_gallery_filter_by_type": "Filter by type", + "media_gallery_all_participants": "All participants", + "media_gallery_all_types": "All types", + "media_gallery_type_images": "Images", + "media_gallery_type_videos": "Videos", + "media_gallery_type_audio": "Audio", + "media_gallery_type_documents": "Documents", + "media_gallery_type_other": "Other", + "media_gallery_filter_active": "Filter active", + "media_gallery_clear_filter": "Clear filter", + "media_gallery_participant_search_placeholder": "Search by name or number...", + "media_gallery_participant_no_match": "No participant matches \"{query}\"" } diff --git a/messages/es.json b/messages/es.json index 03ed2ad..6abab53 100644 --- a/messages/es.json +++ b/messages/es.json @@ -230,5 +230,19 @@ "stats_hour_6am": "6 a. m.", "stats_hour_12pm": "12 p. m.", "stats_hour_6pm": "6 p. m.", - "stats_hour_11pm": "23:00" + "stats_hour_11pm": "23:00", + "media_gallery_options": "Opciones", + "media_gallery_filter_by_participant": "Filtrar por participante", + "media_gallery_filter_by_type": "Filtrar por tipo", + "media_gallery_all_participants": "Todos los participantes", + "media_gallery_all_types": "Todos los tipos", + "media_gallery_type_images": "Imágenes", + "media_gallery_type_videos": "Vídeos", + "media_gallery_type_audio": "Audio", + "media_gallery_type_documents": "Documentos", + "media_gallery_type_other": "Otro", + "media_gallery_filter_active": "Filtro activo", + "media_gallery_clear_filter": "Limpiar filtro", + "media_gallery_participant_search_placeholder": "Buscar por nombre o número...", + "media_gallery_participant_no_match": "Ningún participante coincide con \" {query} \"" } diff --git a/messages/fr.json b/messages/fr.json index 84a5bc6..11fc29f 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -230,5 +230,19 @@ "stats_hour_6am": "6h du matin", "stats_hour_12pm": "12h", "stats_hour_6pm": "18h", - "stats_hour_11pm": "23h" + "stats_hour_11pm": "23h", + "media_gallery_options": "Options", + "media_gallery_filter_by_participant": "Filtrer par participant", + "media_gallery_filter_by_type": "Filtrer par type", + "media_gallery_all_participants": "Tous les participants", + "media_gallery_all_types": "Tous types", + "media_gallery_type_images": "Images", + "media_gallery_type_videos": "Vidéos", + "media_gallery_type_audio": "Audio", + "media_gallery_type_documents": "Documents", + "media_gallery_type_other": "Autre", + "media_gallery_filter_active": "Filtre actif", + "media_gallery_clear_filter": "Filtre clair", + "media_gallery_participant_search_placeholder": "Recherche par nom ou numéro...", + "media_gallery_participant_no_match": "Aucun participant ne correspond à \" {query} \"" } diff --git a/messages/it.json b/messages/it.json index 7a6dee8..5061497 100644 --- a/messages/it.json +++ b/messages/it.json @@ -230,5 +230,19 @@ "stats_hour_6am": "6 del mattino", "stats_hour_12pm": "12:00", "stats_hour_6pm": "18:00", - "stats_hour_11pm": "23:00" + "stats_hour_11pm": "23:00", + "media_gallery_options": "Opzioni", + "media_gallery_filter_by_participant": "Filtra per partecipante", + "media_gallery_filter_by_type": "Filtra per tipo", + "media_gallery_all_participants": "Tutti i partecipanti", + "media_gallery_all_types": "Tutti i tipi", + "media_gallery_type_images": "Immagini", + "media_gallery_type_videos": "Video", + "media_gallery_type_audio": "Audio", + "media_gallery_type_documents": "Documenti", + "media_gallery_type_other": "Altro", + "media_gallery_filter_active": "Filtro attivo", + "media_gallery_clear_filter": "Cancella filtro", + "media_gallery_participant_search_placeholder": "Cerca per nome o numero...", + "media_gallery_participant_no_match": "Nessun partecipante corrisponde a \" {query} \"" } diff --git a/messages/ja.json b/messages/ja.json index 103831d..70bdd58 100644 --- a/messages/ja.json +++ b/messages/ja.json @@ -230,5 +230,19 @@ "stats_hour_6am": "午前6時", "stats_hour_12pm": "午後12時", "stats_hour_6pm": "午後6時", - "stats_hour_11pm": "午後11時" + "stats_hour_11pm": "午後11時", + "media_gallery_options": "オプション", + "media_gallery_filter_by_participant": "参加者でフィルタリング", + "media_gallery_filter_by_type": "タイプでフィルタリング", + "media_gallery_all_participants": "参加者全員", + "media_gallery_all_types": "すべてのタイプ", + "media_gallery_type_images": "画像", + "media_gallery_type_videos": "ビデオ", + "media_gallery_type_audio": "オーディオ", + "media_gallery_type_documents": "文書", + "media_gallery_type_other": "他の", + "media_gallery_filter_active": "フィルターが有効", + "media_gallery_clear_filter": "フィルターをクリア", + "media_gallery_participant_search_placeholder": "名前または番号で検索...", + "media_gallery_participant_no_match": "「 {query} 」に一致する参加者はいません" } diff --git a/messages/nl.json b/messages/nl.json index bfa9389..9aecd50 100644 --- a/messages/nl.json +++ b/messages/nl.json @@ -230,5 +230,19 @@ "stats_hour_6am": "6 uur 's ochtends", "stats_hour_12pm": "12 uur 's middags", "stats_hour_6pm": "18:00 uur", - "stats_hour_11pm": "23:00 uur" + "stats_hour_11pm": "23:00 uur", + "media_gallery_options": "Opties", + "media_gallery_filter_by_participant": "Filteren op deelnemer", + "media_gallery_filter_by_type": "Filteren op type", + "media_gallery_all_participants": "Alle deelnemers", + "media_gallery_all_types": "Alle soorten", + "media_gallery_type_images": "Afbeeldingen", + "media_gallery_type_videos": "Video's", + "media_gallery_type_audio": "Audio", + "media_gallery_type_documents": "Documenten", + "media_gallery_type_other": "Ander", + "media_gallery_filter_active": "Actief filter", + "media_gallery_clear_filter": "Filter wissen", + "media_gallery_participant_search_placeholder": "Zoeken op naam of nummer...", + "media_gallery_participant_no_match": "Geen deelnemer komt overeen met \" {query} \"" } diff --git a/messages/pt.json b/messages/pt.json index 096acff..a93ede8 100644 --- a/messages/pt.json +++ b/messages/pt.json @@ -230,5 +230,19 @@ "stats_hour_6am": "6h da manhã", "stats_hour_12pm": "12h", "stats_hour_6pm": "18h", - "stats_hour_11pm": "23h" + "stats_hour_11pm": "23h", + "media_gallery_options": "Opções", + "media_gallery_filter_by_participant": "Filtrar por participante", + "media_gallery_filter_by_type": "Filtrar por tipo", + "media_gallery_all_participants": "Todos os participantes", + "media_gallery_all_types": "Todos os tipos", + "media_gallery_type_images": "Imagens", + "media_gallery_type_videos": "Vídeos", + "media_gallery_type_audio": "Áudio", + "media_gallery_type_documents": "Documentos", + "media_gallery_type_other": "Outro", + "media_gallery_filter_active": "Filtro ativo", + "media_gallery_clear_filter": "Limpar filtro", + "media_gallery_participant_search_placeholder": "Pesquisar por nome ou número...", + "media_gallery_participant_no_match": "Nenhum participante corresponde a \" {query} \"" } diff --git a/messages/ru.json b/messages/ru.json index c6c259f..b07517f 100644 --- a/messages/ru.json +++ b/messages/ru.json @@ -230,5 +230,19 @@ "stats_hour_6am": "6 утра", "stats_hour_12pm": "12:00", "stats_hour_6pm": "18:00", - "stats_hour_11pm": "23:00" + "stats_hour_11pm": "23:00", + "media_gallery_options": "Параметры", + "media_gallery_filter_by_participant": "Фильтр по участнику", + "media_gallery_filter_by_type": "Фильтр по типу", + "media_gallery_all_participants": "Все участники", + "media_gallery_all_types": "Все типы", + "media_gallery_type_images": "Изображения", + "media_gallery_type_videos": "Видео", + "media_gallery_type_audio": "Аудио", + "media_gallery_type_documents": "Документы", + "media_gallery_type_other": "Другой", + "media_gallery_filter_active": "Фильтр активен", + "media_gallery_clear_filter": "Очистить фильтр", + "media_gallery_participant_search_placeholder": "Поиск по имени или номеру...", + "media_gallery_participant_no_match": "Ни один участник не соответствует \" {query} \"" } diff --git a/messages/zh.json b/messages/zh.json index 7b71ea4..92659a2 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -230,5 +230,19 @@ "stats_hour_6am": "早上6点", "stats_hour_12pm": "中午12点", "stats_hour_6pm": "下午6点", - "stats_hour_11pm": "晚上11点" + "stats_hour_11pm": "晚上11点", + "media_gallery_options": "选项", + "media_gallery_filter_by_participant": "按参与者筛选", + "media_gallery_filter_by_type": "按类型筛选", + "media_gallery_all_participants": "所有参与者", + "media_gallery_all_types": "所有类型", + "media_gallery_type_images": "图片", + "media_gallery_type_videos": "视频", + "media_gallery_type_audio": "声音的", + "media_gallery_type_documents": "文件", + "media_gallery_type_other": "其他", + "media_gallery_filter_active": "过滤器已激活", + "media_gallery_clear_filter": "清除过滤器", + "media_gallery_participant_search_placeholder": "按名称或编号搜索……", + "media_gallery_participant_no_match": "没有参与者匹配“ {query}" } diff --git a/src/lib/components/MediaGallery.svelte b/src/lib/components/MediaGallery.svelte index 49f6683..e082ff9 100644 --- a/src/lib/components/MediaGallery.svelte +++ b/src/lib/components/MediaGallery.svelte @@ -1,14 +1,22 @@