This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
caelum0x 46bf9b83bf feat: round-5 external harvest (22 features ported from external/ into 5 products)
Harvest valuable features from external/ reference repos, adapted to each
product's stack and wired in; all products typecheck clean.

- gitgram-web (5): clickable @mention/#hashtag linkify in rendered content
  (munia), + feed/notification/accessibility patterns; install @testing-library/dom
- gitgram-backend (3): feed thread dedup + muted-thread removal (bluesky),
  GitHub star/follow write-back via OAuth (gh-social)
- gitgram-mobile (4): double-tap-to-like + heart bounce (proximity), haptics layer
  (bluesky useHaptics), + gesture/feed UX
- aitm-api (4): beads ready/dependency-DAG endpoints + atomic claim (beads)
- aitm-mcp (6): beads_ready work-queue tool, context-efficient projections,
  transport arg aliasing (context7/pal-mcp/beads)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 18:48:46 +03:00

62 lines
2.8 KiB
TypeScript

'use client'
import Link from 'next/link'
import { useEffect } from 'react'
import { useAuthStore } from '@/store/authStore'
import { useRouter } from 'next/navigation'
export default function SettingsPage() {
const router = useRouter()
const { isAuthenticated, logout } = useAuthStore()
useEffect(() => {
if (!isAuthenticated) router.replace('/login')
}, [isAuthenticated, router])
if (!isAuthenticated) return null
const handleLogout = async () => {
await logout()
router.push('/')
}
const sections = [
{ title: 'Account', href: '/settings/account', icon: '👤', desc: 'Name, email, username, password' },
{ title: 'Privacy', href: '/settings/privacy', icon: '🔒', desc: 'Visibility, DMs, data export, 2FA' },
{ title: 'Notifications', href: '/settings/notifications', icon: '🔔', desc: 'Push, email, quiet hours' },
{ title: 'Appearance', href: '/settings/appearance', icon: '🎨', desc: 'Theme, font size, language, density' },
{ title: 'Security', href: '/settings/security', icon: '🛡️', desc: 'Sessions, login history, 2FA' },
{ title: 'Blocked Users', href: '/settings/blocked', icon: '🚫', desc: 'Manage blocked accounts' },
{ title: 'Moderation', href: '/settings/moderation', icon: '🔇', desc: 'Muted words, accounts, and threads' },
{ title: 'Language', href: '/settings/language', icon: '🌐', desc: 'Display language and region' },
{ title: 'Data & Storage', href: '/settings/data', icon: '💾', desc: 'Cache, downloads, data export' },
{ title: 'Subscription', href: '/settings/subscription', icon: '⭐', desc: 'Plan, billing, premium features' },
{ title: 'Preferences', href: '/settings/preferences', icon: '⚙️', desc: 'Accessibility, autoplay, content' },
]
return (
<div className="max-w-2xl mx-auto py-8 px-4">
<h1 className="text-3xl font-bold mb-8">Settings</h1>
<div className="space-y-2">
{sections.map(s => (
<Link key={s.href} href={s.href} className="flex items-center gap-4 p-4 bg-card border border-border rounded-lg hover:bg-muted/50 transition-colors">
<span className="text-2xl w-9 text-center flex-shrink-0">{s.icon}</span>
<div className="min-w-0">
<span className="block font-semibold text-foreground">{s.title}</span>
<span className="block text-sm text-foreground/50 truncate">{s.desc}</span>
</div>
<span className="ml-auto text-foreground/30 flex-shrink-0">&#8250;</span>
</Link>
))}
</div>
<div className="mt-8 pt-8 border-t border-border">
<button
onClick={handleLogout}
className="w-full py-3 bg-error text-white rounded-lg hover:bg-error/90 font-semibold"
>
Log Out
</button>
</div>
</div>
)
}