Spaces:
Sleeping
Sleeping
Upload 37 files
Browse files- index.html +39 -2
- server.js +1 -0
index.html
CHANGED
|
@@ -29,6 +29,37 @@
|
|
| 29 |
::-webkit-scrollbar-thumb:hover {
|
| 30 |
background: #a8a8a8;
|
| 31 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
</style>
|
| 33 |
<script type="importmap">
|
| 34 |
{
|
|
@@ -46,7 +77,13 @@
|
|
| 46 |
<link rel="stylesheet" href="/index.css">
|
| 47 |
</head>
|
| 48 |
<body>
|
| 49 |
-
<div id="root"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
<script type="module" src="/index.tsx"></script>
|
| 51 |
</body>
|
| 52 |
-
</html>
|
|
|
|
| 29 |
::-webkit-scrollbar-thumb:hover {
|
| 30 |
background: #a8a8a8;
|
| 31 |
}
|
| 32 |
+
|
| 33 |
+
/* Initial Loading Spinner */
|
| 34 |
+
#loading {
|
| 35 |
+
position: fixed;
|
| 36 |
+
top: 0; left: 0; right: 0; bottom: 0;
|
| 37 |
+
background: #f3f4f6;
|
| 38 |
+
display: flex;
|
| 39 |
+
flex-direction: column;
|
| 40 |
+
justify-content: center;
|
| 41 |
+
align-items: center;
|
| 42 |
+
z-index: 9999;
|
| 43 |
+
}
|
| 44 |
+
.spinner {
|
| 45 |
+
width: 50px;
|
| 46 |
+
height: 50px;
|
| 47 |
+
border: 5px solid #e5e7eb;
|
| 48 |
+
border-top: 5px solid #3b82f6;
|
| 49 |
+
border-radius: 50%;
|
| 50 |
+
animation: spin 1s linear infinite;
|
| 51 |
+
margin-bottom: 20px;
|
| 52 |
+
}
|
| 53 |
+
@keyframes spin {
|
| 54 |
+
0% { transform: rotate(0deg); }
|
| 55 |
+
100% { transform: rotate(360deg); }
|
| 56 |
+
}
|
| 57 |
+
.loading-text {
|
| 58 |
+
color: #4b5563;
|
| 59 |
+
font-weight: 500;
|
| 60 |
+
font-size: 14px;
|
| 61 |
+
letter-spacing: 2px;
|
| 62 |
+
}
|
| 63 |
</style>
|
| 64 |
<script type="importmap">
|
| 65 |
{
|
|
|
|
| 77 |
<link rel="stylesheet" href="/index.css">
|
| 78 |
</head>
|
| 79 |
<body>
|
| 80 |
+
<div id="root">
|
| 81 |
+
<!-- Initial Loading State -->
|
| 82 |
+
<div id="loading">
|
| 83 |
+
<div class="spinner"></div>
|
| 84 |
+
<div class="loading-text">系统启动中...</div>
|
| 85 |
+
</div>
|
| 86 |
+
</div>
|
| 87 |
<script type="module" src="/index.tsx"></script>
|
| 88 |
</body>
|
| 89 |
+
</html>
|
server.js
CHANGED
|
@@ -472,6 +472,7 @@ app.post('/api/students/promote', async (req, res) => {
|
|
| 472 |
|
| 473 |
if (role !== 'ADMIN') return res.status(403).json({ error: 'Permission denied' });
|
| 474 |
|
|
|
|
| 475 |
const GRADE_MAP = {
|
| 476 |
'一年级': '二年级', '二年级': '三年级', '三年级': '四年级', '四年级': '五年级', '五年级': '六年级', '六年级': '毕业',
|
| 477 |
'初一': '初二', '七年级': '八年级', '初二': '初三', '八年级': '九年级', '初三': '毕业', '九年级': '毕业',
|
|
|
|
| 472 |
|
| 473 |
if (role !== 'ADMIN') return res.status(403).json({ error: 'Permission denied' });
|
| 474 |
|
| 475 |
+
// UPDATED GRADE MAP: Treat 6th, 9th, 12th as graduation points
|
| 476 |
const GRADE_MAP = {
|
| 477 |
'一年级': '二年级', '二年级': '三年级', '三年级': '四年级', '四年级': '五年级', '五年级': '六年级', '六年级': '毕业',
|
| 478 |
'初一': '初二', '七年级': '八年级', '初二': '初三', '八年级': '九年级', '初三': '毕业', '九年级': '毕业',
|