From e7ac6203022ef38bc4fbc53c8cb6f611686ae855 Mon Sep 17 00:00:00 2001 From: Julian Freeman Date: Tue, 3 Mar 2026 22:20:02 -0400 Subject: [PATCH] fix ui --- src/App.vue | 206 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 120 insertions(+), 86 deletions(-) diff --git a/src/App.vue b/src/App.vue index de6b809..8a86ec1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -920,7 +920,7 @@ watch(activeTab, (newTab) => { -
+
-
-
-
- - - - -
- {{ Math.round(memoryState.stats?.percent || 0) }}% - 内存占用 +
+ +
+
+
+ + + + +
+ {{ Math.round(memoryState.stats?.percent || 0) }}% + 内存占用 +
+
+
+ +
+
+ 已用内存 + {{ formatItemSize(memoryState.stats?.used || 0) }} +
+
+
+ 可用内存 + {{ formatItemSize(memoryState.stats?.free || 0) }} +
+
+
+ 内存总量 + {{ formatItemSize(memoryState.stats?.total || 0) }}
-
-
-
- 已用内存 - {{ formatItemSize(memoryState.stats?.used || 0) }} -
-
- 可用内存 - {{ formatItemSize(memoryState.stats?.free || 0) }} -
-
- 内存总量 - {{ formatItemSize(memoryState.stats?.total || 0) }} -
-
- -
-
-
-

普通加速

-

压缩所有进程的内存占用,不影响程序运行。

+ +
+
+
+

普通加速

+

压缩所有进程的内存工作集,释放物理内存,不影响程序运行。

+
+
- -
-
-
-

深度加速

-

清空系统备用列表(待机列表),释放更多物理空间。

+ +
+
+

深度加速

+

强制清空系统备用列表(待机列表),释放更多被缓存的物理空间。

+
+
-
- 已为您释放 {{ memoryState.lastFreed }} 内存空间 + 优化完成!已为您释放 {{ memoryState.lastFreed }} 内存空间
@@ -1218,7 +1225,7 @@ body { border: 1px solid var(--border-color); padding: 10px 28px; border-radius: 10px; - font-size: 14px; + font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; @@ -1633,10 +1640,25 @@ body { } /* --- 内存清理特有样式 --- */ -.memory-dashboard { - margin: 20px 0 40px; +.memory-layout-v2 { display: flex; - justify-content: center; + flex-direction: column; + gap: 32px; + margin-top: 24px; +} + +.memory-main-card { + background: white; + border-radius: 32px; + padding: 48px; + display: flex; + align-items: center; + gap: 60px; + box-shadow: var(--card-shadow); +} + +.gauge-section { + flex: 0 0 auto; } .memory-gauge { @@ -1666,10 +1688,6 @@ body { transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s; } -/* 根据百分比改变颜色 */ -.memory-gauge[style*="--percent: 7"], .memory-gauge[style*="--percent: 8"] { --gauge-color: #FF9500; } -.memory-gauge[style*="--percent: 9"] { --gauge-color: #FF3B30; } - .gauge-content { position: absolute; top: 50%; left: 50%; @@ -1680,7 +1698,7 @@ body { } .gauge-value { - font-size: 56px; + font-size: 64px; font-weight: 800; color: var(--text-main); line-height: 1; @@ -1700,49 +1718,57 @@ body { margin-top: 4px; } -.memory-stats-grid { - display: grid; - grid-template-columns: repeat(3, 1fr); - gap: 20px; - margin-bottom: 40px; -} - -.stat-box { - background: white; - padding: 20px; - border-radius: 20px; - text-align: center; +.stats-section { + flex: 1; display: flex; flex-direction: column; - gap: 8px; + gap: 20px; } -.stat-box .label { - font-size: 13px; +.stat-box-v2 { + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px 0; +} + +.stat-box-v2 .label { + font-size: 15px; color: var(--text-sec); font-weight: 500; } -.stat-box .value { - font-size: 18px; +.stat-box-v2 .value { + font-size: 20px; font-weight: 700; color: var(--text-main); } -.memory-actions { - display: flex; - flex-direction: column; - gap: 16px; +.stat-divider-h { + height: 1px; + background: #F2F2F7; + width: 100%; +} + +.memory-actions-v2 { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 24px; } .action-card { background: white; - padding: 24px 32px; - border-radius: 24px; + padding: 32px; + border-radius: 28px; display: flex; - align-items: center; - justify-content: space-between; - transition: all 0.3s; + flex-direction: column; + gap: 24px; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); +} + +.action-card:hover { + transform: translateY(-4px); + box-shadow: 0 16px 40px rgba(0,0,0,0.06); } .action-card.secondary { @@ -1752,30 +1778,38 @@ body { } .action-info h3 { - font-size: 17px; + font-size: 18px; font-weight: 700; - margin-bottom: 4px; + margin-bottom: 8px; + color: var(--text-main); } .action-info p { font-size: 13px; color: var(--text-sec); + line-height: 1.5; +} + +.action-card .btn-primary, +.action-card .btn-secondary { + width: 100%; + padding: 14px; } .clean-feedback { - margin-top: 32px; + margin-top: 40px; text-align: center; - padding: 16px; + padding: 20px; background-color: #E8F5E9; color: #2E7D32; - border-radius: 16px; + border-radius: 20px; font-weight: 600; - font-size: 14px; + font-size: 15px; animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .freed-amount { - font-size: 18px; + font-size: 20px; font-weight: 800; text-decoration: underline; }