feat(settings): configurable selection marker, default off
Adds a Selection Marker toggle under Settings → Preferences that controls the ❯ cursor glyph on the focused row of every list. Default off; rows keep a leading space for alignment either way. Every list pane (tab strip, feed, my shows, discover, search, settings, whitelist editor) reads the glyph through the shared useSelectionMarker hook. Also aligns the lead column across panes: page list rows drop their extra box paddingLeft so labels start at the same column as the tab strip (2 cells without nerd icons, 4 with), keeping episode sub-rows aligned to the title.
This commit is contained in:
16
src/hooks/useSelectionMarker.ts
Normal file
16
src/hooks/useSelectionMarker.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* useSelectionMarker — reactive accessor for the row-selection marker glyph.
|
||||
*
|
||||
* When the `showSelectionMarker` setting is on, the focused row of every list
|
||||
* renders `❯`; when off (the default), it renders a space so column alignment
|
||||
* is preserved. Every list pane in the app reads the marker through this hook
|
||||
* so the setting applies consistently everywhere.
|
||||
*/
|
||||
|
||||
import { useAppStore } from "@/stores/app";
|
||||
|
||||
export function useSelectionMarker(): () => string {
|
||||
const app = useAppStore();
|
||||
return () =>
|
||||
app.state().settings.showSelectionMarker ? "❯" : " ";
|
||||
}
|
||||
Reference in New Issue
Block a user