diff --git a/web/package.json b/web/package.json index e3129ee..bad91bf 100644 --- a/web/package.json +++ b/web/package.json @@ -50,8 +50,8 @@ "dependencies": { "@aws-sdk/client-s3": "^3.806.0", "@sveltejs/adapter-node": "^5.2.12", - "embla-carousel-autoplay": "^8.6.0", - "embla-carousel-svelte": "^8.6.0", + "embla-carousel-autoplay": "^8.6.0", + "embla-carousel-svelte": "^8.6.0", "eslint-plugin-unused-imports": "^4.1.4", "lucide-svelte": "^0.507.0", "sharp": "^0.34.1", diff --git a/web/src/lib/components/add-show-card.svelte b/web/src/lib/components/add-show-card.svelte index 9e59b6f..d114904 100644 --- a/web/src/lib/components/add-show-card.svelte +++ b/web/src/lib/components/add-show-card.svelte @@ -1,85 +1,89 @@ - - - {result.name} - {#if result.year != null} - ({result.year}) - {/if} - - {result.overview !== "" ? result.overview : "No overview available"} - - - {#if result.poster_path != null} - {result.name}'s Poster Image - {:else} -
- -
- {/if} -
- - -
- {#if result.vote_average != null} - - - Rating: {Math.round(result.vote_average)}/10 - - {/if} -
- {#if errorMessage} -

{errorMessage}

- {/if} -
+ + + {result.name} + {#if result.year != null} + ({result.year}) + {/if} + + {result.overview !== '' ? result.overview : 'No overview available'} + + + {#if result.poster_path != null} + {result.name}'s Poster Image + {:else} +
+ +
+ {/if} +
+ + +
+ {#if result.vote_average != null} + + + Rating: {Math.round(result.vote_average)}/10 + + {/if} +
+ {#if errorMessage} +

{errorMessage}

+ {/if} +
diff --git a/web/src/lib/components/app-sidebar.svelte b/web/src/lib/components/app-sidebar.svelte index 7c4d3ea..a62de73 100644 --- a/web/src/lib/components/app-sidebar.svelte +++ b/web/src/lib/components/app-sidebar.svelte @@ -1,98 +1,98 @@ - - - - - {#snippet child({props})} - - Media Manager Logo -
- Media Manager - v{PUBLIC_VERSION} -
-
- {/snippet} -
-
-
-
- - - - - - - - + + + + + {#snippet child({props})} + + Media Manager Logo +
+ Media Manager + v{PUBLIC_VERSION} +
+
+ {/snippet} +
+
+
+
+ + + + + + + +
diff --git a/web/src/lib/components/download-season-dialog.svelte b/web/src/lib/components/download-season-dialog.svelte index f0694f6..a750602 100644 --- a/web/src/lib/components/download-season-dialog.svelte +++ b/web/src/lib/components/download-season-dialog.svelte @@ -1,19 +1,19 @@ - \ No newline at end of file + diff --git a/web/src/lib/components/login-form.svelte b/web/src/lib/components/login-form.svelte index c400620..f181247 100644 --- a/web/src/lib/components/login-form.svelte +++ b/web/src/lib/components/login-form.svelte @@ -12,7 +12,7 @@ let apiUrl = env.PUBLIC_API_URL; let {oauthProvider} = $props(); - let oauthProviderName = $derived(oauthProvider.oauth_name) + let oauthProviderName = $derived(oauthProvider.oauth_name); let email = $state(''); let password = $state(''); @@ -112,19 +112,25 @@ async function handleOauth() { try { - const response = await fetch(apiUrl + "/auth/cookie/" + oauthProviderName + "/authorize?scopes=email", { - method: 'GET', - headers: { - 'Content-Type': 'application/json' - }, - }); + const response = await fetch( + apiUrl + '/auth/cookie/' + oauthProviderName + '/authorize?scopes=email', + { + method: 'GET', + headers: { + 'Content-Type': 'application/json' + } + } + ); if (response.ok) { let result = await response.json(); - console.log('Redirecting to OAuth provider:', oauthProviderName, "url: ", result.authorization_url); - toast.success("Redirecting to " + oauthProviderName + " for authentication..."); + console.log( + 'Redirecting to OAuth provider:', + oauthProviderName, + 'url: ', + result.authorization_url + ); + toast.success('Redirecting to ' + oauthProviderName + ' for authentication...'); window.location = result.authorization_url; - - } else { let errorText = await response.text(); toast.error(errorMessage); @@ -143,8 +149,9 @@ {:then result} {#if result.oauth_name != null} - + {/if} {/await} {/snippet} @@ -196,8 +203,7 @@
+
@@ -242,12 +248,10 @@ {@render oauthLogin()} -
+
diff --git a/web/src/lib/components/nav-projects.svelte b/web/src/lib/components/nav-projects.svelte index cde3ebb..070b364 100644 --- a/web/src/lib/components/nav-projects.svelte +++ b/web/src/lib/components/nav-projects.svelte @@ -23,7 +23,7 @@ - + {#each projects as item (item.name)} diff --git a/web/src/lib/components/nav-user.svelte b/web/src/lib/components/nav-user.svelte index babc3a2..9d4e362 100644 --- a/web/src/lib/components/nav-user.svelte +++ b/web/src/lib/components/nav-user.svelte @@ -9,8 +9,8 @@ import UserDetails from './user-details.svelte'; import UserRound from '@lucide/svelte/icons/user-round'; import {handleLogout} from '$lib/utils.ts'; - import {goto} from "$app/navigation"; - import {base} from "$app/paths"; + import {goto} from '$app/navigation'; + import {base} from '$app/paths'; const sidebar = useSidebar(); @@ -57,7 +57,7 @@ - goto(base+'/dashboard/settings#me')}> + goto(base + '/dashboard/settings#me')}> My Account diff --git a/web/src/lib/components/recommended-shows-carousel.svelte b/web/src/lib/components/recommended-shows-carousel.svelte index 210bbbb..e130a05 100644 --- a/web/src/lib/components/recommended-shows-carousel.svelte +++ b/web/src/lib/components/recommended-shows-carousel.svelte @@ -1,25 +1,25 @@ + {#each shows as show} diff --git a/web/src/lib/components/request-season-dialog.svelte b/web/src/lib/components/request-season-dialog.svelte index 628957e..a5f4a09 100644 --- a/web/src/lib/components/request-season-dialog.svelte +++ b/web/src/lib/components/request-season-dialog.svelte @@ -152,8 +152,7 @@ + diff --git a/web/src/lib/components/ui/button/button.svelte b/web/src/lib/components/ui/button/button.svelte index 32a75f8..811b0b4 100644 --- a/web/src/lib/components/ui/button/button.svelte +++ b/web/src/lib/components/ui/button/button.svelte @@ -1,75 +1,69 @@ {#if href} - - {@render children?.()} - + + {@render children?.()} + {:else} - + {/if} diff --git a/web/src/lib/components/ui/button/index.ts b/web/src/lib/components/ui/button/index.ts index 4fb817b..af28e18 100644 --- a/web/src/lib/components/ui/button/index.ts +++ b/web/src/lib/components/ui/button/index.ts @@ -2,8 +2,8 @@ import Root, { type ButtonProps, type ButtonSize, type ButtonVariant, - buttonVariants, -} from "./button.svelte"; + buttonVariants +} from './button.svelte'; export { Root, @@ -13,5 +13,5 @@ export { buttonVariants, type ButtonProps, type ButtonSize, - type ButtonVariant, + type ButtonVariant }; diff --git a/web/src/lib/components/ui/carousel/carousel-content.svelte b/web/src/lib/components/ui/carousel/carousel-content.svelte index 0dc1835..f95d06a 100644 --- a/web/src/lib/components/ui/carousel/carousel-content.svelte +++ b/web/src/lib/components/ui/carousel/carousel-content.svelte @@ -1,9 +1,9 @@ @@ -21,20 +21,20 @@ on:emblaInit={emblaCtx.onInit} use:emblaCarouselSvelte={{ options: { - container: "[data-embla-container]", - slides: "[data-embla-slide]", + container: '[data-embla-container]', + slides: '[data-embla-slide]', ...emblaCtx.options, - axis: emblaCtx.orientation === "horizontal" ? "x" : "y", + axis: emblaCtx.orientation === 'horizontal' ? 'x' : 'y' }, - plugins: emblaCtx.plugins, + plugins: emblaCtx.plugins }} >
- import type {WithElementRef} from "bits-ui"; - import type {HTMLAttributes} from "svelte/elements"; - import {getEmblaContext} from "./context.js"; - import {cn} from "$lib/utils.js"; + import type {WithElementRef} from 'bits-ui'; + import type {HTMLAttributes} from 'svelte/elements'; + import {getEmblaContext} from './context.js'; + import {cn} from '$lib/utils.js'; let { ref = $bindable(null), @@ -11,7 +11,7 @@ ...restProps }: WithElementRef> = $props(); - const emblaCtx = getEmblaContext(""); + const emblaCtx = getEmblaContext('');
- import ArrowRight from "@lucide/svelte/icons/arrow-right"; - import type {WithoutChildren} from "bits-ui"; - import {getEmblaContext} from "./context.js"; - import {cn} from "$lib/utils.js"; - import {Button, type Props} from "$lib/components/ui/button/index.js"; + import ArrowRight from '@lucide/svelte/icons/arrow-right'; + import type {WithoutChildren} from 'bits-ui'; + import {getEmblaContext} from './context.js'; + import {cn} from '$lib/utils.js'; + import {Button, type Props} from '$lib/components/ui/button/index.js'; let { ref = $bindable(null), class: className, - variant = "outline", - size = "icon", + variant = 'outline', + size = 'icon', ...restProps }: WithoutChildren = $props(); - const emblaCtx = getEmblaContext(""); + const emblaCtx = getEmblaContext(''); - - - - - Edit User Details - - - Change your email or password. Leave fields empty to not change them. - - -
- -
- - -
- -
- - -
-
-
- -
-
- \ No newline at end of file + + + + + + Edit User Details + + Change your email or password. Leave fields empty to not change them. + + +
+ +
+ + +
+ +
+ + +
+
+
+ +
+
+ diff --git a/web/src/routes/dashboard/+layout.svelte b/web/src/routes/dashboard/+layout.svelte index 2cd5411..40e509a 100644 --- a/web/src/routes/dashboard/+layout.svelte +++ b/web/src/routes/dashboard/+layout.svelte @@ -1,13 +1,13 @@ - + {@render children()} diff --git a/web/src/routes/dashboard/+page.svelte b/web/src/routes/dashboard/+page.svelte index 010a1a4..97e6f8c 100644 --- a/web/src/routes/dashboard/+page.svelte +++ b/web/src/routes/dashboard/+page.svelte @@ -1,52 +1,51 @@
-
- - - - - - - -
+
+ + + + + + + +
-

- Dashboard -

-
-
-

Trending Shows

- {#await recommendedShows} - - {:then recommendations} - +

+ Dashboard +

+
+
+

+ Trending Shows +

+ {#await recommendedShows} + + {:then recommendations} + + {/await} +
+
- {/await} - -
-
- -
- - + + -
diff --git a/web/src/routes/login/+page.svelte b/web/src/routes/login/+page.svelte index f1e34bb..fbcd4fe 100644 --- a/web/src/routes/login/+page.svelte +++ b/web/src/routes/login/+page.svelte @@ -1,36 +1,34 @@
-
- -
-
- -
-
-
- -
\ No newline at end of file +
+ +
+
+ +
+
+
+ +
diff --git a/web/src/routes/login/+page.ts b/web/src/routes/login/+page.ts index fdb8d9d..83ab437 100644 --- a/web/src/routes/login/+page.ts +++ b/web/src/routes/login/+page.ts @@ -3,15 +3,14 @@ import type {PageLoad} from './$types'; const apiUrl = env.PUBLIC_API_URL; - export const load: PageLoad = async ({fetch}) => { - const response = await fetch(apiUrl + '/auth/metadata', { - method: 'GET', - headers: { - 'Content-Type': 'application/json' - }, - credentials: 'include' - }); + const response = await fetch(apiUrl + '/auth/metadata', { + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + credentials: 'include' + }); - return {oauthProvider: await response.json()}; -}; \ No newline at end of file + return {oauthProvider: await response.json()}; +};