feat: models?id= support for admin settings

This commit is contained in:
Timothy Jaeryang Baek 2025-07-07 17:16:51 +04:00
parent a519c62250
commit 57f9eadd75

View file

@ -14,6 +14,8 @@
toggleModelById, toggleModelById,
updateModelById updateModelById
} from '$lib/apis/models'; } from '$lib/apis/models';
import { copyToClipboard } from '$lib/utils';
import { page } from '$app/stores';
import { getModels } from '$lib/apis'; import { getModels } from '$lib/apis';
import Search from '$lib/components/icons/Search.svelte'; import Search from '$lib/components/icons/Search.svelte';
@ -34,7 +36,6 @@
import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte'; import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte';
import EyeSlash from '$lib/components/icons/EyeSlash.svelte'; import EyeSlash from '$lib/components/icons/EyeSlash.svelte';
import Eye from '$lib/components/icons/Eye.svelte'; import Eye from '$lib/components/icons/Eye.svelte';
import { copyToClipboard } from '$lib/utils';
let shiftKey = false; let shiftKey = false;
@ -205,6 +206,11 @@
onMount(async () => { onMount(async () => {
await init(); await init();
const id = $page.url.searchParams.get('id');
if (id) {
selectedModelId = id;
}
const onKeyDown = (event) => { const onKeyDown = (event) => {
if (event.key === 'Shift') { if (event.key === 'Shift') {