From 56975f9b0debd60a06f0c21da8c80ba4fd9142ce Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Thu, 23 Apr 2026 16:50:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=AD=9B=E9=80=89=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=8F=B3=E4=BE=A7=E5=9B=BA=E5=AE=9A=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 36 ++++++++++++++++++++++++------------ logs/app.log | 42 ++++++++++++++++++++++++++++-------------- 2 files changed, 52 insertions(+), 26 deletions(-) diff --git a/app.py b/app.py index 4b8d401..c80e9ee 100644 --- a/app.py +++ b/app.py @@ -959,6 +959,17 @@ HTML_TEMPLATE = ''' .nav-btn:hover { background: #475569; transform: scale(1.1); } .nav-btn i { font-size: 20px; color: #94a3b8; } .nav-btn:hover i { color: #f1f5f9; } + .filter-nav { position: fixed; right: 20px; top: 120px; z-index: 100; display: flex; flex-direction: column; gap: 6px; } + .filter-nav-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; background: #1e293b; border: 1px solid #334155; } + .filter-nav-btn:hover { background: #334155; transform: scale(1.1); } + .filter-nav-btn i { font-size: 18px; color: #94a3b8; } + .filter-nav-btn:hover i { color: #f1f5f9; } + .filter-nav-btn.active { background: #3b82f6; border-color: #3b82f6; } + .filter-nav-btn.active i { color: #fff; } + .filter-nav-btn.add-btn { background: #22c55e; border-color: #22c55e; } + .filter-nav-btn.add-btn i { color: #fff; } + .filter-nav-btn.add-btn:hover { background: #16a34a; } + .filter-nav-divider { height: 1px; background: #475569; margin: 4px 8px; } .tab-btn { border-bottom: 2px solid transparent; } .tab-btn.active { border-bottom-color: #3b82f6; } .cron-card { transition: all 0.2s; } @@ -1057,15 +1068,15 @@ HTML_TEMPLATE = ''' - -
- - - - - + +
+ + + + + +
+
@@ -1380,9 +1391,8 @@ HTML_TEMPLATE = ''' function filterType(type) { currentFilter = type; - document.querySelectorAll('.filter-btn').forEach(btn => { - btn.classList.toggle('bg-blue-600', btn.dataset.type === type); - btn.classList.toggle('bg-gray-700', btn.dataset.type !== type); + document.querySelectorAll('.filter-nav-btn').forEach(btn => { + btn.classList.toggle('active', btn.dataset.type === type); }); renderProjects(); } @@ -2126,6 +2136,8 @@ HTML_TEMPLATE = ''' // 初始化 loadProjects(); + // 默认选中"全部"筛选按钮 + document.querySelector('.filter-nav-btn[data-type="all"]')?.classList.add('active'); let refreshIntervalMs = parseInt(localStorage.getItem('refreshInterval') || '30') * 1000; document.getElementById('refreshInterval').value = refreshIntervalMs / 1000; diff --git a/logs/app.log b/logs/app.log index c996b69..8a01fd8 100644 --- a/logs/app.log +++ b/logs/app.log @@ -1,8 +1,8 @@ -[2026-04-23 12:56:53] ================================================== -[2026-04-23 12:56:53] 项目服务管理面板 v2.0.0 启动 -[2026-04-23 12:56:53] 访问地址: http://localhost:19013 -[2026-04-23 12:56:53] 进程PID: 1025674 -[2026-04-23 12:56:53] ================================================== +[2026-04-23 16:49:38] ================================================== +[2026-04-23 16:49:38] 项目服务管理面板 v2.0.0 启动 +[2026-04-23 16:49:38] 访问地址: http://localhost:19013 +[2026-04-23 16:49:38] 进程PID: 1115919 +[2026-04-23 16:49:38] ================================================== * Serving Flask app 'app' * Debug mode: off WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. @@ -10,12 +10,26 @@ WARNING: This is a development server. Do not use it in a production deployment. * Running on http://127.0.0.1:19013 * Running on http://192.168.2.17:19013 Press CTRL+C to quit -127.0.0.1 - - [23/Apr/2026 12:56:55] "GET / HTTP/1.1" 200 - -127.0.0.1 - - [23/Apr/2026 12:56:55] "GET / HTTP/1.1" 200 - -192.168.2.8 - - [23/Apr/2026 12:56:57] "GET /api/projects HTTP/1.1" 200 - -127.0.0.1 - - [23/Apr/2026 12:56:59] "GET / HTTP/1.1" 200 - -192.168.2.14 - - [23/Apr/2026 12:57:00] "GET /api/projects HTTP/1.1" 200 - -127.0.0.1 - - [23/Apr/2026 12:57:00] "GET / HTTP/1.1" 200 - -192.168.2.8 - - [23/Apr/2026 12:57:02] "GET /api/projects HTTP/1.1" 200 - -127.0.0.1 - - [23/Apr/2026 12:57:02] "GET / HTTP/1.1" 200 - -192.168.2.14 - - [23/Apr/2026 12:57:03] "GET /api/projects HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:49:48] "GET / HTTP/1.1" 200 - +192.168.2.8 - - [23/Apr/2026 16:49:49] "GET /api/projects HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:49:58] "GET / HTTP/1.1" 200 - +192.168.2.8 - - [23/Apr/2026 16:49:59] "GET /api/projects HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:06] "GET / HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:06] "GET / HTTP/1.1" 200 - +192.168.2.8 - - [23/Apr/2026 16:50:07] "GET /api/projects HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:08] "GET / HTTP/1.1" 200 - +192.168.2.8 - - [23/Apr/2026 16:50:09] "GET /api/projects HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:16] "GET / HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:18] "GET / HTTP/1.1" 200 - +192.168.2.8 - - [23/Apr/2026 16:50:19] "GET /api/projects HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:27] "GET / HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:28] "GET / HTTP/1.1" 200 - +192.168.2.8 - - [23/Apr/2026 16:50:29] "GET /api/projects HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:33] "GET / HTTP/1.1" 200 - +192.168.2.14 - - [23/Apr/2026 16:50:34] "GET /api/projects HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:36] "GET / HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:36] "GET / HTTP/1.1" 200 - +192.168.2.8 - - [23/Apr/2026 16:50:37] "GET /api/projects HTTP/1.1" 200 - +127.0.0.1 - - [23/Apr/2026 16:50:38] "GET / HTTP/1.1" 200 - +192.168.2.14 - - [23/Apr/2026 16:50:38] "GET /api/projects HTTP/1.1" 200 - +192.168.2.8 - - [23/Apr/2026 16:50:39] "GET /api/projects HTTP/1.1" 200 -