diff --git a/apps/client/src/index.ts b/apps/client/src/index.ts index 658a943692..419032657c 100644 --- a/apps/client/src/index.ts +++ b/apps/client/src/index.ts @@ -33,7 +33,9 @@ async function setupGlob() { function getDevice() { // Respect user's manual override via URL. const urlParams = new URLSearchParams(window.location.search); - if (urlParams.has("desktop")) { + if (urlParams.has("print")) { + return "print"; + } else if (urlParams.has("desktop")) { return "desktop"; } else if (urlParams.has("mobile")) { return "mobile"; @@ -116,10 +118,16 @@ function setBodyAttributes() { } async function loadScripts() { - if (glob.device === "mobile") { - await import("./mobile.js"); - } else { - await import("./desktop.js"); + switch (glob.device) { + case "mobile": + await import("./mobile.js"); + break; + case "print": + await import("./print.js"); + break; + case "desktop": + default: + await import("./desktop.js"); } } diff --git a/apps/server/src/assets/views/print.ejs b/apps/server/src/assets/views/print.ejs deleted file mode 100644 index c1808e507f..0000000000 --- a/apps/server/src/assets/views/print.ejs +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - Trilium Notes - - - - - - - -<%- include("./partials/windowGlobal.ejs", locals) %> - - - - - - - -