mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Feat: Add Configuration Button. user can edit config.json as wanted. Linked and IPC
This commit is contained in:
10
main.js
10
main.js
@@ -11,6 +11,13 @@ const { startRPC } = require("./server/discordRPC");
|
||||
|
||||
let mainWindow;
|
||||
const logsFolderPath = logDir;
|
||||
|
||||
const basePath = config.localMode
|
||||
? path.join(__dirname, "config")
|
||||
: path.join(path.dirname(process.execPath), "resources");
|
||||
|
||||
const configFolderPath = path.join(basePath, "config.json");
|
||||
|
||||
const defaultDownloadPath = path.join(os.homedir(), "Downloads", "Freedom Loader");
|
||||
|
||||
app.setAppUserModelId("com.masteracnolo.freedomloader"); // pour notifications Windows
|
||||
@@ -176,6 +183,9 @@ ipcMain.on("open-website", () => {
|
||||
ipcMain.on("open-wiki", () => {
|
||||
shell.openExternal("https://masteracnolo.github.io/FreedomLoader/pages/wiki.html");
|
||||
});
|
||||
ipcMain.on("open-config", () => {
|
||||
if (configFolderPath) shell.openPath(configFolderPath);
|
||||
});
|
||||
|
||||
|
||||
// App ready
|
||||
|
||||
Reference in New Issue
Block a user