image handling update for route creation
Sonarqube Scanner / Build and analyze (push) Failing after 20s
Sonarqube Scanner / Build and analyze (push) Failing after 20s
This commit is contained in:
Vendored
+21
@@ -21,12 +21,32 @@
|
||||
const cleanupStatus = document.getElementById('storage-cleanup-status');
|
||||
const actionStatus = document.getElementById('bootstrap-action-status');
|
||||
const statusText = document.getElementById('bootstrap-status-text');
|
||||
const androidBrowserHint = document.getElementById('android-browser-hint');
|
||||
let ready = false;
|
||||
let statusTransition = 0;
|
||||
const completedSteps = new Set();
|
||||
|
||||
const versioned = path => `${path}${path.includes('?') ? '&' : '?'}v=${encodeURIComponent(versions.app)}`;
|
||||
|
||||
function updateAndroidBrowserHint() {
|
||||
if (!androidBrowserHint) return;
|
||||
const userAgent = globalThis.navigator?.userAgent || '';
|
||||
const platform = globalThis.navigator?.userAgentData?.platform || '';
|
||||
const isAndroid = /Android/i.test(`${userAgent} ${platform}`);
|
||||
if (!isAndroid) {
|
||||
androidBrowserHint.hidden = true;
|
||||
return;
|
||||
}
|
||||
|
||||
const isChrome = /Chrome\//i.test(userAgent)
|
||||
&& !/(?:EdgA|OPR|SamsungBrowser)\//i.test(userAgent);
|
||||
androidBrowserHint.hidden = false;
|
||||
androidBrowserHint.dataset.browser = isChrome ? 'chrome' : 'other';
|
||||
androidBrowserHint.textContent = isChrome
|
||||
? 'Android mit Chrome erkannt. Lokale Bilder und Audiodateien können als Dateireferenzen verwendet werden.'
|
||||
: 'Android erkannt. Für lokale Bilder und Audiodateien bitte Chrome verwenden; dort können Dateireferenzen ohne Kopie in den Local Storage genutzt werden.';
|
||||
}
|
||||
|
||||
function schedule(callback, delay = 0) {
|
||||
if (typeof globalThis.setTimeout === 'function') {
|
||||
return globalThis.setTimeout(callback, delay);
|
||||
@@ -218,5 +238,6 @@
|
||||
enter.addEventListener('pointerup', openApplication);
|
||||
enter.addEventListener('keydown', openApplication);
|
||||
screen.addEventListener('pointerup', openApplication);
|
||||
updateAndroidBrowserHint();
|
||||
boot();
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user