mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Feat: Add "Theme Workshop" button and associated IPC handler for workshop access
This commit is contained in:
@@ -78,6 +78,9 @@ function registerIpcHandlers(getMainWindow) {
|
|||||||
ipcMain.on("open-wiki", () =>
|
ipcMain.on("open-wiki", () =>
|
||||||
shell.openExternal("https://masteracnolo.github.io/FreedomLoader/pages/wiki.html")
|
shell.openExternal("https://masteracnolo.github.io/FreedomLoader/pages/wiki.html")
|
||||||
);
|
);
|
||||||
|
ipcMain.on("open-workshop", () =>
|
||||||
|
shell.openExternal("https://masteracnolo.github.io/Freedom-Loader-Workshop")
|
||||||
|
);
|
||||||
ipcMain.on("open-config", () => shell.openPath(configFolderPath));
|
ipcMain.on("open-config", () => shell.openPath(configFolderPath));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,5 +22,6 @@ contextBridge.exposeInMainWorld("topbarAPI", {
|
|||||||
openWebsite: () => ipcRenderer.send("open-website"),
|
openWebsite: () => ipcRenderer.send("open-website"),
|
||||||
openTheme: () => ipcRenderer.send("open-theme"),
|
openTheme: () => ipcRenderer.send("open-theme"),
|
||||||
openWiki: () => ipcRenderer.send("open-wiki"),
|
openWiki: () => ipcRenderer.send("open-wiki"),
|
||||||
|
openWorkshop: () => ipcRenderer.send("open-workshop"),
|
||||||
openConfig: () => ipcRenderer.send("open-config")
|
openConfig: () => ipcRenderer.send("open-config")
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<button id="logs-btn" title="Logs">Logs</button>
|
<button id="logs-btn" title="Logs">Logs</button>
|
||||||
<button id="website-btn" title="Website">Website</button>
|
<button id="website-btn" title="Website">Website</button>
|
||||||
<button id="wiki-btn" title="Wiki">Wiki</button>
|
<button id="wiki-btn" title="Wiki">Wiki</button>
|
||||||
|
<button id="workshop-btn" title="Workshop">Theme Workshop</button>
|
||||||
<!-- <button id="theme-btn" title="Theme">Theme</button> -->
|
<!-- <button id="theme-btn" title="Theme">Theme</button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="window-controls">
|
<div class="window-controls">
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ function setupTopbarListeners() {
|
|||||||
const logsBtn = document.getElementById('logs-btn');
|
const logsBtn = document.getElementById('logs-btn');
|
||||||
const websiteBtn = document.getElementById('website-btn');
|
const websiteBtn = document.getElementById('website-btn');
|
||||||
const wikiBtn = document.getElementById('wiki-btn');
|
const wikiBtn = document.getElementById('wiki-btn');
|
||||||
|
const workshopBtn = document.getElementById('workshop-btn');
|
||||||
|
|
||||||
if (minBtn) minBtn.onclick = () => topbarAPI.minimize();
|
if (minBtn) minBtn.onclick = () => topbarAPI.minimize();
|
||||||
if (maxBtn) maxBtn.onclick = () => topbarAPI.maximize();
|
if (maxBtn) maxBtn.onclick = () => topbarAPI.maximize();
|
||||||
@@ -18,6 +19,7 @@ function setupTopbarListeners() {
|
|||||||
if (logsBtn) logsBtn.onclick = () => topbarAPI.openLogs();
|
if (logsBtn) logsBtn.onclick = () => topbarAPI.openLogs();
|
||||||
if (websiteBtn) websiteBtn.onclick = () => topbarAPI.openWebsite();
|
if (websiteBtn) websiteBtn.onclick = () => topbarAPI.openWebsite();
|
||||||
if (wikiBtn) wikiBtn.onclick = () => topbarAPI.openWiki();
|
if (wikiBtn) wikiBtn.onclick = () => topbarAPI.openWiki();
|
||||||
|
if (workshopBtn) workshopBtn.onclick = () => topbarAPI.openWorkshop();
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', setupTopbarListeners);
|
document.addEventListener('DOMContentLoaded', setupTopbarListeners);
|
||||||
|
|||||||
Reference in New Issue
Block a user