Make left sidebar interactive
This commit is contained in:
parent
7488b7cfeb
commit
b69f04fbe8
2 changed files with 17 additions and 10 deletions
|
@ -3,24 +3,28 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {Separator} from "$lib/components/ui/separator";
|
import {Separator} from "$lib/components/ui/separator";
|
||||||
import {Button} from "$lib/components/ui/button";
|
import {Button} from "$lib/components/ui/button";
|
||||||
|
import {Views} from "$lib/components/custom/Views/views.svelte";
|
||||||
|
import {AlbumViews} from "$lib/components/custom/Views/views.svelte.js";
|
||||||
|
|
||||||
let { selectedPlayerView = $bindable() } = $props();
|
let { view = $bindable(), subView = $bindable() } = $props();
|
||||||
let playlists = $state([]);
|
let playlists = $state([]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="border border-2 col-span-1 flex flex-col gap-1 p-2">
|
<div class="border border-2 col-span-1 flex flex-col gap-1 p-2">
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<h1>Albums</h1>
|
<Button onclick={() => view=Views.Albums} class="flex flex-col h-fit">Albums
|
||||||
<h2>All</h2>
|
<Button variant="secondary" onclick={() => subView=AlbumViews.All}>All</Button>
|
||||||
<h2>Random</h2>
|
<Button variant="secondary" onclick={() => subView=AlbumViews.Random}>Random</Button>
|
||||||
<h2>Favourites</h2>
|
<Button variant="secondary" onclick={() => subView=AlbumViews.Favourites}>Favourites</Button>
|
||||||
<h2>Top Rated</h2>
|
<Button variant="secondary" onclick={() => subView=AlbumViews.TopRated}>Top Rated</Button>
|
||||||
<h2>Recently Added</h2>
|
<Button variant="secondary" onclick={() => subView=AlbumViews.RecentlyAdded}>Recently Added</Button>
|
||||||
<h2>Recently Played</h2>
|
<Button variant="secondary" onclick={() => subView=AlbumViews.RecentlyPlayed}>Recently Played</Button>
|
||||||
<h2>Most Played</h2>
|
<Button variant="secondary" onclick={() => subView=AlbumViews.MostPlayed}>Most Played</Button>
|
||||||
|
</Button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Separator />
|
<Separator />
|
||||||
<h1>Artists</h1>
|
<Button onclick={() => view=Views.Artists}>Artists</Button>
|
||||||
<h1>Songs</h1>
|
<h1>Songs</h1>
|
||||||
<h1>Radios</h1>
|
<h1>Radios</h1>
|
||||||
<h1>Shares</h1>
|
<h1>Shares</h1>
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
let volume = $state(0.2);
|
let volume = $state(0.2);
|
||||||
let progress = $state(0);
|
let progress = $state(0);
|
||||||
let duration = $state(0);
|
let duration = $state(0);
|
||||||
|
let viewMode = $state(Views.Albums);
|
||||||
|
let subViewMode = $state(AlbumViews.All);
|
||||||
|
|
||||||
let queue: Array<Song> = $state([]);
|
let queue: Array<Song> = $state([]);
|
||||||
|
|
||||||
|
@ -205,6 +207,7 @@
|
||||||
<div class="border border-2 col-span-3">
|
<div class="border border-2 col-span-3">
|
||||||
<h1>Center</h1>
|
<h1>Center</h1>
|
||||||
</div>
|
</div>
|
||||||
|
<PlayerSidebar bind:view={viewMode} bind:subView={subViewMode} />
|
||||||
<QueueFrame {queue} {fetchQueue} {saveQueue} {removeSongFromQueue} {playSong} currentIndex={currentSong.queueIndex} />
|
<QueueFrame {queue} {fetchQueue} {saveQueue} {removeSongFromQueue} {playSong} currentIndex={currentSong.queueIndex} />
|
||||||
</div>
|
</div>
|
||||||
<div class="border border-2 min-h-24 h-24">
|
<div class="border border-2 min-h-24 h-24">
|
||||||
|
|
Loading…
Reference in a new issue