diff --git a/src/main/menu.ts b/src/main/menu.ts index 7964a22..0bd9cb1 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -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" }, {