feat(ui): guard desktop-only actions with a clear browser-preview message

This commit is contained in:
pj committed 2026-06-20 14:30:07 -04:00
1 parent f8ddde5e91
commit 5e1582fc39
3 files changed
+20 -4

No files matched your search

+2 -4
View File
@@ -3,7 +3,7 @@ import { generateHTML } from "@tiptap/core";
import { useBook } from "../store/useBook";
import { editorExtensions } from "../editor/extensions";
import { bookToPdfInputs } from "../export/typst";
import { compilePdf } from "../ipc";
import { compilePdf, isDesktop } from "../ipc";
import { PdfPreview } from "./PdfPreview";
const TRIM_LABEL: Record<string, string> = {
@@ -13,10 +13,8 @@ const TRIM_LABEL: Record<string, string> = {
a5: "A5",
};
const inTauri = typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
export function Dock() {
return inTauri ? <PdfDock /> : <HtmlDock />;
return isDesktop ? <PdfDock /> : <HtmlDock />;
}
function PdfDock() {