refactor(menu): collapse five export items into one Export submenu
This commit is contained in:
parent
76222fc1b2
commit
18eb25b70d
1 changed files with 26 additions and 24 deletions
|
|
@ -80,32 +80,34 @@ export function buildMenu(
|
||||||
},
|
},
|
||||||
{ type: "separator" },
|
{ type: "separator" },
|
||||||
{
|
{
|
||||||
label: "Export Markdown…",
|
label: "Export",
|
||||||
accelerator: "CmdOrCtrl+Shift+E",
|
|
||||||
enabled: !!getState().bookPath,
|
enabled: !!getState().bookPath,
|
||||||
|
submenu: [
|
||||||
|
{
|
||||||
|
label: "Markdown…",
|
||||||
|
accelerator: "CmdOrCtrl+Shift+E",
|
||||||
click: () => getWindow()?.webContents.send("folio:export-markdown-requested"),
|
click: () => getWindow()?.webContents.send("folio:export-markdown-requested"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Export Bundle (ZIP)…",
|
label: "Bundle (ZIP)…",
|
||||||
enabled: !!getState().bookPath,
|
|
||||||
click: () => getWindow()?.webContents.send("folio:export-zip-requested"),
|
click: () => getWindow()?.webContents.send("folio:export-zip-requested"),
|
||||||
},
|
},
|
||||||
|
{ type: "separator" },
|
||||||
{
|
{
|
||||||
label: "Export Full Book (PDF)…",
|
label: "Full Book (PDF)…",
|
||||||
accelerator: "CmdOrCtrl+Shift+P",
|
accelerator: "CmdOrCtrl+Shift+P",
|
||||||
enabled: !!getState().bookPath,
|
|
||||||
click: () => getWindow()?.webContents.send("folio:export-pdf-requested"),
|
click: () => getWindow()?.webContents.send("folio:export-pdf-requested"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Export Full Book (DOCX)…",
|
label: "Full Book (DOCX)…",
|
||||||
enabled: !!getState().bookPath,
|
|
||||||
click: () => getWindow()?.webContents.send("folio:export-docx-requested"),
|
click: () => getWindow()?.webContents.send("folio:export-docx-requested"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Export Full Book (ODT)…",
|
label: "Full Book (ODT)…",
|
||||||
enabled: !!getState().bookPath,
|
|
||||||
click: () => getWindow()?.webContents.send("folio:export-odt-requested"),
|
click: () => getWindow()?.webContents.send("folio:export-odt-requested"),
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{ type: "separator" },
|
{ type: "separator" },
|
||||||
{
|
{
|
||||||
label: "Check for Updates…",
|
label: "Check for Updates…",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue