feat: send logs feature that send logs to a distant service. Full integration in ui

+ expose logger method to frontEnd (#53)
This commit is contained in:
MasterAcnolo
2026-09-13 11:41:09 +02:00
parent 7dee94da6f
commit 408df0e2f6
11 changed files with 252 additions and 6 deletions

View File

@@ -19,6 +19,7 @@ const config = require("../config");
const { validateDownloadPath, getDefaultDownloadPath } = require("./pathValidator");
const { userThemesPath } = require("../server/helpers/path.helpers");
const { createSystemTray, destroyTray } = require("./tray");
const {sendReport} = require("./sendReport");
/**
* Security whitelist for feature flags that can be modified at runtime.
@@ -180,8 +181,13 @@ function registerIpcHandlers(getMainWindow) {
*/
ipcMain.on("open-config", () => shell.openPath(configFolderPath));
/**
* Front end logger
*/
ipcMain.on("log-error", (_, message) => logger.error(`[Frontend] ${message}`));
ipcMain.on("log-info", (_, message) => logger.info(`[Frontend] ${message}`));
ipcMain.on("log-warn", (_, message) => logger.warn(`[Frontend] ${message}`));
/**
* Retrieves available themes from filesystem.
*/
@@ -199,6 +205,13 @@ function registerIpcHandlers(getMainWindow) {
return await reloadThemes();
});
/**
* Send bug report
*/
ipcMain.handle("send-report", async (_, params) => {
return await sendReport(params);
})
/**
* Updates a runtime feature flag and persists it to disk.
*