From bab2433c1348c98757929b0629c22104384d4e42 Mon Sep 17 00:00:00 2001 From: shirainbown Date: Fri, 19 Jun 2026 15:10:13 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E8=AE=BF=E5=AE=A23=E5=88=97=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=EF=BC=8C=E7=AE=A1=E7=90=86=E5=91=982=E5=88=97?= =?UTF-8?q?=EF=BC=8C=E7=BB=9F=E4=B8=80Material=E5=8D=A1=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/MachineList.vue | 72 ++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 26 deletions(-) diff --git a/web/src/views/MachineList.vue b/web/src/views/MachineList.vue index 3b62a70..ffd5de8 100644 --- a/web/src/views/MachineList.vue +++ b/web/src/views/MachineList.vue @@ -553,20 +553,23 @@ function formatTime(t) { .cards-grid { display: grid; - grid-template-columns: repeat(2, 1fr); - gap: 20px; + grid-template-columns: repeat(3, 1fr); + gap: 16px; } -@media (max-width: 900px) { +@media (max-width: 1200px) { + .cards-grid { grid-template-columns: repeat(2, 1fr); } +} +@media (max-width: 768px) { .cards-grid { grid-template-columns: 1fr; } } /* ─── Material Design 访客卡片 ─── */ .material-card { position: relative; - border-radius: 16px; + border-radius: 12px; border: 1px solid var(--border); - padding: 16px; - min-height: 180px; + padding: 12px 14px; + min-height: 140px; cursor: default; transition: all 0.2s ease; overflow: hidden; @@ -578,7 +581,7 @@ function formatTime(t) { border-color: var(--border-strong); } .material-card.offline-card { - opacity: 0.6; + opacity: 0.55; } .material-content { @@ -591,18 +594,18 @@ function formatTime(t) { display: flex; align-items: center; justify-content: space-between; - margin-bottom: 10px; + margin-bottom: 6px; } .status-indicator { display: flex; align-items: center; - gap: 6px; + gap: 4px; } .status-dot { - width: 8px; - height: 8px; + width: 6px; + height: 6px; border-radius: 50%; display: inline-block; position: relative; @@ -618,43 +621,44 @@ function formatTime(t) { @keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); } - 70% { box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); } + 70% { box-shadow: 0 0 0 5px rgba(76, 175, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); } } .status-text { - font-size: 12px; + font-size: 11px; font-weight: 600; } .status-text.online { color: var(--success); } .status-text.offline { color: var(--text-muted); } .material-ip { - font-size: 11px; + font-size: 10px; font-weight: 500; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; } .material-hostname { - font-size: 15px; + font-size: 14px; font-weight: 700; color: var(--text-primary); - margin-bottom: 4px; + margin-bottom: 2px; line-height: 1.3; } .material-os { display: flex; align-items: center; - gap: 6px; - font-size: 12px; + gap: 5px; + font-size: 11px; color: var(--text-secondary); - margin-bottom: 12px; + margin-bottom: 8px; + flex-wrap: wrap; } .os-dot { - width: 6px; - height: 6px; + width: 5px; + height: 5px; border-radius: 50%; flex-shrink: 0; } @@ -662,14 +666,14 @@ function formatTime(t) { .material-progress-list { display: flex; flex-direction: column; - gap: 8px; + gap: 5px; margin-top: auto; } .progress-item { display: flex; flex-direction: column; - gap: 3px; + gap: 2px; } .progress-label-row { @@ -679,13 +683,13 @@ function formatTime(t) { } .progress-label { - font-size: 11px; + font-size: 10px; font-weight: 500; color: var(--text-muted); } .progress-value { - font-size: 12px; + font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-primary); @@ -696,7 +700,7 @@ function formatTime(t) { .progress-track { width: 100%; - height: 4px; + height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; @@ -708,6 +712,22 @@ function formatTime(t) { transition: width 0.6s ease; } +.material-card.admin-card { + cursor: pointer; +} +.material-card.admin-card:hover { + transform: translateY(-3px); + box-shadow: var(--shadow-lg); + border-color: var(--border-strong); +} + +.material-extra { + margin-top: 8px; + display: flex; + flex-direction: column; + gap: 5px; +} + /* ─── 管理员卡片(保持原有) ─── */ .server-card { position: relative;