remove public_ssr_api_url

This commit is contained in:
maxDorninger
2025-06-08 23:10:37 +02:00
parent ec2493afdb
commit 40a19edc56
26 changed files with 146 additions and 161 deletions

View File

@@ -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}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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 = () => {

View 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>

View File

@@ -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);

View File

@@ -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);

View File

@@ -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',