mirror of
https://github.com/zadam/trilium.git
synced 2025-01-17 20:48:12 +08:00
fix device detection in setup
This commit is contained in:
parent
2b64cbce2c
commit
e50f9cd0a3
1 changed files with 6 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue