diff --git a/frontend/src/lib/components/header.svelte b/frontend/src/lib/components/header.svelte index b4015ec8..894951e1 100644 --- a/frontend/src/lib/components/header.svelte +++ b/frontend/src/lib/components/header.svelte @@ -9,6 +9,7 @@ import { getContext } from 'svelte'; import { type Writable } from 'svelte/store'; import { goto } from '$app/navigation'; + import { onMount, onDestroy } from 'svelte'; const navItems: NavItem[] = [ { @@ -16,8 +17,8 @@ path: '/' }, { - name: 'Stats', - path: '/statistics' + name: 'Summary', + path: '/summary' }, { name: 'Library', @@ -36,11 +37,34 @@ } export let darkWhiteText: boolean = false; + + onMount(async () => { + const header = document.getElementById('header'); + const headerHeight = header?.offsetHeight; + console.log(headerHeight); + + // header?.style.transition = 'padding 0.5s ease, other-properties 0.5s ease'; + + window.addEventListener('scroll', () => { + if (window.scrollY) { + // header?.classList.add('absolute'); + header?.classList.remove('p-8'); + header?.classList.add('p-4'); + header?.classList.add('backdrop-blur-sm'); + } else { + // header?.classList.remove('absolute'); + header?.classList.remove('p-4'); + header?.classList.add('p-8'); + header?.classList.remove('backdrop-blur-sm'); + } + }); + }); \ No newline at end of file + diff --git a/frontend/src/lib/components/home-items.svelte b/frontend/src/lib/components/home-items.svelte index e0ebabf3..eb1e0a4f 100644 --- a/frontend/src/lib/components/home-items.svelte +++ b/frontend/src/lib/components/home-items.svelte @@ -23,12 +23,12 @@
-
+

Trending {name}

- +
@@ -65,12 +65,12 @@ >
-
+

Popular {name}

- +
@@ -95,11 +95,11 @@
- +

{item.release_date || item.first_air_date}

- +

{roundOff(item.vote_average)}

diff --git a/frontend/src/lib/components/media-item.svelte b/frontend/src/lib/components/media-item.svelte new file mode 100644 index 00000000..d7892be3 --- /dev/null +++ b/frontend/src/lib/components/media-item.svelte @@ -0,0 +1,43 @@ + + + +
+ + {data.title} + +
+
+ {data.type} + • + + {data.state === 'PartiallyCompleted' ? 'Partial' : statesName[data.state]} + +
+
{data.title}
+
+
+
diff --git a/frontend/src/lib/components/ui/accordion/accordion-content.svelte b/frontend/src/lib/components/ui/accordion/accordion-content.svelte new file mode 100644 index 00000000..7943a40d --- /dev/null +++ b/frontend/src/lib/components/ui/accordion/accordion-content.svelte @@ -0,0 +1,25 @@ + + + +
+ +
+
diff --git a/frontend/src/lib/components/ui/accordion/accordion-item.svelte b/frontend/src/lib/components/ui/accordion/accordion-item.svelte new file mode 100644 index 00000000..21a3be62 --- /dev/null +++ b/frontend/src/lib/components/ui/accordion/accordion-item.svelte @@ -0,0 +1,14 @@ + + + + + diff --git a/frontend/src/lib/components/ui/accordion/accordion-trigger.svelte b/frontend/src/lib/components/ui/accordion/accordion-trigger.svelte new file mode 100644 index 00000000..b1fb046a --- /dev/null +++ b/frontend/src/lib/components/ui/accordion/accordion-trigger.svelte @@ -0,0 +1,26 @@ + + + + svg]:rotate-180', + className + )} + {...$$restProps} + on:click + > + + + + diff --git a/frontend/src/lib/components/ui/accordion/index.ts b/frontend/src/lib/components/ui/accordion/index.ts new file mode 100644 index 00000000..0734d4e3 --- /dev/null +++ b/frontend/src/lib/components/ui/accordion/index.ts @@ -0,0 +1,17 @@ +import { Accordion as AccordionPrimitive } from 'bits-ui'; +import Content from './accordion-content.svelte'; +import Item from './accordion-item.svelte'; +import Trigger from './accordion-trigger.svelte'; +const Root = AccordionPrimitive.Root; + +export { + Root, + Content, + Item, + Trigger, + // + Root as Accordion, + Content as AccordionContent, + Item as AccordionItem, + Trigger as AccordionTrigger +}; diff --git a/frontend/src/lib/components/ui/drawer/drawer-content.svelte b/frontend/src/lib/components/ui/drawer/drawer-content.svelte index f2cdbfc1..e03e5bbd 100644 --- a/frontend/src/lib/components/ui/drawer/drawer-content.svelte +++ b/frontend/src/lib/components/ui/drawer/drawer-content.svelte @@ -1,11 +1,11 @@ @@ -13,7 +13,7 @@ - import { Drawer as DrawerPrimitive } from "vaul-svelte"; - import { cn } from "$lib/utils.js"; + import { Drawer as DrawerPrimitive } from 'vaul-svelte'; + import { cn } from '$lib/utils.js'; type $$Props = DrawerPrimitive.DescriptionProps; - export let el: $$Props["el"] = undefined; - let className: $$Props["class"] = undefined; + export let el: $$Props['el'] = undefined; + let className: $$Props['class'] = undefined; export { className as class }; diff --git a/frontend/src/lib/components/ui/drawer/drawer-footer.svelte b/frontend/src/lib/components/ui/drawer/drawer-footer.svelte index c6c07ad9..da35d000 100644 --- a/frontend/src/lib/components/ui/drawer/drawer-footer.svelte +++ b/frontend/src/lib/components/ui/drawer/drawer-footer.svelte @@ -1,16 +1,16 @@ -
+
diff --git a/frontend/src/lib/components/ui/drawer/drawer-header.svelte b/frontend/src/lib/components/ui/drawer/drawer-header.svelte index f8571763..1c3aa361 100644 --- a/frontend/src/lib/components/ui/drawer/drawer-header.svelte +++ b/frontend/src/lib/components/ui/drawer/drawer-header.svelte @@ -1,18 +1,18 @@
diff --git a/frontend/src/lib/components/ui/drawer/drawer-nested.svelte b/frontend/src/lib/components/ui/drawer/drawer-nested.svelte index 79b68e36..de5e96ac 100644 --- a/frontend/src/lib/components/ui/drawer/drawer-nested.svelte +++ b/frontend/src/lib/components/ui/drawer/drawer-nested.svelte @@ -1,10 +1,10 @@ diff --git a/frontend/src/lib/components/ui/drawer/drawer-overlay.svelte b/frontend/src/lib/components/ui/drawer/drawer-overlay.svelte index ccc73227..c7221098 100644 --- a/frontend/src/lib/components/ui/drawer/drawer-overlay.svelte +++ b/frontend/src/lib/components/ui/drawer/drawer-overlay.svelte @@ -1,17 +1,17 @@ diff --git a/frontend/src/lib/components/ui/drawer/drawer-title.svelte b/frontend/src/lib/components/ui/drawer/drawer-title.svelte index cfbe5964..95299866 100644 --- a/frontend/src/lib/components/ui/drawer/drawer-title.svelte +++ b/frontend/src/lib/components/ui/drawer/drawer-title.svelte @@ -1,17 +1,17 @@ diff --git a/frontend/src/lib/components/ui/drawer/drawer.svelte b/frontend/src/lib/components/ui/drawer/drawer.svelte index 40eae5ef..2ac8ce5e 100644 --- a/frontend/src/lib/components/ui/drawer/drawer.svelte +++ b/frontend/src/lib/components/ui/drawer/drawer.svelte @@ -1,10 +1,10 @@ diff --git a/frontend/src/lib/components/ui/drawer/index.ts b/frontend/src/lib/components/ui/drawer/index.ts index 76932e31..dd39b2a5 100644 --- a/frontend/src/lib/components/ui/drawer/index.ts +++ b/frontend/src/lib/components/ui/drawer/index.ts @@ -1,13 +1,13 @@ -import { Drawer as DrawerPrimitive } from "vaul-svelte"; +import { Drawer as DrawerPrimitive } from 'vaul-svelte'; -import Root from "./drawer.svelte"; -import Content from "./drawer-content.svelte"; -import Description from "./drawer-description.svelte"; -import Overlay from "./drawer-overlay.svelte"; -import Footer from "./drawer-footer.svelte"; -import Header from "./drawer-header.svelte"; -import Title from "./drawer-title.svelte"; -import NestedRoot from "./drawer-nested.svelte"; +import Root from './drawer.svelte'; +import Content from './drawer-content.svelte'; +import Description from './drawer-description.svelte'; +import Overlay from './drawer-overlay.svelte'; +import Footer from './drawer-footer.svelte'; +import Header from './drawer-header.svelte'; +import Title from './drawer-title.svelte'; +import NestedRoot from './drawer-nested.svelte'; const Trigger = DrawerPrimitive.Trigger; const Portal = DrawerPrimitive.Portal; @@ -37,5 +37,5 @@ export { Title as DrawerTitle, Trigger as DrawerTrigger, Portal as DrawerPortal, - Close as DrawerClose, + Close as DrawerClose }; diff --git a/frontend/src/lib/forms/general-form.svelte b/frontend/src/lib/forms/general-form.svelte index 6ccb50de..329d3c7c 100644 --- a/frontend/src/lib/forms/general-form.svelte +++ b/frontend/src/lib/forms/general-form.svelte @@ -38,7 +38,12 @@ - +
Plex Token -

+

Click the button to generate a new Plex token

diff --git a/frontend/src/lib/forms/scrapers-form.svelte b/frontend/src/lib/forms/scrapers-form.svelte index 9a3307dd..e2de473e 100644 --- a/frontend/src/lib/forms/scrapers-form.svelte +++ b/frontend/src/lib/forms/scrapers-form.svelte @@ -266,7 +266,7 @@ {/each}
-

Add catalogs

+

Add catalogs

-
+

What's Trending Today

@@ -127,7 +127,7 @@ {@const mediaType = trendingAll.media_type} -
+

{roundOff(trendingAll.vote_average)}

diff --git a/frontend/src/routes/[type]/[id]/+page.server.ts b/frontend/src/routes/[type]/[id]/+page.server.ts index 8fa72eb0..335e7bc7 100644 --- a/frontend/src/routes/[type]/[id]/+page.server.ts +++ b/frontend/src/routes/[type]/[id]/+page.server.ts @@ -1,5 +1,5 @@ import type { PageServerLoad } from './$types'; export const load = (async () => { - return {}; -}) satisfies PageServerLoad; \ No newline at end of file + return {}; +}) satisfies PageServerLoad; diff --git a/frontend/src/routes/[type]/[id]/+page.svelte b/frontend/src/routes/[type]/[id]/+page.svelte index acb02b1e..abe9cc81 100644 --- a/frontend/src/routes/[type]/[id]/+page.svelte +++ b/frontend/src/routes/[type]/[id]/+page.svelte @@ -1,10 +1,10 @@
-

Soon...

\ No newline at end of file +

Soon...

diff --git a/frontend/src/routes/library/+page.svelte b/frontend/src/routes/library/+page.svelte index 87042ace..0e860a4b 100644 --- a/frontend/src/routes/library/+page.svelte +++ b/frontend/src/routes/library/+page.svelte @@ -1,17 +1,17 @@
-

Soon™

\ No newline at end of file +

Soon™

diff --git a/frontend/src/routes/settings/+layout.svelte b/frontend/src/routes/settings/+layout.svelte index 52a2f226..98d2b0d9 100644 --- a/frontend/src/routes/settings/+layout.svelte +++ b/frontend/src/routes/settings/+layout.svelte @@ -37,7 +37,7 @@
-
+
{ diff --git a/frontend/src/routes/settings/about/+page.svelte b/frontend/src/routes/settings/about/+page.svelte index 9db6c8c3..8b4ecde7 100644 --- a/frontend/src/routes/settings/about/+page.svelte +++ b/frontend/src/routes/settings/about/+page.svelte @@ -61,14 +61,14 @@

About

-

+

Know what you're running and how to get help.

Version

-

+

{version}

Support

-

+

Need help? Reach out to the Riven community or report an issue on GitHub.

@@ -124,7 +124,7 @@

Contributors

-

+

Thanks to the following people for their contributions to Riven

{ } let data: any = await getPartialSettings(); - console.log('data', data); let toPassToSchema = generalSettingsToPass(data); - console.log('toPassToSchema', toPassToSchema); return { form: await superValidate(toPassToSchema, zod(generalSettingsSchema)) diff --git a/frontend/src/routes/statistics/+page.server.ts b/frontend/src/routes/summary/+page.server.ts similarity index 100% rename from frontend/src/routes/statistics/+page.server.ts rename to frontend/src/routes/summary/+page.server.ts diff --git a/frontend/src/routes/statistics/+page.svelte b/frontend/src/routes/summary/+page.svelte similarity index 62% rename from frontend/src/routes/statistics/+page.svelte rename to frontend/src/routes/summary/+page.svelte index cd7ada03..9070a224 100644 --- a/frontend/src/routes/statistics/+page.svelte +++ b/frontend/src/routes/summary/+page.svelte @@ -3,6 +3,9 @@ import Header from '$lib/components/header.svelte'; import * as Card from '$lib/components/ui/card'; import { clsx } from 'clsx'; + import * as Dialog from '$lib/components/ui/dialog'; + import * as Pagination from '$lib/components/ui/pagination'; + import MediaItem from '$lib/components/media-item.svelte'; export let data: PageData; @@ -33,7 +36,7 @@ Downloaded: 'Downloaded', Symlinked: 'Symlinked', Completed: 'Completed', - PartiallyCompleted: 'Incomplete', + PartiallyCompleted: 'Partially Completed', Failed: 'Failed' }; @@ -73,8 +76,7 @@ 'jackett', 'orionoid', 'mediafusion', - 'torbox', - 'prowlarr', + 'Prowlarr', 'zilean' ]; @@ -154,13 +156,20 @@ Movie: 'movie', Show: 'tv' }; + + const totalIncompleteItems = data.incompleteItems.incomplete_items.length; + let curPage = 1; + const perPage = 20; + $: start = (curPage - 1) * perPage; + $: end = start + perPage; + $: incompleteItems = data.incompleteItems.incomplete_items.slice(start, end);
-
+

Statistics

-

Statistics of the library

+

Statistics of the library

{#each statsData as stat} @@ -170,10 +179,10 @@ {#if stat.title === 'Total Shows'}

{stat.value}

-

+

{data.stats.data.total_seasons} Seasons

-

+

{data.stats.data.total_episodes} Episodes

{:else} @@ -185,7 +194,7 @@

Services

-

Tells the current status of the services

+

Tells the current status of the services

{#each servicesStatus as service} @@ -210,9 +219,31 @@

States

-

+

Tells the current state of the items in the library

+ + + Know more about states + + + + What are these states? + +

+ Riven has items, which are movies/shows/season/episode. These items go through different + states. +

+

+ States represent how the items are processed in the library. Each state represents a + different stage of the item in the library. Items start Requested and end up in + Completed state. Sometimes due to ongoing series, no streams or some error, they can end + up in Incomplete or Failed state. Rarely items end up in Unknown state. +

+
+
+
+