mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-03 22:26:43 +00:00

* feat: add ui worker command loading code (not working yet) * feat: add unocss * feat: add-dev-extension page * feat: implemented list view template * feat: implement list view detail view width, add demo extension for dev * fix: resize listview, add metadata component * fix: metadata tag component background color * feat: implement boolean (checkbox), date fields for form template * feat: support default, optional, placeholder for form fields * feat: implemented form view Select Field * feat: markdown view * feat: fixed a markdown schema type error * fix: markdown styling * feat: implement action panel for UI worker template list view * format: format all * chore: bump desktop version * fix: fix search term bind in list view
20 lines
654 B
Svelte
20 lines
654 B
Svelte
<script lang="ts">
|
|
import { ListSchema, MarkdownSchema, NodeNameEnum } from "@kksh/api/ui/worker"
|
|
import Markdown from "./Markdown.svelte"
|
|
import Metadata from "./metadata/Metadata.svelte"
|
|
|
|
const { detail }: { detail: ListSchema.ItemDetail } = $props()
|
|
</script>
|
|
|
|
<div class="h-full overflow-auto">
|
|
{#each detail.children as child}
|
|
{#if child.nodeName === NodeNameEnum.Markdown}
|
|
<Markdown markdown={(child as MarkdownSchema).content} />
|
|
{:else if child.nodeName === NodeNameEnum.ListItemDetailMetadata}
|
|
<Metadata items={(child as ListSchema.ItemDetailMetadata).items} />
|
|
{:else}
|
|
<div>Unhandled Component</div>
|
|
{/if}
|
|
{/each}
|
|
</div>
|