feat: Implement topbar with custom window controls and actions

This commit is contained in:
MasterAcnolo
2025-12-20 09:53:17 +01:00
parent cbfde8b761
commit c11fd40681
9 changed files with 181 additions and 1 deletions

View File

@@ -5,3 +5,14 @@ contextBridge.exposeInMainWorld("electronAPI", {
selectDownloadFolder: () => ipcRenderer.invoke("select-download-folder"),
setProgress: (percent) => ipcRenderer.send("set-progress", percent)
});
// Contrôles de fenêtre et outils custom pour la topbar
contextBridge.exposeInMainWorld("topbarAPI", {
minimize: () => ipcRenderer.send("window-minimize"),
maximize: () => ipcRenderer.send("window-maximize"),
close: () => ipcRenderer.send("window-close"),
openDevTools: () => ipcRenderer.send("open-devtools"),
openLogs: () => ipcRenderer.send("open-logs"),
openWebsite: () => ipcRenderer.send("open-website"),
openWiki: () => ipcRenderer.send("open-wiki")
});