diff --git a/SRC/index.html b/SRC/index.html index 67876d9..04dbb6a 100755 --- a/SRC/index.html +++ b/SRC/index.html @@ -3,7 +3,7 @@ - + OpenPlanetsMaps diff --git a/SRC/main.js b/SRC/main.js index 60053d6..1f61fae 100755 --- a/SRC/main.js +++ b/SRC/main.js @@ -361,19 +361,28 @@ document.addEventListener('DOMContentLoaded', () => { const isMobile = window.innerWidth <= 768 || /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); const isElectron = navigator.userAgent.toLowerCase().includes('electron'); + const isCapacitor = window.Capacitor !== undefined; // Détecte l'application mobile native - if (isMobile || isElectron) { + if (isMobile || isElectron || isCapacitor) { const iframes = document.querySelectorAll('iframe'); iframes.forEach(iframe => { const fallback = document.createElement('div'); if (isElectron) { fallback.textContent = "3D models are not compatible on the desktop app"; + } else if (isCapacitor) { + fallback.textContent = "3D models are not compatible on the mobile app"; } else { fallback.textContent = "functionality not available on mobile devices"; } fallback.style.display = "flex"; fallback.style.alignItems = "center"; fallback.style.justifyContent = "center"; + + // Correction du responsive : on empêche la boîte de déborder de l'écran + fallback.style.width = "100%"; + fallback.style.maxWidth = "100%"; + fallback.style.boxSizing = "border-box"; + fallback.style.minHeight = "200px"; fallback.style.backgroundColor = "#1e293b"; fallback.style.color = "#f87171"; diff --git a/capacitor.config.json b/capacitor.config.json index b50432c..947842b 100644 --- a/capacitor.config.json +++ b/capacitor.config.json @@ -1,5 +1,9 @@ { "appId": "com.openplanetsmaps.app", "appName": "OpenPlanetsMaps", - "webDir": "SRC" + "webDir": "SRC", + "server": { + "url": "https://opm.nhkyllian.fr", + "cleartext": true + } }