u
This commit is contained in:
28
src/main.jsx
28
src/main.jsx
@@ -9,17 +9,11 @@ import App from './App';
|
||||
import { getActiveTheme } from './theme';
|
||||
import { installCssVars } from './colors';
|
||||
import { disableTouchAutofocus } from './utils/touch';
|
||||
import './index.css';
|
||||
|
||||
// Globally suppress automatic focus on touch devices to avoid virtual keyboard popups
|
||||
disableTouchAutofocus();
|
||||
|
||||
// Side-effect imports: each module registers its automat and subscribes to
|
||||
// authAutomat, so the stores must be evaluated before the session bootstraps.
|
||||
import './automats';
|
||||
import { initPwa } from './automats';
|
||||
import PwaUpdateDialog from './components/PwaUpdateDialog';
|
||||
import './index.css';
|
||||
|
||||
// Publish the color tokens as CSS custom properties so index.css (and any
|
||||
// other plain-CSS stylesheet) reads the same palette as the React components.
|
||||
installCssVars();
|
||||
@@ -29,12 +23,6 @@ installCssVars();
|
||||
const AutomatInspector = import.meta.env.DEV
|
||||
? lazy(() => import('./devtools/AutomatInspector'))
|
||||
: null;
|
||||
const SseMonitor = import.meta.env.DEV
|
||||
? lazy(() => import('./devtools/SseMonitor'))
|
||||
: null;
|
||||
const ChunkCacheMonitor = import.meta.env.DEV
|
||||
? lazy(() => import('./devtools/ChunkCacheMonitor'))
|
||||
: null;
|
||||
|
||||
async function clearDevServiceWorker() {
|
||||
if (!import.meta.env.DEV || !('serviceWorker' in navigator)) return;
|
||||
@@ -50,9 +38,6 @@ if (import.meta.env.DEV) {
|
||||
void clearDevServiceWorker();
|
||||
}
|
||||
|
||||
// Initialize PWA service worker registration and update listener in production
|
||||
initPwa();
|
||||
|
||||
createRoot(document.getElementById('root')).render(
|
||||
<ThemeProvider theme={getActiveTheme()}>
|
||||
<CssBaseline />
|
||||
@@ -74,17 +59,6 @@ createRoot(document.getElementById('root')).render(
|
||||
</Suspense>
|
||||
) : null}
|
||||
</Box>
|
||||
{SseMonitor ? (
|
||||
<Suspense fallback={null}>
|
||||
<SseMonitor />
|
||||
</Suspense>
|
||||
) : null}
|
||||
{ChunkCacheMonitor ? (
|
||||
<Suspense fallback={null}>
|
||||
<ChunkCacheMonitor />
|
||||
</Suspense>
|
||||
) : null}
|
||||
<PwaUpdateDialog />
|
||||
</AuthBootstrap>
|
||||
</SnackbarProvider>
|
||||
</ThemeProvider>,
|
||||
|
||||
Reference in New Issue
Block a user