mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
feat(a11y,i18n): more modal focus-traps + Telegram theme/language sync
Modal a11y: - focus-trap + role=dialog/aria-modal/aria-labelledby on AdminRoles delete confirm and AdminBanSystem user-detail modal (+ close aria-label) Telegram theme/language sync (first run only, explicit choice always wins): - getTelegramColorScheme() / getTelegramLanguageCode() helpers in useTelegramSDK - useTheme initial state follows the Telegram client color scheme when no stored theme - applyTelegramLanguage() adopts the Telegram client language when no stored choice, called from main.tsx after SDK init (launch params unavailable before init)
This commit is contained in:
@@ -24,7 +24,7 @@ import { AppWithNavigator } from './AppWithNavigator';
|
||||
import { ErrorBoundary } from './components/ErrorBoundary';
|
||||
import { initLogoPreload } from './api/branding';
|
||||
import { getCachedFullscreenEnabled, isTelegramMobile } from './hooks/useTelegramSDK';
|
||||
import './i18n';
|
||||
import { applyTelegramLanguage } from './i18n';
|
||||
import './styles/globals.css';
|
||||
|
||||
// Polyfill Object.hasOwn for older iOS/Android WebViews (Safari < 15.4, old Chrome).
|
||||
@@ -55,6 +55,9 @@ if (isTelegramEnv && !alreadyInitialized) {
|
||||
|
||||
clearStaleSessionIfNeeded(retrieveRawInitData() || null);
|
||||
|
||||
// Adopt the user's Telegram client language on first run (no explicit choice yet).
|
||||
applyTelegramLanguage();
|
||||
|
||||
// Each mount in its own try/catch so one failure doesn't block others.
|
||||
// mountMiniApp() internally mounts themeParams in SDK v3,
|
||||
// so we don't call mountThemeParams() separately to avoid ConcurrentCallError.
|
||||
|
||||
Reference in New Issue
Block a user