fix responsive for IPA & APK

This commit is contained in:
2026-05-17 20:45:41 +02:00
parent edfc4d833f
commit 0ae1664ce1
3 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>OpenPlanetsMaps</title>
<link rel="icon" href="IMG/IMP_Gen_logo-removebg-preview.png" type="image/png">
<link rel="stylesheet" href="style.css">
+10 -1
View File
@@ -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";
+5 -1
View File
@@ -1,5 +1,9 @@
{
"appId": "com.openplanetsmaps.app",
"appName": "OpenPlanetsMaps",
"webDir": "SRC"
"webDir": "SRC",
"server": {
"url": "https://opm.nhkyllian.fr",
"cleartext": true
}
}