mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 19:17:03 +00:00
feat(ui): guard desktop-only actions with a clear browser-preview message
This commit is contained in:
1 parent
f8ddde5e91
commit
5e1582fc39
3 files changed
+20
-4
No files matched your search
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user