feat: implement common redistributables preflight checks and UI updates

- Added preflight check for common redistributables during game launch.
- Introduced new translation keys for preflight status messages.
- Updated GameLauncher component to handle preflight progress and display status.
- Enhanced CommonRedistManager with methods to reset and check preflight status.
- Integrated logging for preflight checks and redistributable installations.
- Added spinner animation to indicate loading state in the UI.
This commit is contained in:
Moyasee
2026-01-29 18:23:40 +02:00
parent ae0f1ce355
commit 85a4bdb7b1
11 changed files with 468 additions and 9 deletions

View File

@@ -505,6 +505,18 @@ contextBridge.exposeInMainWorld("electron", {
ipcRenderer.on("common-redist-progress", listener);
return () => ipcRenderer.removeListener("common-redist-progress", listener);
},
onPreflightProgress: (
cb: (value: { status: string; detail: string | null }) => void
) => {
const listener = (
_event: Electron.IpcRendererEvent,
value: { status: string; detail: string | null }
) => cb(value);
ipcRenderer.on("preflight-progress", listener);
return () => ipcRenderer.removeListener("preflight-progress", listener);
},
resetCommonRedistPreflight: () =>
ipcRenderer.invoke("resetCommonRedistPreflight"),
checkForUpdates: () => ipcRenderer.invoke("checkForUpdates"),
restartAndInstallUpdate: () => ipcRenderer.invoke("restartAndInstallUpdate"),