feat: add React/Vite PWA web UI with FastAPI backend

- FastAPI + uvicorn server (turnup-ui) serving config API and static files
- React + TypeScript frontend: connection, global LEDs, per-knob/button
  cards, preset save/load/apply, toast notifications, dark theme
- Vite builds into src/turnup/ui/static/ so no Node.js needed at install time
- PWA assets (manifest, service worker, icon) in ui/public/
- turnup-ui.service systemd user unit; enabled globally via turnupd.install
- PKGBUILD: add python-fastapi + python-uvicorn deps, install UI service file
- pyproject.toml: ui extras group, turnup-ui entry point
This commit is contained in:
Sean Doran committed 2026-02-27 21:25:16 -05:00
1 parent 1c73dc1883
commit 8f8d9ac3fa
41 files changed
+5038 -11

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
export type LedMode = 'volume' | 'static' | 'off';
export type KnobAction = 'sink_volume' | 'source_volume' | 'app_volume' | 'group_volume';
export type ButtonAction = 'mute_sink' | 'mute_source' | 'command';
export interface LedConfig {
mode: LedMode;
low_color: [number, number, number];
high_color: [number, number, number];
}
export interface KnobConfig {
action: KnobAction;
target?: string;
targets?: string[];
led?: Partial<LedConfig>;
}
export interface ButtonConfig {
action: ButtonAction;
target: string;
}
export interface Config {
port: string;
baud: number;
leds: LedConfig;
knobs: Record<string, KnobConfig>;
buttons: Record<string, ButtonConfig>;
}
export interface ToastItem {
id: number;
message: string;
type: 'success' | 'error' | 'info';
}