mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 00:03:13 +03:00
feat(tui): match session exported dialog to new designs (#56093)
This commit is contained in:
committed by
GitHub
Unverified
parent
9d90d892dc
commit
b81629e4c9
@@ -1,4 +1,4 @@
|
||||
import { createSignal } from "solid-js"
|
||||
import { createSignal, Show } from "solid-js"
|
||||
import { useNewDesigns } from "../config"
|
||||
import { useClipboard } from "../context/clipboard"
|
||||
import { Keymap } from "../context/keymap"
|
||||
@@ -52,7 +52,7 @@ export function DialogExportResult(props: { path: string; onClose?: () => void }
|
||||
actions: {
|
||||
primary: [
|
||||
copied()
|
||||
? { title: "✓ copied", color: theme.text.feedback.success.base, onTrigger: copy }
|
||||
? { title: "copied", key: "✓", color: theme.text.feedback.success.base, onTrigger: copy }
|
||||
: { title: "copy path", key: "c", onTrigger: copy },
|
||||
],
|
||||
},
|
||||
@@ -70,7 +70,11 @@ export function DialogExportResult(props: { path: string; onClose?: () => void }
|
||||
</box>
|
||||
}
|
||||
>
|
||||
<text fg={theme.text.base}>{props.path}</text>
|
||||
<Show when={newDesigns()} fallback={<text fg={theme.text.base}>{props.path}</text>}>
|
||||
<text fg={theme.text.base}>
|
||||
Saved to <span style={{ fg: theme.text.muted, underline: true }}>{props.path}</span>
|
||||
</text>
|
||||
</Show>
|
||||
</DialogLayout>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ export type DialogFooterAction = {
|
||||
command?: string
|
||||
onTrigger?: () => void
|
||||
disabled?: boolean
|
||||
/** Overrides the title color, e.g. for a "✓ copied" confirmation. */
|
||||
/** Overrides the title and key color, e.g. for a "copied ✓" confirmation. */
|
||||
color?: RGBA
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ function DialogFooterItem(props: { action: DialogFooterAction; variant: "primary
|
||||
{props.action.title}
|
||||
</span>
|
||||
<Show when={props.action.key}>
|
||||
<span style={{ fg: props.action.disabled ? theme.text.action.primary.disabled : key }}>
|
||||
<span style={{ fg: props.action.disabled ? theme.text.action.primary.disabled : (props.action.color ?? key) }}>
|
||||
{" " + props.action.key}
|
||||
</span>
|
||||
</Show>
|
||||
|
||||
Reference in New Issue
Block a user