refactor(np): now playing controls and icons

This commit is contained in:
2025-10-04 15:19:24 -04:00
parent e5c8ce1c30
commit 9333e55095
6 changed files with 50 additions and 11 deletions

View File

@@ -48,7 +48,7 @@
disabled={!hasTrack} disabled={!hasTrack}
title="Previous" title="Previous"
> >
<img src="/icons/prev.svg" alt="Previous" /> <img src="/icons/player-skip-back.svg" alt="Previous" />
</button> </button>
<button <button
@@ -58,19 +58,28 @@
title={$playback.isPlaying ? 'Pause' : 'Play'} title={$playback.isPlaying ? 'Pause' : 'Play'}
> >
{#if $playback.isPlaying} {#if $playback.isPlaying}
<img src="/icons/pause.svg" alt="Pause" /> <img src="/icons/player-pause.svg" alt="Pause" />
{:else} {:else}
<img src="/icons/play.svg" alt="Play" /> <img src="/icons/player-play.svg" alt="Play" />
{/if} {/if}
</button> </button>
<button
class="control-button"
onclick={() => playback.stop()}
disabled={!hasTrack}
title="Stop"
>
<img src="/icons/player-stop.svg" alt="Stop" />
</button>
<button <button
class="control-button" class="control-button"
onclick={handleNext} onclick={handleNext}
disabled={!hasTrack} disabled={!hasTrack}
title="Next" title="Next"
> >
<img src="/icons/next.svg" alt="Next" /> <img src="/icons/player-skip-forward.svg" alt="Next" />
</button> </button>
</div> </div>
@@ -123,32 +132,37 @@
.controls { .controls {
display: flex; display: flex;
gap: 4px;
flex-shrink: 0; flex-shrink: 0;
} }
.control-button { .control-button {
padding: 4px; padding: 6px 20px;
min-width: auto; min-width: auto;
min-height: auto; min-height: auto;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 0;
margin: 0 -1px 0 0;
}
.control-button:first-child {
margin-left: 0;
} }
.control-button img { .control-button img {
width: 24px; width: 12px;
height: 24px; height: 12px;
filter: light-dark(none, invert(1)); filter: light-dark(none, invert(1));
} }
.play-pause { .play-pause {
padding: 6px; padding: 6px 20px;
} }
.play-pause img { .play-pause img {
width: 28px; width: 12px;
height: 28px; height: 12px;
} }
.track-info { .track-info {

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" version="1.1" viewBox="0 0 512 512">
<!-- Generator: Adobe Illustrator 29.6.1, SVG Export Plug-In . SVG Version: 2.1.1 Build 9) -->
<path d="M224,432h-80V80h80v352ZM368,432h-80V80h80v352Z" fill="#fff"/>
</svg>

After

Width:  |  Height:  |  Size: 331 B

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" version="1.1" viewBox="0 0 512 512">
<!-- Generator: Adobe Illustrator 29.6.1, SVG Export Plug-In . SVG Version: 2.1.1 Build 9) -->
<path d="M96,448l320-192L96,64v384Z" fill="#fff"/>
</svg>

After

Width:  |  Height:  |  Size: 311 B

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" version="1.1" viewBox="0 0 512 512">
<!-- Generator: Adobe Illustrator 29.6.1, SVG Export Plug-In . SVG Version: 2.1.1 Build 9) -->
<path d="M143.47,64v163.52L416,64v384l-272.53-163.51999v163.51999h-47.47V64h47.47Z" fill="#fff"/>
</svg>

After

Width:  |  Height:  |  Size: 358 B

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" version="1.1" viewBox="0 0 512 512">
<!-- Generator: Adobe Illustrator 29.6.1, SVG Export Plug-In . SVG Version: 2.1.1 Build 9) -->
<path d="M368.53,64v163.52L96,64v384l272.53-163.52002v163.52002h47.47V64h-47.47Z" fill="#fff"/>
</svg>

After

Width:  |  Height:  |  Size: 356 B

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" version="1.1" viewBox="0 0 512 512">
<!-- Generator: Adobe Illustrator 29.6.1, SVG Export Plug-In . SVG Version: 2.1.1 Build 9) -->
<path d="M80,80h352v352H80V80Z" fill="#fff"/>
</svg>

After

Width:  |  Height:  |  Size: 306 B