From 8b0bd820d9aeebe7ad95889fcb5af871a70ac181 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Tue, 14 Apr 2026 09:42:02 -0600 Subject: [PATCH] feat(labels): replace heart overlay with pill Follow button below card Swaps the top-right heart-in-circle on 'More labels' cards for a pill-shaped Follow/Following button underneath the label name, matching the Qobuz mobile app's affordance. Uses UserPlus icon + short label ('Sigue' / 'Follow' / etc.) when not followed, Check icon + 'Siguiendo' when followed. Adds 'label.followShort' and 'label.followingShort' i18n keys for all five locales. cc --- src/lib/components/views/LabelView.svelte | 80 ++++++++++++----------- src/lib/i18n/locales/de.json | 4 +- src/lib/i18n/locales/en.json | 4 +- src/lib/i18n/locales/es.json | 4 +- src/lib/i18n/locales/fr.json | 4 +- src/lib/i18n/locales/pt.json | 4 +- 6 files changed, 56 insertions(+), 44 deletions(-) diff --git a/src/lib/components/views/LabelView.svelte b/src/lib/components/views/LabelView.svelte index 38996c280..0e03531a0 100644 --- a/src/lib/components/views/LabelView.svelte +++ b/src/lib/components/views/LabelView.svelte @@ -3,7 +3,7 @@ import { cmdAddTracksToQueue, cmdAddTracksToQueueNext } from '$lib/services/commandRouter'; import { resolveArtistImage } from '$lib/stores/customArtistImageStore'; import { onMount, onDestroy } from 'svelte'; - import { ArrowLeft, Disc3, Play, Music, Ellipsis, Heart, User, ChevronDown, ChevronUp, SquareCheckBig } from 'lucide-svelte'; + import { ArrowLeft, Disc3, Play, Music, Ellipsis, Heart, User, UserPlus, Check, ChevronDown, ChevronUp, SquareCheckBig } from 'lucide-svelte'; import BulkActionBar from '../BulkActionBar.svelte'; import { t } from '$lib/i18n'; import AlbumCard from '../AlbumCard.svelte'; @@ -1266,22 +1266,23 @@ onerror={() => handleLabelImageError(item.id)} /> {/if} -
{item.name}
+ {/each}
@@ -1668,35 +1669,36 @@ text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; } - /* Heart overlay on label card image — hidden until card hover, visible - persistently when the label is followed so the state is glanceable. */ - .label-card-fav { - position: absolute; - top: 6px; - right: 6px; - z-index: 2; - width: 28px; - height: 28px; - display: flex; + /* Pill-shaped Follow/Following button below the label card, matching + the mobile app's "Sigue" affordance. */ + .label-card-follow-btn { + display: inline-flex; align-items: center; - justify-content: center; - background: rgba(0, 0, 0, 0.55); - color: white; - border: none; - border-radius: 50%; + gap: 6px; + padding: 5px 12px; + font-size: 12px; + font-weight: 500; + color: var(--text-primary); + background: transparent; + border: 1px solid var(--text-secondary); + border-radius: 999px; cursor: pointer; - opacity: 0; - transition: opacity 150ms ease, background 150ms ease; + transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease; + white-space: nowrap; } - .label-card:hover .label-card-fav, - .label-card-fav.is-favorite, - .label-card-fav:focus-visible { - opacity: 1; + .label-card-follow-btn:hover:not(:disabled) { + background: var(--bg-secondary); + border-color: var(--text-primary); } - .label-card-fav:hover:not(:disabled) { - background: rgba(0, 0, 0, 0.75); + .label-card-follow-btn.is-following { + color: var(--accent-primary); + border-color: var(--accent-primary); } - .label-card-fav:disabled { + .label-card-follow-btn.is-following:hover:not(:disabled) { + background: color-mix(in srgb, var(--accent-primary) 12%, transparent); + } + .label-card-follow-btn:disabled { + opacity: 0.6; cursor: not-allowed; } .spacer { width: 8px; flex-shrink: 0; } diff --git a/src/lib/i18n/locales/de.json b/src/lib/i18n/locales/de.json index add06ee72..b3bdc1271 100644 --- a/src/lib/i18n/locales/de.json +++ b/src/lib/i18n/locales/de.json @@ -140,7 +140,9 @@ "showMore": "Mehr anzeigen", "showLess": "Weniger anzeigen", "follow": "Label folgen", - "unfollow": "Nicht mehr folgen" + "unfollow": "Nicht mehr folgen", + "followShort": "Folgen", + "followingShort": "Folge ich" }, "labelReleases": { "albumCount": "{count} Alben", diff --git a/src/lib/i18n/locales/en.json b/src/lib/i18n/locales/en.json index 2ff04ca9e..f9b204001 100644 --- a/src/lib/i18n/locales/en.json +++ b/src/lib/i18n/locales/en.json @@ -140,7 +140,9 @@ "showMore": "Show more", "showLess": "Show less", "follow": "Follow label", - "unfollow": "Unfollow label" + "unfollow": "Unfollow label", + "followShort": "Follow", + "followingShort": "Following" }, "labelReleases": { "albumCount": "{count} albums", diff --git a/src/lib/i18n/locales/es.json b/src/lib/i18n/locales/es.json index 09317c1f7..69fb85bd3 100644 --- a/src/lib/i18n/locales/es.json +++ b/src/lib/i18n/locales/es.json @@ -140,7 +140,9 @@ "showMore": "Ver más", "showLess": "Ver menos", "follow": "Seguir sello", - "unfollow": "Dejar de seguir" + "unfollow": "Dejar de seguir", + "followShort": "Sigue", + "followingShort": "Siguiendo" }, "labelReleases": { "albumCount": "{count} albums", diff --git a/src/lib/i18n/locales/fr.json b/src/lib/i18n/locales/fr.json index a7678cf0e..df9ba2d24 100644 --- a/src/lib/i18n/locales/fr.json +++ b/src/lib/i18n/locales/fr.json @@ -140,7 +140,9 @@ "showMore": "Voir plus", "showLess": "Voir moins", "follow": "Suivre le label", - "unfollow": "Ne plus suivre" + "unfollow": "Ne plus suivre", + "followShort": "Suivre", + "followingShort": "Suivi" }, "labelReleases": { "albumCount": "{count} albums", diff --git a/src/lib/i18n/locales/pt.json b/src/lib/i18n/locales/pt.json index 79db6b2d9..603605ea5 100644 --- a/src/lib/i18n/locales/pt.json +++ b/src/lib/i18n/locales/pt.json @@ -140,7 +140,9 @@ "showMore": "Mostrar mais", "showLess": "Mostrar menos", "follow": "Seguir selo", - "unfollow": "Deixar de seguir" + "unfollow": "Deixar de seguir", + "followShort": "Seguir", + "followingShort": "Seguindo" }, "labelReleases": { "albumCount": "{count} álbuns",