Upload via GUI (42 Dateien)

This commit is contained in:
Git Manager GUI
2026-08-06 21:26:45 +02:00
parent bafad25059
commit fc57dfa186
7 changed files with 224 additions and 32 deletions
+8 -3
View File
@@ -87,13 +87,18 @@ contextBridge.exposeInMainWorld('api', {
return () => ipcRenderer.removeListener('backup:progress', l);
},
importInstance: () => ipcRenderer.invoke('instances:import'),
createShortcut: (id) => ipcRenderer.invoke('instances:shortcut', id),
// Start über eine Desktop-Verknüpfung ("--launch <id>")
createShortcut: (id, customName) => ipcRenderer.invoke('instances:shortcut', id, customName),
serversShortcut: (id, ip, name, customName) => ipcRenderer.invoke('servers:shortcut', id, ip, name, customName),
// Start über eine Desktop-Verknüpfung ("--launch=<id>", optional "--server=<ip>")
onLaunchRequest: (cb) => {
const l = (_e, id) => cb(id);
const l = (_e, payload) => cb(payload);
ipcRenderer.on('instance:launch-request', l);
return () => ipcRenderer.removeListener('instance:launch-request', l);
},
// Signalisiert dem Hauptprozess, dass onLaunchRequest jetzt registriert ist –
// verhindert, dass ein Start-Wunsch aus einer Verknüpfung verloren geht,
// weil er ankommt, bevor die Oberfläche fertig eingerichtet ist
notifyReady: () => ipcRenderer.send('renderer:ready'),
importModpack: () => ipcRenderer.invoke('modpack:import'),
// Datei per Drag&Drop aufs Fenster gezogen (.jar/.mrpack/.zip)
filesDrop: (filePath, targetId, targetArt) => ipcRenderer.invoke('files:drop', filePath, targetId, targetArt),