The window is now a fixed 1120x720 frameless window with its own title bar: page navigation, language, minimize and close. The layout follows the game's launcher: a side panel, the main area over the background, and a bottom bar with the state of the current task and the primary action. The colours and type follow the game's website: dark blue-grey, red actions, Roboto Condensed (bundled, OFL), cyan progress. - Pages: home (requirements before installation, the current copy after), copies (copy details with folders to open, feature status grouped by inventory section), settings (language), about. - The install wizard is a hook shared by the side panel (step list), the main area (current step) and the bottom bar (back, next, install, cancel, copy progress). - The adaptation shown for a game version is the version itself when the patches were verified on it, otherwise the nearest verified one. - Both language packs are rewritten in consistent product wording. - New IPC: app:openFolder, install:listFeatures (patcher's new patchFeatures), window:minimize, window:close; app:getInfo reports the supported game versions. Launching is not built yet; its button stays disabled. Checked: launcher typecheck (main and renderer), electron-vite build, root typecheck. Ran the window from a scratch user data folder over the remote debugging port: every page and section in Chinese and English, empty and installed state, the wizard's first step, both new IPC calls, no console errors and no overflow.
32 lines
818 B
TypeScript
32 lines
818 B
TypeScript
import type { ReactNode } from 'react';
|
|
|
|
/**
|
|
* What the bottom bar shows: the state of the current task, its progress, and the primary action
|
|
* (the large red button), which is always the most important next step.
|
|
*/
|
|
|
|
export type StatusTone = 'ok' | 'warn' | 'bad' | 'idle' | 'busy';
|
|
|
|
export interface BarAction {
|
|
readonly label: string;
|
|
readonly disabled?: boolean;
|
|
readonly onClick?: () => void;
|
|
}
|
|
|
|
export interface BarProgress {
|
|
readonly value: number;
|
|
/** Null for work without a measurable end. */
|
|
readonly max: number | null;
|
|
readonly start?: string;
|
|
readonly end?: string;
|
|
}
|
|
|
|
export interface BarModel {
|
|
readonly tone: StatusTone;
|
|
readonly title: string;
|
|
readonly detail?: ReactNode;
|
|
readonly progress?: BarProgress;
|
|
readonly primary: BarAction;
|
|
readonly secondary?: BarAction;
|
|
}
|