fix: whitelist editor keyboard/mouse navigation + highlight gating, My Shows w on focused show
Whitelist editor (Preferences > Auto Download Whitelist): - input focus driven by nav.inputFocused() (SearchPage pattern) so Esc deterministically defocuses and j/k/Space/Enter browse the suggestions - suggestions react to mouse: click focuses the row and toggles membership - no accent bg / no marker on any suggestion while the input is focused - s re-enters typing mode; suggestion rows scroll into view Search page: recent-searches rows get no bg and no marker while the query input is focused (previously the focused row fell into the inactive branch and rendered the border color as a background). My Shows: w toggles the focused show in/out of the auto-download whitelist at the show list (depth 0), with a whitelist marker on the row and a hint in the preview pane (scope: whitelist).
This commit is contained in:
@@ -280,6 +280,9 @@ function SearchPage() {
|
||||
{(query, index) => {
|
||||
const lf = () => focus(0);
|
||||
const ref = useScrollIntoView(() => index() === lf());
|
||||
// While the input is focused (typing), the list is not
|
||||
// in focus: no bg, no accent fg, no `❯` on any entry.
|
||||
const typing = () => inputActive();
|
||||
return (
|
||||
<box
|
||||
ref={ref}
|
||||
@@ -287,7 +290,11 @@ function SearchPage() {
|
||||
gap={1}
|
||||
paddingLeft={1}
|
||||
paddingRight={1}
|
||||
backgroundColor={focusBg(index(), lf(), isActive())}
|
||||
backgroundColor={
|
||||
typing()
|
||||
? undefined
|
||||
: focusBg(index(), lf(), isActive())
|
||||
}
|
||||
onMouseDown={() => {
|
||||
nav.setActivePane(DEPTH_CENTER_PANE);
|
||||
nav.setDepthFocus(index(), 0);
|
||||
@@ -297,10 +304,24 @@ function SearchPage() {
|
||||
selectRecent(query);
|
||||
}}
|
||||
>
|
||||
<text fg={focusFg(index(), lf(), isActive())}>
|
||||
{index() === lf() ? "❯" : " "}
|
||||
<text
|
||||
fg={
|
||||
typing()
|
||||
? theme.text
|
||||
: focusFg(index(), lf(), isActive())
|
||||
}
|
||||
>
|
||||
{index() === lf() && !typing() ? "❯" : " "}
|
||||
</text>
|
||||
<text
|
||||
fg={
|
||||
typing()
|
||||
? theme.text
|
||||
: focusFg(index(), lf(), isActive())
|
||||
}
|
||||
>
|
||||
{query}
|
||||
</text>
|
||||
<text fg={focusFg(index(), lf(), isActive())}>{query}</text>
|
||||
</box>
|
||||
);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user