it is time

This commit is contained in:
2026-02-05 00:55:10 -05:00
parent 4579659784
commit 6950deaa88
15 changed files with 890 additions and 140 deletions

View File

@@ -6,7 +6,6 @@
import { createSignal, For } from "solid-js"
import { useFeedStore } from "../stores/feed"
import { SourceType } from "../types/source"
import { createColorResolver } from "../utils/color"
import type { PodcastSource } from "../types/source"
interface SourceManagerProps {
@@ -149,8 +148,6 @@ export function SourceManager(props: SourceManagerProps) {
const sourceExplicit = () => selectedSource()?.allowExplicit !== false
const sourceLanguage = () => selectedSource()?.language || "en_us"
const resolveColor = createColorResolver({})
return (
<box flexDirection="column" border padding={1} gap={1}>
<box flexDirection="row" justifyContent="space-between">
@@ -158,15 +155,15 @@ export function SourceManager(props: SourceManagerProps) {
<strong>Podcast Sources</strong>
</text>
<box border padding={0} onMouseDown={props.onClose}>
<text fg={resolveColor("--color-primary")}>[Esc] Close</text>
<text fg="var(--color-primary)">[Esc] Close</text>
</box>
</box>
<text fg={resolveColor("--color-muted")}>Manage where to search for podcasts</text>
<text fg="var(--color-muted)">Manage where to search for podcasts</text>
{/* Source list */}
<box border padding={1} flexDirection="column" gap={1}>
<text fg={focusArea() === "list" ? resolveColor("--color-primary") : resolveColor("--color-muted")}>Sources:</text>
<text fg={focusArea() === "list" ? "var(--color-primary)" : "var(--color-muted)"}>Sources:</text>
<scrollbox height={6}>
<For each={sources()}>
{(source, index) => (
@@ -176,7 +173,7 @@ export function SourceManager(props: SourceManagerProps) {
padding={0}
backgroundColor={
focusArea() === "list" && index() === selectedIndex()
? resolveColor("--color-primary")
? "var(--color-primary)"
: undefined
}
onMouseDown={() => {
@@ -187,21 +184,21 @@ export function SourceManager(props: SourceManagerProps) {
>
<text fg={
focusArea() === "list" && index() === selectedIndex()
? resolveColor("--color-primary")
: resolveColor("--color-muted")
? "var(--color-primary)"
: "var(--color-muted)"
}>
{focusArea() === "list" && index() === selectedIndex()
? ">"
: " "}
</text>
<text fg={source.enabled ? resolveColor("--color-success") : resolveColor("--color-error")}>
<text fg={source.enabled ? "var(--color-success)" : "var(--color-error)"}>
{source.enabled ? "[x]" : "[ ]"}
</text>
<text fg={resolveColor("--color-accent")}>{getSourceIcon(source)}</text>
<text fg="var(--color-accent)">{getSourceIcon(source)}</text>
<text
fg={
focusArea() === "list" && index() === selectedIndex()
? resolveColor("--color-text")
? "var(--color-text)"
: undefined
}
>
@@ -211,7 +208,7 @@ export function SourceManager(props: SourceManagerProps) {
)}
</For>
</scrollbox>
<text fg={resolveColor("--color-muted")}>Space/Enter to toggle, d to delete, a to add</text>
<text fg="var(--color-muted)">Space/Enter to toggle, d to delete, a to add</text>
{/* API settings */}
<box flexDirection="column" gap={1}>