feat(slint): clickable artist name on AlbumCard -> artist page

Ports Tauri's behavior where clicking an album card's artist name
navigates to that artist (the card body still opens the album).

  - AlbumCardItem gains artist-id; populated in every album-card
    constructor (home/search/label/foryou/favorites). Artist-page
    release cards leave it empty (their subtitle slot shows the year,
    not the artist, so it stays non-clickable).
  - AlbumCard wraps the artist name in a TouchArea that emits
    media-action("artist", artist-id, "open") and brightens on hover
    only when an id is known.
  - main.rs handles ("artist","open") -> open the artist page;
    FavoritesView (which only forwarded clicked) now forwards the
    artist action.

cc
This commit is contained in:
vicrodh committed 2026-05-22 02:54:52 -06:00
1 parent db8a6ac5b1
commit 75d8571be3
8 files changed
+56 -6

No files matched your search

+3
View File
@@ -103,6 +103,7 @@ pub struct AlbumCard {
pub id: String,
pub title: String,
pub artist: String,
pub artist_id: String,
pub year: String,
pub quality_tier: String,
pub quality_label: String,
@@ -252,6 +253,7 @@ fn map_album(album: Album) -> AlbumCard {
id: album.id,
title: album.title,
artist: album.artist.name,
artist_id: album.artist.id.to_string(),
year,
quality_tier: tier(album.maximum_bit_depth).to_string(),
quality_label,
@@ -335,6 +337,7 @@ pub fn apply_favorites(window: &AppWindow, data: FavData) {
id: a.id.into(),
title: a.title.into(),
artist: a.artist.into(),
artist_id: a.artist_id.into(),
genre: "".into(),
year: a.year.into(),
quality_tier: a.quality_tier.into(),