feat(tui): match session exported dialog to new designs (#56093)

This commit is contained in:
Aarav Sareen
2026-10-20 12:30:52 +05:30
committed by GitHub
Unverified
parent 9d90d892dc
commit b81629e4c9
2 changed files with 9 additions and 5 deletions
+7 -3
View File
@@ -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>
)
}
+2 -2
View File
@@ -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>