feat: add some funcs
This commit is contained in:
@@ -7,7 +7,9 @@ import {
|
||||
type GameLogLine,
|
||||
type UserSettings,
|
||||
type DeviceCodeInfo,
|
||||
type UpdateStatus
|
||||
type UpdateStatus,
|
||||
type PlayOptions,
|
||||
type PackMeta
|
||||
} from '../shared/ipc'
|
||||
|
||||
/** API typée exposée au renderer via window.api. */
|
||||
@@ -18,7 +20,9 @@ const api = {
|
||||
getProfile: (): Promise<PlayerProfile | null> => ipcRenderer.invoke(IPC.authGetProfile),
|
||||
|
||||
// --- Jouer (install + sync + launch) ---
|
||||
play: (): Promise<void> => ipcRenderer.invoke(IPC.play),
|
||||
play: (opts?: PlayOptions): Promise<void> => ipcRenderer.invoke(IPC.play, opts),
|
||||
stopGame: (): Promise<boolean> => ipcRenderer.invoke(IPC.playStop),
|
||||
getPackMeta: (): Promise<PackMeta | null> => ipcRenderer.invoke(IPC.packGet),
|
||||
|
||||
// --- Réglages ---
|
||||
getSettings: (): Promise<UserSettings> => ipcRenderer.invoke(IPC.settingsGet),
|
||||
@@ -29,6 +33,9 @@ const api = {
|
||||
/** Ouvre le dossier d'instance (mods/config/saves) dans l'explorateur. */
|
||||
openInstanceDir: (): Promise<string> => ipcRenderer.invoke(IPC.openInstanceDir),
|
||||
|
||||
/** Ouvre le dossier des logs du launcher. */
|
||||
openLogsDir: (): Promise<string> => ipcRenderer.invoke(IPC.openLogsDir),
|
||||
|
||||
/** Quitte et installe la mise à jour téléchargée. */
|
||||
installUpdate: (): Promise<void> => ipcRenderer.invoke(IPC.updateInstall),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user