Redesign the launcher window after the game's launcher and website
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.
This commit is contained in:
1 parent
303dbf24e6
commit
b83d3e54f3
51 files changed
+2810
-771
No files matched your search
@@ -25,5 +25,6 @@ export { redirectAddresses, type AddressChange } from './network/address-rewrite
|
||||
export { hostPort, localEndpoint, localUrl, type LocalEndpoint } from './network/local-endpoint.ts';
|
||||
export { NETWORK_HOOK_LIBRARY, networkHookSettings } from './network/network-hook.ts';
|
||||
export { redirectNetworkConfig, type NetworkRedirectReport } from './network/redirect-network-config.ts';
|
||||
export { patchFeatures, type PatchFeature } from './patch-features.ts';
|
||||
export { offlinePackBundleGuids } from './store/offline-bundles.ts';
|
||||
export { writeGameCopy } from './write-game-copy.ts';
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* The features the patch definitions cover (feature inventory rows named in `features`), each
|
||||
* once, with the patches behind it. The launcher lists them to show which features a copy has.
|
||||
*/
|
||||
import { loadPatches } from '@wto/exepatch';
|
||||
import { ESSENTIAL_FEATURES } from './essential-features.ts';
|
||||
import { loadGuiPatches } from './gui-patch-definition.ts';
|
||||
|
||||
export interface PatchFeature {
|
||||
/** The feature tag, e.g. "K-侦察"; the letter before the dash is the inventory section. */
|
||||
readonly tag: string;
|
||||
/** A copy cannot run, or cannot stay apart from the online game, without it. */
|
||||
readonly essential: boolean;
|
||||
/** Ids of the exe and GUI patches tagged with it. */
|
||||
readonly patchIds: readonly string[];
|
||||
}
|
||||
|
||||
export function patchFeatures(exePatches: string, guiPatches: string): PatchFeature[] {
|
||||
const byTag = new Map<string, string[]>();
|
||||
for (const patch of [...loadPatches(exePatches), ...loadGuiPatches(guiPatches)]) {
|
||||
for (const tag of patch.features) {
|
||||
const ids = byTag.get(tag) ?? [];
|
||||
ids.push(patch.id);
|
||||
byTag.set(tag, ids);
|
||||
}
|
||||
}
|
||||
return [...byTag.entries()]
|
||||
.map(([tag, patchIds]) => ({ tag, essential: ESSENTIAL_FEATURES.has(tag), patchIds }))
|
||||
.sort((a, b) => a.tag.localeCompare(b.tag));
|
||||
}
|
||||
Reference in new issue
Block a user