This commit is contained in:
pj committed 2026-06-20 23:46:10 -04:00
1 parent c86d5a7d5c
commit 0e0d334f6a
33 files changed
+401 -101

No files matched your search

+3 -3
View File
@@ -5,7 +5,7 @@ import { EditorView } from "./components/EditorView";
import { useBook } from "./store/useBook";
import { isDesktop } from "./ipc";
import { newBook } from "./library";
import { exportEpub, exportPdf } from "./export/exporters";
import { runExport } from "./export/run";
function App() {
const book = useBook((s) => s.book);
@@ -16,8 +16,8 @@ function App() {
const unlisten = listen<string>("menu-action", (event) => {
const state = useBook.getState();
if (event.payload === "new-book") state.openBook(newBook());
else if (event.payload === "export-pdf" && state.book) exportPdf(state.book);
else if (event.payload === "export-epub" && state.book) exportEpub(state.book);
else if (event.payload === "export-pdf") runExport("pdf");
else if (event.payload === "export-epub") runExport("epub");
});
return () => {
unlisten.then((stop) => stop());