feat: add native app detection and adjust styles for Capacitor/Cordova

This commit is contained in:
dasemu committed 2026-01-22 09:22:06 +01:00
1 parent d9e8389777
commit 2bbd388524
5 files changed
+67 -3

No files matched your search

+11
View File
@@ -7,6 +7,17 @@ const THEME_STORAGE_KEY = 'impostorGameTheme';
const LANGUAGE_STORAGE_KEY = 'impostorGameLanguage';
const SCREEN_LOCK_STORAGE_KEY = 'impostorGameScreenLock';
// Detect if running as a native app (Capacitor/Cordova)
(function detectNativeApp() {
const isCapacitor = window.Capacitor !== undefined;
const isCordova = window.cordova !== undefined;
const isNativeApp = isCapacitor || isCordova;
if (isNativeApp) {
document.documentElement.classList.add('native-app');
}
})();
// ---------- Internationalization system ----------
const TRANSLATIONS = {
es: {