feat: isMobile-Methode mit Lazy Loading implementiert; Standortinformationen für mobile Browser auf readonly gesetzt.

This commit is contained in:
Developer 02 2024-07-17 13:22:43 +02:00
parent e44d5f644c
commit 1388b40a6b
2 changed files with 11 additions and 2 deletions

View File

@ -103,6 +103,7 @@
name: id_city,
annotationIds: PSPDFKit.Immutable.List([annotation_city.id]),
value: location.city,
readOnly: isMobile()
})
/**

View File

@ -54,3 +54,11 @@ function locale_date_dd_mm_yyyy() {
const year = String(today.getFullYear()).slice(-4);
return `${day}/${month}/${year}`;
}
let __is_mobile = null;
function isMobile() {
if (__is_mobile === null) {
__is_mobile = /Mobi|Android/i.test(window.navigator.userAgent);
}
return __is_mobile;
}