feat: add Qobuzissimes, Albums of the Week, Press Accolades browse pages
- Add 3 new Rust endpoint constants and command mappings for /discover/qobuzissims, /discover/albumOfTheWeek, /discover/pressAward - Add 3 new navigation ViewType values and genre filter contexts - Extend DiscoverBrowseView to handle the 3 new endpoint types - Add See All links with chevron caret and pipe separator to all 6 discover sections in HomeView (newReleases, mostStreamed, essentialDiscography, qobuzissimes, editorPicks, pressAwards) - Wire up 3 new views in +page.svelte with full album action callbacks - Rename Editor's Picks to Albums of the Week, Press Awards to Press Accolades across all 4 locale files (en, es, de, fr) - Fix rank badge: top-right position, Impact font, 35px size - See All styling: inline-flex with ChevronRight icon, pipe divider, 15px gap before nav buttons, #666666 color matching nav buttons
This commit is contained in:
1 parent
a575c0c805
commit
ba62057545
13 files changed
+171
-27
No files matched your search
@@ -69,6 +69,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 15px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
|
||||
@@ -524,12 +524,13 @@
|
||||
|
||||
.rank-badge {
|
||||
position: absolute;
|
||||
bottom: 114px;
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
z-index: 2;
|
||||
background: rgba(0, 0, 0, 0.70);
|
||||
color: #fff;
|
||||
font-size: 33px;
|
||||
font-family: Impact, 'Arial Black', sans-serif;
|
||||
font-size: 35px;
|
||||
font-weight: 700;
|
||||
padding: 2px 8px;
|
||||
border-radius: 8px;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
|
||||
interface Props {
|
||||
endpointType: 'newReleases' | 'idealDiscography' | 'mostStreamed';
|
||||
endpointType: 'newReleases' | 'idealDiscography' | 'mostStreamed' | 'qobuzissimes' | 'albumOfTheWeek' | 'pressAward';
|
||||
titleKey: string;
|
||||
showRanking?: boolean;
|
||||
onBack: () => void;
|
||||
@@ -88,6 +88,9 @@
|
||||
newReleases: 'discover-new-releases',
|
||||
idealDiscography: 'discover-ideal-discography',
|
||||
mostStreamed: 'discover-top-albums',
|
||||
qobuzissimes: 'discover-qobuzissimes',
|
||||
albumOfTheWeek: 'discover-albums-of-the-week',
|
||||
pressAward: 'discover-press-accolades',
|
||||
};
|
||||
const genreContext = GENRE_CONTEXT_MAP[endpointType];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount, tick } from 'svelte';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { Music, User, Loader2 } from 'lucide-svelte';
|
||||
import { Music, User, Loader2, ChevronRight } from 'lucide-svelte';
|
||||
import {
|
||||
getHomeCache,
|
||||
setHomeCache,
|
||||
@@ -124,6 +124,9 @@
|
||||
onNavigateNewReleases?: () => void;
|
||||
onNavigateIdealDiscography?: () => void;
|
||||
onNavigateTopAlbums?: () => void;
|
||||
onNavigateQobuzissimes?: () => void;
|
||||
onNavigateAlbumsOfTheWeek?: () => void;
|
||||
onNavigatePressAccolades?: () => void;
|
||||
}
|
||||
|
||||
let {
|
||||
@@ -166,6 +169,9 @@
|
||||
onNavigateNewReleases,
|
||||
onNavigateIdealDiscography,
|
||||
onNavigateTopAlbums,
|
||||
onNavigateQobuzissimes,
|
||||
onNavigateAlbumsOfTheWeek,
|
||||
onNavigatePressAccolades,
|
||||
}: Props = $props();
|
||||
|
||||
// Home settings state
|
||||
@@ -892,7 +898,8 @@
|
||||
{#snippet header()}
|
||||
<h2 class="section-title">{$t('home.newReleases')}</h2>
|
||||
{#if onNavigateNewReleases}
|
||||
<button class="see-all-link" onclick={onNavigateNewReleases}>{$t('home.seeAll')}</button>
|
||||
<button class="see-all-link" onclick={onNavigateNewReleases}>{$t('home.seeAll')}<ChevronRight size={14} /></button>
|
||||
<span class="see-all-divider">|</span>
|
||||
{/if}
|
||||
{/snippet}
|
||||
{#snippet children()}
|
||||
@@ -937,7 +944,14 @@
|
||||
</div>
|
||||
</div>
|
||||
{:else if pressAwards.length > 0}
|
||||
<HorizontalScrollRow title={$t('home.pressAwards')}>
|
||||
<HorizontalScrollRow>
|
||||
{#snippet header()}
|
||||
<h2 class="section-title">{$t('home.pressAwards')}</h2>
|
||||
{#if onNavigatePressAccolades}
|
||||
<button class="see-all-link" onclick={onNavigatePressAccolades}>{$t('home.seeAll')}<ChevronRight size={14} /></button>
|
||||
<span class="see-all-divider">|</span>
|
||||
{/if}
|
||||
{/snippet}
|
||||
{#snippet children()}
|
||||
{#each pressAwards as album}
|
||||
<AlbumCard
|
||||
@@ -984,7 +998,8 @@
|
||||
{#snippet header()}
|
||||
<h2 class="section-title">{$t('home.popularAlbums')}</h2>
|
||||
{#if onNavigateTopAlbums}
|
||||
<button class="see-all-link" onclick={onNavigateTopAlbums}>{$t('home.seeAll')}</button>
|
||||
<button class="see-all-link" onclick={onNavigateTopAlbums}>{$t('home.seeAll')}<ChevronRight size={14} /></button>
|
||||
<span class="see-all-divider">|</span>
|
||||
{/if}
|
||||
{/snippet}
|
||||
{#snippet children()}
|
||||
@@ -1029,7 +1044,14 @@
|
||||
</div>
|
||||
</div>
|
||||
{:else if qobuzissimes.length > 0}
|
||||
<HorizontalScrollRow title={$t('home.qobuzissimes')}>
|
||||
<HorizontalScrollRow>
|
||||
{#snippet header()}
|
||||
<h2 class="section-title">{$t('home.qobuzissimes')}</h2>
|
||||
{#if onNavigateQobuzissimes}
|
||||
<button class="see-all-link" onclick={onNavigateQobuzissimes}>{$t('home.seeAll')}<ChevronRight size={14} /></button>
|
||||
<span class="see-all-divider">|</span>
|
||||
{/if}
|
||||
{/snippet}
|
||||
{#snippet children()}
|
||||
{#each qobuzissimes as album}
|
||||
<AlbumCard
|
||||
@@ -1072,7 +1094,14 @@
|
||||
</div>
|
||||
</div>
|
||||
{:else if editorPicks.length > 0}
|
||||
<HorizontalScrollRow title={$t('home.editorPicks')}>
|
||||
<HorizontalScrollRow>
|
||||
{#snippet header()}
|
||||
<h2 class="section-title">{$t('home.editorPicks')}</h2>
|
||||
{#if onNavigateAlbumsOfTheWeek}
|
||||
<button class="see-all-link" onclick={onNavigateAlbumsOfTheWeek}>{$t('home.seeAll')}<ChevronRight size={14} /></button>
|
||||
<span class="see-all-divider">|</span>
|
||||
{/if}
|
||||
{/snippet}
|
||||
{#snippet children()}
|
||||
{#each editorPicks as album}
|
||||
<AlbumCard
|
||||
@@ -1169,7 +1198,8 @@
|
||||
{#snippet header()}
|
||||
<h2 class="section-title">{$t('home.essentialDiscography')}</h2>
|
||||
{#if onNavigateIdealDiscography}
|
||||
<button class="see-all-link" onclick={onNavigateIdealDiscography}>{$t('home.seeAll')}</button>
|
||||
<button class="see-all-link" onclick={onNavigateIdealDiscography}>{$t('home.seeAll')}<ChevronRight size={14} /></button>
|
||||
<span class="see-all-divider">|</span>
|
||||
{/if}
|
||||
{/snippet}
|
||||
{#snippet children()}
|
||||
@@ -1737,6 +1767,9 @@
|
||||
}
|
||||
|
||||
.see-all-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
background: none;
|
||||
border: none;
|
||||
color: #666666;
|
||||
@@ -1752,4 +1785,11 @@
|
||||
.see-all-link:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.see-all-divider {
|
||||
color: #666666;
|
||||
font-size: 16px;
|
||||
margin-left: 12px;
|
||||
user-select: none;
|
||||
}
|
||||
</style>
|
||||
@@ -14,7 +14,7 @@
|
||||
"favorites": "Favoriten",
|
||||
"settings": "Einstellungen",
|
||||
"newReleases": "Neuerscheinungen",
|
||||
"pressAwards": "Presspreise",
|
||||
"pressAwards": "Presseauszeichnungen",
|
||||
"radio": "Radio",
|
||||
"recentlyAdded": "Kürzlich hinzugefügt",
|
||||
"backTo": "Zurück zu",
|
||||
@@ -26,7 +26,7 @@
|
||||
"featuredForYou": "Für dich empfohlen",
|
||||
"recentlyPlayed": "Kürzlich gespielt",
|
||||
"newReleases": "Neuerscheinungen",
|
||||
"pressAwards": "Presspreise",
|
||||
"pressAwards": "Presseauszeichnungen",
|
||||
"madeForYou": "Für dich erstellt",
|
||||
"topPicks": "Top-Auswahl",
|
||||
"yourPlaylists": "Deine Playlists",
|
||||
@@ -37,7 +37,7 @@
|
||||
"loadError": "Startseite konnte nicht geladen werden",
|
||||
"popularAlbums": "Beliebte Alben",
|
||||
"qobuzissimes": "Qobuzissimes",
|
||||
"editorPicks": "Redaktionsempfehlungen",
|
||||
"editorPicks": "Alben der Woche",
|
||||
"continueListening": "Weiterhören",
|
||||
"yourTopArtists": "Deine Top-Künstler",
|
||||
"artistPlays": "{count} Wiedergaben",
|
||||
@@ -53,7 +53,10 @@
|
||||
"noResults": "Keine Alben gefunden",
|
||||
"searchPlaceholder": "Alben suchen...",
|
||||
"allGenres": "Alle Genres",
|
||||
"backToHome": "Zurück zur Startseite"
|
||||
"backToHome": "Zurück zur Startseite",
|
||||
"qobuzissimes": "Qobuzissimes",
|
||||
"albumsOfTheWeek": "Alben der Woche",
|
||||
"pressAccolades": "Presseauszeichnungen"
|
||||
},
|
||||
"search": {
|
||||
"title": "Suchen",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"favorites": "Favorites",
|
||||
"settings": "Settings",
|
||||
"newReleases": "New Releases",
|
||||
"pressAwards": "Press Awards",
|
||||
"pressAwards": "Press Accolades",
|
||||
"radio": "Radio",
|
||||
"recentlyAdded": "Recently Added",
|
||||
"backTo": "Back to",
|
||||
@@ -26,7 +26,7 @@
|
||||
"featuredForYou": "Featured for you",
|
||||
"recentlyPlayed": "Recently Played",
|
||||
"newReleases": "New Releases",
|
||||
"pressAwards": "Press Awards",
|
||||
"pressAwards": "Press Accolades",
|
||||
"madeForYou": "Made for You",
|
||||
"topPicks": "Top Picks",
|
||||
"yourPlaylists": "Your Playlists",
|
||||
@@ -37,7 +37,7 @@
|
||||
"loadError": "Could not load Home",
|
||||
"popularAlbums": "Popular Albums",
|
||||
"qobuzissimes": "Qobuzissimes",
|
||||
"editorPicks": "Editor's Picks",
|
||||
"editorPicks": "Albums of the Week",
|
||||
"qobuzPlaylists": "Qobuz Playlists",
|
||||
"essentialDiscography": "Essential Discography",
|
||||
"allTags": "All",
|
||||
@@ -56,7 +56,10 @@
|
||||
"noResults": "No albums found",
|
||||
"searchPlaceholder": "Search albums...",
|
||||
"allGenres": "All Genres",
|
||||
"backToHome": "Back to Home"
|
||||
"backToHome": "Back to Home",
|
||||
"qobuzissimes": "Qobuzissimes",
|
||||
"albumsOfTheWeek": "Albums of the Week",
|
||||
"pressAccolades": "Press Accolades"
|
||||
},
|
||||
"search": {
|
||||
"title": "Search",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"featuredForYou": "Destacados para ti",
|
||||
"recentlyPlayed": "Escuchado Recientemente",
|
||||
"newReleases": "Novedades",
|
||||
"pressAwards": "Premios de Prensa",
|
||||
"pressAwards": "Reconocimientos de Prensa",
|
||||
"madeForYou": "Hecho para Ti",
|
||||
"topPicks": "Selecciones Destacadas",
|
||||
"yourPlaylists": "Tus Listas",
|
||||
@@ -37,7 +37,7 @@
|
||||
"loadError": "No se pudo cargar el Inicio",
|
||||
"popularAlbums": "Álbumes Populares",
|
||||
"qobuzissimes": "Qobuzissimes",
|
||||
"editorPicks": "Selección del Editor",
|
||||
"editorPicks": "Álbumes de la Semana",
|
||||
"qobuzPlaylists": "Playlists de Qobuz",
|
||||
"essentialDiscography": "Discografía Esencial",
|
||||
"allTags": "Todo",
|
||||
@@ -56,7 +56,10 @@
|
||||
"noResults": "No se encontraron álbumes",
|
||||
"searchPlaceholder": "Buscar álbumes...",
|
||||
"allGenres": "Todos los Géneros",
|
||||
"backToHome": "Volver al Inicio"
|
||||
"backToHome": "Volver al Inicio",
|
||||
"qobuzissimes": "Qobuzissimes",
|
||||
"albumsOfTheWeek": "Álbumes de la Semana",
|
||||
"pressAccolades": "Reconocimientos de Prensa"
|
||||
},
|
||||
"search": {
|
||||
"title": "Buscar",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"favorites": "Favoris",
|
||||
"settings": "Paramètres",
|
||||
"newReleases": "Nouvelles sorties",
|
||||
"pressAwards": "Prix de la presse",
|
||||
"pressAwards": "Distinctions de la presse",
|
||||
"radio": "Radio",
|
||||
"recentlyAdded": "Récemment ajouté",
|
||||
"backTo": "Retour à",
|
||||
@@ -26,7 +26,7 @@
|
||||
"featuredForYou": "Recommandé pour vous",
|
||||
"recentlyPlayed": "Récemment écouté",
|
||||
"newReleases": "Nouvelles sorties",
|
||||
"pressAwards": "Prix de la presse",
|
||||
"pressAwards": "Distinctions de la presse",
|
||||
"madeForYou": "Fait pour vous",
|
||||
"topPicks": "Top picks",
|
||||
"yourPlaylists": "Vos playlists",
|
||||
@@ -37,7 +37,7 @@
|
||||
"loadError": "Impossible de charger l'accueil",
|
||||
"popularAlbums": "Albums populaires",
|
||||
"qobuzissimes": "Qobuzissimes",
|
||||
"editorPicks": "Sélections de l'éditeur",
|
||||
"editorPicks": "Albums de la semaine",
|
||||
"continueListening": "Continuer l'écoute",
|
||||
"yourTopArtists": "Vos artistes favoris",
|
||||
"artistPlays": "{count} lectures",
|
||||
@@ -53,7 +53,10 @@
|
||||
"noResults": "Aucun album trouvé",
|
||||
"searchPlaceholder": "Rechercher des albums...",
|
||||
"allGenres": "Tous les genres",
|
||||
"backToHome": "Retour à l'accueil"
|
||||
"backToHome": "Retour à l'accueil",
|
||||
"qobuzissimes": "Qobuzissimes",
|
||||
"albumsOfTheWeek": "Albums de la semaine",
|
||||
"pressAccolades": "Distinctions de la presse"
|
||||
},
|
||||
"search": {
|
||||
"title": "Recherche",
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface GenreTreeNode {
|
||||
loading?: boolean;
|
||||
}
|
||||
|
||||
export type GenreFilterContext = 'home' | 'favorites' | 'discover-new-releases' | 'discover-ideal-discography' | 'discover-top-albums';
|
||||
export type GenreFilterContext = 'home' | 'favorites' | 'discover-new-releases' | 'discover-ideal-discography' | 'discover-top-albums' | 'discover-qobuzissimes' | 'discover-albums-of-the-week' | 'discover-press-accolades';
|
||||
|
||||
interface ContextState {
|
||||
selectedGenreIds: Set<number>;
|
||||
@@ -43,6 +43,9 @@ const STORAGE_KEYS: Record<GenreFilterContext, string> = {
|
||||
'discover-new-releases': 'qbz_genre_filter_discover_new_releases',
|
||||
'discover-ideal-discography': 'qbz_genre_filter_discover_ideal_discography',
|
||||
'discover-top-albums': 'qbz_genre_filter_discover_top_albums',
|
||||
'discover-qobuzissimes': 'qbz_genre_filter_discover_qobuzissimes',
|
||||
'discover-albums-of-the-week': 'qbz_genre_filter_discover_albums_of_the_week',
|
||||
'discover-press-accolades': 'qbz_genre_filter_discover_press_accolades',
|
||||
};
|
||||
|
||||
const GENRE_CACHE_KEY = 'qbz_genre_cache';
|
||||
@@ -121,6 +124,21 @@ const state: GenreFilterState = {
|
||||
rememberSelection: true,
|
||||
listeners: new Set(),
|
||||
},
|
||||
'discover-qobuzissimes': {
|
||||
selectedGenreIds: new Set(),
|
||||
rememberSelection: true,
|
||||
listeners: new Set(),
|
||||
},
|
||||
'discover-albums-of-the-week': {
|
||||
selectedGenreIds: new Set(),
|
||||
rememberSelection: true,
|
||||
listeners: new Set(),
|
||||
},
|
||||
'discover-press-accolades': {
|
||||
selectedGenreIds: new Set(),
|
||||
rememberSelection: true,
|
||||
listeners: new Set(),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +25,10 @@ export type ViewType =
|
||||
| 'favorites-playlists'
|
||||
| 'discover-new-releases'
|
||||
| 'discover-ideal-discography'
|
||||
| 'discover-top-albums';
|
||||
| 'discover-top-albums'
|
||||
| 'discover-qobuzissimes'
|
||||
| 'discover-albums-of-the-week'
|
||||
| 'discover-press-accolades';
|
||||
export type FavoritesTab = 'tracks' | 'albums' | 'artists' | 'playlists';
|
||||
|
||||
// Navigation state
|
||||
|
||||
@@ -3118,6 +3118,9 @@
|
||||
onNavigateNewReleases={() => navigateTo('discover-new-releases')}
|
||||
onNavigateIdealDiscography={() => navigateTo('discover-ideal-discography')}
|
||||
onNavigateTopAlbums={() => navigateTo('discover-top-albums')}
|
||||
onNavigateQobuzissimes={() => navigateTo('discover-qobuzissimes')}
|
||||
onNavigateAlbumsOfTheWeek={() => navigateTo('discover-albums-of-the-week')}
|
||||
onNavigatePressAccolades={() => navigateTo('discover-press-accolades')}
|
||||
/>
|
||||
{/if}
|
||||
{:else if activeView === 'search'}
|
||||
@@ -3457,6 +3460,63 @@
|
||||
{downloadStateVersion}
|
||||
onArtistClick={handleArtistClick}
|
||||
/>
|
||||
{:else if activeView === 'discover-qobuzissimes'}
|
||||
<DiscoverBrowseView
|
||||
endpointType="qobuzissimes"
|
||||
titleKey="discover.qobuzissimes"
|
||||
onBack={navGoBack}
|
||||
onAlbumClick={handleAlbumClick}
|
||||
onAlbumPlay={playAlbumById}
|
||||
onAlbumPlayNext={queueAlbumNextById}
|
||||
onAlbumPlayLater={queueAlbumLaterById}
|
||||
onAlbumShareQobuz={shareAlbumQobuzLinkById}
|
||||
onAlbumShareSonglink={shareAlbumSonglinkById}
|
||||
onAlbumDownload={downloadAlbumById}
|
||||
onOpenAlbumFolder={openAlbumFolderById}
|
||||
onReDownloadAlbum={reDownloadAlbumById}
|
||||
onAddAlbumToPlaylist={addAlbumToPlaylistById}
|
||||
checkAlbumFullyDownloaded={checkAlbumFullyDownloaded}
|
||||
{downloadStateVersion}
|
||||
onArtistClick={handleArtistClick}
|
||||
/>
|
||||
{:else if activeView === 'discover-albums-of-the-week'}
|
||||
<DiscoverBrowseView
|
||||
endpointType="albumOfTheWeek"
|
||||
titleKey="discover.albumsOfTheWeek"
|
||||
onBack={navGoBack}
|
||||
onAlbumClick={handleAlbumClick}
|
||||
onAlbumPlay={playAlbumById}
|
||||
onAlbumPlayNext={queueAlbumNextById}
|
||||
onAlbumPlayLater={queueAlbumLaterById}
|
||||
onAlbumShareQobuz={shareAlbumQobuzLinkById}
|
||||
onAlbumShareSonglink={shareAlbumSonglinkById}
|
||||
onAlbumDownload={downloadAlbumById}
|
||||
onOpenAlbumFolder={openAlbumFolderById}
|
||||
onReDownloadAlbum={reDownloadAlbumById}
|
||||
onAddAlbumToPlaylist={addAlbumToPlaylistById}
|
||||
checkAlbumFullyDownloaded={checkAlbumFullyDownloaded}
|
||||
{downloadStateVersion}
|
||||
onArtistClick={handleArtistClick}
|
||||
/>
|
||||
{:else if activeView === 'discover-press-accolades'}
|
||||
<DiscoverBrowseView
|
||||
endpointType="pressAward"
|
||||
titleKey="discover.pressAccolades"
|
||||
onBack={navGoBack}
|
||||
onAlbumClick={handleAlbumClick}
|
||||
onAlbumPlay={playAlbumById}
|
||||
onAlbumPlayNext={queueAlbumNextById}
|
||||
onAlbumPlayLater={queueAlbumLaterById}
|
||||
onAlbumShareQobuz={shareAlbumQobuzLinkById}
|
||||
onAlbumShareSonglink={shareAlbumSonglinkById}
|
||||
onAlbumDownload={downloadAlbumById}
|
||||
onOpenAlbumFolder={openAlbumFolderById}
|
||||
onReDownloadAlbum={reDownloadAlbumById}
|
||||
onAddAlbumToPlaylist={addAlbumToPlaylistById}
|
||||
checkAlbumFullyDownloaded={checkAlbumFullyDownloaded}
|
||||
{downloadStateVersion}
|
||||
onArtistClick={handleArtistClick}
|
||||
/>
|
||||
{/if}
|
||||
</main>
|
||||
|
||||
|
||||
Reference in new issue
Block a user