feat: 增加用户修改密码与管理员重置密码

This commit is contained in:
guoqingshan
2026-08-01 21:11:03 +08:00
parent ea9103d765
commit 1e84e8e210
8 changed files with 167 additions and 4 deletions
+36 -2
View File
@@ -46,13 +46,13 @@ body {
/* User area and stats */
#user-area {
display: flex; align-items: center; gap: 0.4rem;
display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
padding: 0.6rem 1rem;
border-top: 1px solid var(--border);
font-size: 0.8rem;
flex-shrink: 0;
}
#user-area #user-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#user-area #user-name { flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#user-area button, #user-area a {
background: none; border: 1px solid var(--border); border-radius: 4px;
padding: 0.25rem 0.5rem; font-size: 0.75rem; cursor: pointer;
@@ -338,6 +338,40 @@ body {
}
#settings-modal-box .btn-confirm { background: var(--accent); color: #fff; border-color: var(--accent); }
/* Change password modal */
#password-modal-overlay {
display: none;
position: fixed; inset: 0;
background: rgba(0,0,0,0.4);
align-items: center; justify-content: center;
z-index: 130;
}
#password-modal-overlay.show { display: flex; }
#password-modal-box {
background: var(--panel-bg); border-radius: var(--radius);
padding: 1.5rem; max-width: 420px; width: 90%;
box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
#password-modal-box h3 { font-size: 1rem; margin-bottom: 0.75rem; }
#password-modal-box label { display: block; font-size: 0.8rem; color: var(--text-muted); margin: 0.6rem 0 0.25rem; }
#password-modal-box input {
width: 100%; border: 1px solid var(--border); border-radius: 6px;
padding: 0.45rem 0.6rem; font-size: 0.85rem;
background: var(--bg); color: var(--text); outline: none;
}
#password-modal-box input:focus { border-color: var(--accent); }
#password-msg {
min-height: 1.4em; font-size: 0.8rem; color: var(--danger);
margin-top: 0.6rem;
}
#password-modal-box .modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
#password-modal-box .modal-actions button {
padding: 0.4rem 1rem; border-radius: 6px; border: 1px solid var(--border);
cursor: pointer; font-size: 0.85rem;
}
#password-modal-box .btn-cancel { background: var(--panel-bg); color: var(--text); }
#password-modal-box .btn-confirm { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (max-width: 768px) {
body { padding: 0; }
#mobile-nav {