fix: Pause button now only appears on hover for playing tracks

- Replace Lucide Pause icon with solid SVG pause icon
- Pause button only shows when hovering over currently playing track
- Playing indicator (animated bars) shows when track is playing
- Play button shows for all non-playing tracks on hover
- Fixes issue where pause appeared on all tracks on hover
This commit is contained in:
vicrodh committed 2026-01-20 17:33:19 -06:00
1 parent 4a79493776
commit 2a8087ecb2
2 files changed
+17 -5

No files matched your search

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { invoke } from '@tauri-apps/api/core'; import { invoke } from '@tauri-apps/api/core';
import { ArrowLeft, User, ChevronDown, ChevronUp, Play, Pause, Music, Heart, Search, X, ChevronLeft, ChevronRight } from 'lucide-svelte'; import { ArrowLeft, User, ChevronDown, ChevronUp, Play, Music, Heart, Search, X, ChevronLeft, ChevronRight } from 'lucide-svelte';
import type { ArtistDetail, QobuzArtist } from '$lib/types'; import type { ArtistDetail, QobuzArtist } from '$lib/types';
import AlbumCard from '../AlbumCard.svelte'; import AlbumCard from '../AlbumCard.svelte';
import TrackMenu from '../TrackMenu.svelte'; import TrackMenu from '../TrackMenu.svelte';
@@ -834,7 +834,11 @@
<div class="bar"></div> <div class="bar"></div>
<div class="bar"></div> <div class="bar"></div>
</div> </div>
<Pause size={18} class="pause-icon" aria-hidden="true" /> <span class="pause-icon" aria-hidden="true">
<svg width="18" height="18" viewBox="0 0 24 24" fill="white">
<path d="M6 4h4v16H6V4zm8 0h4v16h-4V4z"/>
</svg>
</span>
</button> </button>
</div> </div>
<div class="track-info"> <div class="track-info">
+11 -3
View File
@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { onMount, tick } from 'svelte'; import { onMount, tick } from 'svelte';
import { invoke } from '@tauri-apps/api/core'; import { invoke } from '@tauri-apps/api/core';
import { Search, Disc3, Music, Mic2, User, X, ChevronLeft, ChevronRight, Crown, Pause } from 'lucide-svelte'; import { Search, Disc3, Music, Mic2, User, X, ChevronLeft, ChevronRight, Crown } from 'lucide-svelte';
import AlbumCard from '../AlbumCard.svelte'; import AlbumCard from '../AlbumCard.svelte';
import TrackMenu from '../TrackMenu.svelte'; import TrackMenu from '../TrackMenu.svelte';
import { getSearchState, setSearchState, type SearchResults, type SearchAllResults, type SearchTab } from '$lib/stores/searchState'; import { getSearchState, setSearchState, type SearchResults, type SearchAllResults, type SearchTab } from '$lib/stores/searchState';
@@ -824,7 +824,11 @@
<div class="bar"></div> <div class="bar"></div>
<div class="bar"></div> <div class="bar"></div>
</div> </div>
<Pause size={20} class="pause-icon" aria-hidden="true" /> <span class="pause-icon" aria-hidden="true">
<svg width="20" height="20" viewBox="0 0 24 24" fill="white">
<path d="M6 4h4v16H6V4zm8 0h4v16h-4V4z"/>
</svg>
</span>
</button> </button>
</div> </div>
{:else} {:else}
@@ -853,7 +857,11 @@
<div class="bar"></div> <div class="bar"></div>
<div class="bar"></div> <div class="bar"></div>
</div> </div>
<Pause size={20} class="pause-icon" aria-hidden="true" /> <span class="pause-icon" aria-hidden="true">
<svg width="20" height="20" viewBox="0 0 24 24" fill="white">
<path d="M6 4h4v16H6V4zm8 0h4v16h-4V4z"/>
</svg>
</span>
</button> </button>
</div> </div>
{/if} {/if}