missing md

This commit is contained in:
2026-02-04 11:36:47 -05:00
parent 9b1a3585e6
commit b8549777ba
15 changed files with 633 additions and 30 deletions

View File

@@ -39,15 +39,17 @@ export function DiscoverPage(props: DiscoverPageProps) {
// Category navigation
if (area === "categories") {
if (key.name === "left" || key.name === "h") {
setCategoryIndex((i) => Math.max(0, i - 1))
const cat = DISCOVER_CATEGORIES[categoryIndex()]
const nextIndex = Math.max(0, categoryIndex() - 1)
setCategoryIndex(nextIndex)
const cat = DISCOVER_CATEGORIES[nextIndex]
if (cat) discoverStore.setSelectedCategory(cat.id)
setShowIndex(0) // Reset show selection when changing category
setShowIndex(0)
return
}
if (key.name === "right" || key.name === "l") {
setCategoryIndex((i) => Math.min(DISCOVER_CATEGORIES.length - 1, i + 1))
const cat = DISCOVER_CATEGORIES[categoryIndex()]
const nextIndex = Math.min(DISCOVER_CATEGORIES.length - 1, categoryIndex() + 1)
setCategoryIndex(nextIndex)
const cat = DISCOVER_CATEGORIES[nextIndex]
if (cat) discoverStore.setSelectedCategory(cat.id)
setShowIndex(0)
return
@@ -67,10 +69,15 @@ export function DiscoverPage(props: DiscoverPageProps) {
if (area === "shows") {
const shows = discoverStore.filteredPodcasts()
if (key.name === "down" || key.name === "j") {
if (shows.length === 0) return
setShowIndex((i) => Math.min(i + 1, shows.length - 1))
return
}
if (key.name === "up" || key.name === "k") {
if (shows.length === 0) {
setFocusArea("categories")
return
}
const newIndex = showIndex() - 1
if (newIndex < 0) {
setFocusArea("categories")

View File

@@ -4,6 +4,7 @@
*/
import { createSignal, For, Show } from "solid-js"
import { useKeyboard } from "@opentui/solid"
import type { Feed } from "../types/feed"
import type { Episode } from "../types/episode"
import { format } from "date-fns"
@@ -72,6 +73,11 @@ export function FeedDetail(props: FeedDetailProps) {
}
}
useKeyboard((key) => {
if (!props.focused) return
handleKeyPress(key)
})
return (
<box flexDirection="column" gap={1}>
{/* Header with back button */}

View File

@@ -4,6 +4,7 @@
*/
import { createSignal, For, Show } from "solid-js"
import { useKeyboard } from "@opentui/solid"
import { FeedItem } from "./FeedItem"
import { useFeedStore } from "../stores/feed"
import { FeedVisibility, FeedSortField } from "../types/feed"
@@ -65,6 +66,11 @@ export function FeedList(props: FeedListProps) {
}
}
useKeyboard((key) => {
if (!props.focused) return
handleKeyPress(key)
})
const cycleVisibilityFilter = () => {
const current = feedStore.filter().visibility
let next: FeedVisibility | "all"