diff --git a/src/lib/components/media/miniPlayer.svelte b/src/lib/components/media/miniPlayer.svelte index d6bd266..38a2833 100644 --- a/src/lib/components/media/miniPlayer.svelte +++ b/src/lib/components/media/miniPlayer.svelte @@ -4,6 +4,7 @@ import IconButton from '$lib/components/utility/iconButton.svelte' import VolumeSlider from '$lib/components/utility/volumeSlider.svelte' import Slider from '$lib/components/utility/slider.svelte' + import { formatDuration } from '$lib/utils/utils.js' import { currentlyPlaying } from '$lib/utils/stores.js' import { slide } from 'svelte/transition' @@ -11,86 +12,95 @@ let volume let songLiked = false, - songPlaying = false - - const formatDuration = (timeMilliseconds) => { - const seconds = Math.floor((timeMilliseconds / 1000) % 60) - const minutes = Math.floor((timeMilliseconds / 1000 / 60) % 60) - - return [minutes.toString(), seconds.toString().padStart(2, '0')].join(':') - } + songPlaying = false, + fullplayerOpen = false -{#if song} -
- {#if displayMode === 'vertical'} -

Vertical Mode

- {:else} -
-
- {song.name} thumbnail -
- {song.name} - - {#each song.artists as artist} - {@const listIndex = song.artists.indexOf(artist)} - {artist.name} - {#if listIndex === song.artists.length - 2} - & - {:else if listIndex < song.artists.length - 2} - , - {/if} - {/each} - -
- -
-
-
- - - - (songPlaying = !songPlaying)}> - - - ($currentlyPlaying = null)}> - - - - - -
-
-
0:00
- -
{formatDuration(song.duration)}
-
-
-
- - - - - - - - - - -
+ {/each} +
- {/if} + + +
+
+ + + + (songPlaying = !songPlaying)}> + + + ($currentlyPlaying = null)}> + + + + + +
+
+
0:00
+ +
{formatDuration(song.duration)}
+
+
+
+ + + + + + + + + + + (fullplayerOpen = !fullplayerOpen)}> + + +
+
+{:else if song && displayMode === 'vertical'} +
+
+
+ {song.name} thumbnail +
+ {song.name} + {Array.from(song.artists, (artist) => artist.name).join(', ')} +
+
+
+ + (songPlaying = !songPlaying)}> + + +
+
{/if} - - diff --git a/src/lib/components/utility/footer.svelte b/src/lib/components/utility/footer.svelte deleted file mode 100644 index 0c7830e..0000000 --- a/src/lib/components/utility/footer.svelte +++ /dev/null @@ -1,12 +0,0 @@ -
- -
- - diff --git a/src/lib/components/utility/navbar.svelte b/src/lib/components/utility/navbar.svelte index e47621a..253d6b7 100644 --- a/src/lib/components/utility/navbar.svelte +++ b/src/lib/components/utility/navbar.svelte @@ -1,37 +1,25 @@ -