From db57fa73ce36df4e76fdcf9ba4275616d3f59d10 Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Thu, 5 Mar 2026 15:05:48 +0100 Subject: [PATCH] feat: add option to hide bottom navigation bar labels --- lib/i18n/de.i18n.json | 4 +++- lib/i18n/en.i18n.json | 4 +++- lib/i18n/es.i18n.json | 4 +++- lib/i18n/fr.i18n.json | 4 +++- lib/i18n/it.i18n.json | 4 +++- lib/i18n/ko.i18n.json | 4 +++- lib/i18n/nl.i18n.json | 4 +++- lib/i18n/strings.g.dart | 4 ++-- lib/i18n/strings_de.g.dart | 8 ++++++-- lib/i18n/strings_en.g.dart | 12 ++++++++++-- lib/i18n/strings_es.g.dart | 8 ++++++-- lib/i18n/strings_fr.g.dart | 8 ++++++-- lib/i18n/strings_it.g.dart | 8 ++++++-- lib/i18n/strings_ko.g.dart | 8 ++++++-- lib/i18n/strings_nl.g.dart | 8 ++++++-- lib/i18n/strings_sv.g.dart | 8 ++++++-- lib/i18n/strings_zh.g.dart | 8 ++++++-- lib/i18n/sv.i18n.json | 4 +++- lib/i18n/zh.i18n.json | 4 +++- lib/providers/settings_provider.dart | 10 ++++++++++ lib/screens/main_screen.dart | 21 +++++++++++++++++---- lib/screens/settings/settings_screen.dart | 16 ++++++++++++++++ lib/services/settings_service.dart | 11 +++++++++++ 23 files changed, 141 insertions(+), 33 deletions(-) diff --git a/lib/i18n/de.i18n.json b/lib/i18n/de.i18n.json index 95a95f2c..ffc6e4bd 100644 --- a/lib/i18n/de.i18n.json +++ b/lib/i18n/de.i18n.json @@ -209,7 +209,9 @@ "requireProfileSelectionOnOpen": "Profil beim Öffnen abfragen", "requireProfileSelectionOnOpenDescription": "Profilauswahl bei jedem Öffnen der App anzeigen", "confirmExitOnBack": "Vor dem Beenden bestätigen", - "confirmExitOnBackDescription": "Bestätigungsdialog anzeigen, wenn Zurück zum Beenden der App gedrückt wird" + "confirmExitOnBackDescription": "Bestätigungsdialog anzeigen, wenn Zurück zum Beenden der App gedrückt wird", + "showNavBarLabels": "Navigationsleisten-Beschriftungen anzeigen", + "showNavBarLabelsDescription": "Textbeschriftungen unter den Symbolen der Navigationsleiste anzeigen" }, "search": { "hint": "Filme, Serien, Musik suchen...", diff --git a/lib/i18n/en.i18n.json b/lib/i18n/en.i18n.json index 38ce294e..d99e431d 100644 --- a/lib/i18n/en.i18n.json +++ b/lib/i18n/en.i18n.json @@ -209,7 +209,9 @@ "requireProfileSelectionOnOpen": "Ask for profile on app open", "requireProfileSelectionOnOpenDescription": "Show profile selection every time the app is opened", "confirmExitOnBack": "Confirm before exiting", - "confirmExitOnBackDescription": "Show a confirmation dialog when pressing back to exit the app" + "confirmExitOnBackDescription": "Show a confirmation dialog when pressing back to exit the app", + "showNavBarLabels": "Show Navigation Bar Labels", + "showNavBarLabelsDescription": "Display text labels under navigation bar icons" }, "search": { "hint": "Search movies, shows, music...", diff --git a/lib/i18n/es.i18n.json b/lib/i18n/es.i18n.json index eea4fab1..1095a283 100644 --- a/lib/i18n/es.i18n.json +++ b/lib/i18n/es.i18n.json @@ -209,7 +209,9 @@ "requireProfileSelectionOnOpen": "Pedir perfil al abrir la app", "requireProfileSelectionOnOpenDescription": "Mostrar selección de perfil cada vez que se abre la aplicación", "confirmExitOnBack": "Confirmar antes de salir", - "confirmExitOnBackDescription": "Mostrar un diálogo de confirmación al presionar atrás para salir de la app" + "confirmExitOnBackDescription": "Mostrar un diálogo de confirmación al presionar atrás para salir de la app", + "showNavBarLabels": "Mostrar etiquetas de la barra de navegación", + "showNavBarLabelsDescription": "Mostrar etiquetas de texto bajo los iconos de la barra de navegación" }, "search": { "hint": "Buscar películas, series, música...", diff --git a/lib/i18n/fr.i18n.json b/lib/i18n/fr.i18n.json index 602c9ef6..8b028995 100644 --- a/lib/i18n/fr.i18n.json +++ b/lib/i18n/fr.i18n.json @@ -209,7 +209,9 @@ "requireProfileSelectionOnOpen": "Demander le profil à l'ouverture", "requireProfileSelectionOnOpenDescription": "Afficher la sélection de profil à chaque ouverture de l'application", "confirmExitOnBack": "Confirmer avant de quitter", - "confirmExitOnBackDescription": "Afficher une boîte de dialogue de confirmation en appuyant sur retour pour quitter" + "confirmExitOnBackDescription": "Afficher une boîte de dialogue de confirmation en appuyant sur retour pour quitter", + "showNavBarLabels": "Afficher les libellés de la barre de navigation", + "showNavBarLabelsDescription": "Afficher les libellés sous les icônes de la barre de navigation" }, "search": { "hint": "Rechercher des films, des séries, de la musique...", diff --git a/lib/i18n/it.i18n.json b/lib/i18n/it.i18n.json index f36cd95f..7d85feef 100644 --- a/lib/i18n/it.i18n.json +++ b/lib/i18n/it.i18n.json @@ -209,7 +209,9 @@ "requireProfileSelectionOnOpen": "Chiedi profilo all'apertura", "requireProfileSelectionOnOpenDescription": "Mostra la selezione del profilo ogni volta che l'app viene aperta", "confirmExitOnBack": "Conferma prima di uscire", - "confirmExitOnBackDescription": "Mostra una finestra di conferma quando si preme indietro per uscire dall'app" + "confirmExitOnBackDescription": "Mostra una finestra di conferma quando si preme indietro per uscire dall'app", + "showNavBarLabels": "Mostra etichette barra di navigazione", + "showNavBarLabelsDescription": "Mostra le etichette sotto le icone della barra di navigazione" }, "search": { "hint": "Cerca film. spettacoli, musica...", diff --git a/lib/i18n/ko.i18n.json b/lib/i18n/ko.i18n.json index 01fd2387..865e2228 100644 --- a/lib/i18n/ko.i18n.json +++ b/lib/i18n/ko.i18n.json @@ -209,7 +209,9 @@ "requireProfileSelectionOnOpen": "앱 실행 시 프로필 선택", "requireProfileSelectionOnOpenDescription": "앱을 열 때마다 프로필 선택 화면을 표시합니다", "confirmExitOnBack": "종료 전 확인", - "confirmExitOnBackDescription": "뒤로 버튼을 눌러 앱을 종료할 때 확인 대화상자를 표시합니다" + "confirmExitOnBackDescription": "뒤로 버튼을 눌러 앱을 종료할 때 확인 대화상자를 표시합니다", + "showNavBarLabels": "내비게이션 바 라벨 표시", + "showNavBarLabelsDescription": "내비게이션 바 아이콘 아래에 텍스트 라벨을 표시합니다" }, "search": { "hint": "영화, 시리즈, 음악 등을 검색하세요...", diff --git a/lib/i18n/nl.i18n.json b/lib/i18n/nl.i18n.json index 4d8674e1..620c721e 100644 --- a/lib/i18n/nl.i18n.json +++ b/lib/i18n/nl.i18n.json @@ -209,7 +209,9 @@ "requireProfileSelectionOnOpen": "Vraag om profiel bij openen", "requireProfileSelectionOnOpenDescription": "Toon profielselectie telkens wanneer de app wordt geopend", "confirmExitOnBack": "Bevestigen voor afsluiten", - "confirmExitOnBackDescription": "Toon een bevestigingsvenster bij het drukken op terug om de app af te sluiten" + "confirmExitOnBackDescription": "Toon een bevestigingsvenster bij het drukken op terug om de app af te sluiten", + "showNavBarLabels": "Navigatiebalk labels tonen", + "showNavBarLabelsDescription": "Tekstlabels onder de pictogrammen van de navigatiebalk weergeven" }, "search": { "hint": "Zoek films, series, muziek...", diff --git a/lib/i18n/strings.g.dart b/lib/i18n/strings.g.dart index a3c4a027..8fc66f30 100644 --- a/lib/i18n/strings.g.dart +++ b/lib/i18n/strings.g.dart @@ -4,9 +4,9 @@ /// To regenerate, run: `dart run slang` /// /// Locales: 9 -/// Strings: 7236 (804 per locale) +/// Strings: 7254 (806 per locale) /// -/// Built on 2026-03-04 at 08:32 UTC +/// Built on 2026-03-05 at 11:22 UTC // coverage:ignore-file // ignore_for_file: type=lint, unused_import diff --git a/lib/i18n/strings_de.g.dart b/lib/i18n/strings_de.g.dart index 42730025..be47ac2b 100644 --- a/lib/i18n/strings_de.g.dart +++ b/lib/i18n/strings_de.g.dart @@ -329,6 +329,8 @@ class _TranslationsSettingsDe implements TranslationsSettingsEn { @override String get requireProfileSelectionOnOpenDescription => 'Profilauswahl bei jedem Öffnen der App anzeigen'; @override String get confirmExitOnBack => 'Vor dem Beenden bestätigen'; @override String get confirmExitOnBackDescription => 'Bestätigungsdialog anzeigen, wenn Zurück zum Beenden der App gedrückt wird'; + @override String get showNavBarLabels => 'Navigationsleisten-Beschriftungen anzeigen'; + @override String get showNavBarLabelsDescription => 'Textbeschriftungen unter den Symbolen der Navigationsleiste anzeigen'; } // Path: search @@ -1501,6 +1503,8 @@ extension on TranslationsDe { 'settings.requireProfileSelectionOnOpenDescription' => 'Profilauswahl bei jedem Öffnen der App anzeigen', 'settings.confirmExitOnBack' => 'Vor dem Beenden bestätigen', 'settings.confirmExitOnBackDescription' => 'Bestätigungsdialog anzeigen, wenn Zurück zum Beenden der App gedrückt wird', + 'settings.showNavBarLabels' => 'Navigationsleisten-Beschriftungen anzeigen', + 'settings.showNavBarLabelsDescription' => 'Textbeschriftungen unter den Symbolen der Navigationsleiste anzeigen', 'search.hint' => 'Filme, Serien, Musik suchen...', 'search.tryDifferentTerm' => 'Anderen Suchbegriff versuchen', 'search.searchYourMedia' => 'In den eigenen Medien suchen', @@ -1811,10 +1815,10 @@ extension on TranslationsDe { 'liveTv.live' => 'LIVE', 'liveTv.hd' => 'HD', 'liveTv.premiere' => 'NEU', - 'liveTv.reloadGuide' => 'Programmführer neu laden', - 'liveTv.allChannels' => 'Alle Kanäle', _ => null, } ?? switch (path) { + 'liveTv.reloadGuide' => 'Programmführer neu laden', + 'liveTv.allChannels' => 'Alle Kanäle', 'liveTv.now' => 'Jetzt', 'liveTv.today' => 'Heute', 'liveTv.midnight' => 'Mitternacht', diff --git a/lib/i18n/strings_en.g.dart b/lib/i18n/strings_en.g.dart index 438a853f..90f41526 100644 --- a/lib/i18n/strings_en.g.dart +++ b/lib/i18n/strings_en.g.dart @@ -732,6 +732,12 @@ class TranslationsSettingsEn { /// en: 'Show a confirmation dialog when pressing back to exit the app' String get confirmExitOnBackDescription => 'Show a confirmation dialog when pressing back to exit the app'; + + /// en: 'Show Navigation Bar Labels' + String get showNavBarLabels => 'Show Navigation Bar Labels'; + + /// en: 'Display text labels under navigation bar icons' + String get showNavBarLabelsDescription => 'Display text labels under navigation bar icons'; } // Path: search @@ -3116,6 +3122,8 @@ extension on Translations { 'settings.requireProfileSelectionOnOpenDescription' => 'Show profile selection every time the app is opened', 'settings.confirmExitOnBack' => 'Confirm before exiting', 'settings.confirmExitOnBackDescription' => 'Show a confirmation dialog when pressing back to exit the app', + 'settings.showNavBarLabels' => 'Show Navigation Bar Labels', + 'settings.showNavBarLabelsDescription' => 'Display text labels under navigation bar icons', 'search.hint' => 'Search movies, shows, music...', 'search.tryDifferentTerm' => 'Try a different search term', 'search.searchYourMedia' => 'Search your media', @@ -3426,10 +3434,10 @@ extension on Translations { 'liveTv.live' => 'LIVE', 'liveTv.hd' => 'HD', 'liveTv.premiere' => 'NEW', - 'liveTv.reloadGuide' => 'Reload Guide', - 'liveTv.allChannels' => 'All Channels', _ => null, } ?? switch (path) { + 'liveTv.reloadGuide' => 'Reload Guide', + 'liveTv.allChannels' => 'All Channels', 'liveTv.now' => 'Now', 'liveTv.today' => 'Today', 'liveTv.midnight' => 'Midnight', diff --git a/lib/i18n/strings_es.g.dart b/lib/i18n/strings_es.g.dart index bc1957d2..dbfdf9c2 100644 --- a/lib/i18n/strings_es.g.dart +++ b/lib/i18n/strings_es.g.dart @@ -329,6 +329,8 @@ class _TranslationsSettingsEs implements TranslationsSettingsEn { @override String get requireProfileSelectionOnOpenDescription => 'Mostrar selección de perfil cada vez que se abre la aplicación'; @override String get confirmExitOnBack => 'Confirmar antes de salir'; @override String get confirmExitOnBackDescription => 'Mostrar un diálogo de confirmación al presionar atrás para salir de la app'; + @override String get showNavBarLabels => 'Mostrar etiquetas de la barra de navegación'; + @override String get showNavBarLabelsDescription => 'Mostrar etiquetas de texto bajo los iconos de la barra de navegación'; } // Path: search @@ -1501,6 +1503,8 @@ extension on TranslationsEs { 'settings.requireProfileSelectionOnOpenDescription' => 'Mostrar selección de perfil cada vez que se abre la aplicación', 'settings.confirmExitOnBack' => 'Confirmar antes de salir', 'settings.confirmExitOnBackDescription' => 'Mostrar un diálogo de confirmación al presionar atrás para salir de la app', + 'settings.showNavBarLabels' => 'Mostrar etiquetas de la barra de navegación', + 'settings.showNavBarLabelsDescription' => 'Mostrar etiquetas de texto bajo los iconos de la barra de navegación', 'search.hint' => 'Buscar películas, series, música...', 'search.tryDifferentTerm' => 'Prueba con un término de búsqueda diferente', 'search.searchYourMedia' => 'Busca en tu contenido', @@ -1811,10 +1815,10 @@ extension on TranslationsEs { 'liveTv.live' => 'EN VIVO', 'liveTv.hd' => 'HD', 'liveTv.premiere' => 'NUEVO', - 'liveTv.reloadGuide' => 'Recargar guía', - 'liveTv.allChannels' => 'Todos los canales', _ => null, } ?? switch (path) { + 'liveTv.reloadGuide' => 'Recargar guía', + 'liveTv.allChannels' => 'Todos los canales', 'liveTv.now' => 'Ahora', 'liveTv.today' => 'Hoy', 'liveTv.midnight' => 'Medianoche', diff --git a/lib/i18n/strings_fr.g.dart b/lib/i18n/strings_fr.g.dart index 2d9821e6..62e73b85 100644 --- a/lib/i18n/strings_fr.g.dart +++ b/lib/i18n/strings_fr.g.dart @@ -329,6 +329,8 @@ class _TranslationsSettingsFr implements TranslationsSettingsEn { @override String get requireProfileSelectionOnOpenDescription => 'Afficher la sélection de profil à chaque ouverture de l\'application'; @override String get confirmExitOnBack => 'Confirmer avant de quitter'; @override String get confirmExitOnBackDescription => 'Afficher une boîte de dialogue de confirmation en appuyant sur retour pour quitter'; + @override String get showNavBarLabels => 'Afficher les libellés de la barre de navigation'; + @override String get showNavBarLabelsDescription => 'Afficher les libellés sous les icônes de la barre de navigation'; } // Path: search @@ -1501,6 +1503,8 @@ extension on TranslationsFr { 'settings.requireProfileSelectionOnOpenDescription' => 'Afficher la sélection de profil à chaque ouverture de l\'application', 'settings.confirmExitOnBack' => 'Confirmer avant de quitter', 'settings.confirmExitOnBackDescription' => 'Afficher une boîte de dialogue de confirmation en appuyant sur retour pour quitter', + 'settings.showNavBarLabels' => 'Afficher les libellés de la barre de navigation', + 'settings.showNavBarLabelsDescription' => 'Afficher les libellés sous les icônes de la barre de navigation', 'search.hint' => 'Rechercher des films, des séries, de la musique...', 'search.tryDifferentTerm' => 'Essayez un autre terme de recherche', 'search.searchYourMedia' => 'Rechercher dans vos médias', @@ -1811,10 +1815,10 @@ extension on TranslationsFr { 'liveTv.live' => 'EN DIRECT', 'liveTv.hd' => 'HD', 'liveTv.premiere' => 'NOUVEAU', - 'liveTv.reloadGuide' => 'Recharger le guide', - 'liveTv.allChannels' => 'Toutes les chaînes', _ => null, } ?? switch (path) { + 'liveTv.reloadGuide' => 'Recharger le guide', + 'liveTv.allChannels' => 'Toutes les chaînes', 'liveTv.now' => 'Maintenant', 'liveTv.today' => 'Aujourd\'hui', 'liveTv.midnight' => 'Minuit', diff --git a/lib/i18n/strings_it.g.dart b/lib/i18n/strings_it.g.dart index 7557767c..87ae56e5 100644 --- a/lib/i18n/strings_it.g.dart +++ b/lib/i18n/strings_it.g.dart @@ -329,6 +329,8 @@ class _TranslationsSettingsIt implements TranslationsSettingsEn { @override String get requireProfileSelectionOnOpenDescription => 'Mostra la selezione del profilo ogni volta che l\'app viene aperta'; @override String get confirmExitOnBack => 'Conferma prima di uscire'; @override String get confirmExitOnBackDescription => 'Mostra una finestra di conferma quando si preme indietro per uscire dall\'app'; + @override String get showNavBarLabels => 'Mostra etichette barra di navigazione'; + @override String get showNavBarLabelsDescription => 'Mostra le etichette sotto le icone della barra di navigazione'; } // Path: search @@ -1501,6 +1503,8 @@ extension on TranslationsIt { 'settings.requireProfileSelectionOnOpenDescription' => 'Mostra la selezione del profilo ogni volta che l\'app viene aperta', 'settings.confirmExitOnBack' => 'Conferma prima di uscire', 'settings.confirmExitOnBackDescription' => 'Mostra una finestra di conferma quando si preme indietro per uscire dall\'app', + 'settings.showNavBarLabels' => 'Mostra etichette barra di navigazione', + 'settings.showNavBarLabelsDescription' => 'Mostra le etichette sotto le icone della barra di navigazione', 'search.hint' => 'Cerca film. spettacoli, musica...', 'search.tryDifferentTerm' => 'Prova altri termini di ricerca', 'search.searchYourMedia' => 'Cerca nei tuoi media', @@ -1811,10 +1815,10 @@ extension on TranslationsIt { 'liveTv.live' => 'IN DIRETTA', 'liveTv.hd' => 'HD', 'liveTv.premiere' => 'NUOVO', - 'liveTv.reloadGuide' => 'Ricarica guida', - 'liveTv.allChannels' => 'Tutti i canali', _ => null, } ?? switch (path) { + 'liveTv.reloadGuide' => 'Ricarica guida', + 'liveTv.allChannels' => 'Tutti i canali', 'liveTv.now' => 'Ora', 'liveTv.today' => 'Oggi', 'liveTv.midnight' => 'Mezzanotte', diff --git a/lib/i18n/strings_ko.g.dart b/lib/i18n/strings_ko.g.dart index b97cf5dc..976d1bd2 100644 --- a/lib/i18n/strings_ko.g.dart +++ b/lib/i18n/strings_ko.g.dart @@ -329,6 +329,8 @@ class _TranslationsSettingsKo implements TranslationsSettingsEn { @override String get requireProfileSelectionOnOpenDescription => '앱을 열 때마다 프로필 선택 화면을 표시합니다'; @override String get confirmExitOnBack => '종료 전 확인'; @override String get confirmExitOnBackDescription => '뒤로 버튼을 눌러 앱을 종료할 때 확인 대화상자를 표시합니다'; + @override String get showNavBarLabels => '내비게이션 바 라벨 표시'; + @override String get showNavBarLabelsDescription => '내비게이션 바 아이콘 아래에 텍스트 라벨을 표시합니다'; } // Path: search @@ -1501,6 +1503,8 @@ extension on TranslationsKo { 'settings.requireProfileSelectionOnOpenDescription' => '앱을 열 때마다 프로필 선택 화면을 표시합니다', 'settings.confirmExitOnBack' => '종료 전 확인', 'settings.confirmExitOnBackDescription' => '뒤로 버튼을 눌러 앱을 종료할 때 확인 대화상자를 표시합니다', + 'settings.showNavBarLabels' => '내비게이션 바 라벨 표시', + 'settings.showNavBarLabelsDescription' => '내비게이션 바 아이콘 아래에 텍스트 라벨을 표시합니다', 'search.hint' => '영화, 시리즈, 음악 등을 검색하세요...', 'search.tryDifferentTerm' => '다른 검색어를 시도해 보세요', 'search.searchYourMedia' => '미디어 검색', @@ -1811,10 +1815,10 @@ extension on TranslationsKo { 'liveTv.live' => '실시간', 'liveTv.hd' => 'HD', 'liveTv.premiere' => '신규', - 'liveTv.reloadGuide' => '편성표 새로고침', - 'liveTv.allChannels' => '전체 채널', _ => null, } ?? switch (path) { + 'liveTv.reloadGuide' => '편성표 새로고침', + 'liveTv.allChannels' => '전체 채널', 'liveTv.now' => '지금', 'liveTv.today' => '오늘', 'liveTv.midnight' => '자정', diff --git a/lib/i18n/strings_nl.g.dart b/lib/i18n/strings_nl.g.dart index e44561cf..6566ba44 100644 --- a/lib/i18n/strings_nl.g.dart +++ b/lib/i18n/strings_nl.g.dart @@ -329,6 +329,8 @@ class _TranslationsSettingsNl implements TranslationsSettingsEn { @override String get requireProfileSelectionOnOpenDescription => 'Toon profielselectie telkens wanneer de app wordt geopend'; @override String get confirmExitOnBack => 'Bevestigen voor afsluiten'; @override String get confirmExitOnBackDescription => 'Toon een bevestigingsvenster bij het drukken op terug om de app af te sluiten'; + @override String get showNavBarLabels => 'Navigatiebalk labels tonen'; + @override String get showNavBarLabelsDescription => 'Tekstlabels onder de pictogrammen van de navigatiebalk weergeven'; } // Path: search @@ -1501,6 +1503,8 @@ extension on TranslationsNl { 'settings.requireProfileSelectionOnOpenDescription' => 'Toon profielselectie telkens wanneer de app wordt geopend', 'settings.confirmExitOnBack' => 'Bevestigen voor afsluiten', 'settings.confirmExitOnBackDescription' => 'Toon een bevestigingsvenster bij het drukken op terug om de app af te sluiten', + 'settings.showNavBarLabels' => 'Navigatiebalk labels tonen', + 'settings.showNavBarLabelsDescription' => 'Tekstlabels onder de pictogrammen van de navigatiebalk weergeven', 'search.hint' => 'Zoek films, series, muziek...', 'search.tryDifferentTerm' => 'Probeer een andere zoekterm', 'search.searchYourMedia' => 'Zoek in je media', @@ -1811,10 +1815,10 @@ extension on TranslationsNl { 'liveTv.live' => 'LIVE', 'liveTv.hd' => 'HD', 'liveTv.premiere' => 'NIEUW', - 'liveTv.reloadGuide' => 'Gids herladen', - 'liveTv.allChannels' => 'Alle zenders', _ => null, } ?? switch (path) { + 'liveTv.reloadGuide' => 'Gids herladen', + 'liveTv.allChannels' => 'Alle zenders', 'liveTv.now' => 'Nu', 'liveTv.today' => 'Vandaag', 'liveTv.midnight' => 'Middernacht', diff --git a/lib/i18n/strings_sv.g.dart b/lib/i18n/strings_sv.g.dart index 858359eb..88f66d3a 100644 --- a/lib/i18n/strings_sv.g.dart +++ b/lib/i18n/strings_sv.g.dart @@ -329,6 +329,8 @@ class _TranslationsSettingsSv implements TranslationsSettingsEn { @override String get requireProfileSelectionOnOpenDescription => 'Visa profilval varje gång appen öppnas'; @override String get confirmExitOnBack => 'Bekräfta innan avslut'; @override String get confirmExitOnBackDescription => 'Visa en bekräftelsedialog när du trycker tillbaka för att avsluta appen'; + @override String get showNavBarLabels => 'Visa navigeringsfältets etiketter'; + @override String get showNavBarLabelsDescription => 'Visa textetiketter under navigeringsfältets ikoner'; } // Path: search @@ -1501,6 +1503,8 @@ extension on TranslationsSv { 'settings.requireProfileSelectionOnOpenDescription' => 'Visa profilval varje gång appen öppnas', 'settings.confirmExitOnBack' => 'Bekräfta innan avslut', 'settings.confirmExitOnBackDescription' => 'Visa en bekräftelsedialog när du trycker tillbaka för att avsluta appen', + 'settings.showNavBarLabels' => 'Visa navigeringsfältets etiketter', + 'settings.showNavBarLabelsDescription' => 'Visa textetiketter under navigeringsfältets ikoner', 'search.hint' => 'Sök filmer, serier, musik...', 'search.tryDifferentTerm' => 'Prova en annan sökterm', 'search.searchYourMedia' => 'Sök i dina media', @@ -1811,10 +1815,10 @@ extension on TranslationsSv { 'liveTv.live' => 'LIVE', 'liveTv.hd' => 'HD', 'liveTv.premiere' => 'NY', - 'liveTv.reloadGuide' => 'Ladda om programguide', - 'liveTv.allChannels' => 'Alla kanaler', _ => null, } ?? switch (path) { + 'liveTv.reloadGuide' => 'Ladda om programguide', + 'liveTv.allChannels' => 'Alla kanaler', 'liveTv.now' => 'Nu', 'liveTv.today' => 'Idag', 'liveTv.midnight' => 'Midnatt', diff --git a/lib/i18n/strings_zh.g.dart b/lib/i18n/strings_zh.g.dart index 9363e610..df15f3e8 100644 --- a/lib/i18n/strings_zh.g.dart +++ b/lib/i18n/strings_zh.g.dart @@ -329,6 +329,8 @@ class _TranslationsSettingsZh implements TranslationsSettingsEn { @override String get requireProfileSelectionOnOpenDescription => '每次打开应用时显示配置文件选择'; @override String get confirmExitOnBack => '退出前确认'; @override String get confirmExitOnBackDescription => '按返回键退出应用时显示确认对话框'; + @override String get showNavBarLabels => '显示导航栏标签'; + @override String get showNavBarLabelsDescription => '在导航栏图标下方显示文字标签'; } // Path: search @@ -1501,6 +1503,8 @@ extension on TranslationsZh { 'settings.requireProfileSelectionOnOpenDescription' => '每次打开应用时显示配置文件选择', 'settings.confirmExitOnBack' => '退出前确认', 'settings.confirmExitOnBackDescription' => '按返回键退出应用时显示确认对话框', + 'settings.showNavBarLabels' => '显示导航栏标签', + 'settings.showNavBarLabelsDescription' => '在导航栏图标下方显示文字标签', 'search.hint' => '搜索电影、系列、音乐...', 'search.tryDifferentTerm' => '尝试不同的搜索词', 'search.searchYourMedia' => '搜索媒体', @@ -1811,10 +1815,10 @@ extension on TranslationsZh { 'liveTv.live' => '直播', 'liveTv.hd' => '高清', 'liveTv.premiere' => '新', - 'liveTv.reloadGuide' => '重新加载节目指南', - 'liveTv.allChannels' => '所有频道', _ => null, } ?? switch (path) { + 'liveTv.reloadGuide' => '重新加载节目指南', + 'liveTv.allChannels' => '所有频道', 'liveTv.now' => '现在', 'liveTv.today' => '今天', 'liveTv.midnight' => '午夜', diff --git a/lib/i18n/sv.i18n.json b/lib/i18n/sv.i18n.json index 08e072e7..99841cb5 100644 --- a/lib/i18n/sv.i18n.json +++ b/lib/i18n/sv.i18n.json @@ -209,7 +209,9 @@ "requireProfileSelectionOnOpen": "Fråga efter profil vid appstart", "requireProfileSelectionOnOpenDescription": "Visa profilval varje gång appen öppnas", "confirmExitOnBack": "Bekräfta innan avslut", - "confirmExitOnBackDescription": "Visa en bekräftelsedialog när du trycker tillbaka för att avsluta appen" + "confirmExitOnBackDescription": "Visa en bekräftelsedialog när du trycker tillbaka för att avsluta appen", + "showNavBarLabels": "Visa navigeringsfältets etiketter", + "showNavBarLabelsDescription": "Visa textetiketter under navigeringsfältets ikoner" }, "search": { "hint": "Sök filmer, serier, musik...", diff --git a/lib/i18n/zh.i18n.json b/lib/i18n/zh.i18n.json index 61f30a1f..2eea373e 100644 --- a/lib/i18n/zh.i18n.json +++ b/lib/i18n/zh.i18n.json @@ -209,7 +209,9 @@ "requireProfileSelectionOnOpen": "打开应用时询问配置文件", "requireProfileSelectionOnOpenDescription": "每次打开应用时显示配置文件选择", "confirmExitOnBack": "退出前确认", - "confirmExitOnBackDescription": "按返回键退出应用时显示确认对话框" + "confirmExitOnBackDescription": "按返回键退出应用时显示确认对话框", + "showNavBarLabels": "显示导航栏标签", + "showNavBarLabelsDescription": "在导航栏图标下方显示文字标签" }, "search": { "hint": "搜索电影、系列、音乐...", diff --git a/lib/providers/settings_provider.dart b/lib/providers/settings_provider.dart index a0694355..47da2528 100644 --- a/lib/providers/settings_provider.dart +++ b/lib/providers/settings_provider.dart @@ -13,6 +13,7 @@ class SettingsProvider extends ChangeNotifier { bool _alwaysKeepSidebarOpen = false; bool _showUnwatchedCount = true; bool _hideSpoilers = false; + bool _showNavBarLabels = true; bool _isInitialized = false; Future? _initFuture; @@ -38,6 +39,7 @@ class SettingsProvider extends ChangeNotifier { _alwaysKeepSidebarOpen = _settingsService!.getAlwaysKeepSidebarOpen(); _showUnwatchedCount = _settingsService!.getShowUnwatchedCount(); _hideSpoilers = _settingsService!.getHideSpoilers(); + _showNavBarLabels = _settingsService!.getShowNavBarLabels(); _isInitialized = true; notifyListeners(); } @@ -63,6 +65,8 @@ class SettingsProvider extends ChangeNotifier { bool get hideSpoilers => _hideSpoilers; + bool get showNavBarLabels => _showNavBarLabels; + /// Helper to update a setting: ensures init, deduplicates, persists, notifies. Future _updateSetting({ required T current, @@ -132,6 +136,12 @@ class SettingsProvider extends ChangeNotifier { persist: _settingsService!.setHideSpoilers, ); + Future setShowNavBarLabels(bool value) => _updateSetting( + current: _showNavBarLabels, value: value, + setLocal: (v) => _showNavBarLabels = v, + persist: _settingsService!.setShowNavBarLabels, + ); + String get libraryDensityDisplayName { switch (_libraryDensity) { case LibraryDensity.compact: diff --git a/lib/screens/main_screen.dart b/lib/screens/main_screen.dart index 3b089bfd..c068d779 100644 --- a/lib/screens/main_screen.dart +++ b/lib/screens/main_screen.dart @@ -1113,10 +1113,23 @@ class _MainScreenState extends State with RouteAware, WindowListener ), ), ), - NavigationBar( - selectedIndex: _currentIndex, - onDestinationSelected: _selectTab, - destinations: _buildNavDestinations(_isOffline), + Consumer( + builder: (context, settingsProvider, child) { + final hideLabels = !settingsProvider.showNavBarLabels; + return NavigationBarTheme( + data: NavigationBarTheme.of(context).copyWith( + height: hideLabels ? 56 : null, + ), + child: NavigationBar( + selectedIndex: _currentIndex, + onDestinationSelected: _selectTab, + labelBehavior: hideLabels + ? NavigationDestinationLabelBehavior.alwaysHide + : NavigationDestinationLabelBehavior.alwaysShow, + destinations: _buildNavDestinations(_isOffline), + ), + ); + }, ), ], ), diff --git a/lib/screens/settings/settings_screen.dart b/lib/screens/settings/settings_screen.dart index f902187f..9fe91042 100644 --- a/lib/screens/settings/settings_screen.dart +++ b/lib/screens/settings/settings_screen.dart @@ -73,6 +73,7 @@ class _SettingsScreenState extends State with FocusableTab { static const _kAlwaysKeepSidebarOpen = 'always_keep_sidebar_open'; static const _kShowUnwatchedCount = 'show_unwatched_count'; static const _kHideSpoilers = 'hide_spoilers'; + static const _kShowNavBarLabels = 'show_nav_bar_labels'; static const _kRequireProfileSelectionOnOpen = 'require_profile_selection_on_open'; static const _kConfirmExitOnBack = 'confirm_exit_on_back'; static const _kPlayerBackend = 'player_backend'; @@ -380,6 +381,21 @@ class _SettingsScreenState extends State with FocusableTab { ); }, ), + if (!PlatformDetector.shouldUseSideNavigation(context)) + Consumer( + builder: (context, settingsProvider, child) { + return SwitchListTile( + focusNode: _focusTracker.get(_kShowNavBarLabels), + secondary: const AppIcon(Symbols.label_rounded, fill: 1), + title: Text(t.settings.showNavBarLabels), + subtitle: Text(t.settings.showNavBarLabelsDescription), + value: settingsProvider.showNavBarLabels, + onChanged: (value) async { + await settingsProvider.setShowNavBarLabels(value); + }, + ); + }, + ), Consumer( builder: (context, settingsProvider, child) { return SwitchListTile( diff --git a/lib/services/settings_service.dart b/lib/services/settings_service.dart index 409e3754..8c48cec3 100644 --- a/lib/services/settings_service.dart +++ b/lib/services/settings_service.dart @@ -77,6 +77,7 @@ class SettingsService extends BaseSharedPreferencesService { static const String _keyAlwaysKeepSidebarOpen = 'always_keep_sidebar_open'; static const String _keyShowUnwatchedCount = 'show_unwatched_count'; static const String _keyHideSpoilers = 'hide_spoilers'; + static const String _keyShowNavBarLabels = 'show_nav_bar_labels'; static const String _keyGlobalShaderPreset = 'global_shader_preset'; static const String _keyRequireProfileSelectionOnOpen = 'require_profile_selection_on_open'; static const String _keyUseExternalPlayer = 'use_external_player'; @@ -1145,6 +1146,15 @@ class SettingsService extends BaseSharedPreferencesService { return prefs.getBool(_keyHideSpoilers) ?? false; // Default: disabled } + // Show Navigation Bar Labels (mobile bottom nav) + Future setShowNavBarLabels(bool enabled) async { + await prefs.setBool(_keyShowNavBarLabels, enabled); + } + + bool getShowNavBarLabels() { + return prefs.getBool(_keyShowNavBarLabels) ?? true; // Default: show labels + } + // Global Shader Preset (for MPV video enhancement) Future setGlobalShaderPreset(String presetId) async { await prefs.setString(_keyGlobalShaderPreset, presetId); @@ -1325,6 +1335,7 @@ class SettingsService extends BaseSharedPreferencesService { prefs.remove(_keyAlwaysKeepSidebarOpen), prefs.remove(_keyShowUnwatchedCount), prefs.remove(_keyHideSpoilers), + prefs.remove(_keyShowNavBarLabels), prefs.remove(_keyGlobalShaderPreset), prefs.remove(_keyCustomShaderPresets), prefs.remove(_keyRequireProfileSelectionOnOpen),