refactor: Constants

This commit is contained in:
Aleksander Grygier 2025-11-29 01:38:02 +01:00
parent 648d2deebc
commit 27b152267f
2 changed files with 8 additions and 4 deletions

View File

@ -19,6 +19,11 @@
import { isRouterMode } from '$lib/stores/server.svelte';
import { DialogModelInformation } from '$lib/components/app';
import type { ModelOption } from '$lib/types/models';
import {
MENU_MAX_WIDTH,
MENU_OFFSET,
VIEWPORT_GUTTER
} from '$lib/constants/floating-ui-constraints';
interface Props {
class?: string;
@ -154,10 +159,6 @@
maxHeight: number;
} | null>(null);
const VIEWPORT_GUTTER = 8;
const MENU_OFFSET = 6;
const MENU_MAX_WIDTH = 320;
onMount(async () => {
try {
await modelsStore.fetch();

View File

@ -0,0 +1,3 @@
export const VIEWPORT_GUTTER = 8;
export const MENU_OFFSET = 6;
export const MENU_MAX_WIDTH = 320;