refactor frontend style

This commit is contained in:
Julian Freeman
2026-04-17 11:00:42 -04:00
parent 11a8955aca
commit 40215bcbcb
8 changed files with 1243 additions and 832 deletions

View File

@@ -153,835 +153,3 @@ async function searchNode(provider: "google" | "perplexity") {
</div>
</template>
<style>
/* --- 全局基础样式修复 --- */
:root {
--primary-color: #007AFF;
--primary-hover: #0063CC;
--bg-light: #FBFBFD;
--sidebar-bg: #FFFFFF;
--text-main: #1D1D1F;
--text-sec: #86868B;
--border-color: #E5E5E7;
--card-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
--btn-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
color: var(--text-main);
background-color: var(--bg-light);
height: 100vh;
overflow: hidden;
-webkit-font-smoothing: antialiased;
}
#app { height: 100%; }
.app-container {
display: flex;
height: 100%;
}
/* --- 侧边栏优化 (清爽浅蓝重构) --- */
.sidebar {
width: 240px;
background-color: #F8FAFD;
border-right: 1px solid #E9EFF6;
display: flex;
flex-direction: column;
padding: 40px 0 20px;
z-index: 10;
}
.sidebar-header { padding: 0 28px 36px; }
.brand { font-size: 20px; font-weight: 700; color: var(--text-main); letter-spacing: -0.3px; }
.sidebar-nav { flex: 1; }
.nav-item, .nav-item-header {
padding: 12px 20px;
margin: 4px 12px;
display: flex;
align-items: center;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
color: #4A5568;
font-size: 14px;
font-weight: 500;
border-radius: 12px;
}
.nav-item:hover, .nav-item-header:hover {
background-color: #EDF2F7;
color: #2D3748;
}
.nav-item.active {
background-color: #EBF4FF;
color: #04448a;
font-weight: 600;
}
.icon { margin-right: 12px; font-size: 18px; width: 24px; text-align: center; }
.arrow {
margin-left: auto;
transition: transform 0.3s;
font-size: 10px;
color: #A0AEC0;
}
.arrow.open { transform: rotate(180deg); color: #4A5568; }
.nav-sub-items { margin-bottom: 8px; }
.nav-sub-item {
padding: 10px 20px 10px 52px;
margin: 2px 12px;
cursor: pointer;
font-size: 13px;
color: #718096;
transition: all 0.2s;
border-radius: 10px;
}
.nav-sub-item:hover {
background-color: #EDF2F7;
color: #2D3748;
}
.nav-sub-item.active {
color: #007AFF;
font-weight: 600;
background-color: #EBF4FF;
}
.sidebar-footer {
padding: 0px 20px;
text-align: center;
}
.version {
font-size: 12px;
color: #CBD5E0;
font-weight: 500;
letter-spacing: 0.2px;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
/* --- 内容区 --- */
.content {
flex: 1;
padding: 40px 60px;
overflow-y: auto;
height: 100%;
scrollbar-gutter: stable;
}
/* 当处于全屏模式(深度分析)时,内容区本身不滚动,让内部树形滚动 */
.content:has(.page-container.full-width) {
overflow-y: hidden;
padding-bottom: 24px; /* 调小全屏模式下的底部留白 */
}
.page-container { max-width: 800px; margin: 0 auto; padding-bottom: 0px; transition: max-width 0.4s ease; }
.page-container.full-width {
max-width: 1400px;
height: calc(100vh - 64px); /* 相应调整高度计算 */
display: flex;
flex-direction: column;
}
.page-header {
display: flex;
align-items: flex-end;
justify-content: space-between;
margin-bottom: 16px;
padding-bottom: 16px;
border-bottom: 1px solid var(--border-color);
flex-shrink: 0;
}
.header-info {
display: flex;
flex-direction: column;
gap: 4px;
}
.page-header h1 { font-size: 22px; font-weight: 700; margin-bottom: 0; color: var(--text-main); line-height: 1.2; }
.page-header p { color: var(--text-sec); font-size: 13px; margin-bottom: 0; line-height: 1.2; }
.header-actions { display: flex; align-items: center; }
/* --- 按钮样式重构 --- */
.btn-primary {
background-color: var(--primary-color);
color: white;
border: none;
padding: 12px 40px;
border-radius: 12px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: var(--btn-shadow);
flex-shrink: 0;
}
.btn-sm { padding: 8px 24px; font-size: 14px; border-radius: 10px; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1.5px); box-shadow: 0 6px 16px rgba(0, 122, 255, 0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background-color: #D1D1D6; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-secondary {
background-color: white;
color: var(--text-main);
border: 1px solid var(--border-color);
padding: 10px 28px;
border-radius: 10px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
}
.btn-secondary:hover { background-color: #F5F5F7; }
/* --- 扫描结果卡片 (重点优化) --- */
.main-action { margin: 24px 0; display: flex; justify-content: center; }
.result-card {
background: white;
border-radius: 24px;
padding: 32px 40px;
width: 100%;
box-shadow: var(--card-shadow);
text-align: center;
border: 1px solid rgba(0,0,0,0.02);
}
.result-header { margin-bottom: 24px; }
.result-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.result-header h2 { font-size: 20px; font-weight: 700; color: var(--text-main); }
.result-stats {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 32px;
}
.stat-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
}
.stat-value {
display: flex;
align-items: baseline;
justify-content: center;
font-size: 38px;
font-weight: 800;
color: var(--primary-color);
letter-spacing: -1.2px;
line-height: 1;
margin-bottom: 6px;
white-space: nowrap;
}
.stat-value .unit {
font-size: 14px;
font-weight: 700;
margin-left: 3px;
letter-spacing: 0;
opacity: 0.9;
}
.stat-label { font-size: 13px; color: var(--text-sec); font-weight: 500; }
.stat-divider {
width: 1px;
height: 40px;
background-color: #F2F2F7;
margin: 0 16px;
flex-shrink: 0;
}
.main-btn { width: 180px; }
/* --- 扫描中 UI --- */
.scan-circle-container { width: 200px; height: 200px; margin: 0 auto; }
.scan-circle {
width: 100%; height: 100%; border-radius: 50%; border: 2px solid #F2F2F7;
display: flex; align-items: center; justify-content: center; position: relative;
}
.scan-circle.scanning { border-color: transparent; }
.scan-circle.scanning::before {
content: "";
position: absolute;
top: -2px; left: -2px; right: -2px; bottom: -2px;
border-radius: 50%;
border: 3px solid var(--primary-color);
border-top-color: transparent;
animation: spin 1s linear infinite;
}
.scan-inner {
width: 168px; height: 168px; border-radius: 50%; background: white;
display: flex; align-items: center; justify-content: center;
cursor: pointer; box-shadow: 0 10px 25px rgba(0,0,0,0.05); transition: transform 0.2s ease;
}
.scan-inner:hover { transform: scale(1.03); }
.scan-btn-text { font-size: 18px; font-weight: 700; color: var(--primary-color); }
.scan-percent { font-size: 36px; font-weight: 800; color: var(--primary-color); letter-spacing: -1px; }
.stat-value.highlight-gray { color: #8E8E93; }
.done-card { border: 2px solid #E8F5E9; }
.result-icon.success { color: #34C759; font-size: 48px; margin-bottom: 12px; display: block; }
.clean-summary { font-size: 18px; color: var(--text-main); font-weight: 700; margin-top: 10px; }
/* --- 高级模式卡片 --- */
.adv-card-list { display: flex; flex-direction: column; gap: 20px; }
.adv-card {
background: #fff;
border-radius: 20px;
box-shadow: var(--card-shadow);
border: 1px solid rgba(0,0,0,0.02);
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.adv-card:hover { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(0,0,0,0.06); }
.adv-card-main {
padding: 24px 32px;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
}
.adv-card-main:hover { background: #FAFAFA; }
.adv-card-info { display: flex; align-items: center; gap: 24px; }
.adv-card-icon { font-size: 32px; }
.adv-card-text h3 { font-size: 18px; margin-bottom: 4px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.adv-card-text p { color: var(--text-sec); font-size: 14px; }
.detail-hint { font-size: 12px; color: var(--text-sec); font-weight: 400; opacity: 0.7; }
.adv-card-right { display: flex; align-items: center; gap: 16px; }
.expand-icon {
width: 32px; height: 32px;
display: flex; align-items: center; justify-content: center;
color: #C1C1C1;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border-radius: 50%;
background: #F8F9FA;
}
.expand-icon svg { width: 18px; height: 18px; }
.expand-icon.rotated { transform: rotate(180deg); background: #EBF4FF; color: var(--primary-color); }
.btn-action {
background-color: #F2F2F7;
color: var(--primary-color);
border: none;
padding: 10px 24px;
border-radius: 10px;
font-weight: 700;
font-size: 14px;
cursor: pointer;
transition: all 0.2s ease;
min-width: 90px;
}
.btn-action:hover { background-color: var(--primary-color); color: #fff; transform: scale(1.05); }
.btn-action:disabled { background-color: #E5E5E7; color: #A1A1A1; cursor: not-allowed; transform: none; }
.adv-card-detail {
padding: 0 32px 32px 88px;
border-top: 1px solid #F5F5F7;
background: #FCFCFD;
}
.detail-content { padding-top: 24px; }
.detail-content h4 { font-size: 14px; margin-bottom: 10px; color: var(--text-main); font-weight: 700; }
.detail-content p { font-size: 14px; color: var(--text-sec); line-height: 1.6; margin-bottom: 16px; }
.warning-title { color: #FF9500 !important; margin-top: 20px; }
.detail-content ul { padding-left: 18px; color: var(--text-sec); font-size: 13px; }
.detail-content li { margin-bottom: 8px; line-height: 1.4; }
/* --- 磁盘树样式 --- */
/* .advanced-actions { display: flex; justify-content: center; margin-bottom: 32px; flex-shrink: 0; } */
.tree-table-container {
background: #fff;
border-radius: 24px;
overflow: hidden;
margin-top: 8px;
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
box-shadow: var(--card-shadow);
border: 1px solid rgba(0,0,0,0.02);
}
.tree-content-wrapper {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.tree-header {
display: flex;
background: #F9FAFB;
padding: 16px 24px;
font-size: 12px;
font-weight: 700;
color: var(--text-sec);
text-transform: uppercase;
letter-spacing: 0.5px;
border-bottom: 1px solid var(--border-color);
flex-shrink: 0;
}
.tree-body {
flex: 1;
overflow-y: auto;
}
.tree-row {
display: flex;
align-items: center;
padding: 14px 24px;
border-bottom: 1px solid #F5F5F7;
font-size: 14px;
transition: background 0.15s ease;
}
.tree-row:hover { background: #F9F9FB; }
.tree-row.is-file { color: #424245; }
.col-name {
flex: 2;
display: flex;
align-items: center;
font-weight: 500;
min-width: 0;
}
.node-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
}
.col-size { width: 100px; text-align: right; font-weight: 600; color: var(--text-main); flex-shrink: 0; }
.col-graph { width: 180px; display: flex; align-items: center; gap: 12px; padding-left: 32px; flex-shrink: 0; }
.mini-bar-bg { flex: 1; height: 6px; background: #F0F0F2; border-radius: 3px; overflow: hidden; }
.mini-bar-fill {
height: 100%;
background: linear-gradient(90deg, #007AFF, #5856D6);
border-radius: 3px;
transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.percent-text { font-size: 11px; color: var(--text-sec); width: 32px; font-weight: 600; text-align: right; }
.node-toggle { width: 24px; cursor: pointer; color: #C1C1C1; display: inline-block; text-align: center; font-size: 10px; transition: color 0.2s; }
.node-toggle:hover { color: var(--primary-color); }
.node-icon { width: 24px; font-size: 14px; opacity: 0.7; }
/* --- 通用状态 --- */
.scanning-loader, .scanning-overlay { padding: 100px 40px; text-align: center; color: var(--text-sec); }
.scanning-status { margin-top: 16px; }
.scanning-main-text { font-size: 16px; font-weight: 600; color: var(--text-main); margin-bottom: 12px; }
.scanning-stats-row { margin-bottom: 16px; }
.stat-badge { background: #EBF4FF; color: var(--primary-color); padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.scanning-current-path { font-size: 12px; color: var(--text-sec); max-width: 500px; margin: 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; opacity: 0.8; }
.spinner {
width: 44px; height: 44px;
border: 3px solid #F2F2F7;
border-top: 3px solid var(--primary-color);
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin: 0 auto 24px;
}
.detail-list {
background: white;
border-radius: 20px;
padding: 32px;
box-shadow: var(--card-shadow);
margin-top: 40px;
border: 1px solid rgba(0,0,0,0.02);
}
.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.list-header h3 { font-size: 18px; margin-bottom: 0; font-weight: 700; color: var(--text-main); }
.list-actions { display: flex; gap: 8px; }
.btn-text {
background: none;
border: none;
color: var(--primary-color);
font-size: 12px;
font-weight: 600;
cursor: pointer;
padding: 6px 10px;
border-radius: 8px;
transition: all 0.2s;
}
.btn-text:hover { background-color: #F0F7FF; }
.detail-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 0;
border-bottom: 1px solid #F5F5F7;
font-size: 14px;
color: #424245;
transition: all 0.2s ease;
cursor: pointer;
}
.detail-item:hover { background-color: #FAFAFB; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.detail-item.disabled { opacity: 0.5; }
.detail-item:last-child { border-bottom: none; }
.item-info { display: flex; align-items: center; gap: 12px; }
/* --- 自定义复选框 --- */
.checkbox-container {
display: block;
position: relative;
width: 20px;
height: 20px;
cursor: pointer;
user-select: none;
}
.checkbox-container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0; width: 0;
}
.checkmark {
position: absolute;
top: 0; left: 0;
height: 20px; width: 20px;
background-color: #F2F2F7;
border-radius: 6px;
transition: all 0.2s;
border: 1px solid #E5E5E7;
}
.checkbox-container:hover input ~ .checkmark { background-color: #E5E5E7; }
.checkbox-container input:checked ~ .checkmark { background-color: var(--primary-color); border-color: var(--primary-color); }
.checkmark:after {
content: "";
position: absolute;
display: none;
left: 6px; top: 1px;
width: 5px; height: 10px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
.checkbox-container input:checked ~ .checkmark:after { display: block; }
.item-size { font-weight: 600; color: var(--primary-color); }
.placeholder-page { padding-top: 120px; text-align: center; color: var(--text-sec); }
.empty-icon { font-size: 64px; display: block; margin-bottom: 24px; opacity: 0.5; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.3); } 70% { box-shadow: 0 0 0 25px rgba(0, 122, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); } }
/* --- 自定义弹窗样式 --- */
.modal-overlay {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background-color: rgba(0, 0, 0, 0.2);
backdrop-filter: blur(8px);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
animation: fadeIn 0.2s ease;
}
.modal-card {
background: white;
width: 400px;
border-radius: 24px;
padding: 32px;
box-shadow: 0 20px 60px rgba(0,0,0,0.15);
text-align: center;
animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-header { margin-bottom: 20px; }
.modal-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.modal-header h3 { font-size: 20px; font-weight: 700; color: var(--text-main); }
.modal-card.success .modal-header h3 { color: #34C759; }
.modal-card.error .modal-header h3 { color: #FF3B30; }
.modal-body { margin-bottom: 32px; }
.modal-body p { color: var(--text-sec); font-size: 15px; line-height: 1.6; }
.modal-footer { display: flex; justify-content: center; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
/* --- 右键菜单样式 --- */
.context-menu {
position: fixed;
background: white;
min-width: 180px;
border-radius: 12px;
padding: 6px;
z-index: 2000;
border: 1px solid rgba(0,0,0,0.08);
animation: fadeIn 0.1s ease;
}
.menu-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
font-size: 13px;
color: var(--text-main);
cursor: pointer;
border-radius: 8px;
transition: background 0.15s;
}
.menu-item:hover {
background-color: #F2F2F7;
color: var(--primary-color);
}
.menu-icon { font-size: 16px; }
.menu-divider {
height: 1px;
background: #F5F5F7;
margin: 4px 0;
}
/* --- 内存清理特有样式 --- */
.memory-layout-v2 {
display: flex;
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 {
position: relative;
width: 240px;
height: 240px;
}
.memory-gauge svg {
transform: rotate(-90deg);
width: 100%;
height: 100%;
}
.gauge-bg {
fill: none;
stroke: #F2F2F7;
stroke-width: 8;
}
.gauge-fill {
fill: none;
stroke: var(--primary-color);
stroke-width: 8;
stroke-linecap: round;
stroke-dasharray: 283;
transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s;
}
.gauge-content {
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
text-align: center;
display: flex;
flex-direction: column;
}
.gauge-value {
font-size: 64px;
font-weight: 800;
color: var(--text-main);
line-height: 1;
letter-spacing: -2px;
}
.gauge-value small {
font-size: 24px;
margin-left: 2px;
letter-spacing: 0;
}
.gauge-label {
font-size: 14px;
color: var(--text-sec);
font-weight: 600;
margin-top: 4px;
}
.stats-section {
flex: 1;
display: flex;
flex-direction: column;
gap: 20px;
}
.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-v2 .value {
font-size: 20px;
font-weight: 700;
color: var(--text-main);
}
.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: 32px;
border-radius: 28px;
display: flex;
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 {
background-color: #FBFBFD;
border: 1px dashed var(--border-color);
box-shadow: none;
}
.action-info {
flex: 1;
}
.action-info h3 {
font-size: 18px;
font-weight: 700;
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: 40px;
text-align: center;
padding: 20px;
background-color: #E8F5E9;
color: #2E7D32;
border-radius: 20px;
font-weight: 600;
font-size: 15px;
animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.freed-amount {
font-size: 20px;
font-weight: 800;
text-decoration: underline;
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.action-card.cleaning {
filter: grayscale(1);
opacity: 0.7;
pointer-events: none;
}
/* --- SVG 图标通用样式 --- */
.svg-icon {
display: inline-flex;
align-items: center;
justify-content: center;
vertical-align: middle;
}
.svg-icon svg {
width: 1.25em;
height: 1.25em;
stroke: currentColor;
stroke-width: 2;
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
}
.svg-icon.big svg {
width: 2.5em;
height: 2.5em;
}
.icon.svg-icon {
margin-right: 12px;
color: inherit;
}
.icon.svg-icon svg {
width: 18px;
height: 18px;
}
</style>

View File

@@ -1,4 +1,7 @@
import { createApp } from "vue";
import App from "./App.vue";
import "./styles/base.css";
import "./styles/layout.css";
import "./styles/common.css";
createApp(App).mount("#app");

View File

@@ -110,3 +110,164 @@ const { expandedAdvanced, loading, runTask } = useAdvancedClean(props.showAlert)
</div>
</section>
</template>
<style scoped>
.adv-card-list {
display: flex;
flex-direction: column;
gap: 20px;
}
.adv-card {
background: #fff;
border-radius: 20px;
box-shadow: var(--card-shadow);
border: 1px solid rgba(0, 0, 0, 0.02);
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.adv-card:hover {
transform: translateY(-2px);
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
}
.adv-card-main {
padding: 24px 32px;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
}
.adv-card-main:hover {
background: #fafafa;
}
.adv-card-info {
display: flex;
align-items: center;
gap: 24px;
}
.adv-card-icon {
font-size: 32px;
}
.adv-card-text h3 {
font-size: 18px;
margin-bottom: 4px;
font-weight: 700;
color: var(--text-main);
display: flex;
align-items: center;
gap: 8px;
}
.adv-card-text p {
color: var(--text-sec);
font-size: 14px;
}
.detail-hint {
font-size: 12px;
color: var(--text-sec);
font-weight: 400;
opacity: 0.7;
}
.adv-card-right {
display: flex;
align-items: center;
gap: 16px;
}
.expand-icon {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
color: #c1c1c1;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border-radius: 50%;
background: #f8f9fa;
}
.expand-icon svg {
width: 18px;
height: 18px;
}
.expand-icon.rotated {
transform: rotate(180deg);
background: #ebf4ff;
color: var(--primary-color);
}
.btn-action {
background-color: #f2f2f7;
color: var(--primary-color);
border: none;
padding: 10px 24px;
border-radius: 10px;
font-weight: 700;
font-size: 14px;
cursor: pointer;
transition: all 0.2s ease;
min-width: 90px;
}
.btn-action:hover {
background-color: var(--primary-color);
color: #fff;
transform: scale(1.05);
}
.btn-action:disabled {
background-color: #e5e5e7;
color: #a1a1a1;
cursor: not-allowed;
transform: none;
}
.adv-card-detail {
padding: 0 32px 32px 88px;
border-top: 1px solid #f5f5f7;
background: #fcfcfd;
}
.detail-content {
padding-top: 24px;
}
.detail-content h4 {
font-size: 14px;
margin-bottom: 10px;
color: var(--text-main);
font-weight: 700;
}
.detail-content p {
font-size: 14px;
color: var(--text-sec);
line-height: 1.6;
margin-bottom: 16px;
}
.warning-title {
color: #ff9500 !important;
margin-top: 20px;
}
.detail-content ul {
padding-left: 18px;
color: var(--text-sec);
font-size: 13px;
}
.detail-content li {
margin-bottom: 8px;
line-height: 1.4;
}
</style>

View File

@@ -79,3 +79,135 @@ const { isFullScanning, fullScanProgress, treeData, startFullDiskScan, toggleNod
</div>
</section>
</template>
<style scoped>
.tree-table-container {
background: #fff;
border-radius: 24px;
overflow: hidden;
margin-top: 8px;
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
box-shadow: var(--card-shadow);
border: 1px solid rgba(0, 0, 0, 0.02);
}
.tree-content-wrapper {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.tree-header {
display: flex;
background: #f9fafb;
padding: 16px 24px;
font-size: 12px;
font-weight: 700;
color: var(--text-sec);
text-transform: uppercase;
letter-spacing: 0.5px;
border-bottom: 1px solid var(--border-color);
flex-shrink: 0;
}
.tree-body {
flex: 1;
overflow-y: auto;
}
.tree-row {
display: flex;
align-items: center;
padding: 14px 24px;
border-bottom: 1px solid #f5f5f7;
font-size: 14px;
transition: background 0.15s ease;
}
.tree-row:hover {
background: #f9f9fb;
}
.tree-row.is-file {
color: #424245;
}
.col-name {
flex: 2;
display: flex;
align-items: center;
font-weight: 500;
min-width: 0;
}
.node-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
}
.col-size {
width: 100px;
text-align: right;
font-weight: 600;
color: var(--text-main);
flex-shrink: 0;
}
.col-graph {
width: 180px;
display: flex;
align-items: center;
gap: 12px;
padding-left: 32px;
flex-shrink: 0;
}
.mini-bar-bg {
flex: 1;
height: 6px;
background: #f0f0f2;
border-radius: 3px;
overflow: hidden;
}
.mini-bar-fill {
height: 100%;
background: linear-gradient(90deg, #007aff, #5856d6);
border-radius: 3px;
transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.percent-text {
font-size: 11px;
color: var(--text-sec);
width: 32px;
font-weight: 600;
text-align: right;
}
.node-toggle {
width: 24px;
cursor: pointer;
color: #c1c1c1;
display: inline-block;
text-align: center;
font-size: 10px;
transition: color 0.2s;
}
.node-toggle:hover {
color: var(--primary-color);
}
.node-icon {
width: 24px;
font-size: 14px;
opacity: 0.7;
}
</style>

View File

@@ -76,3 +76,172 @@ const { state, startClean } = useMemoryClean(props.showAlert);
</div>
</section>
</template>
<style scoped>
.memory-layout-v2 {
display: flex;
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 {
position: relative;
width: 240px;
height: 240px;
}
.memory-gauge svg {
transform: rotate(-90deg);
width: 100%;
height: 100%;
}
.gauge-bg {
fill: none;
stroke: #f2f2f7;
stroke-width: 8;
}
.gauge-fill {
fill: none;
stroke: var(--primary-color);
stroke-width: 8;
stroke-linecap: round;
stroke-dasharray: 283;
transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s;
}
.gauge-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
display: flex;
flex-direction: column;
}
.gauge-value {
font-size: 64px;
font-weight: 800;
color: var(--text-main);
line-height: 1;
letter-spacing: -2px;
}
.gauge-value small {
font-size: 24px;
margin-left: 2px;
letter-spacing: 0;
}
.gauge-label {
font-size: 14px;
color: var(--text-sec);
font-weight: 600;
margin-top: 4px;
}
.stats-section {
flex: 1;
display: flex;
flex-direction: column;
gap: 20px;
}
.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-v2 .value {
font-size: 20px;
font-weight: 700;
color: var(--text-main);
}
.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: 32px;
border-radius: 28px;
display: flex;
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 {
background-color: #fbfbfd;
border: 1px dashed var(--border-color);
box-shadow: none;
}
.action-info {
flex: 1;
}
.action-info h3 {
font-size: 18px;
font-weight: 700;
margin-bottom: 8px;
color: var(--text-main);
}
.action-info p {
font-size: 13px;
color: var(--text-sec);
line-height: 1.5;
}
.action-card :deep(.btn-primary),
.action-card :deep(.btn-secondary) {
width: 100%;
padding: 14px;
}
.action-card.cleaning {
filter: grayscale(1);
opacity: 0.7;
pointer-events: none;
}
</style>

87
src/styles/base.css Normal file
View File

@@ -0,0 +1,87 @@
:root {
--primary-color: #007aff;
--primary-hover: #0063cc;
--bg-light: #fbfbfd;
--sidebar-bg: #ffffff;
--text-main: #1d1d1f;
--text-sec: #86868b;
--border-color: #e5e5e7;
--card-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
--btn-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
color: var(--text-main);
background-color: var(--bg-light);
height: 100vh;
overflow: hidden;
-webkit-font-smoothing: antialiased;
}
#app {
height: 100%;
}
.app-container {
display: flex;
height: 100%;
}
.svg-icon {
display: inline-flex;
align-items: center;
justify-content: center;
vertical-align: middle;
}
.svg-icon svg {
width: 1.25em;
height: 1.25em;
stroke: currentColor;
stroke-width: 2;
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
}
.svg-icon.big svg {
width: 2.5em;
height: 2.5em;
}
.icon.svg-icon {
margin-right: 12px;
color: inherit;
}
.icon.svg-icon svg {
width: 18px;
height: 18px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes modalIn {
from { opacity: 0; transform: scale(0.9) translateY(20px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}

508
src/styles/common.css Normal file
View File

@@ -0,0 +1,508 @@
.btn-primary {
background-color: var(--primary-color);
color: white;
border: none;
padding: 12px 40px;
border-radius: 12px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: var(--btn-shadow);
flex-shrink: 0;
}
.btn-sm {
padding: 8px 24px;
font-size: 14px;
border-radius: 10px;
}
.btn-primary:hover {
background-color: var(--primary-hover);
transform: translateY(-1.5px);
box-shadow: 0 6px 16px rgba(0, 122, 255, 0.35);
}
.btn-primary:active {
transform: translateY(0);
}
.btn-primary:disabled {
background-color: #d1d1d6;
box-shadow: none;
cursor: not-allowed;
transform: none;
}
.btn-secondary {
background-color: white;
color: var(--text-main);
border: 1px solid var(--border-color);
padding: 10px 28px;
border-radius: 10px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
}
.btn-secondary:hover {
background-color: #f5f5f7;
}
.main-action {
margin: 24px 0;
display: flex;
justify-content: center;
}
.result-card {
background: white;
border-radius: 24px;
padding: 32px 40px;
width: 100%;
box-shadow: var(--card-shadow);
text-align: center;
border: 1px solid rgba(0, 0, 0, 0.02);
}
.result-header {
margin-bottom: 24px;
}
.result-icon {
font-size: 28px;
display: block;
margin-bottom: 8px;
}
.result-header h2 {
font-size: 20px;
font-weight: 700;
color: var(--text-main);
}
.result-stats {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 32px;
}
.stat-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
}
.stat-value {
display: flex;
align-items: baseline;
justify-content: center;
font-size: 38px;
font-weight: 800;
color: var(--primary-color);
letter-spacing: -1.2px;
line-height: 1;
margin-bottom: 6px;
white-space: nowrap;
}
.stat-value .unit {
font-size: 14px;
font-weight: 700;
margin-left: 3px;
letter-spacing: 0;
opacity: 0.9;
}
.stat-label {
font-size: 13px;
color: var(--text-sec);
font-weight: 500;
}
.stat-divider {
width: 1px;
height: 40px;
background-color: #f2f2f7;
margin: 0 16px;
flex-shrink: 0;
}
.main-btn {
width: 180px;
}
.scan-circle-container {
width: 200px;
height: 200px;
margin: 0 auto;
}
.scan-circle {
width: 100%;
height: 100%;
border-radius: 50%;
border: 2px solid #f2f2f7;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.scan-circle.scanning {
border-color: transparent;
}
.scan-circle.scanning::before {
content: "";
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
border-radius: 50%;
border: 3px solid var(--primary-color);
border-top-color: transparent;
animation: spin 1s linear infinite;
}
.scan-inner {
width: 168px;
height: 168px;
border-radius: 50%;
background: white;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
transition: transform 0.2s ease;
}
.scan-inner:hover {
transform: scale(1.03);
}
.scan-btn-text {
font-size: 18px;
font-weight: 700;
color: var(--primary-color);
}
.scan-percent {
font-size: 36px;
font-weight: 800;
color: var(--primary-color);
letter-spacing: -1px;
}
.stat-value.highlight-gray {
color: #8e8e93;
}
.done-card {
border: 2px solid #e8f5e9;
}
.result-icon.success {
color: #34c759;
font-size: 48px;
margin-bottom: 12px;
display: block;
}
.scanning-loader,
.scanning-overlay {
padding: 100px 40px;
text-align: center;
color: var(--text-sec);
}
.scanning-status {
margin-top: 16px;
}
.scanning-main-text {
font-size: 16px;
font-weight: 600;
color: var(--text-main);
margin-bottom: 12px;
}
.scanning-stats-row {
margin-bottom: 16px;
}
.stat-badge {
background: #ebf4ff;
color: var(--primary-color);
padding: 6px 16px;
border-radius: 20px;
font-size: 13px;
font-weight: 700;
}
.scanning-current-path {
font-size: 12px;
color: var(--text-sec);
max-width: 500px;
margin: 0 auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
opacity: 0.8;
}
.spinner {
width: 44px;
height: 44px;
border: 3px solid #f2f2f7;
border-top: 3px solid var(--primary-color);
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin: 0 auto 24px;
}
.detail-list {
background: white;
border-radius: 20px;
padding: 32px;
box-shadow: var(--card-shadow);
margin-top: 40px;
border: 1px solid rgba(0, 0, 0, 0.02);
}
.list-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.list-header h3 {
font-size: 18px;
margin-bottom: 0;
font-weight: 700;
color: var(--text-main);
}
.list-actions {
display: flex;
gap: 8px;
}
.btn-text {
background: none;
border: none;
color: var(--primary-color);
font-size: 12px;
font-weight: 600;
cursor: pointer;
padding: 6px 10px;
border-radius: 8px;
transition: all 0.2s;
}
.btn-text:hover {
background-color: #f0f7ff;
}
.detail-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 0;
border-bottom: 1px solid #f5f5f7;
font-size: 14px;
color: #424245;
transition: all 0.2s ease;
cursor: pointer;
}
.detail-item:hover {
background-color: #fafafb;
padding-left: 8px;
padding-right: 8px;
border-radius: 8px;
}
.detail-item.disabled {
opacity: 0.5;
}
.detail-item:last-child {
border-bottom: none;
}
.item-info {
display: flex;
align-items: center;
gap: 12px;
}
.checkbox-container {
display: block;
position: relative;
width: 20px;
height: 20px;
cursor: pointer;
user-select: none;
}
.checkbox-container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
.checkmark {
position: absolute;
top: 0;
left: 0;
height: 20px;
width: 20px;
background-color: #f2f2f7;
border-radius: 6px;
transition: all 0.2s;
border: 1px solid #e5e5e7;
}
.checkbox-container:hover input ~ .checkmark {
background-color: #e5e5e7;
}
.checkbox-container input:checked ~ .checkmark {
background-color: var(--primary-color);
border-color: var(--primary-color);
}
.checkmark:after {
content: "";
position: absolute;
display: none;
left: 6px;
top: 1px;
width: 5px;
height: 10px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
.checkbox-container input:checked ~ .checkmark:after {
display: block;
}
.item-size {
font-weight: 600;
color: var(--primary-color);
}
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.2);
backdrop-filter: blur(8px);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
animation: fadeIn 0.2s ease;
}
.modal-card {
background: white;
width: 400px;
border-radius: 24px;
padding: 32px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
text-align: center;
animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-header {
margin-bottom: 20px;
}
.modal-icon {
font-size: 40px;
display: block;
margin-bottom: 12px;
}
.modal-header h3 {
font-size: 20px;
font-weight: 700;
color: var(--text-main);
}
.modal-card.success .modal-header h3 {
color: #34c759;
}
.modal-card.error .modal-header h3 {
color: #ff3b30;
}
.modal-body {
margin-bottom: 32px;
}
.modal-body p {
color: var(--text-sec);
font-size: 15px;
line-height: 1.6;
}
.modal-footer {
display: flex;
justify-content: center;
}
.context-menu {
position: fixed;
background: white;
min-width: 180px;
border-radius: 12px;
padding: 6px;
z-index: 2000;
border: 1px solid rgba(0, 0, 0, 0.08);
animation: fadeIn 0.1s ease;
}
.menu-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
font-size: 13px;
color: var(--text-main);
cursor: pointer;
border-radius: 8px;
transition: background 0.15s;
}
.menu-item:hover {
background-color: #f2f2f7;
color: var(--primary-color);
}
.menu-icon {
font-size: 16px;
}
.menu-divider {
height: 1px;
background: #f5f5f7;
margin: 4px 0;
}

183
src/styles/layout.css Normal file
View File

@@ -0,0 +1,183 @@
.sidebar {
width: 240px;
background-color: #f8fafd;
border-right: 1px solid #e9eff6;
display: flex;
flex-direction: column;
padding: 40px 0 20px;
z-index: 10;
}
.sidebar-header {
padding: 0 28px 36px;
}
.brand {
font-size: 20px;
font-weight: 700;
color: var(--text-main);
letter-spacing: -0.3px;
}
.sidebar-nav {
flex: 1;
}
.nav-item,
.nav-item-header {
padding: 12px 20px;
margin: 4px 12px;
display: flex;
align-items: center;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
color: #4a5568;
font-size: 14px;
font-weight: 500;
border-radius: 12px;
}
.nav-item:hover,
.nav-item-header:hover {
background-color: #edf2f7;
color: #2d3748;
}
.nav-item.active {
background-color: #ebf4ff;
color: #04448a;
font-weight: 600;
}
.icon {
margin-right: 12px;
font-size: 18px;
width: 24px;
text-align: center;
}
.arrow {
margin-left: auto;
transition: transform 0.3s;
font-size: 10px;
color: #a0aec0;
}
.arrow.open {
transform: rotate(180deg);
color: #4a5568;
}
.nav-sub-items {
margin-bottom: 8px;
}
.nav-sub-item {
padding: 10px 20px 10px 52px;
margin: 2px 12px;
cursor: pointer;
font-size: 13px;
color: #718096;
transition: all 0.2s;
border-radius: 10px;
}
.nav-sub-item:hover {
background-color: #edf2f7;
color: #2d3748;
}
.nav-sub-item.active {
color: #007aff;
font-weight: 600;
background-color: #ebf4ff;
}
.sidebar-footer {
padding: 0 20px;
text-align: center;
}
.version {
font-size: 12px;
color: #cbd5e0;
font-weight: 500;
letter-spacing: 0.2px;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.content {
flex: 1;
padding: 40px 60px;
overflow-y: auto;
height: 100%;
scrollbar-gutter: stable;
}
.content:has(.page-container.full-width) {
overflow-y: hidden;
padding-bottom: 24px;
}
.page-container {
max-width: 800px;
margin: 0 auto;
padding-bottom: 0;
transition: max-width 0.4s ease;
}
.page-container.full-width {
max-width: 1400px;
height: calc(100vh - 64px);
display: flex;
flex-direction: column;
}
.page-header {
display: flex;
align-items: flex-end;
justify-content: space-between;
margin-bottom: 16px;
padding-bottom: 16px;
border-bottom: 1px solid var(--border-color);
flex-shrink: 0;
}
.header-info {
display: flex;
flex-direction: column;
gap: 4px;
}
.page-header h1 {
font-size: 22px;
font-weight: 700;
margin-bottom: 0;
color: var(--text-main);
line-height: 1.2;
}
.page-header p {
color: var(--text-sec);
font-size: 13px;
margin-bottom: 0;
line-height: 1.2;
}
.header-actions {
display: flex;
align-items: center;
}
.placeholder-page {
padding-top: 120px;
text-align: center;
color: var(--text-sec);
}
.empty-icon {
font-size: 64px;
display: block;
margin-bottom: 24px;
opacity: 0.5;
}