fix: restore export logs menu item

pull/3173/head
yougotwill 8 months ago
parent e83c047053
commit 7f97d3c6cb

@ -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