diff --git a/Cargo.toml b/Cargo.toml index d489cc8..a2de486 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "furumusic" -version = "0.2.15" +version = "0.3.0" edition = "2024" description = "Reusable web-app boilerplate: auth, OIDC/SSO, admin panel, user management, i18n, PostgreSQL" diff --git a/src/i18n/phrases.rs b/src/i18n/phrases.rs index 105d8d1..ca879f2 100644 --- a/src/i18n/phrases.rs +++ b/src/i18n/phrases.rs @@ -273,6 +273,7 @@ translations! { player_library: "Library" , "Библиотека"; player_artists: "Artists" , "Артисты"; player_global_library: "Global" , "Global"; + player_featured_only_artists: "Featured only" , "Только фиты"; player_release: "Release" , "Релиз"; player_releases: "Releases" , "Релизы"; player_tracks: "Tracks" , "Треки"; diff --git a/templates/player/scripts.html b/templates/player/scripts.html index 96b31c4..f2a52d6 100644 --- a/templates/player/scripts.html +++ b/templates/player/scripts.html @@ -2048,6 +2048,17 @@ document.addEventListener('alpine:init', () => { } }, + isFeaturedOnlyArtist(artist) { + return Number(artist?.release_count || 0) <= 0 && Number(artist?.track_count || 0) > 0; + }, + + shouldShowFeaturedSeparator(index) { + if (!(this.view === 'artists' || this.view === 'my_uploads') || index <= 0) return false; + const current = this.artists[index]; + const previous = this.artists[index - 1]; + return this.isFeaturedOnlyArtist(current) && !this.isFeaturedOnlyArtist(previous); + }, + async openArtist(id, options = {}) { this._beginNavigation('#artist/' + id, options); this.searchQuery = ''; diff --git a/templates/player/shell.html b/templates/player/shell.html index c339387..375dd4c 100644 --- a/templates/player/shell.html +++ b/templates/player/shell.html @@ -523,29 +523,36 @@

-