refactor(menu): collapse five export items into one Export submenu

This commit is contained in:
avi 2026-09-22 16:58:29 -05:00
commit 18eb25b70d

View file

@ -80,31 +80,33 @@ export function buildMenu(
}, },
{ type: "separator" }, { type: "separator" },
{ {
label: "Export Markdown…", label: "Export",
accelerator: "CmdOrCtrl+Shift+E",
enabled: !!getState().bookPath, enabled: !!getState().bookPath,
click: () => getWindow()?.webContents.send("folio:export-markdown-requested"), submenu: [
}, {
{ label: "Markdown…",
label: "Export Bundle (ZIP)…", accelerator: "CmdOrCtrl+Shift+E",
enabled: !!getState().bookPath, click: () => getWindow()?.webContents.send("folio:export-markdown-requested"),
click: () => getWindow()?.webContents.send("folio:export-zip-requested"), },
}, {
{ label: "Bundle (ZIP)…",
label: "Export Full Book (PDF)…", click: () => getWindow()?.webContents.send("folio:export-zip-requested"),
accelerator: "CmdOrCtrl+Shift+P", },
enabled: !!getState().bookPath, { type: "separator" },
click: () => getWindow()?.webContents.send("folio:export-pdf-requested"), {
}, label: "Full Book (PDF)…",
{ accelerator: "CmdOrCtrl+Shift+P",
label: "Export Full Book (DOCX)…", click: () => getWindow()?.webContents.send("folio:export-pdf-requested"),
enabled: !!getState().bookPath, },
click: () => getWindow()?.webContents.send("folio:export-docx-requested"), {
}, label: "Full Book (DOCX)…",
{ click: () => getWindow()?.webContents.send("folio:export-docx-requested"),
label: "Export Full Book (ODT)…", },
enabled: !!getState().bookPath, {
click: () => getWindow()?.webContents.send("folio:export-odt-requested"), label: "Full Book (ODT)…",
click: () => getWindow()?.webContents.send("folio:export-odt-requested"),
},
],
}, },
{ type: "separator" }, { type: "separator" },
{ {