"use client"
import { useTheme } from "next-themes"
import { useUserInterfaceStore } from "@/lib/stores/user-interface-store"
function SettingsSection({
title,
defaultOpen,
children,
}: {
title: string
defaultOpen?: boolean
children: React.ReactNode
}) {
return (
{title}
{children}
)
}
export function AppearanceSettings() {
const { theme, setTheme } = useTheme()
const entryListViewMode = useUserInterfaceStore(
(state) => state.entryListViewMode
)
const setEntryListViewMode = useUserInterfaceStore(
(state) => state.setEntryListViewMode
)
const displayDensity = useUserInterfaceStore(
(state) => state.displayDensity
)
const setDisplayDensity = useUserInterfaceStore(
(state) => state.setDisplayDensity
)
const showFeedFavicons = useUserInterfaceStore(
(state) => state.showFeedFavicons
)
const setShowFeedFavicons = useUserInterfaceStore(
(state) => state.setShowFeedFavicons
)
const focusFollowsInteraction = useUserInterfaceStore(
(state) => state.focusFollowsInteraction
)
const setFocusFollowsInteraction = useUserInterfaceStore(
(state) => state.setFocusFollowsInteraction
)
const timeDisplayFormat = useUserInterfaceStore(
(state) => state.timeDisplayFormat
)
const setTimeDisplayFormat = useUserInterfaceStore(
(state) => state.setTimeDisplayFormat
)
const showEntryImages = useUserInterfaceStore(
(state) => state.showEntryImages
)
const setShowEntryImages = useUserInterfaceStore(
(state) => state.setShowEntryImages
)
const showReadingTime = useUserInterfaceStore(
(state) => state.showReadingTime
)
const setShowReadingTime = useUserInterfaceStore(
(state) => state.setShowReadingTime
)
const showEntryFavicons = useUserInterfaceStore(
(state) => state.showEntryFavicons
)
const setShowEntryFavicons = useUserInterfaceStore(
(state) => state.setShowEntryFavicons
)
const showFoldersAboveFeeds = useUserInterfaceStore(
(state) => state.showFoldersAboveFeeds
)
const setShowFoldersAboveFeeds = useUserInterfaceStore(
(state) => state.setShowFoldersAboveFeeds
)
const prioritiseUnreadEntries = useUserInterfaceStore(
(state) => state.prioritiseUnreadEntries
)
const setPrioritiseUnreadEntries = useUserInterfaceStore(
(state) => state.setPrioritiseUnreadEntries
)
const autoRefreshTimeline = useUserInterfaceStore(
(state) => state.autoRefreshTimeline
)
const setAutoRefreshTimeline = useUserInterfaceStore(
(state) => state.setAutoRefreshTimeline
)
const scrollbarStyle = useUserInterfaceStore(
(state) => state.scrollbarStyle
)
const setScrollbarStyle = useUserInterfaceStore(
(state) => state.setScrollbarStyle
)
const toolbarPosition = useUserInterfaceStore(
(state) => state.toolbarPosition
)
const setToolbarPosition = useUserInterfaceStore(
(state) => state.setToolbarPosition
)
return (
theme
controls the colour scheme of the application
setTheme(event.target.value)}
className="border border-border bg-background-primary px-3 py-2 text-text-primary outline-none focus:border-text-dim"
>
system
light
dark
display density
controls the overall text size and spacing
setDisplayDensity(
event.target.value as "compact" | "default" | "spacious"
)
}
className="border border-border bg-background-primary px-3 py-2 text-text-primary outline-none focus:border-text-dim"
>
compact
default
spacious
toolbar position
place the toolbar at the top or bottom of the reader
setToolbarPosition(event.target.value as "top" | "bottom")
}
className="border border-border bg-background-primary px-3 py-2 text-text-primary outline-none focus:border-text-dim"
>
top
bottom
scrollbars
choose between themed scrollbars, platform native, or hidden
setScrollbarStyle(
event.target.value as "custom" | "native" | "hidden"
)
}
className="border border-border bg-background-primary px-3 py-2 text-text-primary outline-none focus:border-text-dim"
>
themed
native
hidden
entry list view
controls how entries are displayed in the list
setEntryListViewMode(
event.target.value as "compact" | "comfortable" | "expanded"
)
}
className="border border-border bg-background-primary px-3 py-2 text-text-primary outline-none focus:border-text-dim"
>
compact
comfortable
expanded
time display
choose between relative timestamps (e.g. “2h ago”) or
absolute dates
setTimeDisplayFormat(
event.target.value as "relative" | "absolute"
)
}
className="border border-border bg-background-primary px-3 py-2 text-text-primary outline-none focus:border-text-dim"
>
relative
absolute
)
}