fix icon and passwd fill
This commit is contained in:
parent
573cf9feb5
commit
ada8c291a2
@ -67,6 +67,7 @@ body {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 角色容器 */
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="./assets/login-animated.css?v=20251231-1427" />
|
||||
<link rel="stylesheet" href="./assets/login-animated.css?v=20250511-1445" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-page">
|
||||
@ -77,22 +77,22 @@
|
||||
<p>请输入您的登录信息</p>
|
||||
</div>
|
||||
|
||||
<form class="login-form" onsubmit="return false;">
|
||||
<form class="login-form" id="login-form" autocomplete="on">
|
||||
<div class="form-group">
|
||||
<label for="username">用户名</label>
|
||||
<input type="text" id="username" class="form-input" placeholder="请输入用户名" required autocomplete="username">
|
||||
<input type="text" id="username" name="username" class="form-input" placeholder="请输入用户名" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password">密码</label>
|
||||
<div class="password-wrapper">
|
||||
<input type="text" id="password" class="form-input" placeholder="请输入密码" required autocomplete="current-password">
|
||||
<button type="button" class="password-toggle" id="password-toggle" aria-label="隐藏密码">
|
||||
<svg class="eye-icon eye-open" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<input type="password" id="password" name="password" class="form-input" placeholder="请输入密码" required>
|
||||
<button type="button" class="password-toggle" id="password-toggle" aria-label="显示密码">
|
||||
<svg class="eye-icon eye-open" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="display:none;">
|
||||
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
|
||||
<circle cx="12" cy="12" r="3"></circle>
|
||||
</svg>
|
||||
<svg class="eye-icon eye-closed" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="display:none;">
|
||||
<svg class="eye-icon eye-closed" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<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.94M9.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.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path>
|
||||
<line x1="1" y1="1" x2="23" y2="23"></line>
|
||||
</svg>
|
||||
@ -112,7 +112,7 @@
|
||||
|
||||
<div id="error-message" class="error-message" style="display:none;"></div>
|
||||
|
||||
<button type="button" id="login-btn" class="login-button">
|
||||
<button type="submit" id="login-btn" class="login-button">
|
||||
<span id="login-text">登录</span>
|
||||
<span id="login-loader" class="btn-loader" style="display:none;">
|
||||
<span class="dot"></span>
|
||||
@ -274,7 +274,10 @@ async function handleLogin() {
|
||||
}
|
||||
}
|
||||
|
||||
loginBtn.addEventListener('click', handleLogin);
|
||||
document.getElementById('login-form').addEventListener('submit', (e) => {
|
||||
e.preventDefault();
|
||||
handleLogin();
|
||||
});
|
||||
|
||||
// 回车键登录
|
||||
usernameInput.addEventListener('keypress', (e) => {
|
||||
@ -553,7 +556,7 @@ passwordInput.addEventListener('input', () => {
|
||||
updatePupilPositions();
|
||||
});
|
||||
|
||||
// 密码可见性切换(默认显示,点击隐藏)
|
||||
// 密码可见性切换(默认隐藏,点击显示)
|
||||
passwordToggle.addEventListener('click', () => {
|
||||
const type = passwordInput.getAttribute('type');
|
||||
const eyeOpen = passwordToggle.querySelector('.eye-open');
|
||||
|
||||
@ -8927,6 +8927,15 @@ def get_stations():
|
||||
return jsonify({'success': False, 'error': str(e)})
|
||||
|
||||
|
||||
@app.get('/icon.ico')
|
||||
def favicon():
|
||||
"""提供网站图标"""
|
||||
icon_path = os.path.join(os.path.dirname(BASE_DIR), 'icon.ico')
|
||||
if os.path.exists(icon_path):
|
||||
return send_file(icon_path, mimetype='image/x-icon')
|
||||
return '', 404
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("🚀 启动服务器(已启用静态资源缓存)...")
|
||||
app.run(host='0.0.0.0', port=int(os.environ.get('PORT', '5000')), threaded=True)
|
||||
|
||||
BIN
server/data.db
BIN
server/data.db
Binary file not shown.
Loading…
Reference in New Issue
Block a user