Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
/* --- logo con destello pulsante ------------------------------------ */
#splash img {
z-index: 10;
animation: pulseShadow 8s ease-in-out infinite;
border: 1px solid rgb(255 255 255 / 30%);
border-radius: 50%;
}

/* --- “neones” de colores ------------------------------------------- */
Expand Down Expand Up @@ -153,14 +154,13 @@

<script type="module" src="/src/index.tsx"></script>
<script>
new MutationObserver((m,obs)=>{
const root=document.getElementById('root');
if(root && root.childElementCount){
document.getElementById('splash')?.remove();
root.style.opacity='1';
obs.disconnect();
}
}).observe(document.getElementById('root'),{childList:true});
function showApp() {
const root = document.getElementById('root');
document.getElementById('splash')?.remove();
root.style.opacity = '1';
window.removeEventListener('app:ready', showApp);
}
window.addEventListener('app:ready', showApp);
</script>
</body>
</html>
12 changes: 12 additions & 0 deletions src/components/app-ready.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { useEffect } from 'react';

export default function AppReady() {
useEffect(() => {
requestAnimationFrame(() =>
requestAnimationFrame(() => {
window.dispatchEvent(new Event('app:ready'));
})
);
}, []);
return null;
}
2 changes: 2 additions & 0 deletions src/routes/sections/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import DashboardLayout from '@src/layouts/dashboard';
// components
import { LoadingScreen, SplashScreen } from '@src/components/loading-screen';
import CompactLayout from '@src/layouts/compact';
import AppReady from '@src/components/app-ready.tsx';


// ----------------------------------------------------------------------
Expand Down Expand Up @@ -42,6 +43,7 @@ export const dashboardRoutes = [
element: (
<DashboardLayout>
<Suspense fallback={<LoadingScreen />}>
<AppReady />
<Outlet />
</Suspense>
</DashboardLayout>
Expand Down
2 changes: 1 addition & 1 deletion stats.html

Large diffs are not rendered by default.

Loading