Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix device detection in setup
azivnere50f9cd0a354
diff --git a/src/public/javascripts/services/utils.js b/src/public/javascripts/services/utils.jsindex 013f4225ea..dcca082e38 100644--- a/src/public/javascripts/services/utils.js+++ b/src/public/javascripts/services/utils.js@@ -151,11 +151,15 @@ function bindShortcut(keyboardShortcut, handler) {}function isMobile() {- return window.device === "mobile";+ return window.device === "mobile"+ // window.device is not available in setup+ || (!window.device && /Mobi/.test(navigator.userAgent));}function isDesktop() {- return window.device === "desktop";+ return window.device === "desktop"+ // window.device is not available in setup+ || (!window.device && !/Mobi/.test(navigator.userAgent));}function setCookie(name, value) {