2026-04-19 14:18:20 +08:00
|
|
|
|
<script setup lang="ts">
|
2026-05-02 19:25:15 +08:00
|
|
|
|
import { computed, onBeforeUnmount, onMounted, reactive, ref, watch } from 'vue'
|
2026-05-01 20:39:09 +08:00
|
|
|
|
import { DEFAULT_API_BASE_URL, useDesktopSession } from '../composables/useDesktopSession'
|
2026-04-19 14:18:20 +08:00
|
|
|
|
|
2026-05-01 20:39:09 +08:00
|
|
|
|
const { apiBaseURL, error, pending, setApiBaseURL, login } = useDesktopSession()
|
2026-04-19 14:18:20 +08:00
|
|
|
|
|
2026-05-01 20:39:09 +08:00
|
|
|
|
const menuOpen = ref(false)
|
|
|
|
|
|
const showServerDialog = ref(false)
|
2026-05-02 19:25:15 +08:00
|
|
|
|
const showPassword = ref(false)
|
2026-05-14 21:49:27 +08:00
|
|
|
|
const legacySavedIdentifier =
|
2026-05-01 20:39:09 +08:00
|
|
|
|
localStorage.getItem('geo_rankly_saved_identifier') ??
|
|
|
|
|
|
localStorage.getItem('geo_rankly_saved_email') ??
|
|
|
|
|
|
''
|
2026-05-14 21:49:27 +08:00
|
|
|
|
const rememberCredentials = ref(!!legacySavedIdentifier)
|
2026-04-19 14:18:20 +08:00
|
|
|
|
|
|
|
|
|
|
const form = reactive({
|
|
|
|
|
|
apiBaseURL: apiBaseURL.value,
|
2026-05-14 21:49:27 +08:00
|
|
|
|
identifier: legacySavedIdentifier,
|
2026-05-14 11:05:20 +08:00
|
|
|
|
password: '',
|
2026-05-01 20:39:09 +08:00
|
|
|
|
})
|
2026-04-19 14:18:20 +08:00
|
|
|
|
|
2026-05-01 20:39:09 +08:00
|
|
|
|
const menuRef = ref<HTMLElement | null>(null)
|
2026-04-22 00:24:21 +08:00
|
|
|
|
|
|
|
|
|
|
function toggleMenu() {
|
2026-05-01 20:39:09 +08:00
|
|
|
|
menuOpen.value = !menuOpen.value
|
2026-04-22 00:24:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-14 21:49:27 +08:00
|
|
|
|
async function onRememberChange(event: Event) {
|
|
|
|
|
|
rememberCredentials.value = (event.target as HTMLInputElement).checked
|
|
|
|
|
|
if (!rememberCredentials.value) {
|
|
|
|
|
|
await clearSavedCredentials()
|
|
|
|
|
|
}
|
2026-04-27 20:07:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
function handleOutsideClick(event: MouseEvent) {
|
2026-05-01 20:39:09 +08:00
|
|
|
|
if (!menuOpen.value) return
|
|
|
|
|
|
const root = menuRef.value
|
2026-04-22 00:24:21 +08:00
|
|
|
|
if (root && !root.contains(event.target as Node)) {
|
2026-05-01 20:39:09 +08:00
|
|
|
|
menuOpen.value = false
|
2026-04-22 00:24:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function openServerSettings() {
|
2026-05-01 20:39:09 +08:00
|
|
|
|
menuOpen.value = false
|
|
|
|
|
|
form.apiBaseURL = apiBaseURL.value
|
|
|
|
|
|
showServerDialog.value = true
|
2026-04-22 00:24:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function closeServerSettings() {
|
2026-05-01 20:39:09 +08:00
|
|
|
|
showServerDialog.value = false
|
2026-04-22 00:24:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function saveServerSettings() {
|
2026-05-01 20:39:09 +08:00
|
|
|
|
setApiBaseURL(form.apiBaseURL)
|
|
|
|
|
|
showServerDialog.value = false
|
2026-04-22 00:24:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-19 14:18:20 +08:00
|
|
|
|
async function submitLogin() {
|
|
|
|
|
|
await login({
|
2026-05-01 18:02:00 +08:00
|
|
|
|
identifier: form.identifier,
|
2026-04-19 14:18:20 +08:00
|
|
|
|
password: form.password,
|
2026-05-01 20:39:09 +08:00
|
|
|
|
})
|
2026-05-14 21:49:27 +08:00
|
|
|
|
await persistCredentialsPreference()
|
2026-05-01 20:39:09 +08:00
|
|
|
|
await window.desktopBridge?.app?.setWindowMode?.('main', { source: 'login' })
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
2026-04-22 00:24:21 +08:00
|
|
|
|
|
2026-05-14 21:49:27 +08:00
|
|
|
|
async function hydrateSavedCredentials() {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const saved = await window.desktopBridge?.app?.getLoginCredentials?.()
|
|
|
|
|
|
if (!saved) return
|
|
|
|
|
|
form.identifier = saved.identifier
|
|
|
|
|
|
form.password = saved.password
|
|
|
|
|
|
rememberCredentials.value = true
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
console.warn('[login-view] load saved credentials failed', err)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async function clearSavedCredentials() {
|
|
|
|
|
|
localStorage.removeItem('geo_rankly_saved_identifier')
|
|
|
|
|
|
localStorage.removeItem('geo_rankly_saved_email')
|
|
|
|
|
|
localStorage.removeItem('geo_rankly_saved_password')
|
|
|
|
|
|
try {
|
|
|
|
|
|
await window.desktopBridge?.app?.clearLoginCredentials?.()
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
console.warn('[login-view] clear saved credentials failed', err)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async function persistCredentialsPreference() {
|
|
|
|
|
|
if (!rememberCredentials.value) {
|
|
|
|
|
|
await clearSavedCredentials()
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const identifier = form.identifier.trim()
|
|
|
|
|
|
localStorage.setItem('geo_rankly_saved_identifier', identifier)
|
|
|
|
|
|
localStorage.removeItem('geo_rankly_saved_email')
|
|
|
|
|
|
localStorage.removeItem('geo_rankly_saved_password')
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
await window.desktopBridge?.app?.saveLoginCredentials?.({
|
|
|
|
|
|
identifier,
|
|
|
|
|
|
password: form.password,
|
|
|
|
|
|
})
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
console.warn('[login-view] save credentials failed', err)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-02 19:25:15 +08:00
|
|
|
|
const lockCountdown = ref(0)
|
|
|
|
|
|
let countdownTimer: ReturnType<typeof setInterval> | null = null
|
|
|
|
|
|
|
|
|
|
|
|
function clearCountdown() {
|
|
|
|
|
|
if (countdownTimer) {
|
|
|
|
|
|
clearInterval(countdownTimer)
|
|
|
|
|
|
countdownTimer = null
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
watch(error, (msg) => {
|
|
|
|
|
|
clearCountdown()
|
|
|
|
|
|
lockCountdown.value = 0
|
|
|
|
|
|
if (!msg) return
|
|
|
|
|
|
const match = msg.match(/请\s*(\d+)\s*秒后重试/)
|
|
|
|
|
|
if (!match) return
|
|
|
|
|
|
lockCountdown.value = parseInt(match[1], 10)
|
|
|
|
|
|
countdownTimer = setInterval(() => {
|
|
|
|
|
|
lockCountdown.value--
|
|
|
|
|
|
if (lockCountdown.value <= 0) clearCountdown()
|
|
|
|
|
|
}, 1000)
|
|
|
|
|
|
}, { flush: 'sync' })
|
|
|
|
|
|
|
|
|
|
|
|
const displayError = computed(() => {
|
|
|
|
|
|
if (!error.value) return null
|
|
|
|
|
|
if (error.value.startsWith('登录已被临时保护')) {
|
|
|
|
|
|
if (lockCountdown.value <= 0) return null
|
|
|
|
|
|
return error.value.replace(/\d+(?=\s*秒后重试)/, String(lockCountdown.value))
|
|
|
|
|
|
}
|
|
|
|
|
|
return error.value
|
|
|
|
|
|
})
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
onMounted(() => {
|
2026-05-01 20:39:09 +08:00
|
|
|
|
document.addEventListener('mousedown', handleOutsideClick)
|
2026-05-14 21:49:27 +08:00
|
|
|
|
void hydrateSavedCredentials()
|
2026-05-01 20:39:09 +08:00
|
|
|
|
})
|
2026-04-22 00:24:21 +08:00
|
|
|
|
|
|
|
|
|
|
onBeforeUnmount(() => {
|
2026-05-01 20:39:09 +08:00
|
|
|
|
document.removeEventListener('mousedown', handleOutsideClick)
|
2026-05-02 19:25:15 +08:00
|
|
|
|
clearCountdown()
|
2026-05-01 20:39:09 +08:00
|
|
|
|
})
|
2026-04-19 14:18:20 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
<section class="login-shell">
|
|
|
|
|
|
<div class="bg-layer">
|
|
|
|
|
|
<div class="orb orb-1"></div>
|
|
|
|
|
|
<div class="orb orb-2"></div>
|
|
|
|
|
|
<div class="orb orb-3"></div>
|
2026-04-22 00:24:21 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-05-01 20:39:09 +08:00
|
|
|
|
<div ref="menuRef" class="top-bar">
|
2026-04-22 00:24:21 +08:00
|
|
|
|
<button
|
|
|
|
|
|
type="button"
|
|
|
|
|
|
class="menu-trigger"
|
|
|
|
|
|
:class="{ active: menuOpen }"
|
|
|
|
|
|
aria-label="菜单"
|
|
|
|
|
|
@click="toggleMenu"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span></span>
|
|
|
|
|
|
<span></span>
|
|
|
|
|
|
<span></span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<div v-if="menuOpen" class="menu-dropdown">
|
2026-05-01 20:39:09 +08:00
|
|
|
|
<button type="button" class="menu-item" @click="openServerSettings">服务器设置</button>
|
2026-04-22 00:24:21 +08:00
|
|
|
|
</div>
|
2026-04-19 14:18:20 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="auth-wrapper">
|
2026-04-22 00:24:21 +08:00
|
|
|
|
<header class="brand-header">
|
|
|
|
|
|
<div class="brand-logo">
|
|
|
|
|
|
<span class="brand-core"></span>
|
|
|
|
|
|
</div>
|
2026-05-01 11:03:55 +08:00
|
|
|
|
<h1 class="brand-name">省心推</h1>
|
2026-04-22 00:24:21 +08:00
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
|
|
<form class="login-form" @submit.prevent="submitLogin">
|
|
|
|
|
|
<div class="field">
|
|
|
|
|
|
<input
|
2026-05-01 18:02:00 +08:00
|
|
|
|
v-model.trim="form.identifier"
|
|
|
|
|
|
type="text"
|
2026-04-22 00:24:21 +08:00
|
|
|
|
autocomplete="username"
|
2026-05-01 18:02:00 +08:00
|
|
|
|
placeholder="邮箱 / 手机号"
|
2026-04-22 00:24:21 +08:00
|
|
|
|
required
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
2026-04-19 14:18:20 +08:00
|
|
|
|
|
2026-05-02 19:25:15 +08:00
|
|
|
|
<div class="field field--password">
|
2026-04-22 00:24:21 +08:00
|
|
|
|
<input
|
|
|
|
|
|
v-model="form.password"
|
2026-05-02 19:25:15 +08:00
|
|
|
|
:type="showPassword ? 'text' : 'password'"
|
2026-04-22 00:24:21 +08:00
|
|
|
|
autocomplete="current-password"
|
|
|
|
|
|
placeholder="密码"
|
|
|
|
|
|
required
|
|
|
|
|
|
/>
|
2026-05-02 19:25:15 +08:00
|
|
|
|
<button type="button" class="eye-toggle" tabindex="-1" @click="showPassword = !showPassword">
|
|
|
|
|
|
<svg v-if="showPassword" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
|
|
|
|
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>
|
|
|
|
|
|
<circle cx="12" cy="12" r="3"/>
|
|
|
|
|
|
</svg>
|
|
|
|
|
|
<svg v-else xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
|
|
|
|
<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/>
|
|
|
|
|
|
<path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/>
|
|
|
|
|
|
<line x1="1" y1="1" x2="23" y2="23"/>
|
|
|
|
|
|
</svg>
|
|
|
|
|
|
</button>
|
2026-04-22 00:24:21 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="options-row">
|
|
|
|
|
|
<label class="check-label">
|
2026-05-14 21:49:27 +08:00
|
|
|
|
<input type="checkbox" :checked="rememberCredentials" @change="onRememberChange" />
|
|
|
|
|
|
<span>记住账号和密码</span>
|
2026-04-19 14:18:20 +08:00
|
|
|
|
</label>
|
2026-04-22 00:24:21 +08:00
|
|
|
|
</div>
|
2026-04-19 14:18:20 +08:00
|
|
|
|
|
2026-05-02 19:25:15 +08:00
|
|
|
|
<button type="submit" class="submit-button" :disabled="pending || lockCountdown > 0">
|
2026-05-01 20:39:09 +08:00
|
|
|
|
{{ pending ? '登录中...' : '登 录' }}
|
2026-04-22 00:24:21 +08:00
|
|
|
|
</button>
|
2026-04-19 14:18:20 +08:00
|
|
|
|
|
2026-05-02 19:25:15 +08:00
|
|
|
|
<p v-if="displayError" class="error-text">{{ displayError }}</p>
|
2026-04-22 00:24:21 +08:00
|
|
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<Transition name="fade">
|
2026-05-01 20:39:09 +08:00
|
|
|
|
<div v-if="showServerDialog" class="dialog-mask" @click.self="closeServerSettings">
|
2026-04-22 00:24:21 +08:00
|
|
|
|
<div class="dialog" role="dialog" aria-modal="true">
|
|
|
|
|
|
<header class="dialog-header">
|
|
|
|
|
|
<h3>服务器设置</h3>
|
|
|
|
|
|
<button
|
|
|
|
|
|
type="button"
|
|
|
|
|
|
class="dialog-close"
|
|
|
|
|
|
aria-label="关闭"
|
|
|
|
|
|
@click="closeServerSettings"
|
|
|
|
|
|
>
|
|
|
|
|
|
×
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
<div class="dialog-body">
|
|
|
|
|
|
<label class="dialog-field">
|
2026-04-19 14:18:20 +08:00
|
|
|
|
<span>网关 API 地址</span>
|
|
|
|
|
|
<input
|
|
|
|
|
|
v-model.trim="form.apiBaseURL"
|
|
|
|
|
|
type="text"
|
2026-04-30 22:00:01 +08:00
|
|
|
|
:placeholder="DEFAULT_API_BASE_URL"
|
2026-04-19 14:18:20 +08:00
|
|
|
|
spellcheck="false"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
2026-04-22 00:24:21 +08:00
|
|
|
|
<footer class="dialog-footer">
|
2026-05-01 20:39:09 +08:00
|
|
|
|
<button type="button" class="btn-ghost" @click="closeServerSettings">取消</button>
|
|
|
|
|
|
<button type="button" class="btn-primary" @click="saveServerSettings">保存</button>
|
2026-04-22 00:24:21 +08:00
|
|
|
|
</footer>
|
2026-04-19 14:18:20 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-04-22 00:24:21 +08:00
|
|
|
|
</Transition>
|
2026-04-19 14:18:20 +08:00
|
|
|
|
</section>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.login-shell {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
height: 100vh;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
overflow: hidden;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
background: linear-gradient(180deg, #eaf2ff 0%, #e4ecff 40%, #e8efff 100%);
|
|
|
|
|
|
padding: 0 24px 28px;
|
|
|
|
|
|
-webkit-app-region: drag;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.login-shell input,
|
|
|
|
|
|
.login-shell button,
|
|
|
|
|
|
.login-shell a,
|
2026-04-27 20:07:18 +08:00
|
|
|
|
.login-shell label,
|
|
|
|
|
|
.login-shell .options-row,
|
|
|
|
|
|
.login-shell .options-row * {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
-webkit-app-region: no-drag;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bg-layer {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
inset: 0;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
z-index: 0;
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.orb {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
filter: blur(60px);
|
2026-04-22 00:24:21 +08:00
|
|
|
|
opacity: 0.55;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.orb-1 {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
width: 520px;
|
|
|
|
|
|
height: 520px;
|
|
|
|
|
|
background: radial-gradient(circle, rgba(120, 170, 255, 0.45), rgba(120, 170, 255, 0));
|
|
|
|
|
|
top: -180px;
|
|
|
|
|
|
left: -160px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.orb-2 {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
width: 420px;
|
|
|
|
|
|
height: 420px;
|
|
|
|
|
|
background: radial-gradient(circle, rgba(180, 210, 255, 0.5), rgba(180, 210, 255, 0));
|
|
|
|
|
|
bottom: -140px;
|
|
|
|
|
|
right: -120px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.orb-3 {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
width: 300px;
|
|
|
|
|
|
height: 300px;
|
|
|
|
|
|
background: radial-gradient(circle, rgba(200, 220, 255, 0.45), rgba(200, 220, 255, 0));
|
|
|
|
|
|
top: 55%;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
left: 60%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.top-bar {
|
2026-04-19 14:18:20 +08:00
|
|
|
|
position: absolute;
|
2026-05-01 18:02:52 +08:00
|
|
|
|
top: 34px;
|
|
|
|
|
|
right: 14px;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
z-index: 10;
|
|
|
|
|
|
-webkit-app-region: no-drag;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-01 20:39:09 +08:00
|
|
|
|
:global(html[data-platform='darwin']) .top-bar {
|
2026-05-01 18:02:52 +08:00
|
|
|
|
left: 52px;
|
|
|
|
|
|
right: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.menu-trigger {
|
|
|
|
|
|
width: 28px;
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
gap: 3px;
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
transition: background 0.2s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.menu-trigger span {
|
|
|
|
|
|
width: 14px;
|
|
|
|
|
|
height: 2px;
|
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
background: #3a4a66;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.menu-trigger:hover,
|
|
|
|
|
|
.menu-trigger.active {
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.85);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.menu-dropdown {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 44px;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
min-width: 140px;
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
box-shadow: 0 12px 32px rgba(31, 58, 112, 0.18);
|
|
|
|
|
|
padding: 8px;
|
|
|
|
|
|
animation: dropdown-in 0.15s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes dropdown-in {
|
|
|
|
|
|
from {
|
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
transform: translateY(-4px);
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
2026-04-22 00:24:21 +08:00
|
|
|
|
to {
|
|
|
|
|
|
opacity: 1;
|
|
|
|
|
|
transform: translateY(0);
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.menu-item {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #1f2937;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
transition: background 0.15s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.menu-item:hover {
|
|
|
|
|
|
background: #f2f6ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-19 14:18:20 +08:00
|
|
|
|
.auth-wrapper {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
width: 100%;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
max-width: 280px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
|
animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes slideUpFade {
|
|
|
|
|
|
0% {
|
|
|
|
|
|
opacity: 0;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
transform: translateY(12px);
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
100% {
|
|
|
|
|
|
opacity: 1;
|
|
|
|
|
|
transform: translateY(0);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.brand-header {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
margin-bottom: 18px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.brand-logo {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
width: 72px;
|
|
|
|
|
|
height: 72px;
|
|
|
|
|
|
border-radius: 50%;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
display: grid;
|
|
|
|
|
|
place-items: center;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%);
|
2026-05-01 20:39:09 +08:00
|
|
|
|
box-shadow:
|
|
|
|
|
|
0 10px 22px rgba(22, 119, 255, 0.28),
|
|
|
|
|
|
inset 0 1px 0 rgba(255, 255, 255, 0.35);
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.brand-core {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
width: 26px;
|
|
|
|
|
|
height: 26px;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
box-shadow: 0 2px 8px rgba(22, 119, 255, 0.25);
|
|
|
|
|
|
position: relative;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.brand-core::after {
|
2026-05-01 20:39:09 +08:00
|
|
|
|
content: '';
|
2026-04-22 00:24:21 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
|
inset: 7px;
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
background: linear-gradient(135deg, #1677ff, #69b1ff);
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.brand-name {
|
|
|
|
|
|
margin: 10px 0 0;
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
letter-spacing: 0.02em;
|
|
|
|
|
|
color: #1f2937;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.login-form {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 10px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.field input {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
width: 100%;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
height: 40px;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
padding: 0 14px;
|
|
|
|
|
|
border: 1px solid transparent;
|
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
background: #ffffff;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
font-size: 14px;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
color: #1f2937;
|
|
|
|
|
|
box-shadow: 0 4px 12px rgba(31, 58, 112, 0.08);
|
2026-05-01 20:39:09 +08:00
|
|
|
|
transition:
|
|
|
|
|
|
border-color 0.2s ease,
|
|
|
|
|
|
box-shadow 0.2s ease;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
outline: none;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
box-sizing: border-box;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.field input::placeholder {
|
|
|
|
|
|
color: #9aa4b8;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.field input:focus {
|
|
|
|
|
|
border-color: #1677ff;
|
2026-05-01 20:39:09 +08:00
|
|
|
|
box-shadow:
|
|
|
|
|
|
0 4px 14px rgba(31, 58, 112, 0.08),
|
|
|
|
|
|
0 0 0 3px rgba(22, 119, 255, 0.12);
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-02 19:25:15 +08:00
|
|
|
|
.field--password {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.field--password input {
|
|
|
|
|
|
padding-right: 42px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.eye-toggle {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 10px;
|
|
|
|
|
|
top: 50%;
|
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
width: 24px;
|
|
|
|
|
|
height: 24px;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
color: #9aa4b8;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.eye-toggle:hover {
|
|
|
|
|
|
color: #1677ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.eye-toggle svg {
|
|
|
|
|
|
width: 16px;
|
|
|
|
|
|
height: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.options-row {
|
2026-04-19 14:18:20 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-end;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
padding: 2px 4px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.check-label {
|
2026-04-19 14:18:20 +08:00
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
user-select: none;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
color: #6b7280;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-01 20:39:09 +08:00
|
|
|
|
.check-label input[type='checkbox'] {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
width: 16px;
|
|
|
|
|
|
height: 16px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
accent-color: #1677ff;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
margin: 0;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.submit-button {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
margin-top: 6px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
height: 40px;
|
|
|
|
|
|
background: #1677ff;
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
border: none;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
font-size: 14px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
font-weight: 500;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
letter-spacing: 0.4em;
|
|
|
|
|
|
padding-left: 0.4em;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
cursor: pointer;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
box-shadow: 0 6px 16px rgba(22, 119, 255, 0.25);
|
2026-05-01 20:39:09 +08:00
|
|
|
|
transition:
|
|
|
|
|
|
background 0.2s ease,
|
|
|
|
|
|
transform 0.1s ease;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.submit-button:hover:not(:disabled) {
|
|
|
|
|
|
background: #4096ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.submit-button:active:not(:disabled) {
|
|
|
|
|
|
transform: translateY(1px);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-19 14:18:20 +08:00
|
|
|
|
.submit-button:disabled {
|
2026-04-22 00:24:21 +08:00
|
|
|
|
opacity: 0.65;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
cursor: not-allowed;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
box-shadow: none;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.error-text {
|
|
|
|
|
|
margin: 4px 0 0;
|
|
|
|
|
|
padding: 10px 12px;
|
|
|
|
|
|
background: rgba(255, 77, 79, 0.08);
|
|
|
|
|
|
border: 1px solid rgba(255, 77, 79, 0.3);
|
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
color: #d9363e;
|
|
|
|
|
|
font-size: 13px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.dialog-mask {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
inset: 0;
|
|
|
|
|
|
background: rgba(17, 24, 39, 0.35);
|
|
|
|
|
|
backdrop-filter: blur(4px);
|
|
|
|
|
|
-webkit-backdrop-filter: blur(4px);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
z-index: 100;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.dialog {
|
|
|
|
|
|
width: min(360px, calc(100vw - 32px));
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
|
box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.dialog-header {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
padding: 16px 20px;
|
|
|
|
|
|
border-bottom: 1px solid #eef1f6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.dialog-header h3 {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #1f2937;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.dialog-close {
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
color: #9aa4b8;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
cursor: pointer;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
|
border-radius: 6px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.dialog-close:hover {
|
2026-05-02 19:25:15 +08:00
|
|
|
|
background: #fff0f0;
|
|
|
|
|
|
color: #e53935;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.dialog-close:active {
|
|
|
|
|
|
background: #ffe0e0;
|
|
|
|
|
|
color: #c62828;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.dialog-body {
|
|
|
|
|
|
padding: 18px 20px 8px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.dialog-field {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 8px;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.dialog-field span {
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
color: #4b5563;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.dialog-field input {
|
|
|
|
|
|
height: 38px;
|
|
|
|
|
|
padding: 0 12px;
|
|
|
|
|
|
border: 1px solid #d6dde8;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #1f2937;
|
|
|
|
|
|
outline: none;
|
2026-05-01 20:39:09 +08:00
|
|
|
|
transition:
|
|
|
|
|
|
border-color 0.2s ease,
|
|
|
|
|
|
box-shadow 0.2s ease;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.dialog-field input:focus {
|
|
|
|
|
|
border-color: #1677ff;
|
|
|
|
|
|
box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.dialog-hint {
|
|
|
|
|
|
margin: 10px 0 0;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
font-size: 12px;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
color: #9aa4b8;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 00:24:21 +08:00
|
|
|
|
.dialog-footer {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
padding: 14px 20px 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-ghost,
|
|
|
|
|
|
.btn-primary {
|
|
|
|
|
|
height: 34px;
|
|
|
|
|
|
padding: 0 16px;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
border: 1px solid transparent;
|
2026-05-01 20:39:09 +08:00
|
|
|
|
transition:
|
|
|
|
|
|
background 0.2s ease,
|
|
|
|
|
|
border-color 0.2s ease;
|
2026-04-22 00:24:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-ghost {
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
border-color: #d6dde8;
|
|
|
|
|
|
color: #4b5563;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-ghost:hover {
|
|
|
|
|
|
background: #f6f8fc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-primary {
|
|
|
|
|
|
background: #1677ff;
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-primary:hover {
|
|
|
|
|
|
background: #4096ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.fade-enter-active,
|
|
|
|
|
|
.fade-leave-active {
|
|
|
|
|
|
transition: opacity 0.18s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.fade-enter-from,
|
|
|
|
|
|
.fade-leave-to {
|
|
|
|
|
|
opacity: 0;
|
2026-04-19 14:18:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|