mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-20 03:54:19 +02:00
remove public_ssr_api_url
This commit is contained in:
@@ -6,10 +6,8 @@
|
||||
import {goto} from '$app/navigation';
|
||||
import {base} from '$app/paths';
|
||||
import type {MetaDataProviderShowSearchResult} from '$lib/types.js';
|
||||
import {toOptimizedURL} from 'sveltekit-image-optimize/components';
|
||||
import {browser} from "$app/environment";
|
||||
|
||||
const apiUrl = browser ? env.PUBLIC_API_URL : env.PUBLIC_SSR_API_URL;
|
||||
const apiUrl = env.PUBLIC_API_URL
|
||||
let loading = $state(false);
|
||||
let errorMessage = $state(null);
|
||||
let {result}: { result: MetaDataProviderShowSearchResult } = $props();
|
||||
@@ -51,7 +49,7 @@
|
||||
{#if result.poster_path != null}
|
||||
<img
|
||||
class="max-h-full max-w-full rounded-lg object-contain"
|
||||
src={toOptimizedURL(result.poster_path)}
|
||||
src={result.poster_path}
|
||||
alt="{result.name}'s Poster Image"
|
||||
/>
|
||||
{:else}
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
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 {browser} from "$app/environment";
|
||||
|
||||
const apiUrl = browser ? env.PUBLIC_API_URL : env.PUBLIC_SSR_API_URL;
|
||||
const apiUrl = env.PUBLIC_API_URL
|
||||
let {show} = $props();
|
||||
let dialogueState = $state(false);
|
||||
let selectedSeasonNumber: number = $state(1);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import LoadingBar from '$lib/components/loading-bar.svelte';
|
||||
import {browser} from "$app/environment";
|
||||
|
||||
const apiUrl = browser ? env.PUBLIC_API_URL : env.PUBLIC_SSR_API_URL;
|
||||
const apiUrl = env.PUBLIC_API_URL
|
||||
|
||||
let {oauthProvider} = $props();
|
||||
let oauthProviderName = $derived(oauthProvider.oauth_name);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {browser} from "$app/environment";
|
||||
|
||||
const apiUrl = browser ? env.PUBLIC_API_URL : env.PUBLIC_SSR_API_URL;
|
||||
const apiUrl = env.PUBLIC_API_URL
|
||||
let {show}: { show: PublicShow } = $props();
|
||||
|
||||
let dialogOpen = $state(false);
|
||||
|
||||
@@ -9,9 +9,8 @@
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {goto} from '$app/navigation';
|
||||
import {base} from '$app/paths';
|
||||
import {browser} from "$app/environment";
|
||||
|
||||
const apiUrl = browser ? env.PUBLIC_API_URL : env.PUBLIC_SSR_API_URL;
|
||||
const apiUrl = env.PUBLIC_API_URL
|
||||
let {
|
||||
requests,
|
||||
filter = () => {
|
||||
|
||||
24
web/src/lib/components/show-picture.svelte
Normal file
24
web/src/lib/components/show-picture.svelte
Normal file
@@ -0,0 +1,24 @@
|
||||
<script>
|
||||
import {getFullyQualifiedShowName} from "$lib/utils.js";
|
||||
import logo from "$lib/images/svelte-logo.svg";
|
||||
import {env} from "$env/dynamic/public";
|
||||
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
let {show} = $props();
|
||||
</script>
|
||||
|
||||
<picture>
|
||||
<source
|
||||
srcset="{apiUrl}/static/image/{show.id}.avif"
|
||||
type="image/avif"
|
||||
/>
|
||||
<source
|
||||
srcset="{apiUrl}/static/image/{show.id}.webp"
|
||||
type="image/webp"
|
||||
/>
|
||||
<img
|
||||
alt="{getFullyQualifiedShowName(show)}'s Poster Image"
|
||||
class="aspect-9/16 center h-auto max-w-full rounded-lg object-cover"
|
||||
src="{apiUrl}/static/image/{show.id}.jpeg"
|
||||
/>
|
||||
</picture>
|
||||
@@ -11,7 +11,7 @@
|
||||
import {Input} from '$lib/components/ui/input/index.js';
|
||||
import {browser} from "$app/environment";
|
||||
|
||||
const apiUrl = browser ? env.PUBLIC_API_URL : env.PUBLIC_SSR_API_URL;
|
||||
const apiUrl = env.PUBLIC_API_URL
|
||||
let {users}: { users: User[] } = $props();
|
||||
let sortedUsers = $derived(users.sort((a, b) => a.email.localeCompare(b.email)));
|
||||
let selectedUser: User | null = $state(null);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import {Input} from '$lib/components/ui/input/index.js';
|
||||
import {browser} from "$app/environment";
|
||||
|
||||
const apiUrl = browser ? env.PUBLIC_API_URL : env.PUBLIC_SSR_API_URL;
|
||||
const apiUrl = env.PUBLIC_API_URL
|
||||
let newPassword: string = $state('');
|
||||
let newEmail: string = $state('');
|
||||
let dialogOpen = $state(false);
|
||||
|
||||
@@ -6,7 +6,7 @@ import {base} from '$app/paths';
|
||||
import {toast} from 'svelte-sonner';
|
||||
import {browser} from "$app/environment";
|
||||
|
||||
const apiUrl = browser ? env.PUBLIC_API_URL : env.PUBLIC_SSR_API_URL;
|
||||
const apiUrl = env.PUBLIC_API_URL;
|
||||
|
||||
export const qualityMap: { [key: number]: string } = {
|
||||
1: '4K/UHD',
|
||||
|
||||
Reference in New Issue
Block a user