fix: 登录占位英文、缩短提示并消除横向滚动条
This commit is contained in:
@@ -35,7 +35,6 @@ const countdown = ref(0);
|
||||
const busy = ref(false);
|
||||
const noticeVisible = ref(false);
|
||||
const noticePinned = ref(false);
|
||||
const accountHint = computed(() => (mode.value === "nqi" ? "大数据平台账号" : "管理员账号"));
|
||||
let countdownTimer = 0;
|
||||
let noticeTimer = 0;
|
||||
|
||||
@@ -57,7 +56,7 @@ function beginNoticeCountdown() {
|
||||
noticeTimer = window.setTimeout(() => {
|
||||
noticeTimer = 0;
|
||||
if (!noticePinned.value) noticeVisible.value = false;
|
||||
}, 8000);
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
function pinNotice() {
|
||||
@@ -316,7 +315,7 @@ async function finishNqi() {
|
||||
</form>
|
||||
</section>
|
||||
<div v-else class="gate lv-tower">
|
||||
<ThemeButton />
|
||||
<ThemeButton placement="left" />
|
||||
<div class="lv-mast" aria-hidden="true"><span /></div>
|
||||
<section class="lv-side">
|
||||
<div class="lv-brand">
|
||||
@@ -325,13 +324,13 @@ async function finishNqi() {
|
||||
<p v-if="noticeVisible" class="lv-notice">请使用大数据平台账号登录</p>
|
||||
<form class="lv-fields" @submit.prevent="submitLogin">
|
||||
<label for="login-account">账号</label>
|
||||
<input id="login-account" v-model="username" :placeholder="accountHint" autocomplete="username" @keyup.enter="submitLogin" />
|
||||
<input id="login-account" v-model="username" placeholder="account" autocomplete="username" @keyup.enter="submitLogin" />
|
||||
<label for="login-password">密码</label>
|
||||
<input id="login-password" v-model="password" type="password" placeholder="密码" autocomplete="current-password" @keyup.enter="submitLogin" />
|
||||
<input id="login-password" v-model="password" type="password" placeholder="password" autocomplete="current-password" @keyup.enter="submitLogin" />
|
||||
<template v-if="mode === 'nqi'">
|
||||
<label for="login-captcha">验证码</label>
|
||||
<div class="lv-captcha">
|
||||
<input id="login-captcha" v-model="captcha" placeholder="验证码" autocomplete="off" @keyup.enter="submitLogin" />
|
||||
<input id="login-captcha" v-model="captcha" placeholder="captcha" autocomplete="off" @keyup.enter="submitLogin" />
|
||||
<button type="button" class="lv-captcha-box" title="点击刷新" @click="refreshCaptcha">
|
||||
<n-spin v-if="captchaLoading" size="small" />
|
||||
<img v-else :src="captchaSrc" alt="验证码" @error="markCaptchaBroken" />
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
--field: color-mix(in srgb, var(--paper) 70%, #fff);
|
||||
--captcha-bg: #fff;
|
||||
--muted-line: color-mix(in srgb, var(--ink-line) 42%, var(--paper));
|
||||
--notice: #b4483e;
|
||||
display: grid;
|
||||
grid-template-columns: 88px minmax(0, 1fr);
|
||||
align-items: stretch;
|
||||
@@ -12,6 +13,7 @@
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
contain: paint;
|
||||
background: var(--paper);
|
||||
color: var(--ink-line);
|
||||
font-family: SimSun, "Songti SC", serif;
|
||||
@@ -23,6 +25,7 @@ html[data-theme="dark"] .gate.lv-tower {
|
||||
--ink-line: #e6dece;
|
||||
--field: #24211b;
|
||||
--captcha-bg: #2c2922;
|
||||
--notice: #e0978c;
|
||||
}
|
||||
|
||||
.gate.lv-tower .theme-switch {
|
||||
@@ -81,26 +84,27 @@ html[data-theme="dark"] .gate.lv-tower {
|
||||
}
|
||||
.gate.lv-tower .lv-brand {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin: 0 0 18px;
|
||||
justify-content: center;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
.gate.lv-tower .lv-side h1 {
|
||||
width: 100%;
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.18em;
|
||||
text-align: center;
|
||||
}
|
||||
.gate.lv-tower .lv-notice,
|
||||
.gate.lv-tower .lv-brand + .lv-notice {
|
||||
margin: 0 0 16px;
|
||||
padding: 6px 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-top: 1px solid var(--ink-line);
|
||||
border-bottom: 1px solid var(--ink-line);
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
color: var(--ink-line);
|
||||
text-align: left;
|
||||
color: var(--notice);
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.gate.lv-tower .lv-fields {
|
||||
display: grid;
|
||||
|
||||
@@ -64,7 +64,7 @@ async function submit() {
|
||||
|
||||
<template>
|
||||
<div class="gate">
|
||||
<ThemeButton />
|
||||
<ThemeButton placement="left" />
|
||||
<section class="gate-card wide">
|
||||
<div class="gate-brand">
|
||||
<div class="brand-mark" aria-hidden="true">D</div>
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
import { NButton, NIcon, NTooltip } from "naive-ui";
|
||||
import { cycleTheme, themeChoice } from "../shared/theme";
|
||||
|
||||
withDefaults(defineProps<{ placement?: "top" | "left" | "bottom" | "right" }>(), { placement: "top" });
|
||||
const label = { system: "跟随系统", dark: "深色", light: "浅色" } as const;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-tooltip>
|
||||
<n-tooltip :placement="placement">
|
||||
<template #trigger>
|
||||
<n-button class="theme-switch" quaternary circle :aria-label="label[themeChoice]" @click="cycleTheme">
|
||||
<template #icon>
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html, body, #app, .n-config-provider, .n-message-provider, .n-dialog-provider, .app-root { margin: 0; height: 100%; }
|
||||
html:has(.gate),
|
||||
html:has(.gate) body { overflow-x: hidden; }
|
||||
body { background: var(--bg); }
|
||||
button, input, select { font: inherit; }
|
||||
::selection { background: var(--accent-soft); }
|
||||
|
||||
Reference in New Issue
Block a user