From 882203a138a73f6623ba383afb2af9e35e197e0d Mon Sep 17 00:00:00 2001 From: Feichtmeier Date: Sat, 2 Dec 2023 12:35:01 +0100 Subject: [PATCH] Replace emojis with animated emojis Fixes #280 --- lib/src/common/audio_page_body.dart | 2 ++ lib/src/common/no_search_result_page.dart | 22 ++++++++++++---- lib/src/l10n/app_de.arb | 14 +++++----- lib/src/l10n/app_en.arb | 18 ++++++------- lib/src/l10n/app_es.arb | 14 +++++----- lib/src/l10n/app_sk.arb | 31 ++++++++++++----------- lib/src/l10n/app_sv.arb | 14 +++++----- lib/src/local_audio/album_view.dart | 2 ++ lib/src/local_audio/artists_view.dart | 2 ++ lib/src/theme.dart | 2 +- pubspec.lock | 16 ++++++++++++ pubspec.yaml | 1 + 12 files changed, 87 insertions(+), 51 deletions(-) diff --git a/lib/src/common/audio_page_body.dart b/lib/src/common/audio_page_body.dart index d3b8984d0..dcd7e5841 100644 --- a/lib/src/common/audio_page_body.dart +++ b/lib/src/common/audio_page_body.dart @@ -1,3 +1,4 @@ +import 'package:animated_emoji/animated_emoji.dart'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -159,6 +160,7 @@ class _AudioPageBodyState extends State { audioControlPanel, Expanded( child: NoSearchResultPage( + icons: const AnimatedEmoji(AnimatedEmojis.eyes), message: widget.noResultMessage, ), ), diff --git a/lib/src/common/no_search_result_page.dart b/lib/src/common/no_search_result_page.dart index 34a227335..e7b46e939 100644 --- a/lib/src/common/no_search_result_page.dart +++ b/lib/src/common/no_search_result_page.dart @@ -1,3 +1,4 @@ +import 'package:animated_emoji/animated_emoji.dart'; import 'package:flutter/material.dart'; import '../../common.dart'; @@ -7,9 +8,11 @@ class NoSearchResultPage extends StatelessWidget { const NoSearchResultPage({ super.key, this.message, + this.icons, }); final Widget? message; + final Widget? icons; @override Widget build(BuildContext context) { @@ -29,12 +32,21 @@ class NoSearchResultPage extends StatelessWidget { child: DefaultTextStyle( style: style!, textAlign: TextAlign.center, - child: message ?? - Text( - context.l10n.nothingFound, - style: style, - textAlign: TextAlign.center, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + icons ?? const AnimatedEmoji(AnimatedEmojis.thinkingFace), + const SizedBox( + height: 20, ), + message ?? + Text( + context.l10n.nothingFound, + style: style, + textAlign: TextAlign.center, + ), + ], + ), ), ), ); diff --git a/lib/src/l10n/app_de.arb b/lib/src/l10n/app_de.arb index 14ec7c21d..4e979c977 100644 --- a/lib/src/l10n/app_de.arb +++ b/lib/src/l10n/app_de.arb @@ -36,7 +36,7 @@ "discover": "Erkunden", "forYou": "Für dich", "search": "Suche", - "noPodcastFound": "🐣🔎🎙❓\n\nEntschuldigung, es wurde kein Podcast mit diesem Suchbegriff gefunden.", + "noPodcastFound": " 🐣🔎🎙❓\n\nEntschuldigung, es wurde kein Podcast mit diesem Suchbegriff gefunden.", "noPodcastChartsFound": "🐣🔎🎙❓\n\nEntschuldigung, für dieses Land sind keine Charts verfügbar.", "noPodcastSubsFound": "🐣🔎🎙❓\n\nDu hast noch keinen Podcast abonniert.", "charts": "Charts", @@ -64,9 +64,9 @@ "offline": "Offline", "offlineDescription": "Dein Computer scheint nicht mit dem Internet verbunden zu sein.", "newEpisodeAvailable": "Neue Episode verfügbar:", - "noStationFound": "🐣🔎📻❓\n\nEntschuldigung, es wurde kein Sender mit diesem Suchbegriff gefunden.", - "nothingFound": "🐣🔎❓\n\nNichts gefunden", - "noStarredStations": "🐣🔎📻❓\n\nDu hast noch keine Radiosender mit dem Stern-Button favorisiert.", + "noStationFound": "Entschuldigung, es wurde kein Sender mit diesem Suchbegriff gefunden.", + "nothingFound": "Nichts gefunden", + "noStarredStations": "Du hast noch keine Radiosender mit dem Stern-Button favorisiert.", "tags": "Tags", "quality": "Qualität", "station": "Station", @@ -81,8 +81,8 @@ "podcastFeedIsEmpty": "Entschuldigung, dieser Podcast-Feed ist leer.", "video": "Video", "ok": "OK", - "noLocalTitlesFound": "🐣🔎🎵❓\n\nDeine lokale Audiosammlung scheint leer zu sein. Schaue in den Einstellungen nach, ob du den richtigen Ordner ausgewählt hast.", - "noLocalSearchFound": "🐣🔎🎵❓\n\nEntschuldigung, es wurde nichts mit diesem Suchbegriff gefunden.", + "noLocalTitlesFound": "Deine lokale Audiosammlung scheint leer zu sein. Schaue in den Einstellungen nach, ob du den richtigen Ordner ausgewählt hast.", + "noLocalSearchFound": "Entschuldigung, es wurde nichts mit diesem Suchbegriff gefunden.", "buyMusicOnline": "Vielleicht findest du hier Musik die du kaufen möchtest:", "settings": "Einstellungen", "findUsOnGitHub": "Finde uns auf GitHub", @@ -98,7 +98,7 @@ } } }, - "emptyPlaylist": "🐣🔎🎵❓\n\nDiese Wiedergabeliste ist leer.", + "emptyPlaylist": "Diese Wiedergabeliste ist leer.", "copiedToClipBoard": "In die Zwischenablage kopiert:", "insertIntoQueue": "In Warteschlange aufnehmen", "about": "Über", diff --git a/lib/src/l10n/app_en.arb b/lib/src/l10n/app_en.arb index 1d12b72d7..9ccae13b3 100644 --- a/lib/src/l10n/app_en.arb +++ b/lib/src/l10n/app_en.arb @@ -36,9 +36,9 @@ "discover": "Discover", "forYou": "For you", "search": "Search", - "noPodcastFound": "🐣🔎🎙❓\n\nSorry, no podcast was found with this search query.", - "noPodcastChartsFound": "🐣🔎🎙❓\n\nSorry, no charts available for this country or category.", - "noPodcastSubsFound": "🐣🔎🎙❓\n\nYou haven't subscribed to any podcast yet.", + "noPodcastFound": "Sorry, no podcast was found with this search query.", + "noPodcastChartsFound": "Sorry, no charts available for this country or category.", + "noPodcastSubsFound": "You haven't subscribed to any podcast yet.", "charts": "Charts", "discover": "Discover", "upNext": "Up next", @@ -64,9 +64,9 @@ "offline": "offline", "offlineDescription": "It looks like your computer is not connected to the internet.", "newEpisodeAvailable": "New episode available:", - "noStationFound": "🐣🔎📻❓\n\nSorry, no stations found with this search query", - "nothingFound": "🐣🔎❓\n\nNothing found", - "noStarredStations": "🐣🔎📻❓\n\nYou haven't starred any stations yet.", + "noStationFound": "Sorry, no stations found with this search query", + "nothingFound": "Nothing found", + "noStarredStations": "You haven't starred any stations yet.", "tags": "Tags", "quality": "Quality", "station": "Station", @@ -81,8 +81,8 @@ "podcastFeedIsEmpty": "Sorry, this podcast''s feed is empty.", "video": "Video", "ok": "OK", - "noLocalTitlesFound": "🐣🔎🎵❓\n\nIt looks like your local music collection is empty. Check your library location in the settings.", - "noLocalSearchFound": "🐣🔎🎵❓\n\nSorry, no local music found for this search query.", + "noLocalTitlesFound": "It looks like your local music collection is empty. Check your library location in the settings.", + "noLocalSearchFound": "Sorry, no local music found for this search query.", "buyMusicOnline": "Maybe here you'll find music that you'd like to buy:", "settings": "Settings", "findUsOnGitHub": "Find us on GitHub", @@ -98,7 +98,7 @@ } } }, - "emptyPlaylist": "🐣🔎🎵❓\n\nThis playlist is empty.", + "emptyPlaylist": "This playlist is empty.", "copiedToClipBoard": "Copied to clipboard:", "insertIntoQueue": "Insert into queue", "about": "About", diff --git a/lib/src/l10n/app_es.arb b/lib/src/l10n/app_es.arb index b8e036896..6163bdd9e 100644 --- a/lib/src/l10n/app_es.arb +++ b/lib/src/l10n/app_es.arb @@ -36,8 +36,8 @@ "discover": "Explorar", "forYou": "Para ti", "search": "Buscar", - "noPodcastFound": "🐣🔎🎙❓\n\nLo siento, no se ha encontrado ningún podcast que concida con esa búsqueda.", - "noPodcastChartsFound": "🐣🔎🎙❓\n\nLo siento, no hay listas disponibles para este país o categoría.", + "noPodcastFound": "Lo siento, no se ha encontrado ningún podcast que concida con esa búsqueda.", + "noPodcastChartsFound": "Lo siento, no hay listas disponibles para este país o categoría.", "upNext": "A continuación", "all": "Todo", "arts": "Arte", @@ -61,8 +61,8 @@ "offline": "Sin conexión", "offlineDescription": "Parece que tu ordenador no está conectado a internet", "newEpisodeAvailable": "Nuevo episodio disponible:", - "noStationFound": "🐣🔎📻❓\n\nLo siento, no se ha encontrado ningúna estación que concida con esa búsqueda", - "nothingFound": "🐣🔎❓\n\nSin resultados", + "noStationFound": "Lo siento, no se ha encontrado ningúna estación que concida con esa búsqueda", + "nothingFound": "Sin resultados", "tags": "Tags", "quality": "Calidad", "station": "Estación", @@ -77,8 +77,8 @@ "podcastFeedIsEmpty": "Lo siento, el feed de este podcast se encuentra vacío", "video": "Vídeo", "ok": "De acuerdo", - "noLocalTitlesFound": "🐣🔎🎵❓\n\nParece que tu colección de música local está vacía. Revisa la ubicación de tu biblioteca en los ajustes", - "noLocalSearchFound": "🐣🔎🎵❓\n\nLo siento, no se ha encontrado música local que concida con esa búsqueda", + "noLocalTitlesFound": "Parece que tu colección de música local está vacía. Revisa la ubicación de tu biblioteca en los ajustes", + "noLocalSearchFound": "Lo siento, no se ha encontrado música local que concida con esa búsqueda", "buyMusicOnline": "Aquí encontrarás música que puedes comprar:", "settings": "Ajustes", "findUsOnGitHub": "Visítanos en GitHub", @@ -94,6 +94,6 @@ } } }, - "emptyPlaylist": "🐣🔎🎵❓\n\nEsta lista de reproducción se encuentra vacía", + "emptyPlaylist": "Esta lista de reproducción se encuentra vacía", "copiedToClipBoard": "Copiado al portapapeles:" } diff --git a/lib/src/l10n/app_sk.arb b/lib/src/l10n/app_sk.arb index 30dd4f894..255cdcc58 100644 --- a/lib/src/l10n/app_sk.arb +++ b/lib/src/l10n/app_sk.arb @@ -36,9 +36,9 @@ "discover": "Objavte", "forYou": "Pre vás", "search": "Nájsť", - "noPodcastFound": "🐣🔎🎙❓\n\nĽutujeme, s týmto vyhľadávacím dopytom sa nenašiel žiadny podcast.", - "noPodcastChartsFound": "🐣🔎🎙❓\n\nĽutujeme, pre túto krajinu alebo kategóriu nie sú k dispozícii žiadne rebríčky.", - "noPodcastSubsFound": "🐣🔎🎙❓\n\nZatiaľ ste sa neprihlásili na odber žiadneho podcastu.", + "noPodcastFound": "Ľutujeme, s týmto vyhľadávacím dopytom sa nenašiel žiadny podcast.", + "noPodcastChartsFound": "Ľutujeme, pre túto krajinu alebo kategóriu nie sú k dispozícii žiadne rebríčky.", + "noPodcastSubsFound": "Zatiaľ ste sa neprihlásili na odber žiadneho podcastu.", "charts": "Rebríčky", "discover": "Objavte", "upNext": "Nasledujúce", @@ -64,9 +64,9 @@ "offline": "bez pripojenia", "offlineDescription": "Zdá sa, že váš počítač nie je pripojený k internetu.", "newEpisodeAvailable": "K dispozícii je nová epizóda:", - "noStationFound": "🐣🔎📻❓\n\nĽutujeme, na tento vyhľadávací dopyt sa nenašli žiadne stanice", - "nothingFound": "🐣🔎❓\n\nNič sa nenašlo", - "noStarredStations": "🐣🔎📻❓\n\nZatiaľ ste nezaradili medzi obľúbené žiadne rozhlasové stanice s tlačidlom s hviezdičkou.", + "noStationFound": "Ľutujeme, na tento vyhľadávací dopyt sa nenašli žiadne stanice.", + "nothingFound": "Nič sa nenašlo.", + "noStarredStations": "Zatiaľ ste nezaradili medzi obľúbené žiadne rozhlasové stanice s tlačidlom s hviezdičkou.", "tags": "Tagy", "quality": "Kvalita", "station": "Stanica", @@ -81,8 +81,8 @@ "podcastFeedIsEmpty": "Ľutujeme, informačný kanál tohto podcastu je prázdny.", "video": "Video", "ok": "OK", - "noLocalTitlesFound": "🐣🔎🎵❓\n\nZdá sa, že vaša lokálna audio zbierka je prázdna. V nastaveniach skontrolujte umiestnenie knižnice.", - "noLocalSearchFound": "🐣🔎🎵❓\n\nĽutujeme, pre tento vyhľadávací dopyt sa nenašlo žiadne lokálne audio.", + "noLocalTitlesFound": "Zdá sa, že vaša lokálna audio zbierka je prázdna. V nastaveniach skontrolujte umiestnenie knižnice.", + "noLocalSearchFound": "Ľutujeme, pre tento vyhľadávací dopyt sa nenašlo žiadne lokálne audio.", "buyMusicOnline": "Možno tu nájdete hudbu, ktorú by ste si chceli kúpiť:", "settings": "Nastavenia", "findUsOnGitHub": "Nájdete nás na GitHube", @@ -98,11 +98,11 @@ } } }, - "emptyPlaylist": "🐣🔎🎵❓\n\nTento playlist je prázdny.", + "emptyPlaylist": "Tento playlist je prázdny.", "copiedToClipBoard": "Skopírované do schránky:", "insertIntoQueue": "Pridať do poradia", - "about": "O apke", - "localAudioCacheSuggestion": "Máte {length} lokálnych audio súborov. Chcete vytvoriť vyrovnávaciu pamäť na urýchlenie spustenia aplikácie?", + "about": "O", + "localAudioCacheSuggestion": "Máte {length} lokálnych audio súborov. Chcete vytvoriť medzipamäť na urýchlenie spustenia aplikácie?", "@localAudioCacheSuggestion": { "placeholders": { "length": { @@ -111,10 +111,11 @@ } }, "noThankYou": "Nie, ďakujem.", - "recreateLocalAudioCache": "Obnoviť vyrovnávaciu pamäť", - "useALocalAudioCache": "Použiť lokálnu audio pamäť", + "recreateLocalAudioCache": "Obnoviť medzipamäť", + "useALocalAudioCache": "Použiť medzipamäť", "newEpisodes": "Nové epizódy", "collection": "Zbierka", "addToCollection": "Pridať do zbierky", - "removeFromCollection": "Odstrániť zo zbierky" -} \ No newline at end of file + "removeFromCollection": "Odstrániť zo zbierky", + "loadingPodcastFeed": "Načítava sa kanál podcastov..." +} diff --git a/lib/src/l10n/app_sv.arb b/lib/src/l10n/app_sv.arb index 6a2ff3f68..85bcf6efb 100644 --- a/lib/src/l10n/app_sv.arb +++ b/lib/src/l10n/app_sv.arb @@ -36,8 +36,8 @@ "discover": "Spellista", "forYou": "För dig", "search": "Sök", - "noPodcastFound": "🐣🔎🎙❓\n\nTyvärr, ingen podcast hittades med denna sökfråga..", - "noPodcastChartsFound": "🐣🔎🎙❓\n\nTyvärr, inga listor tillgängliga för det här landet eller kategori.", + "noPodcastFound": "Tyvärr, ingen podcast hittades med denna sökfråga..", + "noPodcastChartsFound": "Tyvärr, inga listor tillgängliga för det här landet eller kategori.", "upNext": "Upp härnäst", "all": "Alla", "arts": "Konst", @@ -61,8 +61,8 @@ "offline": "offline", "offlineDescription": "Det verkar som om din dator inte är ansluten till internet.", "newEpisodeAvailable": "Nytt avsnitt tillgängligt:", - "noStationFound": "🐣🔎📻❓\n\nTyvärr, inga stationer hittades med denna sökfråga", - "nothingFound": "🐣🔎❓\n\nIngenting hittades", + "noStationFound": "Tyvärr, inga stationer hittades med denna sökfråga", + "nothingFound": "Ingenting hittades", "tags": "Taggar", "quality": "Kvalite", "station": "Station", @@ -77,8 +77,8 @@ "podcastFeedIsEmpty": "Tyvärr, denna podcasts flöde är tomt.", "video": "Video", "ok": "OK", - "noLocalTitlesFound": "🐣🔎🎵❓\n\nDet verkar som om din lokala musiksamling är tom. Kontrollera bibliotekets plats i inställningarna.", - "noLocalSearchFound": "🐣🔎🎵❓\n\nTyvärr, ingen lokal musik hittades för denna sökfråga.", + "noLocalTitlesFound": "Det verkar som om din lokala musiksamling är tom. Kontrollera bibliotekets plats i inställningarna.", + "noLocalSearchFound": "Tyvärr, ingen lokal musik hittades för denna sökfråga.", "buyMusicOnline": "Här kanske du hittar musik som du vill köpa:", "settings": "Inställningar", "findUsOnGitHub": "Hitta oss på GitHub", @@ -94,7 +94,7 @@ } } }, -"emptyPlaylist": "🐣🔎🎵❓\n\nDenna spellista är tom.", +"emptyPlaylist": "Denna spellista är tom.", "copiedToClipBoard": "Kopierat till urklipp:", "insertIntoQueue": "Lägg in i kö", "about": "Om", diff --git a/lib/src/local_audio/album_view.dart b/lib/src/local_audio/album_view.dart index 1ffd8f550..7d530a90c 100644 --- a/lib/src/local_audio/album_view.dart +++ b/lib/src/local_audio/album_view.dart @@ -1,3 +1,4 @@ +import 'package:animated_emoji/animated_emoji.dart'; import 'package:flutter/material.dart'; import '../../common.dart'; @@ -46,6 +47,7 @@ class AlbumsView extends StatelessWidget { if (albums!.isEmpty) { return NoSearchResultPage( + icons: const AnimatedEmoji(AnimatedEmojis.eyes), message: Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/src/local_audio/artists_view.dart b/lib/src/local_audio/artists_view.dart index 10d86cd0f..b8faa0fc3 100644 --- a/lib/src/local_audio/artists_view.dart +++ b/lib/src/local_audio/artists_view.dart @@ -1,5 +1,6 @@ import 'dart:typed_data'; +import 'package:animated_emoji/animated_emoji.dart'; import 'package:flutter/material.dart'; import 'package:yaru_widgets/yaru_widgets.dart'; @@ -37,6 +38,7 @@ class ArtistsView extends StatelessWidget { if (artists!.isEmpty) { return NoSearchResultPage( + icons: const AnimatedEmoji(AnimatedEmojis.eyes), message: Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/src/theme.dart b/lib/src/theme.dart index 9a1098f86..da9799f8a 100644 --- a/lib/src/theme.dart +++ b/lib/src/theme.dart @@ -47,6 +47,6 @@ Color getPlayerBg(Color? surfaceTintColor, Color scaffoldBg) { } } -bool get yaruStyled => Platform.isLinux; +bool get yaruStyled => false; bool get appleStyled => Platform.isMacOS || Platform.isIOS; diff --git a/pubspec.lock b/pubspec.lock index d921da76f..9c1b1a941 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,14 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + animated_emoji: + dependency: "direct main" + description: + name: animated_emoji + sha256: "23984ecfa1dea62998989853ffa2572981ff3ffc001667ffef33f541f92e43d6" + url: "https://pub.dev" + source: hosted + version: "2.1.0" archive: dependency: transitive description: @@ -485,6 +493,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + lottie: + dependency: transitive + description: + name: lottie + sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + url: "https://pub.dev" + source: hosted + version: "2.7.0" markdown: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d97ba6356..538bb8b6c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,6 +8,7 @@ environment: flutter: ">=3.10.0" dependencies: + animated_emoji: ^2.1.0 audio_service: ^0.18.12 basic_utils: ^5.6.1 cached_network_image: ^3.3.0