feat(desktop): startup errors shown

This commit is contained in:
Adam 2025-12-17 15:42:50 -06:00
commit e48d804d84
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
7 changed files with 334 additions and 238 deletions

View file

@ -26,6 +26,7 @@ export interface TextFieldProps
error?: string
variant?: "normal" | "ghost"
copyable?: boolean
multiline?: boolean
}
export function TextField(props: TextFieldProps) {
@ -46,6 +47,7 @@ export function TextField(props: TextFieldProps) {
"error",
"variant",
"copyable",
"multiline",
])
const [copied, setCopied] = createSignal(false)
@ -81,7 +83,12 @@ export function TextField(props: TextFieldProps) {
</Kobalte.Label>
</Show>
<div data-slot="input-wrapper">
<Kobalte.Input {...others} data-slot="input-input" class={local.class} />
<Show
when={local.multiline}
fallback={<Kobalte.Input {...others} data-slot="input-input" class={local.class} />}
>
<Kobalte.TextArea {...others} autoResize data-slot="input-input" class={local.class} />
</Show>
<Show when={local.copyable}>
<Tooltip value={copied() ? "Copied" : "Copy to clipboard"} placement="top" gutter={8}>
<IconButton