Spaces:
Sleeping
Sleeping
File size: 3,014 Bytes
33ebc65 ce143cd 33ebc65 714367c 33ebc65 7de2979 892ab14 7de2979 892ab14 7de2979 33ebc65 6c59d17 7de2979 33ebc65 6c59d17 b167385 6c59d17 928d114 671594c ce143cd c071bb8 306e4e6 33ebc65 892ab14 7de2979 892ab14 a01dcda 714367c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="theme-color" content="#2563eb" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<title>智慧校园管理系统</title>
<script>
// Global PWA Event Capture
// This runs before React, ensuring we don't miss the event.
window.deferredPrompt = null;
window.addEventListener('beforeinstallprompt', (e) => {
// Prevent the mini-infobar from appearing on mobile
e.preventDefault();
// Stash the event so it can be triggered later.
window.deferredPrompt = e;
console.log('✨ PWA Install Prompt captured globally');
});
</script>
<style>
/* Critical CSS for immediate loading state */
body { margin: 0; background-color: #f9fafb; font-family: sans-serif; }
#root-loader {
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
display: flex; flex-direction: column; align-items: center; justify-content: center;
z-index: 9999; background: #fff; transition: opacity 0.5s;
}
.spinner {
width: 40px; height: 40px; border: 4px solid #e5e7eb;
border-top: 4px solid #3b82f6; border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-text { margin-top: 15px; color: #6b7280; font-size: 14px; font-weight: 500; }
</style>
<script type="importmap">
{
"imports": {
"react": "https://aistudiocdn.com/react@^19.2.0",
"react-dom/": "https://aistudiocdn.com/react-dom@^19.2.0/",
"react/": "https://aistudiocdn.com/react@^19.2.0/",
"lucide-react": "https://aistudiocdn.com/lucide-react@^0.555.0",
"recharts": "https://aistudiocdn.com/recharts@^3.5.1",
"vite": "https://aistudiocdn.com/vite@^7.2.6",
"@vitejs/plugin-react": "https://aistudiocdn.com/@vitejs/plugin-react@^5.1.1",
"react-dom": "https://aistudiocdn.com/react-dom@^19.2.0",
"xlsx": "https://aistudiocdn.com/xlsx@^0.18.5",
"@google/genai": "https://esm.sh/@google/genai@^1.33.0",
"react-markdown": "https://esm.sh/react-markdown@^10.1.0",
"remark-gfm": "https://esm.sh/remark-gfm@^4.0.1",
"vite-plugin-pwa": "https://esm.sh/vite-plugin-pwa@^1.2.0",
"mammoth": "https://esm.sh/mammoth@1.6.0",
"pdfjs-dist": "https://esm.sh/pdfjs-dist@3.11.174",
"docx": "https://esm.sh/docx@8.5.0"
}
}
</script>
</head>
<body>
<div id="root">
<!-- Immediate Loading UI (Disappears when React mounts) -->
<div id="root-loader">
<div class="spinner"></div>
<div class="loading-text">系统启动中...</div>
</div>
</div>
<script type="module" src="/index.tsx"></script>
</body>
</html> |