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,31 +80,33 @@ export function buildMenu(
|
|||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Export Markdown…",
|
||||
accelerator: "CmdOrCtrl+Shift+E",
|
||||
label: "Export",
|
||||
enabled: !!getState().bookPath,
|
||||
click: () => getWindow()?.webContents.send("folio:export-markdown-requested"),
|
||||
},
|
||||
{
|
||||
label: "Export Bundle (ZIP)…",
|
||||
enabled: !!getState().bookPath,
|
||||
click: () => getWindow()?.webContents.send("folio:export-zip-requested"),
|
||||
},
|
||||
{
|
||||
label: "Export Full Book (PDF)…",
|
||||
accelerator: "CmdOrCtrl+Shift+P",
|
||||
enabled: !!getState().bookPath,
|
||||
click: () => getWindow()?.webContents.send("folio:export-pdf-requested"),
|
||||
},
|
||||
{
|
||||
label: "Export Full Book (DOCX)…",
|
||||
enabled: !!getState().bookPath,
|
||||
click: () => getWindow()?.webContents.send("folio:export-docx-requested"),
|
||||
},
|
||||
{
|
||||
label: "Export Full Book (ODT)…",
|
||||
enabled: !!getState().bookPath,
|
||||
click: () => getWindow()?.webContents.send("folio:export-odt-requested"),
|
||||
submenu: [
|
||||
{
|
||||
label: "Markdown…",
|
||||
accelerator: "CmdOrCtrl+Shift+E",
|
||||
click: () => getWindow()?.webContents.send("folio:export-markdown-requested"),
|
||||
},
|
||||
{
|
||||
label: "Bundle (ZIP)…",
|
||||
click: () => getWindow()?.webContents.send("folio:export-zip-requested"),
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "Full Book (PDF)…",
|
||||
accelerator: "CmdOrCtrl+Shift+P",
|
||||
click: () => getWindow()?.webContents.send("folio:export-pdf-requested"),
|
||||
},
|
||||
{
|
||||
label: "Full Book (DOCX)…",
|
||||
click: () => getWindow()?.webContents.send("folio:export-docx-requested"),
|
||||
},
|
||||
{
|
||||
label: "Full Book (ODT)…",
|
||||
click: () => getWindow()?.webContents.send("folio:export-odt-requested"),
|
||||
},
|
||||
],
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue