From ff396e8ca24bd99f778206298550a3769638ef8a Mon Sep 17 00:00:00 2001 From: Neshura Date: Mon, 29 Apr 2024 07:15:09 +0200 Subject: [PATCH] Add various new components --- .../components/custom/Views/AlbumView.svelte | 84 +++++++++++++++++++ .../custom/Views/PlaylistView.svelte | 24 ++++++ .../components/custom/Views/ViewCard.svelte | 42 ++++++++++ .../components/custom/Views/views.svelte.ts | 17 ++++ src/lib/components/ui/skeleton/index.ts | 7 ++ .../components/ui/skeleton/skeleton.svelte | 11 +++ 6 files changed, 185 insertions(+) create mode 100644 src/lib/components/custom/Views/AlbumView.svelte create mode 100644 src/lib/components/custom/Views/PlaylistView.svelte create mode 100644 src/lib/components/custom/Views/ViewCard.svelte create mode 100644 src/lib/components/custom/Views/views.svelte.ts create mode 100644 src/lib/components/ui/skeleton/index.ts create mode 100644 src/lib/components/ui/skeleton/skeleton.svelte diff --git a/src/lib/components/custom/Views/AlbumView.svelte b/src/lib/components/custom/Views/AlbumView.svelte new file mode 100644 index 0000000..0b295ce --- /dev/null +++ b/src/lib/components/custom/Views/AlbumView.svelte @@ -0,0 +1,84 @@ + + + + +
updateScroll(self)}> + {#if loading} + {#each [...Array(20).keys()] as i} + + {/each} + {:else} + {#each albums as album} + + {/each} + {/if} +
\ No newline at end of file diff --git a/src/lib/components/custom/Views/PlaylistView.svelte b/src/lib/components/custom/Views/PlaylistView.svelte new file mode 100644 index 0000000..e914080 --- /dev/null +++ b/src/lib/components/custom/Views/PlaylistView.svelte @@ -0,0 +1,24 @@ + + + + +
+

{viewMode}

+

View Actions go here

+
+

everything above this should be sticky

+

and this lists the songs

+ {#each range as ignore} +

A

+ {/each} +

And this should be after infiny loading

+
+ +
\ No newline at end of file diff --git a/src/lib/components/custom/Views/ViewCard.svelte b/src/lib/components/custom/Views/ViewCard.svelte new file mode 100644 index 0000000..37095d5 --- /dev/null +++ b/src/lib/components/custom/Views/ViewCard.svelte @@ -0,0 +1,42 @@ + + + + +
onselectalbum(data.id)}> + {#if loading} + + {:else} + {data.name + {/if} + +

{data.name}

+

{data.artist}

+
\ No newline at end of file diff --git a/src/lib/components/custom/Views/views.svelte.ts b/src/lib/components/custom/Views/views.svelte.ts new file mode 100644 index 0000000..2c5a765 --- /dev/null +++ b/src/lib/components/custom/Views/views.svelte.ts @@ -0,0 +1,17 @@ +export enum AlbumViews { + All = "alphabeticalByName", + Random = "random", + Favourites = "starred", + TopRated = "highest", + RecentlyAdded = "newest", + RecentlyPlayed = "recent", + MostPlayed = "frequent" +} + +export enum Views { + Albums = "Albums", + Artists = "Artists", + Songs = "Songs", + Radios = "Radios", + Shares = "Shares" +} \ No newline at end of file diff --git a/src/lib/components/ui/skeleton/index.ts b/src/lib/components/ui/skeleton/index.ts new file mode 100644 index 0000000..186db21 --- /dev/null +++ b/src/lib/components/ui/skeleton/index.ts @@ -0,0 +1,7 @@ +import Root from "./skeleton.svelte"; + +export { + Root, + // + Root as Skeleton, +}; diff --git a/src/lib/components/ui/skeleton/skeleton.svelte b/src/lib/components/ui/skeleton/skeleton.svelte new file mode 100644 index 0000000..0269d64 --- /dev/null +++ b/src/lib/components/ui/skeleton/skeleton.svelte @@ -0,0 +1,11 @@ + + +