修复登录界面首次进入加载背景异常

This commit is contained in:
eoao
2025-08-22 22:02:00 +08:00
parent 799cc4277f
commit de0bb288ec
8 changed files with 53 additions and 54 deletions

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en" class="dark">
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
@@ -7,6 +7,15 @@
<link rel="icon" href="./src/assets/favicon.svg" type="image/svg+xml">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<script>
const uiStoreStr = localStorage.getItem('ui')
if (uiStoreStr) {
const uiStore = JSON.parse(uiStoreStr)
const root = document.documentElement
root.style.background = uiStore.dark ? '#141414' : '#FFFFFF'
root.setAttribute('class', uiStore.dark ? 'dark' : '');
}
</script>
</head>
<style>
@@ -20,6 +29,7 @@
justify-content: center;
align-items: center;
z-index: 500;
background: var(--el-bg-color);
}
.loading-icon {
@@ -33,7 +43,6 @@
height: 30px;
width: 30px;
animation: loading-rotate 1s linear infinite;
fill: transparent !important;
}
.loading-path .dot1 {
@@ -93,14 +102,6 @@
</div>
</div>
<div id="app"></div>
<script>
const uiStoreStr = localStorage.getItem('ui')
if (uiStoreStr) {
const uiStore = JSON.parse(uiStoreStr)
const doc = document.querySelector('#loading-first')
doc.style.background = uiStore.dark ? '#141414' : '#FFFFFF'
}
</script>
<script type="module" src="/src/main.js"></script>
</body>
</html>

View File

@@ -1,7 +1,6 @@
import {useUserStore} from "@/store/user.js";
import {useSettingStore} from "@/store/setting.js";
import {useAccountStore} from "@/store/account.js";
import {useUiStore} from "@/store/ui.js";
import {loginUserInfo} from "@/request/my.js";
import {permsToRouter} from "@/perm/perm.js";
import router from "@/router";
@@ -25,10 +24,6 @@ export async function init() {
i18n.global.locale.value = settingStore.lang
const uiStore = useUiStore();
let doc = document.querySelector("html");
doc.setAttribute('class', uiStore.dark ? 'dark' : '');
let setting = null;
if (token) {

View File

@@ -27,10 +27,13 @@ body {
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
line-height: 1.5;
color: var(--el-text-color-primary);
background-color: var(--el-bg-color);
font-size: 14px;
}
html, body {
background: var(--el-bg-color);
}
* {
-webkit-tap-highlight-color: transparent;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en" class="dark">
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
@@ -7,8 +7,17 @@
<link rel="icon" href="/assets/favicon-C5dAZutX.svg" type="image/svg+xml">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<script type="module" crossorigin src="/assets/index-BWO6kBue.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-IV79mZ40.css">
<script>
const uiStoreStr = localStorage.getItem('ui')
if (uiStoreStr) {
const uiStore = JSON.parse(uiStoreStr)
const root = document.documentElement
root.style.background = uiStore.dark ? '#141414' : '#FFFFFF'
root.setAttribute('class', uiStore.dark ? 'dark' : '');
}
</script>
<script type="module" crossorigin src="/assets/index-DCcUqVQw.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CnzY8c7c.css">
</head>
<style>
@@ -22,6 +31,7 @@
justify-content: center;
align-items: center;
z-index: 500;
background: var(--el-bg-color);
}
.loading-icon {
@@ -35,7 +45,6 @@
height: 30px;
width: 30px;
animation: loading-rotate 1s linear infinite;
fill: transparent !important;
}
.loading-path .dot1 {
@@ -94,14 +103,6 @@
</svg>
</div>
</div>
<div id="app"></div>
<script>
const uiStoreStr = localStorage.getItem('ui')
if (uiStoreStr) {
const uiStore = JSON.parse(uiStoreStr)
const doc = document.querySelector('#loading-first')
doc.style.background = uiStore.dark ? '#141414' : '#FFFFFF'
}
</script>
<div id="app"></div>
</body>

View File

@@ -1,7 +1,6 @@
import app from './hono/webs';
import { email } from './email/email';
import userService from './service/user-service';
import verifyRecord from './entity/verify-record';
import verifyRecordService from './service/verify-record-service';
export default {
async fetch(req, env, ctx) {