mirror of
https://github.com/dream-pep/koring-launcher.git
synced 2026-09-12 05:45:18 +08:00
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:
@@ -0,0 +1,24 @@
|
||||
// Run: node scripts/gen-installer-header.js
|
||||
const { createCanvas } = require('canvas');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const c = createCanvas(493, 58);
|
||||
const ctx = c.getContext('2d');
|
||||
|
||||
const g = ctx.createLinearGradient(0, 0, 493, 0);
|
||||
g.addColorStop(0, '#1a1a2e');
|
||||
g.addColorStop(1, '#16213e');
|
||||
ctx.fillStyle = g;
|
||||
ctx.fillRect(0, 0, 493, 58);
|
||||
|
||||
ctx.fillStyle = '#ffffff';
|
||||
ctx.font = 'bold 24px sans-serif';
|
||||
ctx.textAlign = 'center';
|
||||
ctx.textBaseline = 'middle';
|
||||
ctx.fillText('Koring Launcher', 246, 29);
|
||||
|
||||
const buf = c.toBuffer('image/png');
|
||||
const out = path.resolve(__dirname, '..', 'build', 'installer-header.png');
|
||||
fs.writeFileSync(out, buf);
|
||||
console.log('Created:', out);
|
||||
Reference in New Issue
Block a user