diff --git a/src/vitals/web/app.py b/src/vitals/web/app.py index ea28bcf..e1903d0 100644 --- a/src/vitals/web/app.py +++ b/src/vitals/web/app.py @@ -3064,6 +3064,34 @@ def get_admin_page_html() -> str: color: #ef4444; margin-bottom: 16px; } + /* 移动端适配 */ + @media (max-width: 768px) { + .nav { display: none !important; } + body { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } + .container { padding: 12px; } + header { padding: 20px 16px; margin-bottom: 16px; } + header h1 { font-size: 1.5rem; } + .card { padding: 16px; margin-bottom: 16px; } + .card h2 { font-size: 1.1rem; flex-direction: column; align-items: flex-start; gap: 12px; } + /* 表格改为卡片列表 */ + table, thead, tbody, th, td, tr { display: block; } + thead { display: none; } + tr { background: #f8f9fa; border-radius: 8px; padding: 12px; margin-bottom: 12px; border: 1px solid #e2e8f0; } + td { padding: 8px 0; border: none; display: flex; justify-content: space-between; align-items: center; } + td:before { content: attr(data-label); font-weight: 600; color: #64748b; font-size: 0.85rem; } + /* 按钮触摸目标 */ + .btn { min-height: 44px; padding: 12px 16px; font-size: 1rem; } + .btn-sm { min-height: 40px; padding: 10px 14px; } + /* 表单输入框 */ + .form-group input, .form-group select { font-size: 16px; min-height: 48px; padding: 14px 16px; } + /* 模态框 */ + .modal-content { margin: 12px; padding: 20px; } + .modal-footer { flex-direction: column; gap: 10px; } + .modal-footer .btn { width: 100%; } + /* 操作按钮组 */ + .action-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; } + .action-buttons .btn { flex: 1; min-width: 80px; } + }
@@ -3283,22 +3311,24 @@ def get_admin_page_html() -> str: const tbody = document.getElementById('usersBody'); tbody.innerHTML = users.map(user => `