add user settings

This commit is contained in:
Garret Patti
2026-04-05 18:15:08 -04:00
parent eecee9bc5f
commit 5b5503b7a6
11 changed files with 363 additions and 9 deletions

27
src/app/settings/page.tsx Normal file
View File

@@ -0,0 +1,27 @@
import { redirect } from 'next/navigation'
import { getServerSession } from '@/lib/auth'
import { getUserSettings } from '@/lib/settings'
import SettingsForm from './SettingsForm'
export default async function SettingsPage() {
const session = await getServerSession()
if (!session.userId) redirect('/login')
const settings = getUserSettings(session.userId)
return (
<div className="p-6 max-w-2xl">
<h1 className="text-2xl font-semibold mb-1" style={{ color: 'var(--text-primary)' }}>
Settings
</h1>
<p className="text-sm mb-8" style={{ color: 'var(--text-secondary)' }}>
Signed in as <strong>{session.username}</strong>
</p>
<h2 className="text-base font-semibold mb-4" style={{ color: 'var(--text-primary)' }}>
Video Playback
</h2>
<SettingsForm initialSettings={settings} />
</div>
)
}