From de60792b7ec7ac5d9714c08e6cc57ea7f1ec70bf Mon Sep 17 00:00:00 2001 From: OoO Date: Sun, 17 May 2026 22:34:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B6=E6=96=82=E5=B8=B3=E8=99=9F?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=A0=81=E6=96=B0=E7=89=88=E6=A8=A3=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 2 +- templates/change_password.html | 138 ++++++++++++++++++++++++++++++--- templates/login_history.html | 77 ++++++++++++++++-- 3 files changed, 196 insertions(+), 21 deletions(-) diff --git a/config.py b/config.py index b028e10..c50f0a7 100644 --- a/config.py +++ b/config.py @@ -320,7 +320,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '') # ========================================== # 系統版本與路徑 # ========================================== -SYSTEM_VERSION = "V10.156" +SYSTEM_VERSION = "V10.157" LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log') public_url = PUBLIC_URL # 用於模板顯示 diff --git a/templates/change_password.html b/templates/change_password.html index ab42ff7..d1edb5e 100644 --- a/templates/change_password.html +++ b/templates/change_password.html @@ -2,12 +2,125 @@ {% block title %}修改密碼 - EwoooC{% endblock %} +{% block extra_css %} + +{% endblock %} + {% block content %} +
-
-
+
+
修改密碼
@@ -49,7 +162,7 @@
-
+
密碼要求
    {% for req in password_requirements %} @@ -72,6 +185,7 @@
+
{% endblock %} {% block extra_js %} @@ -168,24 +282,24 @@ if (/[0-9]/.test(password)) score++; if (/[!@#$%^&*]/.test(password)) score++; - let strengthText, strengthClass; + let strengthText, strengthTone; if (score < 3) { strengthText = '弱'; - strengthClass = 'text-danger'; + strengthTone = 'danger'; } else if (score < 5) { strengthText = '中等'; - strengthClass = 'text-warning'; + strengthTone = 'warning'; } else { strengthText = '強'; - strengthClass = 'text-success'; + strengthTone = 'success'; } strengthDiv.innerHTML = `
-
- 密碼強度:${strengthText} + 密碼強度:${strengthText} `; } @@ -200,16 +314,16 @@ } if (newPassword === confirmPassword) { - matchDiv.innerHTML = '密碼相符'; + matchDiv.innerHTML = '密碼相符'; } else { - matchDiv.innerHTML = '密碼不相符'; + matchDiv.innerHTML = '密碼不相符'; } } function showAlert(message, type) { const container = document.getElementById('alertContainer'); container.innerHTML = ` -