import { Gear, ShareNetwork, MagnifyingGlass, Shield, Globe, Key, Envelope, CaretRight, } from "@phosphor-icons/react"; import { useQuery } from "@tanstack/react-query"; import { Link } from "@tanstack/react-router"; import { fetchManifest } from "../lib/api"; interface SettingsLinkProps { to: string; icon: React.ReactNode; title: string; description: string; } function SettingsLink({ to, icon, title, description }: SettingsLinkProps) { return (
{icon}
{title}
{description}
); } /** * Settings hub page — links to all settings sub-pages. */ export function Settings() { const { data: manifest } = useQuery({ queryKey: ["manifest"], queryFn: fetchManifest, }); const showSecuritySettings = manifest?.authMode === "passkey"; return (

Settings

{/* Site settings */}
} title="General" description="Site identity, logo, favicon, and reading preferences" /> } title="Social Links" description="Social media profile links" /> } title="SEO" description="Search engine optimization and verification" />
{/* Security & access — only for passkey auth */} {showSecuritySettings && (
} title="Security" description="Manage your passkeys and authentication" /> } title="Self-Signup Domains" description="Allow users from specific domains to sign up" />
)} {/* Always visible for admins */}
} title="API Tokens" description="Create personal access tokens for programmatic API access" /> } title="Email" description="View email provider status and send test emails" />
); } export default Settings;