mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-13 11:39:41 +03:00
fix(tui): use faint secondary text in list dialogs (#56094)
This commit is contained in:
committed by
GitHub
Unverified
parent
b81629e4c9
commit
d63c8d25f7
@@ -837,8 +837,11 @@ function DialogSelectRow(props: {
|
||||
if (props.current && !newDesigns()) return theme.text.formfield.selected
|
||||
return theme.text.base
|
||||
})
|
||||
// Secondary text (description and footer) on the highlighted row.
|
||||
const secondary = () => (newDesigns() ? theme.text.action.secondary.focused : text())
|
||||
// Secondary text (description and footer).
|
||||
const secondary = () => {
|
||||
if (!newDesigns()) return props.active ? text() : theme.text.muted
|
||||
return props.active ? theme.text.action.secondary.focused : theme.text.faint
|
||||
}
|
||||
|
||||
const row = () => (
|
||||
// A marker or gutter takes its cell plus the row gap out of the left padding,
|
||||
@@ -881,12 +884,12 @@ function DialogSelectRow(props: {
|
||||
? Locale.truncateLeft(props.title, props.titleWidth ?? 61)
|
||||
: Locale.truncate(props.title, props.titleWidth ?? 61))}
|
||||
<Show when={props.description}>
|
||||
<span style={{ fg: props.active ? secondary() : theme.text.muted }}>{" " + props.description}</span>
|
||||
<span style={{ fg: secondary() }}>{" " + props.description}</span>
|
||||
</Show>
|
||||
</text>
|
||||
<Show when={props.footer}>
|
||||
<box flexShrink={0}>
|
||||
<text fg={props.active ? secondary() : (props.footerColor ?? theme.text.muted)}>{props.footer}</text>
|
||||
<text fg={props.active || !props.footerColor ? secondary() : props.footerColor}>{props.footer}</text>
|
||||
</box>
|
||||
</Show>
|
||||
</box>
|
||||
|
||||
Reference in New Issue
Block a user