refactor: Constants
This commit is contained in:
parent
648d2deebc
commit
27b152267f
|
|
@ -19,6 +19,11 @@
|
||||||
import { isRouterMode } from '$lib/stores/server.svelte';
|
import { isRouterMode } from '$lib/stores/server.svelte';
|
||||||
import { DialogModelInformation } from '$lib/components/app';
|
import { DialogModelInformation } from '$lib/components/app';
|
||||||
import type { ModelOption } from '$lib/types/models';
|
import type { ModelOption } from '$lib/types/models';
|
||||||
|
import {
|
||||||
|
MENU_MAX_WIDTH,
|
||||||
|
MENU_OFFSET,
|
||||||
|
VIEWPORT_GUTTER
|
||||||
|
} from '$lib/constants/floating-ui-constraints';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
class?: string;
|
class?: string;
|
||||||
|
|
@ -154,10 +159,6 @@
|
||||||
maxHeight: number;
|
maxHeight: number;
|
||||||
} | null>(null);
|
} | null>(null);
|
||||||
|
|
||||||
const VIEWPORT_GUTTER = 8;
|
|
||||||
const MENU_OFFSET = 6;
|
|
||||||
const MENU_MAX_WIDTH = 320;
|
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
try {
|
try {
|
||||||
await modelsStore.fetch();
|
await modelsStore.fetch();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
export const VIEWPORT_GUTTER = 8;
|
||||||
|
export const MENU_OFFSET = 6;
|
||||||
|
export const MENU_MAX_WIDTH = 320;
|
||||||
Loading…
Reference in New Issue