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 @@
+
@@ -193,6 +194,7 @@
diff --git a/public/script/topbar.js b/public/script/topbar.js
index be7f584..2a1404a 100644
--- a/public/script/topbar.js
+++ b/public/script/topbar.js
@@ -10,6 +10,7 @@ function setupTopbarListeners() {
const logsBtn = document.getElementById('logs-btn');
const websiteBtn = document.getElementById('website-btn');
const wikiBtn = document.getElementById('wiki-btn');
+ const themeBtn = document.getElementById('theme-btn');
const configBtn = document.getElementById('config-btn');
if (minBtn) minBtn.onclick = () => topbarAPI.minimize();
@@ -19,6 +20,7 @@ function setupTopbarListeners() {
if (logsBtn) logsBtn.onclick = () => topbarAPI.openLogs();
if (websiteBtn) websiteBtn.onclick = () => topbarAPI.openWebsite();
if (wikiBtn) wikiBtn.onclick = () => topbarAPI.openWiki();
+ if (themeBtn) themeBtn.onclick = () => topbarAPI.openTheme();
if (configBtn) configBtn.onclick = () => topbarAPI.openConfig();
});
}
diff --git a/public/styles/layout/settingsPanel.css b/public/styles/layout/settingsPanel.css
index e7a2c98..0a77622 100644
--- a/public/styles/layout/settingsPanel.css
+++ b/public/styles/layout/settingsPanel.css
@@ -194,6 +194,16 @@ details summary {
color: #fff;
}
+#open-theme {
+ padding: 10px 14px;
+ border-radius: 8px;
+ border: none;
+ cursor: pointer;
+ font-weight: 600;
+ background-color: var(--form-button-bg-color);
+ color: #fff;
+}
+
#experimental-args {
width: 100%;
min-height: 80px;