Add Koring auth flow and settings UI refactor

Implements Koring OIDC device-auth flow and integrates it into the app: core auth (TS/JS), IPC handlers, renderer API, KoringLogin React component, and a zustand koringAuth store. Handlers support device-code request, polling, refresh, get-user and logout and persist user info to existing auth/config. Also refactors many settings pages to use shared Setting components (SettingCard, SettingRow, SectionTitle, PageHeader) and replaces custom controls with @heroui/react primitives (Avatar, Button, Switch, RadioGroup, Slider, Input, TextArea, EmptyState). Adds OOBE login/welcome pages, a setting login route, installer header generator script, and a sample koring-auth.json for development.
This commit is contained in:
2026-07-26 06:42:41 +08:00
parent cdbb1e54a3
commit 27acc66252
35 changed files with 1504 additions and 509 deletions
+12
View File
@@ -0,0 +1,12 @@
export function PageHeader({ title, desc }: { title: string; desc: string }) {
return (
<>
<h2 className="text-xl font-bold text-foreground mb-1">{title}</h2>
<p className="text-sm text-muted-foreground mb-6">{desc}</p>
</>
);
}
export function SectionTitle({ children }: { children: React.ReactNode }) {
return <h3 className="text-lg font-bold text-foreground mb-3">{children}</h3>;
}