Add custommodel

This commit is contained in:
Kwaroran
2025-03-23 15:21:31 +09:00
parent bcb8a28034
commit 3535c29c10
7 changed files with 174 additions and 11 deletions

View File

@@ -9,6 +9,7 @@
help?: (keyof (typeof language.help))|'';
disabled?: boolean;
children?: import('svelte').Snippet;
className?: string;
}
let {
@@ -16,7 +17,8 @@
styled = false,
help = '',
disabled = false,
children
children,
className = ""
}: Props = $props();
</script>
{#if disabled}
@@ -35,7 +37,7 @@
<Help key={help} />
{/if}</button>
{#if open}
<div class="flex flex-col border border-selected p-2 rounded-b-md">
<div class={"flex flex-col border border-selected p-2 rounded-b-md " + className}>
{@render children?.()}
</div>
{/if}

View File

@@ -74,6 +74,17 @@
{/await}
</Arcodion>
{#if DBState?.db.customModels?.length > 0}
<Arcodion name={language.customModels}>
{#each DBState.db.customModels as model}
<button class="hover:bg-selected px-6 py-2 text-lg" onclick={() => {changeModel(model.id)}}>{model.name ?? "Unnamed"}</button>
{/each}
</Arcodion>
{/if}
{#if blankable}
<button class="hover:bg-selected px-6 py-2 text-lg" onclick={() => {changeModel('')}}>{language.none}</button>
{/if}