janitorial work

This commit is contained in:
2026-02-07 15:12:34 -05:00
parent 7eb49ac1c7
commit 73aa211229
17 changed files with 38 additions and 76 deletions

View File

@@ -4,11 +4,18 @@
*/
import { useKeyboard, useRenderer } from "@opentui/solid"
import type { TabId } from "../components/Tab"
import type { Accessor } from "solid-js"
const TAB_ORDER: TabId[] = ["feed", "shows", "discover", "search", "player", "settings"]
type TabId =
| "feed"
| "shows"
| "discover"
| "search"
| "player"
| "settings"
type ShortcutOptions = {
activeTab: TabId
onTabChange: (tab: TabId) => void
@@ -53,8 +60,9 @@ export function useAppKeyboard(options: ShortcutOptions) {
return
}
// Return key cycles tabs (equivalent to Tab)
if (key.name === "return") {
options.onAction?.("enter")
options.onTabChange(getNextTab(options.activeTab))
return
}