v0.7.2: 修复登录页面版本号和主题初始化
This commit is contained in:
@@ -69,16 +69,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-8 text-center text-sm text-gray-400 dark:text-gray-500">
|
<div class="mt-8 text-center text-sm text-gray-400 dark:text-gray-500">
|
||||||
智队中枢 v0.7.0
|
智队中枢 v0.7.2
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 主题切换
|
// 立即应用主题 - 防止闪烁
|
||||||
const savedTheme = localStorage.getItem('theme') || 'light';
|
(function() {
|
||||||
if (savedTheme === 'dark') {
|
const theme = localStorage.getItem('theme') || 'light';
|
||||||
document.documentElement.classList.add('dark');
|
if (theme === 'dark') {
|
||||||
}
|
document.documentElement.classList.add('dark');
|
||||||
|
}
|
||||||
|
document.documentElement.setAttribute('data-theme', theme);
|
||||||
|
})();
|
||||||
|
|
||||||
// 登录处理
|
// 登录处理
|
||||||
document.getElementById('login-form').addEventListener('submit', async (e) => {
|
document.getElementById('login-form').addEventListener('submit', async (e) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user