feat: 全面完善功能和修复 CSS/API 问题

- 修复暗色主题缺少 --accent 变量导致按钮颜色异常
- 消除所有 CSS 硬编码颜色(btn-primary, btn-danger:hover, sidebar-logo)
- 添加 toast.warning 样式支持
- Modal 支持 Enter 确认和 Escape 关闭
- Dashboard 快速操作按钮添加 loading 状态
- Services 操作后延迟刷新确保状态同步
- Memory 页面添加预览/新建/删除文件功能
- Deploy 页面 .env 路径添加默认值
- Rust 后端补充 delete_memory_file/check_installation/write_env_file 命令
- Mock 数据补全所有 API 端点
This commit is contained in:
晴天
2026-02-26 23:19:00 +08:00
parent 8bf2caf788
commit ed353cb3b5
12 changed files with 187 additions and 10 deletions

View File

@@ -72,7 +72,7 @@
.btn-primary {
background: var(--accent);
color: #fff;
color: var(--text-inverse);
}
.btn-primary:hover { background: var(--accent-hover); }
@@ -93,7 +93,7 @@
color: var(--error);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }
.btn-danger:hover { background: var(--error-muted); opacity: 0.85; }
.btn-sm {
padding: var(--space-xs) var(--space-md);
@@ -140,6 +140,7 @@
.toast.success { background: var(--success-muted); border: 1px solid rgba(34,197,94,0.3); color: var(--success); }
.toast.error { background: var(--error-muted); border: 1px solid rgba(239,68,68,0.3); color: var(--error); }
.toast.info { background: var(--info-muted); border: 1px solid rgba(59,130,246,0.3); color: var(--info); }
.toast.warning { background: var(--warning-muted); border: 1px solid rgba(245,158,11,0.3); color: var(--warning); }
@keyframes slideIn {
from { opacity: 0; transform: translateX(20px); }

View File

@@ -24,13 +24,13 @@
width: 28px;
height: 28px;
border-radius: var(--radius-sm);
background: linear-gradient(135deg, var(--accent), #a855f7);
background: linear-gradient(135deg, var(--accent), var(--accent-hover));
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: var(--font-size-sm);
color: #fff;
color: var(--text-inverse);
flex-shrink: 0;
}

View File

@@ -54,7 +54,8 @@
--text-tertiary: #71717a;
--text-inverse: #0a0a0f;
--accent-hover: #818cf8;
--accent: #818cf8;
--accent-hover: #a5b4fc;
--accent-muted: rgba(99, 102, 241, 0.15);
--success: #22c55e;