Merge pull request #3173 from yougotwill/fix/no-ref/restore_log_menuitem

Restore export logs menu item
pull/3176/head
Audric Ackermann 1 year ago committed by GitHub
commit a77a1b3918
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -649,7 +649,7 @@ async function showAbout() {
aboutWindow?.show();
}
async function saveDebugLog(_event: any, additionalInfo: string) {
async function saveDebugLog(_event: any, additionalInfo?: string) {
const options: Electron.SaveDialogOptions = {
title: 'Save debug log',
defaultPath: path.join(
@ -799,6 +799,7 @@ function setupMenu() {
const { platform } = process;
const menuOptions = {
development,
saveDebugLog,
showWindow,
showAbout,
openReleaseNotes,

@ -7,6 +7,7 @@ export const createTemplate = (
openSupportPage: () => void;
platform: string;
showAbout: () => void;
saveDebugLog: (_event: any, additionalInfo?: string) => void;
showWindow: () => void;
},
messages: LocaleMessagesType
@ -15,7 +16,8 @@ export const createTemplate = (
throw new TypeError('`options.platform` must be a string');
}
const { openReleaseNotes, openSupportPage, platform, showAbout, showWindow } = options;
const { openReleaseNotes, openSupportPage, platform, showAbout, saveDebugLog, showWindow } =
options;
const template = [
{
@ -92,6 +94,15 @@ export const createTemplate = (
{
type: 'separator',
},
{
label: messages.showDebugLog,
click: () => {
saveDebugLog('save-debug-log');
},
},
{
type: 'separator',
},
{
role: 'toggledevtools',
label: messages.viewMenuToggleDevTools,

Loading…
Cancel
Save