Files
koring-launcher/scripts/gen-installer-header.js
dream_pep 27acc66252 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.
2026-07-26 06:42:41 +08:00

25 lines
702 B
JavaScript

// 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);