[MM-50237] Add menu item for showing the logs folder (#2533)

* Add menu item for showing the logs folder

* Add translation
This commit is contained in:
Tasos Boulis
2023-02-02 16:24:18 +02:00
committed by GitHub
parent f62944c5a4
commit db5a2e055d
2 changed files with 10 additions and 0 deletions

View File

@@ -68,6 +68,7 @@
"main.menus.app.help.learnMore": "Learn More...",
"main.menus.app.help.restartAndUpdate": "Restart and Update",
"main.menus.app.help.RunDiagnostics": "Run diagnostics",
"main.menus.app.help.ShowLogs": "Show logs",
"main.menus.app.help.versionString": "Version {version}{commit}",
"main.menus.app.history": "&History",
"main.menus.app.history.back": "Back",

View File

@@ -4,6 +4,7 @@
'use strict';
import {app, ipcMain, Menu, MenuItemConstructorOptions, MenuItem, session, shell, WebContents, clipboard} from 'electron';
import log from 'electron-log';
import {BROWSER_HISTORY_BUTTON, OPEN_TEAMS_DROPDOWN, SHOW_NEW_SERVER_MODAL} from 'common/communication';
import {t} from 'common/utils/util';
@@ -340,6 +341,14 @@ export function createTemplate(config: Config, updateManager: UpdateManager) {
submenu.push(separatorItem);
}
submenu.push({
id: 'Show logs',
label: localizeMessage('main.menus.app.help.ShowLogs', 'Show logs'),
click() {
shell.showItemInFolder(log.transports.file.getFile().path);
},
});
submenu.push({
id: 'diagnostics',
label: localizeMessage('main.menus.app.help.RunDiagnostics', 'Run diagnostics'),