mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-19 22:54:22 +02:00
format files
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
<script lang="ts">
|
||||
import {Button} from '$lib/components/ui/button/index.js';
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {Button} from '$lib/components/ui/button/index.js';
|
||||
import {env} from '$env/dynamic/public';
|
||||
import * as Card from '$lib/components/ui/card/index.js';
|
||||
import {ImageOff} from 'lucide-svelte';
|
||||
import {goto} from '$app/navigation';
|
||||
import {base} from '$app/paths';
|
||||
import type {MetaDataProviderShowSearchResult} from '$lib/types.js';
|
||||
import {ImageOff} from 'lucide-svelte';
|
||||
import {goto} from '$app/navigation';
|
||||
import {base} from '$app/paths';
|
||||
import type {MetaDataProviderShowSearchResult} from '$lib/types.js';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let loading = $state(false);
|
||||
let errorMessage = $state(null);
|
||||
let {result, isShow = true}: { result: MetaDataProviderShowSearchResult, isShow: boolean } = $props();
|
||||
let {result, isShow = true}: { result: MetaDataProviderShowSearchResult; isShow: boolean } =
|
||||
$props();
|
||||
console.log('Add Show Card Result: ', result);
|
||||
|
||||
async function addMedia() {
|
||||
@@ -42,27 +43,27 @@
|
||||
{/if}
|
||||
</Card.Title>
|
||||
<Card.Description class="truncate"
|
||||
>{result.overview !== '' ? result.overview : 'No overview available'}</Card.Description
|
||||
>{result.overview !== '' ? result.overview : 'No overview available'}</Card.Description
|
||||
>
|
||||
</Card.Header>
|
||||
<Card.Content class="flex flex-1 items-center justify-center">
|
||||
{#if result.poster_path != null}
|
||||
<img
|
||||
class="h-full w-full rounded-lg object-contain"
|
||||
src={result.poster_path}
|
||||
alt="{result.name}'s Poster Image"
|
||||
class="h-full w-full rounded-lg object-contain"
|
||||
src={result.poster_path}
|
||||
alt="{result.name}'s Poster Image"
|
||||
/>
|
||||
{:else}
|
||||
<div class="flex h-full w-full items-center justify-center">
|
||||
<ImageOff class="h-12 w-12 text-gray-400"/>
|
||||
<ImageOff class="h-12 w-12 text-gray-400"/>
|
||||
</div>
|
||||
{/if}
|
||||
</Card.Content>
|
||||
<Card.Footer class="flex flex-col items-start gap-2 rounded-b-lg border-t bg-card p-4">
|
||||
<Button
|
||||
class="w-full font-semibold"
|
||||
disabled={result.added || loading}
|
||||
onclick={() => addMedia(result)}
|
||||
class="w-full font-semibold"
|
||||
disabled={result.added || loading}
|
||||
onclick={() => addMedia(result)}
|
||||
>
|
||||
{#if loading}
|
||||
<span class="animate-pulse">Loading...</span>
|
||||
@@ -74,9 +75,9 @@
|
||||
{#if result.vote_average != null}
|
||||
<span class="flex items-center text-sm font-medium text-yellow-600">
|
||||
<svg class="mr-1 h-4 w-4 text-yellow-400" fill="currentColor" viewBox="0 0 20 20"
|
||||
><path
|
||||
><path
|
||||
d="M10 15l-5.878 3.09 1.122-6.545L.488 6.91l6.561-.955L10 0l2.951 5.955 6.561.955-4.756 4.635 1.122 6.545z"
|
||||
/></svg
|
||||
/></svg
|
||||
>
|
||||
Rating: {Math.round(result.vote_average)}/10
|
||||
</span>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" module>
|
||||
import {Home, Info, LifeBuoy, Send, Settings, TvIcon, Clapperboard} from 'lucide-svelte';
|
||||
import {Clapperboard, Home, Info, LifeBuoy, Send, Settings, TvIcon} from 'lucide-svelte';
|
||||
import {PUBLIC_VERSION} from '$env/static/public';
|
||||
|
||||
const data = {
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
import {Input} from '$lib/components/ui/input';
|
||||
import {Label} from '$lib/components/ui/label';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {Badge} from "$lib/components/ui/badge/index.js";
|
||||
|
||||
import {Badge} from '$lib/components/ui/badge/index.js';
|
||||
|
||||
import type {PublicIndexerQueryResult} from '$lib/types.js';
|
||||
import {convertTorrentSeasonRangeToIntegerRange, getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import {getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import {LoaderCircle} from 'lucide-svelte';
|
||||
import * as Dialog from '$lib/components/ui/dialog/index.js';
|
||||
import * as Tabs from '$lib/components/ui/tabs/index.js';
|
||||
@@ -60,9 +59,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function getTorrents(
|
||||
override: boolean = false
|
||||
): Promise<PublicIndexerQueryResult[]> {
|
||||
async function getTorrents(override: boolean = false): Promise<PublicIndexerQueryResult[]> {
|
||||
isLoadingTorrents = true;
|
||||
torrentsError = null;
|
||||
torrents = [];
|
||||
@@ -157,8 +154,8 @@
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
<p class="text-sm text-muted-foreground">
|
||||
This is necessary to differentiate between versions of the same movie, for
|
||||
example a 1080p and a 4K version.
|
||||
This is necessary to differentiate between versions of the same movie, for example a
|
||||
1080p and a 4K version.
|
||||
</p>
|
||||
<Label for="file-suffix-display"
|
||||
>The files will be saved in the following directory:</Label
|
||||
@@ -192,7 +189,8 @@
|
||||
</Button>
|
||||
</div>
|
||||
<p class="text-sm text-muted-foreground">
|
||||
The custom query will override the default search string like "A Minecraft Movie (2025)".
|
||||
The custom query will override the default search string like "A Minecraft Movie
|
||||
(2025)".
|
||||
</p>
|
||||
<Label for="file-suffix">Filepath suffix</Label>
|
||||
<Input
|
||||
@@ -203,8 +201,8 @@
|
||||
type="text"
|
||||
/>
|
||||
<p class="text-sm text-muted-foreground">
|
||||
This is necessary to differentiate between versions of the same movie, for
|
||||
example a 1080p and a 4K version.
|
||||
This is necessary to differentiate between versions of the same movie, for example a
|
||||
1080p and a 4K version.
|
||||
</p>
|
||||
|
||||
<Label for="file-suffix-display"
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
import {toast} from 'svelte-sonner';
|
||||
|
||||
import type {PublicIndexerQueryResult} from '$lib/types.js';
|
||||
import {convertTorrentSeasonRangeToIntegerRange, getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import {convertTorrentSeasonRangeToIntegerRange, getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import {LoaderCircle} from 'lucide-svelte';
|
||||
import * as Dialog from '$lib/components/ui/dialog/index.js';
|
||||
import * as Tabs from '$lib/components/ui/tabs/index.js';
|
||||
import * as Select from '$lib/components/ui/select/index.js';
|
||||
import * as Table from '$lib/components/ui/table/index.js';
|
||||
import {Badge} from "$lib/components/ui/badge";
|
||||
import {Badge} from '$lib/components/ui/badge';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let {show} = $props();
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<script lang="ts">
|
||||
import {Button} from '$lib/components/ui/button/index.js';
|
||||
import {Button} from '$lib/components/ui/button/index.js';
|
||||
import * as Card from '$lib/components/ui/card/index.js';
|
||||
import {Input} from '$lib/components/ui/input/index.js';
|
||||
import {Label} from '$lib/components/ui/label/index.js';
|
||||
import {goto} from '$app/navigation';
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {Input} from '$lib/components/ui/input/index.js';
|
||||
import {Label} from '$lib/components/ui/label/index.js';
|
||||
import {goto} from '$app/navigation';
|
||||
import {env} from '$env/dynamic/public';
|
||||
import * as Tabs from '$lib/components/ui/tabs/index.js';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import LoadingBar from '$lib/components/loading-bar.svelte';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
|
||||
let {oauthProvider} = $props();
|
||||
let {oauthProvider} = $props();
|
||||
let oauthProviderName = $derived(oauthProvider.oauth_name);
|
||||
|
||||
let email = $state('');
|
||||
@@ -113,21 +113,21 @@
|
||||
async function handleOauth() {
|
||||
try {
|
||||
const response = await fetch(
|
||||
apiUrl + '/auth/cookie/' + oauthProviderName + '/authorize?scopes=email',
|
||||
{
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}
|
||||
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
|
||||
'Redirecting to OAuth provider:',
|
||||
oauthProviderName,
|
||||
'url: ',
|
||||
result.authorization_url
|
||||
);
|
||||
toast.success('Redirecting to ' + oauthProviderName + ' for authentication...');
|
||||
window.location = result.authorization_url;
|
||||
@@ -146,18 +146,18 @@
|
||||
|
||||
{#snippet oauthLogin()}
|
||||
{#await oauthProvider}
|
||||
<LoadingBar/>
|
||||
<LoadingBar/>
|
||||
{:then result}
|
||||
{#if result.oauth_name != null}
|
||||
<div
|
||||
class="relative mt-2 text-center text-sm after:absolute after:inset-0 after:top-1/2 after:z-0 after:flex after:items-center after:border-t after:border-border"
|
||||
class="relative mt-2 text-center text-sm after:absolute after:inset-0 after:top-1/2 after:z-0 after:flex after:items-center after:border-t after:border-border"
|
||||
>
|
||||
<span class="relative z-10 bg-background px-2 text-muted-foreground">
|
||||
Or continue with
|
||||
</span>
|
||||
</div>
|
||||
<Button class="mt-2 w-full" onclick={() => handleOauth()} variant="outline"
|
||||
>Login with {result.oauth_name}</Button
|
||||
>Login with {result.oauth_name}</Button
|
||||
>
|
||||
{/if}
|
||||
{/await}
|
||||
@@ -174,11 +174,11 @@
|
||||
<div class="grid gap-2">
|
||||
<Label for="email">Email</Label>
|
||||
<Input
|
||||
bind:value={email}
|
||||
id="email"
|
||||
placeholder="m@example.com"
|
||||
required
|
||||
type="email"
|
||||
bind:value={email}
|
||||
id="email"
|
||||
placeholder="m@example.com"
|
||||
required
|
||||
type="email"
|
||||
/>
|
||||
</div>
|
||||
<div class="grid gap-2">
|
||||
@@ -189,7 +189,7 @@
|
||||
Forgot your password?
|
||||
</a>
|
||||
</div>
|
||||
<Input bind:value={password} id="password" required type="password"/>
|
||||
<Input bind:value={password} id="password" required type="password"/>
|
||||
</div>
|
||||
|
||||
{#if errorMessage}
|
||||
@@ -226,18 +226,18 @@
|
||||
<div class="grid gap-2">
|
||||
<Label for="email2">Email</Label>
|
||||
<Input
|
||||
bind:value={email}
|
||||
id="email2"
|
||||
placeholder="m@example.com"
|
||||
required
|
||||
type="email"
|
||||
bind:value={email}
|
||||
id="email2"
|
||||
placeholder="m@example.com"
|
||||
required
|
||||
type="email"
|
||||
/>
|
||||
</div>
|
||||
<div class="grid gap-2">
|
||||
<div class="flex items-center">
|
||||
<Label for="password2">Password</Label>
|
||||
</div>
|
||||
<Input bind:value={password} id="password2" required type="password"/>
|
||||
<Input bind:value={password} id="password2" required type="password"/>
|
||||
</div>
|
||||
|
||||
{#if errorMessage}
|
||||
@@ -256,7 +256,7 @@
|
||||
|
||||
<div class="mt-4 text-center text-sm">
|
||||
<Button onclick={() => (tabValue = 'login')} variant="link"
|
||||
>Already have an account? Login
|
||||
>Already have an account? Login
|
||||
</Button>
|
||||
</div>
|
||||
</Card.Content>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let {media} = $props();
|
||||
console.log("got media: ", media);
|
||||
console.log('got media: ', media);
|
||||
</script>
|
||||
|
||||
<picture>
|
||||
|
||||
@@ -1,29 +1,32 @@
|
||||
<script lang="ts">
|
||||
import Autoplay from 'embla-carousel-autoplay';
|
||||
import * as Carousel from '$lib/components/ui/carousel/index.js';
|
||||
import type {MetaDataProviderShowSearchResult} from '$lib/types';
|
||||
import AddMediaCard from '$lib/components/add-media-card.svelte';
|
||||
import {Skeleton} from "$lib/components/ui/skeleton";
|
||||
import {Button} from "$lib/components/ui/button";
|
||||
import {ChevronDown, ChevronRight} from "lucide-svelte";
|
||||
import {Skeleton} from '$lib/components/ui/skeleton';
|
||||
import {Button} from '$lib/components/ui/button';
|
||||
import {ChevronRight} from 'lucide-svelte';
|
||||
|
||||
let {media, isShow, isLoading}: {
|
||||
media: MetaDataProviderShowSearchResult[],
|
||||
isShow: boolean,
|
||||
isLoading: boolean
|
||||
let {
|
||||
media,
|
||||
isShow,
|
||||
isLoading
|
||||
}: {
|
||||
media: MetaDataProviderShowSearchResult[];
|
||||
isShow: boolean;
|
||||
isLoading: boolean;
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<div class="grid w-full gap-4 sm:grid-cols-1
|
||||
md:grid-cols-2 lg:grid-cols-3">
|
||||
<div
|
||||
class="grid w-full gap-4 sm:grid-cols-1
|
||||
md:grid-cols-2 lg:grid-cols-3"
|
||||
>
|
||||
{#if isLoading}
|
||||
<Skeleton class="w-full h-[70vh]"/>
|
||||
<Skeleton class="w-full h-[70vh]"/>
|
||||
<Skeleton class="w-full h-[70vh]"/>
|
||||
|
||||
{:else }
|
||||
<Skeleton class="h-[70vh] w-full"/>
|
||||
<Skeleton class="h-[70vh] w-full"/>
|
||||
<Skeleton class="h-[70vh] w-full"/>
|
||||
{:else}
|
||||
{#each media.slice(0, 3) as mediaItem}
|
||||
<AddMediaCard isShow={isShow} result={mediaItem}/>
|
||||
<AddMediaCard {isShow} result={mediaItem}/>
|
||||
{/each}
|
||||
{/if}
|
||||
{#if isShow}
|
||||
@@ -31,11 +34,10 @@
|
||||
More recommendations
|
||||
<ChevronRight/>
|
||||
</Button>
|
||||
{:else }
|
||||
{:else}
|
||||
<Button class="md:col-start-2" variant="secondary" href="/dashboard/movies/add-movie">
|
||||
More recommendations
|
||||
<ChevronRight/>
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import {Label} from '$lib/components/ui/label';
|
||||
import * as Select from '$lib/components/ui/select/index.js';
|
||||
import LoaderCircle from '@lucide/svelte/icons/loader-circle';
|
||||
import type {CreateSeasonRequest, PublicMovie, PublicShow, Quality} from '$lib/types.js';
|
||||
import type {PublicMovie, Quality} from '$lib/types.js';
|
||||
import {getFullyQualifiedMediaName, getTorrentQualityString} from '$lib/utils.js';
|
||||
import {toast} from 'svelte-sonner';
|
||||
|
||||
@@ -21,11 +21,7 @@
|
||||
let qualityOptions = $derived(
|
||||
qualityValues.map((q) => ({value: q, label: getTorrentQualityString(q)}))
|
||||
);
|
||||
let isFormInvalid = $derived(
|
||||
!minQuality ||
|
||||
!wantedQuality ||
|
||||
wantedQuality > minQuality
|
||||
);
|
||||
let isFormInvalid = $derived(!minQuality || !wantedQuality || wantedQuality > minQuality);
|
||||
|
||||
async function handleRequestMovie() {
|
||||
isSubmittingRequest = true;
|
||||
@@ -78,9 +74,7 @@
|
||||
<Dialog.Content class="max-h-[90vh] w-fit min-w-[clamp(300px,50vw,600px)] overflow-y-auto">
|
||||
<Dialog.Header>
|
||||
<Dialog.Title>Request {getFullyQualifiedMediaName(movie)}</Dialog.Title>
|
||||
<Dialog.Description>
|
||||
Select desired qualities to submit a request.
|
||||
</Dialog.Description>
|
||||
<Dialog.Description>Select desired qualities to submit a request.</Dialog.Description>
|
||||
</Dialog.Header>
|
||||
<div class="grid gap-4 py-4">
|
||||
<!-- Min Quality Select -->
|
||||
|
||||
@@ -17,13 +17,17 @@
|
||||
return true;
|
||||
},
|
||||
isShow = true
|
||||
}: { requests: SeasonRequest[]; filter: (request: SeasonRequest) => boolean, isShow: boolean } = $props();
|
||||
}: {
|
||||
requests: SeasonRequest[];
|
||||
filter: (request: SeasonRequest) => boolean;
|
||||
isShow: boolean;
|
||||
} = $props();
|
||||
const user: () => User = getContext('user');
|
||||
|
||||
async function approveRequest(requestId: string, currentAuthorizedStatus: boolean) {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${apiUrl}${isShow ? "/tv/seasons" : "/movies"}/requests/${requestId}?authorized_status=${!currentAuthorizedStatus}`,
|
||||
`${apiUrl}${isShow ? '/tv/seasons' : '/movies'}/requests/${requestId}?authorized_status=${!currentAuthorizedStatus}`,
|
||||
{
|
||||
method: 'PATCH',
|
||||
headers: {
|
||||
@@ -58,13 +62,16 @@
|
||||
|
||||
async function deleteRequest(requestId: string) {
|
||||
try {
|
||||
const response = await fetch(`${apiUrl}${isShow ? "/tv/seasons" : "/movies"}/requests/${requestId}`, {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
credentials: 'include'
|
||||
});
|
||||
const response = await fetch(
|
||||
`${apiUrl}${isShow ? '/tv/seasons' : '/movies'}/requests/${requestId}`,
|
||||
{
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
credentials: 'include'
|
||||
}
|
||||
);
|
||||
|
||||
if (response.ok) {
|
||||
const index = requests.findIndex((r) => r.id === requestId);
|
||||
@@ -89,7 +96,7 @@
|
||||
<Table.Caption>A list of all requests.</Table.Caption>
|
||||
<Table.Header>
|
||||
<Table.Row>
|
||||
<Table.Head>{isShow ? "Show" : "Movie"}</Table.Head>
|
||||
<Table.Head>{isShow ? 'Show' : 'Movie'}</Table.Head>
|
||||
{#if isShow}
|
||||
<Table.Head>Season</Table.Head>
|
||||
{/if}
|
||||
@@ -108,10 +115,8 @@
|
||||
<Table.Cell>
|
||||
{#if isShow}
|
||||
{getFullyQualifiedMediaName(request.show)}
|
||||
|
||||
{:else}
|
||||
{getFullyQualifiedMediaName(request.movie)}
|
||||
|
||||
{/if}
|
||||
</Table.Cell>
|
||||
{#if isShow}
|
||||
@@ -163,7 +168,6 @@
|
||||
Download manually
|
||||
</Button>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
{#if user().is_superuser || user().id === request.requested_by?.id}
|
||||
<Button variant="destructive" size="sm" onclick={() => deleteRequest(request.id)}
|
||||
|
||||
@@ -1,37 +1,36 @@
|
||||
<script lang="ts" module>
|
||||
import {type VariantProps, tv} from "tailwind-variants";
|
||||
import {type VariantProps, tv} from 'tailwind-variants';
|
||||
|
||||
export const badgeVariants = tv({
|
||||
base: "focus:ring-ring inline-flex select-none items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",
|
||||
base: 'focus:ring-ring inline-flex select-none items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2',
|
||||
variants: {
|
||||
variant: {
|
||||
default:
|
||||
"bg-primary text-primary-foreground hover:bg-primary/80 border-transparent shadow",
|
||||
default: 'bg-primary text-primary-foreground hover:bg-primary/80 border-transparent shadow',
|
||||
secondary:
|
||||
"bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent",
|
||||
'bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent',
|
||||
destructive:
|
||||
"bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent shadow",
|
||||
outline: "text-foreground",
|
||||
},
|
||||
'bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent shadow',
|
||||
outline: 'text-foreground'
|
||||
}
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: "default",
|
||||
},
|
||||
variant: 'default'
|
||||
}
|
||||
});
|
||||
|
||||
export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
|
||||
export type BadgeVariant = VariantProps<typeof badgeVariants>['variant'];
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import type {WithElementRef} from "bits-ui";
|
||||
import type {HTMLAnchorAttributes} from "svelte/elements";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import type {WithElementRef} from 'bits-ui';
|
||||
import type {HTMLAnchorAttributes} from 'svelte/elements';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
href,
|
||||
class: className,
|
||||
variant = "default",
|
||||
variant = 'default',
|
||||
children,
|
||||
...restProps
|
||||
}: WithElementRef<HTMLAnchorAttributes> & {
|
||||
@@ -40,11 +39,11 @@
|
||||
</script>
|
||||
|
||||
<svelte:element
|
||||
this={href ? 'a' : 'span'}
|
||||
{...restProps}
|
||||
bind:this={ref}
|
||||
class={cn(badgeVariants({ variant }), className)}
|
||||
{href}
|
||||
this={href ? "a" : "span"}
|
||||
>
|
||||
{@render children?.()}
|
||||
</svelte:element>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export {default as Badge} from "./badge.svelte";
|
||||
export {badgeVariants, type BadgeVariant} from "./badge.svelte";
|
||||
export {default as Badge} from './badge.svelte';
|
||||
export {badgeVariants, type BadgeVariant} from './badge.svelte';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script lang="ts">
|
||||
import {Checkbox as CheckboxPrimitive, type WithoutChildrenOrChild} from 'bits-ui';
|
||||
import {Checkbox as CheckboxPrimitive, type WithoutChildrenOrChild} from 'bits-ui';
|
||||
import Check from '@lucide/svelte/icons/check';
|
||||
import Minus from '@lucide/svelte/icons/minus';
|
||||
import {cn} from '$lib/utils.js';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -14,16 +14,16 @@
|
||||
</script>
|
||||
|
||||
<CheckboxPrimitive.Root
|
||||
{...restProps}
|
||||
bind:checked
|
||||
bind:indeterminate
|
||||
bind:ref
|
||||
class={cn(
|
||||
{...restProps}
|
||||
bind:checked
|
||||
bind:indeterminate
|
||||
bind:ref
|
||||
class={cn(
|
||||
'peer box-content size-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[disabled=true]:opacity-50',
|
||||
className
|
||||
)}
|
||||
>
|
||||
{#snippet children({checked, indeterminate})}
|
||||
{#snippet children({checked, indeterminate})}
|
||||
<span class="flex items-center justify-center text-current">
|
||||
{#if indeterminate}
|
||||
<Minus class="size-4"/>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import {Menubar as MenubarPrimitive} from "bits-ui";
|
||||
import Root from "./menubar.svelte";
|
||||
import CheckboxItem from "./menubar-checkbox-item.svelte";
|
||||
import Content from "./menubar-content.svelte";
|
||||
import Item from "./menubar-item.svelte";
|
||||
import GroupHeading from "./menubar-group-heading.svelte";
|
||||
import RadioItem from "./menubar-radio-item.svelte";
|
||||
import Separator from "./menubar-separator.svelte";
|
||||
import Shortcut from "./menubar-shortcut.svelte";
|
||||
import SubContent from "./menubar-sub-content.svelte";
|
||||
import SubTrigger from "./menubar-sub-trigger.svelte";
|
||||
import Trigger from "./menubar-trigger.svelte";
|
||||
import {Menubar as MenubarPrimitive} from 'bits-ui';
|
||||
import Root from './menubar.svelte';
|
||||
import CheckboxItem from './menubar-checkbox-item.svelte';
|
||||
import Content from './menubar-content.svelte';
|
||||
import Item from './menubar-item.svelte';
|
||||
import GroupHeading from './menubar-group-heading.svelte';
|
||||
import RadioItem from './menubar-radio-item.svelte';
|
||||
import Separator from './menubar-separator.svelte';
|
||||
import Shortcut from './menubar-shortcut.svelte';
|
||||
import SubContent from './menubar-sub-content.svelte';
|
||||
import SubTrigger from './menubar-sub-trigger.svelte';
|
||||
import Trigger from './menubar-trigger.svelte';
|
||||
|
||||
const Menu = MenubarPrimitive.Menu;
|
||||
const Group = MenubarPrimitive.Group;
|
||||
@@ -47,5 +47,5 @@ export {
|
||||
Menu as MenubarMenu,
|
||||
Group as MenubarGroup,
|
||||
Sub as MenubarSub,
|
||||
RadioGroup as MenubarRadioGroup,
|
||||
RadioGroup as MenubarRadioGroup
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts">
|
||||
import {Menubar as MenubarPrimitive, type WithoutChildrenOrChild} from "bits-ui";
|
||||
import Check from "@lucide/svelte/icons/check";
|
||||
import Minus from "@lucide/svelte/icons/minus";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import type {Snippet} from "svelte";
|
||||
import {Menubar as MenubarPrimitive, type WithoutChildrenOrChild} from 'bits-ui';
|
||||
import Check from '@lucide/svelte/icons/check';
|
||||
import Minus from '@lucide/svelte/icons/minus';
|
||||
import {cn} from '$lib/utils.js';
|
||||
import type {Snippet} from 'svelte';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -23,7 +23,7 @@
|
||||
bind:indeterminate
|
||||
bind:ref
|
||||
class={cn(
|
||||
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50',
|
||||
className
|
||||
)}
|
||||
>
|
||||
@@ -32,7 +32,7 @@
|
||||
{#if indeterminate}
|
||||
<Minus class="size-4"/>
|
||||
{:else}
|
||||
<Check class={cn("size-4", !checked && "text-transparent")}/>
|
||||
<Check class={cn('size-4', !checked && 'text-transparent')}/>
|
||||
{/if}
|
||||
</span>
|
||||
{@render childrenProp?.()}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script lang="ts">
|
||||
import {Menubar as MenubarPrimitive} from "bits-ui";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import {Menubar as MenubarPrimitive} from 'bits-ui';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
sideOffset = 8,
|
||||
alignOffset = -4,
|
||||
align = "start",
|
||||
side = "bottom",
|
||||
align = 'start',
|
||||
side = 'bottom',
|
||||
portalProps,
|
||||
...restProps
|
||||
}: MenubarPrimitive.ContentProps & {
|
||||
@@ -23,7 +23,7 @@
|
||||
{alignOffset}
|
||||
bind:ref
|
||||
class={cn(
|
||||
"bg-popover text-popover-foreground z-50 min-w-[12rem] rounded-md border p-1 shadow-md focus:outline-none",
|
||||
'z-50 min-w-[12rem] rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus:outline-none',
|
||||
className
|
||||
)}
|
||||
{side}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {Menubar as MenubarPrimitive} from "bits-ui";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import {Menubar as MenubarPrimitive} from 'bits-ui';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -15,5 +15,5 @@
|
||||
<MenubarPrimitive.GroupHeading
|
||||
{...restProps}
|
||||
bind:ref
|
||||
class={cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)}
|
||||
class={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {Menubar as MenubarPrimitive} from "bits-ui";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import {Menubar as MenubarPrimitive} from 'bits-ui';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -16,8 +16,8 @@
|
||||
{...restProps}
|
||||
bind:ref
|
||||
class={cn(
|
||||
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||
inset && "pl-8",
|
||||
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50',
|
||||
inset && 'pl-8',
|
||||
className
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {Menubar as MenubarPrimitive, type WithoutChild} from "bits-ui";
|
||||
import Circle from "@lucide/svelte/icons/circle";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import {Menubar as MenubarPrimitive, type WithoutChild} from 'bits-ui';
|
||||
import Circle from '@lucide/svelte/icons/circle';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -15,7 +15,7 @@
|
||||
{...restProps}
|
||||
bind:ref
|
||||
class={cn(
|
||||
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50',
|
||||
className
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {Menubar as MenubarPrimitive} from "bits-ui";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import {Menubar as MenubarPrimitive} from 'bits-ui';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -12,5 +12,5 @@
|
||||
<MenubarPrimitive.Separator
|
||||
{...restProps}
|
||||
bind:ref
|
||||
class={cn("bg-muted -mx-1 my-1 h-px", className)}
|
||||
class={cn('-mx-1 my-1 h-px bg-muted', className)}
|
||||
/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type {HTMLAttributes} from "svelte/elements";
|
||||
import type {WithElementRef} from "bits-ui";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import type {HTMLAttributes} from 'svelte/elements';
|
||||
import type {WithElementRef} from 'bits-ui';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -14,7 +14,7 @@
|
||||
<span
|
||||
{...restProps}
|
||||
bind:this={ref}
|
||||
class={cn("text-muted-foreground ml-auto text-xs tracking-widest", className)}
|
||||
class={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)}
|
||||
>
|
||||
{@render children?.()}
|
||||
</span>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {Menubar as MenubarPrimitive} from "bits-ui";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import {Menubar as MenubarPrimitive} from 'bits-ui';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -13,7 +13,7 @@
|
||||
{...restProps}
|
||||
bind:ref
|
||||
class={cn(
|
||||
"bg-popover text-popover-foreground z-50 min-w-max rounded-md border p-1 shadow-lg focus:outline-none",
|
||||
'z-50 min-w-max rounded-md border bg-popover p-1 text-popover-foreground shadow-lg focus:outline-none',
|
||||
className
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {Menubar as MenubarPrimitive} from "bits-ui";
|
||||
import ChevronRight from "@lucide/svelte/icons/chevron-right";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import {Menubar as MenubarPrimitive} from 'bits-ui';
|
||||
import ChevronRight from '@lucide/svelte/icons/chevron-right';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -18,8 +18,8 @@
|
||||
{...restProps}
|
||||
bind:ref
|
||||
class={cn(
|
||||
"data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||
inset && "pl-8",
|
||||
'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground data-[disabled]:opacity-50',
|
||||
inset && 'pl-8',
|
||||
className
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {Menubar as MenubarPrimitive} from "bits-ui";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import {Menubar as MenubarPrimitive} from 'bits-ui';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -13,7 +13,7 @@
|
||||
{...restProps}
|
||||
bind:ref
|
||||
class={cn(
|
||||
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none",
|
||||
'flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
|
||||
className
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {Menubar as MenubarPrimitive} from "bits-ui";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import {Menubar as MenubarPrimitive} from 'bits-ui';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -13,7 +13,7 @@
|
||||
{...restProps}
|
||||
bind:ref
|
||||
class={cn(
|
||||
"bg-background flex h-9 items-center space-x-1 rounded-md border p-1 shadow-sm",
|
||||
'flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm',
|
||||
className
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Root from "./skeleton.svelte";
|
||||
import Root from './skeleton.svelte';
|
||||
|
||||
export {
|
||||
Root,
|
||||
//
|
||||
Root as Skeleton,
|
||||
Root as Skeleton
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type {WithElementRef, WithoutChildren} from "bits-ui";
|
||||
import type {HTMLAttributes} from "svelte/elements";
|
||||
import {cn} from "$lib/utils.js";
|
||||
import type {WithElementRef, WithoutChildren} from 'bits-ui';
|
||||
import type {HTMLAttributes} from 'svelte/elements';
|
||||
import {cn} from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -12,6 +12,6 @@
|
||||
|
||||
<div
|
||||
bind:this={ref}
|
||||
class={cn("bg-primary/10 animate-pulse rounded-md", className)}
|
||||
class={cn('animate-pulse rounded-md bg-primary/10', className)}
|
||||
{...restProps}
|
||||
></div>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script lang="ts">
|
||||
import {Button} from '$lib/components/ui/button/index.js';
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {Button} from '$lib/components/ui/button/index.js';
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import * as Dialog from '$lib/components/ui/dialog/index.js';
|
||||
import {Label} from '$lib/components/ui/label/index.js';
|
||||
import {Input} from '$lib/components/ui/input/index.js';
|
||||
import {Label} from '$lib/components/ui/label/index.js';
|
||||
import {Input} from '$lib/components/ui/input/index.js';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let newPassword: string = $state('');
|
||||
@@ -20,8 +20,8 @@
|
||||
},
|
||||
credentials: 'include',
|
||||
body: JSON.stringify({
|
||||
...(newPassword !== '' && {password: newPassword}),
|
||||
...(newEmail !== '' && {password: newEmail})
|
||||
...(newPassword !== '' && {password: newPassword}),
|
||||
...(newEmail !== '' && {password: newEmail})
|
||||
})
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
} catch (error) {
|
||||
console.error('Error updating user:', error);
|
||||
toast.error(
|
||||
'Error updating user: ' + (error instanceof Error ? error.message : String(error))
|
||||
'Error updating user: ' + (error instanceof Error ? error.message : String(error))
|
||||
);
|
||||
} finally {
|
||||
newPassword = '';
|
||||
@@ -63,22 +63,22 @@
|
||||
<div>
|
||||
<Label class="mb-1 block text-sm font-medium" for="email">Email</Label>
|
||||
<Input
|
||||
bind:value={newEmail}
|
||||
class="w-full"
|
||||
id="email"
|
||||
placeholder="Keep empty to not change the email"
|
||||
type="email"
|
||||
bind:value={newEmail}
|
||||
class="w-full"
|
||||
id="email"
|
||||
placeholder="Keep empty to not change the email"
|
||||
type="email"
|
||||
/>
|
||||
</div>
|
||||
<!-- Password -->
|
||||
<div>
|
||||
<Label class="mb-1 block text-sm font-medium" for="password">Password</Label>
|
||||
<Input
|
||||
bind:value={newPassword}
|
||||
class="w-full"
|
||||
id="password"
|
||||
placeholder="Keep empty to not change the password"
|
||||
type="password"
|
||||
bind:value={newPassword}
|
||||
class="w-full"
|
||||
id="password"
|
||||
placeholder="Keep empty to not change the password"
|
||||
type="password"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<script lang="ts">
|
||||
import {goto} from '$app/navigation';
|
||||
import {PUBLIC_BASE_PATH} from '$env/dynamic/public';
|
||||
import {browser} from '$app/environment';
|
||||
import {redirect} from '@sveltejs/kit';
|
||||
import {goto} from '$app/navigation';
|
||||
import {PUBLIC_BASE_PATH} from '$env/dynamic/public';
|
||||
import {browser} from '$app/environment';
|
||||
import {redirect} from '@sveltejs/kit';
|
||||
|
||||
if (browser) goto(PUBLIC_BASE_PATH + '/dashboard');
|
||||
else throw redirect(307, PUBLIC_BASE_PATH + '/login');
|
||||
if (browser) goto(PUBLIC_BASE_PATH + '/dashboard');
|
||||
else throw redirect(307, PUBLIC_BASE_PATH + '/login');
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Home</title>
|
||||
<meta content="Svelte demo app" name="description"/>
|
||||
<meta content="Svelte demo app" name="description"/>
|
||||
</svelte:head>
|
||||
<h1>Servas</h1>
|
||||
|
||||
@@ -3,15 +3,11 @@
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import RecommendedMediaCarousel from '$lib/components/recommended-media-carousel.svelte';
|
||||
import LoadingBar from '$lib/components/loading-bar.svelte';
|
||||
import {base} from '$app/paths';
|
||||
import {page} from '$app/state';
|
||||
import type {MetaDataProviderShowSearchResult} from '$lib/types';
|
||||
import {onMount} from 'svelte';
|
||||
import {env} from "$env/dynamic/public";
|
||||
import {Skeleton} from "$lib/components/ui/skeleton/index.js";
|
||||
import {onMount} from 'svelte';
|
||||
import {env} from '$env/dynamic/public';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
|
||||
let recommendedShows: any[] = [];
|
||||
let showsLoading = true;
|
||||
@@ -23,29 +19,25 @@
|
||||
const showsRes = await fetch(apiUrl + '/tv/recommended', {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
Accept: 'application/json'
|
||||
},
|
||||
credentials: 'include',
|
||||
method: 'GET'
|
||||
});
|
||||
recommendedShows = await showsRes.json();
|
||||
showsLoading = false
|
||||
showsLoading = false;
|
||||
|
||||
const moviesRes = await fetch(apiUrl + '/movies/recommended', {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
Accept: 'application/json'
|
||||
},
|
||||
credentials: 'include',
|
||||
method: 'GET'
|
||||
});
|
||||
recommendedMovies = await moviesRes.json();
|
||||
moviesLoading = false;
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
@@ -70,18 +62,16 @@
|
||||
Dashboard
|
||||
</h1>
|
||||
<div class="min-h-[100vh] flex-1 items-center justify-center rounded-xl p-4 md:min-h-min">
|
||||
<div
|
||||
class="mx-auto max-w-[70vw] md:max-w-[80vw]"
|
||||
>
|
||||
<h3 class="my-4 text-center text-2xl font-semibold ">
|
||||
Trending Shows
|
||||
</h3>
|
||||
<RecommendedMediaCarousel isLoading={showsLoading} isShow={true} media={recommendedShows}/>
|
||||
<div class="mx-auto max-w-[70vw] md:max-w-[80vw]">
|
||||
<h3 class="my-4 text-center text-2xl font-semibold">Trending Shows</h3>
|
||||
<RecommendedMediaCarousel isLoading={showsLoading} isShow={true} media={recommendedShows}/>
|
||||
|
||||
<h3 class="my-4 text-center text-2xl font-semibold ">
|
||||
Trending Movies
|
||||
</h3>
|
||||
<RecommendedMediaCarousel isLoading={moviesLoading} isShow={false} media={recommendedMovies}/>
|
||||
<h3 class="my-4 text-center text-2xl font-semibold">Trending Movies</h3>
|
||||
<RecommendedMediaCarousel
|
||||
isLoading={moviesLoading}
|
||||
isShow={false}
|
||||
media={recommendedMovies}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
<script lang="ts">
|
||||
import {page} from '$app/state';
|
||||
import * as Card from '$lib/components/ui/card/index.js';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import {getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import LoadingBar from '$lib/components/loading-bar.svelte';
|
||||
import MediaPicture from '$lib/components/media-picture.svelte';
|
||||
import {onMount} from "svelte";
|
||||
import {toast} from "svelte-sonner";
|
||||
import {onMount} from 'svelte';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {Skeleton} from "$lib/components/ui/skeleton";
|
||||
import {Skeleton} from '$lib/components/ui/skeleton';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let movies
|
||||
let movies;
|
||||
let loading = false;
|
||||
onMount(async () => {
|
||||
loading = true;
|
||||
@@ -25,13 +23,13 @@
|
||||
credentials: 'include'
|
||||
});
|
||||
if (!response.ok) {
|
||||
toast.error(`Failed to fetch movies`)
|
||||
toast.error(`Failed to fetch movies`);
|
||||
throw new Error(`Failed to fetch movies: ${response.status} ${response.statusText}`);
|
||||
}
|
||||
movies = await response.json();
|
||||
console.log("got movies: ", movies);
|
||||
console.log('got movies: ', movies);
|
||||
loading = false;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
@@ -56,7 +54,6 @@
|
||||
</div>
|
||||
</header>
|
||||
{#snippet loadingbar()}
|
||||
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
@@ -68,12 +65,9 @@
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
|
||||
{/snippet}
|
||||
<div class="flex w-full flex-1 flex-col gap-4 p-4 pt-0">
|
||||
<h1 class="scroll-m-20 text-center text-4xl font-extrabold tracking-tight lg:text-5xl">
|
||||
Movies
|
||||
</h1>
|
||||
<h1 class="scroll-m-20 text-center text-4xl font-extrabold tracking-tight lg:text-5xl">Movies</h1>
|
||||
<div
|
||||
class="grid w-full auto-rows-min gap-4 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
|
||||
>
|
||||
|
||||
@@ -3,19 +3,13 @@
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import {goto} from '$app/navigation';
|
||||
import {ImageOff} from 'lucide-svelte';
|
||||
import * as Table from '$lib/components/ui/table/index.js';
|
||||
import {getContext} from 'svelte';
|
||||
import type {PublicMovie, RichShowTorrent, Show, User} from '$lib/types.js';
|
||||
import type {PublicMovie, RichShowTorrent, User} from '$lib/types.js';
|
||||
import {getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import CheckmarkX from '$lib/components/checkmark-x.svelte';
|
||||
import {page} from '$app/state';
|
||||
import TorrentTable from '$lib/components/torrent-table.svelte';
|
||||
import MediaPicture from '$lib/components/media-picture.svelte';
|
||||
import {Checkbox} from '$lib/components/ui/checkbox/index.js';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {Label} from '$lib/components/ui/label';
|
||||
import DownloadMovieDialog from '$lib/components/download-movie-dialog.svelte';
|
||||
import RequestMovieDialog from '$lib/components/request-movie-dialog.svelte';
|
||||
|
||||
@@ -23,7 +17,6 @@
|
||||
let movie: PublicMovie = page.data.movie;
|
||||
let user: () => User = getContext('user');
|
||||
let torrents: RichShowTorrent = page.data.torrents;
|
||||
|
||||
</script>
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
@@ -74,10 +67,10 @@
|
||||
</div>
|
||||
<div class="w-full flex-auto rounded-xl bg-muted/50 p-4 md:w-1/3">
|
||||
{#if user().is_superuser}
|
||||
<DownloadMovieDialog movie={movie}/>
|
||||
<DownloadMovieDialog {movie}/>
|
||||
<div class="my-4"></div>
|
||||
{/if}
|
||||
<RequestMovieDialog movie={movie}/>
|
||||
<RequestMovieDialog {movie}/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="flex-1 rounded-xl bg-muted/50 p-4">
|
||||
|
||||
@@ -9,4 +9,4 @@ export const load: LayoutLoad = async ({params, fetch}) => {
|
||||
if (!res.ok) throw error(res.status, `Failed to load movie`);
|
||||
const movieData = await res.json();
|
||||
return {movie: movieData, torrents: []};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -12,14 +12,13 @@
|
||||
import * as RadioGroup from '$lib/components/ui/radio-group/index.js';
|
||||
import AddMediaCard from '$lib/components/add-media-card.svelte';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {onMount} from "svelte";
|
||||
import * as Menubar from "$lib/components/ui/menubar/index.js";
|
||||
import {onMount} from 'svelte';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let searchTerm: string = $state('');
|
||||
let metadataProvider: string = $state('tmdb');
|
||||
let results: MetaDataProviderShowSearchResult[] | null = $state(null);
|
||||
onMount(search)
|
||||
onMount(search);
|
||||
|
||||
async function search() {
|
||||
let url = new URL(apiUrl + '/movies/recommended');
|
||||
@@ -28,7 +27,6 @@
|
||||
url.searchParams.append('query', searchTerm);
|
||||
url.searchParams.append('metadata_provider', metadataProvider);
|
||||
toast.info(`Searching for "${searchTerm}" using ${metadataProvider.toUpperCase()}...`);
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -42,7 +40,7 @@
|
||||
}
|
||||
results = await response.json();
|
||||
if (searchTerm.length === 0) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
if (results && results.length > 0) {
|
||||
toast.success(`Found ${results.length} result(s) for "${searchTerm}".`);
|
||||
@@ -137,7 +135,7 @@
|
||||
md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
|
||||
>
|
||||
{#each results as result}
|
||||
<AddMediaCard result={result} isShow={false}/>
|
||||
<AddMediaCard {result} isShow={false}/>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -3,32 +3,32 @@ import type {LayoutLoad} from './$types';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
export const load: LayoutLoad = async ({fetch}) => {
|
||||
try {
|
||||
const requests = await fetch(`${apiUrl}/movies/requests`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
credentials: 'include'
|
||||
});
|
||||
try {
|
||||
const requests = await fetch(`${apiUrl}/movies/requests`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
credentials: 'include'
|
||||
});
|
||||
|
||||
if (!requests.ok) {
|
||||
console.error(`Failed to fetch season requests ${requests.statusText}`);
|
||||
return {
|
||||
requestsData: null
|
||||
};
|
||||
}
|
||||
if (!requests.ok) {
|
||||
console.error(`Failed to fetch season requests ${requests.statusText}`);
|
||||
return {
|
||||
requestsData: null
|
||||
};
|
||||
}
|
||||
|
||||
const requestsData = await requests.json();
|
||||
console.log('Fetched season requests:', requestsData);
|
||||
const requestsData = await requests.json();
|
||||
console.log('Fetched season requests:', requestsData);
|
||||
|
||||
return {
|
||||
requestsData: requestsData
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Error fetching season requests:', error);
|
||||
return {
|
||||
requestsData: null
|
||||
};
|
||||
}
|
||||
return {
|
||||
requestsData: requestsData
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Error fetching season requests:', error);
|
||||
return {
|
||||
requestsData: null
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,43 +1,42 @@
|
||||
<script lang="ts">
|
||||
import {page} from '$app/state';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import type {SeasonRequest} from '$lib/types';
|
||||
import RequestsTable from '$lib/components/season-requests-table.svelte';
|
||||
import {page} from '$app/state';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import RequestsTable from '$lib/components/season-requests-table.svelte';
|
||||
|
||||
let requests = $state(page.data.requestsData);
|
||||
let requests = $state(page.data.requestsData);
|
||||
</script>
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href="/dashboard">MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard">Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard/movies">Movies</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>Movie Requests</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
</Breadcrumb.List>
|
||||
</Breadcrumb.Root>
|
||||
</div>
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href="/dashboard">MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard">Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard/movies">Movies</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>Movie Requests</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
</Breadcrumb.List>
|
||||
</Breadcrumb.Root>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="flex w-full flex-1 flex-col items-center gap-4 p-4 pt-0">
|
||||
<h1 class="scroll-m-20 text-center text-4xl font-extrabold tracking-tight lg:text-5xl">
|
||||
Movie Requests
|
||||
</h1>
|
||||
<RequestsTable bind:requests isShow={false}/>
|
||||
<h1 class="scroll-m-20 text-center text-4xl font-extrabold tracking-tight lg:text-5xl">
|
||||
Movie Requests
|
||||
</h1>
|
||||
<RequestsTable bind:requests isShow={false}/>
|
||||
</div>
|
||||
|
||||
@@ -1,80 +1,78 @@
|
||||
<script lang="ts">
|
||||
import {page} from '$app/state';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import type {RichMovieTorrent, RichShowTorrent} from '$lib/types';
|
||||
import {getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import * as Accordion from '$lib/components/ui/accordion/index.js';
|
||||
import * as Card from '$lib/components/ui/card/index.js';
|
||||
import TorrentTable from '$lib/components/torrent-table.svelte';
|
||||
import {onMount} from "svelte";
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {toast} from "svelte-sonner";
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import type {RichMovieTorrent} from '$lib/types';
|
||||
import {getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import * as Accordion from '$lib/components/ui/accordion/index.js';
|
||||
import * as Card from '$lib/components/ui/card/index.js';
|
||||
import TorrentTable from '$lib/components/torrent-table.svelte';
|
||||
import {onMount} from 'svelte';
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {toast} from 'svelte-sonner';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let torrents: RichMovieTorrent[] = [];
|
||||
onMount(async () => {
|
||||
const res = await fetch(apiUrl + '/movies/torrents', {
|
||||
method: 'GET',
|
||||
credentials: 'include'
|
||||
});
|
||||
if (!res.ok) {
|
||||
toast.error("Failed to fetch torrents");
|
||||
throw new Error(`Failed to fetch torrents: ${res.status} ${res.statusText}`);
|
||||
}
|
||||
torrents = await res.json();
|
||||
console.log("got torrents: ", torrents);
|
||||
|
||||
})
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let torrents: RichMovieTorrent[] = [];
|
||||
onMount(async () => {
|
||||
const res = await fetch(apiUrl + '/movies/torrents', {
|
||||
method: 'GET',
|
||||
credentials: 'include'
|
||||
});
|
||||
if (!res.ok) {
|
||||
toast.error('Failed to fetch torrents');
|
||||
throw new Error(`Failed to fetch torrents: ${res.status} ${res.statusText}`);
|
||||
}
|
||||
torrents = await res.json();
|
||||
console.log('got torrents: ', torrents);
|
||||
});
|
||||
</script>
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href="/dashboard">MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard">Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard/tv">Shows</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>Movie Torrents</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
</Breadcrumb.List>
|
||||
</Breadcrumb.Root>
|
||||
</div>
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href="/dashboard">MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard">Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard/tv">Shows</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>Movie Torrents</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
</Breadcrumb.List>
|
||||
</Breadcrumb.Root>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="flex w-full flex-1 flex-col items-center gap-4 p-4 pt-0">
|
||||
<h1 class="scroll-m-20 text-center text-4xl font-extrabold tracking-tight lg:text-5xl">
|
||||
Movie Torrents
|
||||
</h1>
|
||||
<Accordion.Root class="w-full" type="single">
|
||||
{#each torrents as movie}
|
||||
<div class="p-6">
|
||||
<Card.Root>
|
||||
<Card.Header>
|
||||
<Card.Title>
|
||||
{getFullyQualifiedMediaName(movie)}
|
||||
</Card.Title>
|
||||
</Card.Header>
|
||||
<Card.Content>
|
||||
<TorrentTable isShow={false} torrents={movie.torrents}/>
|
||||
</Card.Content>
|
||||
</Card.Root>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="col-span-full text-center text-muted-foreground">No Torrents added yet.</div>
|
||||
{/each}
|
||||
</Accordion.Root>
|
||||
<h1 class="scroll-m-20 text-center text-4xl font-extrabold tracking-tight lg:text-5xl">
|
||||
Movie Torrents
|
||||
</h1>
|
||||
<Accordion.Root class="w-full" type="single">
|
||||
{#each torrents as movie}
|
||||
<div class="p-6">
|
||||
<Card.Root>
|
||||
<Card.Header>
|
||||
<Card.Title>
|
||||
{getFullyQualifiedMediaName(movie)}
|
||||
</Card.Title>
|
||||
</Card.Header>
|
||||
<Card.Content>
|
||||
<TorrentTable isShow={false} torrents={movie.torrents}/>
|
||||
</Card.Content>
|
||||
</Card.Root>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="col-span-full text-center text-muted-foreground">No Torrents added yet.</div>
|
||||
{/each}
|
||||
</Accordion.Root>
|
||||
</div>
|
||||
|
||||
@@ -4,5 +4,4 @@ import type {PageLoad} from './$types';
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
|
||||
export const load: PageLoad = async ({fetch}) => {
|
||||
|
||||
};
|
||||
|
||||
@@ -1,31 +1,30 @@
|
||||
<script lang="ts">
|
||||
import {page} from '$app/state';
|
||||
import {page} from '$app/state';
|
||||
import * as Card from '$lib/components/ui/card/index.js';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import {getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import LoadingBar from '$lib/components/loading-bar.svelte';
|
||||
import {getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import MediaPicture from '$lib/components/media-picture.svelte';
|
||||
import {Skeleton} from "$lib/components/ui/skeleton";
|
||||
import {Skeleton} from '$lib/components/ui/skeleton';
|
||||
|
||||
let tvShowsPromise = page.data.tvShows;
|
||||
</script>
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href="/dashboard">MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard">Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>Shows</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
@@ -34,24 +33,24 @@
|
||||
</div>
|
||||
</header>
|
||||
{#snippet loadingbar()}
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
<Skeleton class="h-[50vh] w-full "/>
|
||||
{/snippet}
|
||||
<div class="flex w-full flex-1 flex-col gap-4 p-4 pt-0">
|
||||
<h1 class="scroll-m-20 text-center text-4xl font-extrabold tracking-tight lg:text-5xl">
|
||||
TV Shows
|
||||
</h1>
|
||||
<div
|
||||
class="grid w-full auto-rows-min gap-4 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
|
||||
class="grid w-full auto-rows-min gap-4 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
|
||||
>
|
||||
{#await tvShowsPromise}
|
||||
{@render loadingbar()}
|
||||
@@ -67,7 +66,7 @@
|
||||
<Card.Description class="truncate">{show.overview}</Card.Description>
|
||||
</Card.Header>
|
||||
<Card.Content>
|
||||
<MediaPicture media={show}/>
|
||||
<MediaPicture media={show}/>
|
||||
</Card.Content>
|
||||
</Card.Root>
|
||||
</a>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script lang="ts">
|
||||
import {setContext} from 'svelte';
|
||||
import type {LayoutProps} from './$types';
|
||||
import {setContext} from 'svelte';
|
||||
import type {LayoutProps} from './$types';
|
||||
|
||||
let {data, children}: LayoutProps = $props();
|
||||
let {data, children}: LayoutProps = $props();
|
||||
|
||||
const showData = $derived(data.showData);
|
||||
setContext('show', () => showData);
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<script lang="ts">
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import {goto} from '$app/navigation';
|
||||
import {ImageOff} from 'lucide-svelte';
|
||||
import {goto} from '$app/navigation';
|
||||
import {ImageOff} from 'lucide-svelte';
|
||||
import * as Table from '$lib/components/ui/table/index.js';
|
||||
import {getContext} from 'svelte';
|
||||
import type {RichShowTorrent, Show, User} from '$lib/types.js';
|
||||
import {getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import {getContext} from 'svelte';
|
||||
import type {RichShowTorrent, Show, User} from '$lib/types.js';
|
||||
import {getFullyQualifiedMediaName} from '$lib/utils';
|
||||
import DownloadSeasonDialog from '$lib/components/download-season-dialog.svelte';
|
||||
import CheckmarkX from '$lib/components/checkmark-x.svelte';
|
||||
import {page} from '$app/state';
|
||||
import {page} from '$app/state';
|
||||
import TorrentTable from '$lib/components/torrent-table.svelte';
|
||||
import RequestSeasonDialog from '$lib/components/request-season-dialog.svelte';
|
||||
import MediaPicture from '$lib/components/media-picture.svelte';
|
||||
import {Checkbox} from '$lib/components/ui/checkbox/index.js';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {Label} from '$lib/components/ui/label';
|
||||
import {Checkbox} from '$lib/components/ui/checkbox/index.js';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {Label} from '$lib/components/ui/label';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let show: () => Show = getContext('show');
|
||||
@@ -28,10 +28,10 @@
|
||||
let url = new URL(apiUrl + '/tv/shows/' + show().id + '/continuousDownload');
|
||||
url.searchParams.append('continuous_download', !show().continuous_download);
|
||||
console.log(
|
||||
'Toggling continuous download for show',
|
||||
show().name,
|
||||
'to',
|
||||
!show().continuous_download
|
||||
'Toggling continuous download for show',
|
||||
show().name,
|
||||
'to',
|
||||
!show().continuous_download
|
||||
);
|
||||
const response = await fetch(url, {
|
||||
method: 'POST',
|
||||
@@ -49,22 +49,22 @@
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href="/dashboard">MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard">Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard/tv">Shows</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>{getFullyQualifiedMediaName(show())}</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
@@ -79,12 +79,12 @@
|
||||
<div class="flex flex-col gap-4 md:flex-row md:items-stretch">
|
||||
<div class="w-full overflow-hidden rounded-xl bg-muted/50 md:w-1/3 md:max-w-sm">
|
||||
{#if show().id}
|
||||
<MediaPicture media={show()}/>
|
||||
<MediaPicture media={show()}/>
|
||||
{:else}
|
||||
<div
|
||||
class="aspect-9/16 flex h-auto w-full items-center justify-center rounded-lg bg-gray-200 text-gray-500"
|
||||
class="aspect-9/16 flex h-auto w-full items-center justify-center rounded-lg bg-gray-200 text-gray-500"
|
||||
>
|
||||
<ImageOff size={48}/>
|
||||
<ImageOff size={48}/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -98,21 +98,21 @@
|
||||
{#if !show().ended}
|
||||
<div class="mx-1 my-2 block">
|
||||
<Checkbox
|
||||
checked={show().continuous_download}
|
||||
onCheckedChange={() => {
|
||||
checked={show().continuous_download}
|
||||
onCheckedChange={() => {
|
||||
toggle_continuous_download();
|
||||
}}
|
||||
id="continuous-download-checkbox"
|
||||
id="continuous-download-checkbox"
|
||||
/>
|
||||
<Label for="continuous-download-checkbox">
|
||||
Enable automatic download of future seasons
|
||||
</Label>
|
||||
<hr/>
|
||||
<hr/>
|
||||
</div>
|
||||
{/if}
|
||||
<DownloadSeasonDialog show={show()}/>
|
||||
<DownloadSeasonDialog show={show()}/>
|
||||
{/if}
|
||||
<RequestSeasonDialog show={show()}/>
|
||||
<RequestSeasonDialog show={show()}/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 rounded-xl bg-muted/50 p-4">
|
||||
@@ -131,12 +131,12 @@
|
||||
{#if show().seasons.length > 0}
|
||||
{#each show().seasons as season (season.id)}
|
||||
<Table.Row
|
||||
link={true}
|
||||
onclick={() => goto('/dashboard/tv/' + show().id + '/' + season.id)}
|
||||
link={true}
|
||||
onclick={() => goto('/dashboard/tv/' + show().id + '/' + season.id)}
|
||||
>
|
||||
<Table.Cell class="min-w-[10px] font-medium">{season.number}</Table.Cell>
|
||||
<Table.Cell class="min-w-[10px] font-medium">
|
||||
<CheckmarkX state={season.downloaded}/>
|
||||
<CheckmarkX state={season.downloaded}/>
|
||||
</Table.Cell>
|
||||
<Table.Cell class="min-w-[50px]">{season.name}</Table.Cell>
|
||||
<Table.Cell class="max-w-[300px] truncate">{season.overview}</Table.Cell>
|
||||
@@ -153,7 +153,7 @@
|
||||
</div>
|
||||
<div class="flex-1 rounded-xl bg-muted/50 p-4">
|
||||
<div class="w-full overflow-x-auto">
|
||||
<TorrentTable torrents={torrents.torrents}/>
|
||||
<TorrentTable torrents={torrents.torrents}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<script lang="ts">
|
||||
import {page} from '$app/state';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import {page} from '$app/state';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import * as Table from '$lib/components/ui/table/index.js';
|
||||
import {getContext} from 'svelte';
|
||||
import type {PublicSeasonFile, Season, Show} from '$lib/types';
|
||||
import {getContext} from 'svelte';
|
||||
import type {PublicSeasonFile, Season, Show} from '$lib/types';
|
||||
import CheckmarkX from '$lib/components/checkmark-x.svelte';
|
||||
import {getFullyQualifiedMediaName, getTorrentQualityString} from '$lib/utils';
|
||||
import {getFullyQualifiedMediaName, getTorrentQualityString} from '$lib/utils';
|
||||
import MediaPicture from '$lib/components/media-picture.svelte';
|
||||
|
||||
let seasonFiles: PublicSeasonFile[] = $state(page.data.files);
|
||||
@@ -19,29 +19,29 @@
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href="/dashboard">MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard">Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard/tv">Shows</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard/tv/{show().id}">
|
||||
{show().name}
|
||||
{show().year == null ? '' : '(' + show().year + ')'}
|
||||
</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>Season {season.number}</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
@@ -55,7 +55,7 @@
|
||||
<div class="flex flex-1 flex-col gap-4 p-4">
|
||||
<div class="flex flex-col gap-4 md:flex-row md:items-stretch">
|
||||
<div class="w-full overflow-hidden rounded-xl bg-muted/50 md:w-1/3 md:max-w-sm">
|
||||
<MediaPicture media={show()}/>
|
||||
<MediaPicture media={show()}/>
|
||||
</div>
|
||||
<div class="w-full flex-auto rounded-xl bg-muted/50 p-4 md:w-1/4">
|
||||
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
||||
@@ -82,7 +82,7 @@
|
||||
{file.file_path_suffix}
|
||||
</Table.Cell>
|
||||
<Table.Cell class="w-[10px] font-medium">
|
||||
<CheckmarkX state={file.downloaded}/>
|
||||
<CheckmarkX state={file.downloaded}/>
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
{:else}
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
<script lang="ts">
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import {env} from '$env/dynamic/public';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import {Input} from '$lib/components/ui/input';
|
||||
import {Label} from '$lib/components/ui/label';
|
||||
import {Button} from '$lib/components/ui/button';
|
||||
import {ChevronDown} from 'lucide-svelte';
|
||||
import {Input} from '$lib/components/ui/input';
|
||||
import {Label} from '$lib/components/ui/label';
|
||||
import {Button} from '$lib/components/ui/button';
|
||||
import {ChevronDown} from 'lucide-svelte';
|
||||
import * as Collapsible from '$lib/components/ui/collapsible/index.js';
|
||||
import type {MetaDataProviderShowSearchResult} from '$lib/types.js';
|
||||
import type {MetaDataProviderShowSearchResult} from '$lib/types.js';
|
||||
import * as RadioGroup from '$lib/components/ui/radio-group/index.js';
|
||||
import AddMediaCard from '$lib/components/add-media-card.svelte';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {onMount} from "svelte";
|
||||
import * as Menubar from "$lib/components/ui/menubar/index.js";
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {onMount} from 'svelte';
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let searchTerm: string = $state('');
|
||||
let metadataProvider: string = $state('tmdb');
|
||||
let results: MetaDataProviderShowSearchResult[] | null = $state(null);
|
||||
onMount(search)
|
||||
onMount(search);
|
||||
async function search() {
|
||||
let url = new URL(apiUrl + '/tv/recommended');
|
||||
if (searchTerm.length > 0) {
|
||||
@@ -27,7 +26,6 @@
|
||||
url.searchParams.append('query', searchTerm);
|
||||
url.searchParams.append('metadata_provider', metadataProvider);
|
||||
toast.info(`Searching for "${searchTerm}" using ${metadataProvider.toUpperCase()}...`);
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -41,7 +39,7 @@
|
||||
}
|
||||
results = await response.json();
|
||||
if (searchTerm.length === 0) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
if (results && results.length > 0) {
|
||||
toast.success(`Found ${results.length} result(s) for "${searchTerm}".`);
|
||||
@@ -50,7 +48,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
const errorMessage =
|
||||
error instanceof Error ? error.message : 'An unknown error occurred during search.';
|
||||
error instanceof Error ? error.message : 'An unknown error occurred during search.';
|
||||
console.error('Search error:', error);
|
||||
toast.error(errorMessage);
|
||||
results = null; // Clear previous results on error
|
||||
@@ -60,22 +58,22 @@
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href="/dashboard">MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard">Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard/tv">Shows</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>Add a Show</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
@@ -91,7 +89,7 @@
|
||||
</h1>
|
||||
<section>
|
||||
<Label for="search-box">Show Name</Label>
|
||||
<Input bind:value={searchTerm} id="search-box" placeholder="Show Name" type="text"/>
|
||||
<Input bind:value={searchTerm} id="search-box" placeholder="Show Name" type="text"/>
|
||||
<p class="text-sm text-muted-foreground">Search for a Show to add.</p>
|
||||
</section>
|
||||
<section>
|
||||
@@ -100,7 +98,7 @@
|
||||
<div class="flex items-center justify-between space-x-4 px-4">
|
||||
<h4 class="text-sm font-semibold">Advanced Settings</h4>
|
||||
<Button class="w-9 p-0" size="sm" variant="ghost">
|
||||
<ChevronDown/>
|
||||
<ChevronDown/>
|
||||
<span class="sr-only">Toggle</span>
|
||||
</Button>
|
||||
</div>
|
||||
@@ -109,11 +107,11 @@
|
||||
<Label for="metadata-provider-selector">Choose which Metadata Provider to query.</Label>
|
||||
<RadioGroup.Root bind:value={metadataProvider} id="metadata-provider-selector">
|
||||
<div class="flex items-center space-x-2">
|
||||
<RadioGroup.Item id="option-one" value="tmdb"/>
|
||||
<RadioGroup.Item id="option-one" value="tmdb"/>
|
||||
<Label for="option-one">TMDB (Recommended)</Label>
|
||||
</div>
|
||||
<div class="flex items-center space-x-2">
|
||||
<RadioGroup.Item id="option-two" value="tvdb"/>
|
||||
<RadioGroup.Item id="option-two" value="tvdb"/>
|
||||
<Label for="option-two">TVDB</Label>
|
||||
</div>
|
||||
</RadioGroup.Root>
|
||||
@@ -125,18 +123,18 @@
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<Separator class="my-8"/>
|
||||
<Separator class="my-8"/>
|
||||
|
||||
{#if results != null}
|
||||
{#if results.length === 0}
|
||||
<h3 class="mx-auto">No Shows found.</h3>
|
||||
{:else}
|
||||
<div
|
||||
class="grid w-full auto-rows-min gap-4 sm:grid-cols-1
|
||||
class="grid w-full auto-rows-min gap-4 sm:grid-cols-1
|
||||
md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
|
||||
>
|
||||
{#each results as result}
|
||||
<AddMediaCard {result}/>
|
||||
<AddMediaCard {result}/>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts">
|
||||
import {page} from '$app/state';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import {page} from '$app/state';
|
||||
import {Separator} from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import type {SeasonRequest} from '$lib/types';
|
||||
import type {SeasonRequest} from '$lib/types';
|
||||
import RequestsTable from '$lib/components/season-requests-table.svelte';
|
||||
|
||||
let requests: SeasonRequest[] = $state(page.data.requestsData);
|
||||
@@ -11,22 +11,22 @@
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Sidebar.Trigger class="-ml-1"/>
|
||||
<Separator class="mr-2 h-4" orientation="vertical"/>
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href="/dashboard">MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard">Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href="/dashboard/tv">Shows</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Separator class="hidden md:block"/>
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>Season Requests</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
|
||||
@@ -12,5 +12,5 @@ export const load: PageLoad = async ({fetch}) => {
|
||||
credentials: 'include'
|
||||
});
|
||||
|
||||
return {oauthProvider: await response.json()};
|
||||
return {oauthProvider: await response.json()};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user