diff --git a/web/src/lib/components/app-sidebar.svelte b/web/src/lib/components/app-sidebar.svelte index 58b8c43..2e36e48 100644 --- a/web/src/lib/components/app-sidebar.svelte +++ b/web/src/lib/components/app-sidebar.svelte @@ -9,53 +9,55 @@ Settings, TvIcon } from 'lucide-svelte'; + import { base } from '$app/paths'; + import { PUBLIC_VERSION } from '$env/static/public'; const data = { navMain: [ { title: 'Dashboard', - url: '/dashboard', + url: base+'/dashboard', icon: Home, isActive: true }, { title: 'TV', - url: '/dashboard/tv', + url: base+'/dashboard/tv', icon: TvIcon, isActive: true, items: [ { title: 'Add a show', - url: '/dashboard/tv/add-show' + url: base+'/dashboard/tv/add-show' }, { title: 'Torrents', - url: '/dashboard/tv/torrents' + url: base+'/dashboard/tv/torrents' }, { title: 'Requests', - url: '/dashboard/tv/requests' + url: base+'/dashboard/tv/requests' } ] }, { title: 'Movies', - url: '/dashboard/movies', + url: base+'/dashboard/movies', icon: Clapperboard, isActive: true, items: [ { title: 'Add a movie', - url: '/dashboard/movies/add-movie' + url: base+'/dashboard/movies/add-movie' }, { title: 'Torrents', - url: '/dashboard/movies/torrents' + url: base+'/dashboard/movies/torrents' }, { title: 'Requests', - url: '/dashboard/movies/requests' + url: base+'/dashboard/movies/requests' } ] } @@ -63,12 +65,12 @@ navSecondary: [ { title: 'Notifications', - url: '/dashboard/notifications', + url: base+'/dashboard/notifications', icon: Bell }, { title: 'Settings', - url: '/dashboard/settings', + url: base+'/dashboard/settings', icon: Settings }, { @@ -83,7 +85,7 @@ }, { title: 'About', - url: '/dashboard/about', + url: base+'/dashboard/about', icon: Info } ] @@ -97,7 +99,6 @@ import * as Sidebar from '$lib/components/ui/sidebar/index.js'; import type { ComponentProps } from 'svelte'; import logo from '$lib/images/logo.svg'; - import { base } from '$app/paths'; let { ref = $bindable(null), ...restProps }: ComponentProps = $props(); diff --git a/web/src/lib/components/login-form.svelte b/web/src/lib/components/login-form.svelte index 194cb70..8e20576 100644 --- a/web/src/lib/components/login-form.svelte +++ b/web/src/lib/components/login-form.svelte @@ -8,6 +8,7 @@ import * as Tabs from '$lib/components/ui/tabs/index.js'; import { toast } from 'svelte-sonner'; import LoadingBar from '$lib/components/loading-bar.svelte'; + import { base } from '$app/paths'; const apiUrl = env.PUBLIC_API_URL; @@ -44,7 +45,7 @@ console.log('Received User Data: ', response); errorMessage = 'Login successful! Redirecting...'; toast.success(errorMessage); - goto('/dashboard'); + goto(base + '/dashboard'); } else { let errorText = await response.text(); try { @@ -184,7 +185,7 @@
diff --git a/web/src/lib/components/recommended-media-carousel.svelte b/web/src/lib/components/recommended-media-carousel.svelte index abfb03e..304381b 100644 --- a/web/src/lib/components/recommended-media-carousel.svelte +++ b/web/src/lib/components/recommended-media-carousel.svelte @@ -4,6 +4,7 @@ import { Skeleton } from '$lib/components/ui/skeleton'; import { Button } from '$lib/components/ui/button'; import { ChevronRight } from 'lucide-svelte'; + import { base } from '$app/paths'; let { media, @@ -30,12 +31,12 @@ {/each} {/if} {#if isShow} - {:else} - diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index 322fa43..1bd4674 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -2,6 +2,7 @@ import '../app.css'; import { ModeWatcher } from 'mode-watcher'; import { Toaster } from '$lib/components/ui/sonner/index.js'; + import { base } from '$app/paths'; let { children } = $props(); @@ -9,7 +10,7 @@ MediaManager - + diff --git a/web/src/routes/dashboard/about/+page.svelte b/web/src/routes/dashboard/about/+page.svelte index 1520452..39ffaaa 100644 --- a/web/src/routes/dashboard/about/+page.svelte +++ b/web/src/routes/dashboard/about/+page.svelte @@ -5,6 +5,7 @@ import { base } from '$app/paths'; import logo from '$lib/images/logo.svg'; import { PUBLIC_VERSION } from '$env/static/public'; + diff --git a/web/src/routes/dashboard/movies/+page.svelte b/web/src/routes/dashboard/movies/+page.svelte index fbf2216..90eaf20 100644 --- a/web/src/routes/dashboard/movies/+page.svelte +++ b/web/src/routes/dashboard/movies/+page.svelte @@ -10,6 +10,7 @@ import { env } from '$env/dynamic/public'; import { Skeleton } from '$lib/components/ui/skeleton'; import type { PublicMovie } from '$lib/types'; + import { base } from '$app/paths'; const apiUrl = env.PUBLIC_API_URL; let movies: PublicMovie[] = []; @@ -45,11 +46,11 @@