From 49e1e1b50738aec3932f89dc69135e1b8d2b05bc Mon Sep 17 00:00:00 2001 From: MasterAcnolo <68693319+MasterAcnolo@users.noreply.github.com> Date: Sat, 11 Apr 2026 18:25:17 +0200 Subject: [PATCH] Feat: Add theme folder access functionality in UI --- app/ipcHandlers.js | 6 ++++++ preload.js | 1 + public/index.html | 2 ++ public/script/topbar.js | 2 ++ public/styles/layout/settingsPanel.css | 10 ++++++++++ 5 files changed, 21 insertions(+) diff --git a/app/ipcHandlers.js b/app/ipcHandlers.js index 6efa381..36a6ade 100644 --- a/app/ipcHandlers.js +++ b/app/ipcHandlers.js @@ -22,6 +22,10 @@ const FEATURE_WHITELIST = new Set([ const configFolderPath = featuresPath; +const themeFolderPath = config.localMode + ? path.join(__dirname, "..", "theme") + : path.join(process.resourcesPath, "theme"); + function registerIpcHandlers(getMainWindow) { // Infos générales @@ -75,6 +79,8 @@ function registerIpcHandlers(getMainWindow) { ); ipcMain.on("open-config", () => shell.openPath(configFolderPath)); + ipcMain.on("open-theme", () => shell.openPath(themeFolderPath)); + ipcMain.handle("get-themes", () => getThemes()); // Modification des features diff --git a/preload.js b/preload.js index 9692594..a623352 100644 --- a/preload.js +++ b/preload.js @@ -19,6 +19,7 @@ contextBridge.exposeInMainWorld("topbarAPI", { openDevTools: () => ipcRenderer.send("open-devtools"), openLogs: () => ipcRenderer.send("open-logs"), openWebsite: () => ipcRenderer.send("open-website"), + openTheme: () => ipcRenderer.send("open-theme"), openWiki: () => ipcRenderer.send("open-wiki"), openConfig: () => ipcRenderer.send("open-config") }); diff --git a/public/index.html b/public/index.html index 4fabac3..0497b50 100644 --- a/public/index.html +++ b/public/index.html @@ -24,6 +24,7 @@ +