fix: 收窄短信弹窗并去掉返回按钮

This commit is contained in:
2026-11-03 08:39:06 +08:00
parent 28f3495724
commit d301acedfd
2 changed files with 37 additions and 21 deletions
+4 -4
View File
@@ -342,12 +342,12 @@ async function finishNqi() {
</section>
<n-modal v-model:show="smsRequired" :mask-closable="false" :auto-focus="false">
<div class="lv-sms-sheet" role="dialog" aria-modal="true" aria-labelledby="sms-title">
<button type="button" class="lv-sms-close" aria-label="关闭" @click="backFromSms">×</button>
<h2 id="sms-title">短信认证</h2>
<label for="login-sms">验证码</label>
<input id="login-sms" v-model="smsCode" placeholder="sms code" autocomplete="one-time-code" @keyup.enter="finishNqi" />
<div class="lv-sms-actions">
<button type="button" @click="backFromSms">返回</button>
<button type="button" :disabled="smsSending || countdown > 0" @click="sendSms">{{ countdown > 0 ? `重新发送(${countdown})` : "发送验证码" }}</button>
<div class="lv-sms-row">
<input id="login-sms" v-model="smsCode" placeholder="sms code" autocomplete="one-time-code" @keyup.enter="finishNqi" />
<button type="button" class="lv-sms-send" :disabled="smsSending || countdown > 0" @click="sendSms">{{ countdown > 0 ? `发送(${countdown})` : "发送" }}</button>
</div>
<button class="lv-sms-go" type="button" :disabled="busy || !smsCode.trim()" @click="finishNqi">{{ busy ? "提交中" : "提交" }}</button>
</div>
+33 -17
View File
@@ -200,8 +200,9 @@ html[data-theme="dark"] .gate.lv-tower {
--ink-line: #2c3038;
--field: color-mix(in srgb, var(--paper) 70%, #fff);
--muted-line: color-mix(in srgb, var(--ink-line) 42%, var(--paper));
width: min(320px, calc(100vw - 48px));
padding: 28px 24px 24px;
position: relative;
width: min(260px, calc(100vw - 48px));
padding: 28px 20px 20px;
background: var(--paper);
color: var(--ink-line);
border: 1px solid var(--ink-line);
@@ -214,9 +215,22 @@ html[data-theme="dark"] .lv-sms-sheet {
--ink-line: #e6dece;
--field: #24211b;
}
.lv-sms-close {
position: absolute;
top: 6px;
right: 8px;
width: 28px;
height: 28px;
padding: 0;
border: 0;
background: transparent;
color: var(--ink-line);
font: 22px/28px SimSun, "Songti SC", serif;
cursor: pointer;
}
.lv-sms-sheet h2 {
margin: 0 0 18px;
font-size: 22px;
font-size: 20px;
font-weight: 700;
letter-spacing: 0.12em;
text-align: center;
@@ -225,11 +239,15 @@ html[data-theme="dark"] .lv-sms-sheet {
display: block;
margin: 0 0 8px;
}
.lv-sms-row {
display: flex;
gap: 8px;
margin: 0 0 12px;
}
.lv-sms-sheet input {
display: block;
width: 100%;
flex: 1;
min-width: 0;
height: 36px;
margin: 0 0 16px;
padding: 0 8px;
border: 1px solid var(--ink-line);
border-radius: 0;
@@ -241,23 +259,20 @@ html[data-theme="dark"] .lv-sms-sheet {
}
.lv-sms-sheet input::placeholder { color: var(--muted-line); }
.lv-sms-sheet input:focus { box-shadow: inset 0 0 0 1px var(--ink-line); }
.lv-sms-actions {
display: flex;
gap: 8px;
margin: 0 0 10px;
}
.lv-sms-actions button,
.lv-sms-send,
.lv-sms-go {
height: 36px;
padding: 0 12px;
border: 1px solid var(--ink-line);
border-radius: 0;
background: var(--paper);
color: var(--ink-line);
font: inherit;
cursor: pointer;
}
.lv-sms-actions button { flex: 1; }
.lv-sms-send {
flex: none;
background: var(--paper);
color: var(--ink-line);
}
.lv-sms-go {
display: block;
width: 100%;
@@ -267,9 +282,10 @@ html[data-theme="dark"] .lv-sms-sheet {
letter-spacing: 0.3em;
font-size: 16px;
}
.lv-sms-actions button:hover,
.lv-sms-close:hover,
.lv-sms-send:hover,
.lv-sms-go:hover { filter: brightness(1.08); }
.lv-sms-actions button:disabled,
.lv-sms-send:disabled,
.lv-sms-go:disabled { opacity: 0.6; cursor: default; filter: none; }
body:has(.lv-sms-sheet) .n-modal-mask {
background: color-mix(in srgb, #2c3038 42%, transparent);