feat(ui): 全局深色主题与登录注册页样式优化

- App 全局主题变量与 Element 组件暗色适配
- 首页、测试平台布局与主题切换
- 登录/注册页改版并支持明暗主题切换
- 用例列表等页面样式与主题保持一致

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
qiaoxinjiu
2026-05-18 16:18:40 +08:00
parent f05cf53b85
commit 3b359a7fd5
6 changed files with 1652 additions and 194 deletions

View File

@@ -210,8 +210,7 @@ export default {
<style scoped>
.effekt-home {
padding: 20px;
max-width: 1200px;
max-width: 1240px;
margin: 0 auto;
}
@@ -219,37 +218,80 @@ export default {
margin-bottom: 20px;
}
.greet-card,
.work-card,
.links-card {
border: 1px solid rgba(148, 163, 184, 0.2);
border-radius: 18px;
box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.04);
overflow: hidden;
background: #111827;
}
.greet-card,
.work-card {
border-radius: 10px;
border: 1px solid #ebeef5;
min-height: 160px;
min-height: 174px;
}
.greet-card {
position: relative;
background: radial-gradient(circle at 88% 16%, rgba(103, 232, 249, 0.28), transparent 28%), linear-gradient(135deg, rgba(30, 64, 175, 0.95) 0%, rgba(15, 23, 42, 0.96) 62%, rgba(8, 13, 27, 0.98) 100%);
color: #fff;
border-color: rgba(103, 232, 249, 0.22);
}
.greet-card:after {
content: '';
position: absolute;
right: -44px;
bottom: -54px;
width: 170px;
height: 170px;
border-radius: 50%;
background: radial-gradient(circle, rgba(56, 189, 248, 0.26), transparent 68%);
}
.greet-card >>> .el-card__body,
.work-card >>> .el-card__body,
.links-card >>> .el-card__body {
padding: 24px;
position: relative;
z-index: 1;
}
.greet-line {
font-size: 20px;
font-weight: 600;
color: #303133;
font-size: 24px;
font-weight: 800;
color: #f8fbff;
margin-bottom: 8px;
letter-spacing: 0.2px;
}
.greet-date {
color: #909399;
color: #bae6fd;
font-size: 13px;
margin-bottom: 16px;
margin-bottom: 22px;
}
.greet-progress-label {
font-size: 12px;
color: #606266;
color: rgba(224, 242, 254, 0.9);
display: block;
margin-bottom: 6px;
margin-bottom: 8px;
}
.greet-progress >>> .el-progress-bar__outer {
background-color: rgba(15, 23, 42, 0.68);
}
.greet-progress >>> .el-progress-bar__inner {
background: linear-gradient(90deg, #22d3ee 0%, #6366f1 100%);
}
.greet-progress-tip {
font-size: 12px;
color: #67c23a;
margin-top: 6px;
color: #a7f3d0;
margin-top: 8px;
display: block;
}
@@ -257,32 +299,52 @@ export default {
margin-top: 8px;
}
.work-card-title {
font-size: 15px;
font-weight: 600;
color: #303133;
margin-bottom: 16px;
padding-bottom: 10px;
border-bottom: 1px solid #ebeef5;
.greet-login-tip >>> .el-link.el-link--primary {
color: #67e8f9;
font-weight: 700;
}
.work-card-title,
.links-card-title {
position: relative;
font-size: 16px;
font-weight: 800;
color: #e0f2fe;
margin-bottom: 18px;
padding-left: 12px;
letter-spacing: 0.3px;
}
.work-card-title:before,
.links-card-title:before {
content: '';
position: absolute;
left: 0;
top: 3px;
width: 4px;
height: 16px;
border-radius: 999px;
background: linear-gradient(180deg, #67e8f9 0%, #6366f1 100%);
box-shadow: 0 0 14px rgba(103, 232, 249, 0.55);
}
.work-stats {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 12px;
gap: 14px;
}
.work-stat {
flex: 1;
min-width: 120px;
text-align: center;
padding: 12px 8px;
border-radius: 8px;
background: #f5f9ff;
border: 1px solid #e4ecfb;
min-width: 126px;
text-align: left;
padding: 18px;
border-radius: 16px;
background: #162033;
border: 1px solid rgba(148, 163, 184, 0.18);
cursor: default;
transition: box-shadow 0.2s, border-color 0.2s;
transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.work-stat--click {
@@ -290,38 +352,35 @@ export default {
}
.work-stat--click:hover {
border-color: #409eff;
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.15);
border-color: rgba(56, 189, 248, 0.52);
background: #1e293b;
box-shadow: 0 0 24px rgba(56, 189, 248, 0.14), 0 18px 34px rgba(0, 0, 0, 0.24);
transform: translateY(-2px);
}
.work-stat-value {
font-size: 28px;
font-weight: 600;
color: #409eff;
line-height: 1.2;
font-size: 32px;
font-weight: 900;
color: #67e8f9;
line-height: 1.1;
text-shadow: 0 0 18px rgba(103, 232, 249, 0.35);
}
.work-stat-label {
margin-top: 8px;
margin-top: 10px;
font-size: 14px;
color: #606266;
color: #dbeafe;
font-weight: 700;
}
.work-stat-hint {
margin-top: 4px;
font-size: 11px;
color: #909399;
margin-top: 6px;
font-size: 12px;
color: #8fb3d9;
}
.links-card {
border-radius: 10px;
}
.links-card-title {
font-size: 15px;
font-weight: 600;
color: #303133;
margin-bottom: 8px;
background: #111827;
}
.home-content {
@@ -330,25 +389,28 @@ export default {
}
.home-desc {
margin: 0 0 16px;
color: #606266;
margin: 0 0 18px;
color: #94a3b8;
font-size: 13px;
}
.project-block {
padding: 16px 0;
border-bottom: 1px solid #ebeef5;
padding: 18px;
margin-bottom: 14px;
border: 1px solid rgba(148, 163, 184, 0.16);
border-radius: 16px;
background: #162033;
}
.project-block:last-child {
border-bottom: none;
margin-bottom: 0;
}
.project-title {
margin-bottom: 12px;
font-size: 16px;
font-weight: 600;
color: #303133;
font-weight: 800;
color: #e0f2fe;
}
.link-item {
@@ -358,12 +420,95 @@ export default {
line-height: 22px;
}
.link-item:last-child {
margin-bottom: 0;
}
.link-label {
min-width: 140px;
color: #606266;
min-width: 150px;
color: #b7c9df;
font-weight: 700;
}
.doc-link {
word-break: break-all;
}
.doc-link >>> span {
color: #67e8f9;
}
body.theme-light .greet-card,
body.theme-light .work-card,
body.theme-light .links-card {
background: #ffffff;
border-color: #dbe5f3;
box-shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
}
body.theme-light .greet-card {
background: radial-gradient(circle at 88% 16%, rgba(96, 165, 250, 0.24), transparent 28%), linear-gradient(135deg, #2563eb 0%, #3b82f6 58%, #60a5fa 100%);
color: #ffffff;
border-color: rgba(96, 165, 250, 0.42);
}
body.theme-light .greet-card:after {
background: radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 68%);
}
body.theme-light .greet-date,
body.theme-light .greet-progress-label {
color: rgba(239, 246, 255, 0.92);
}
body.theme-light .greet-progress >>> .el-progress-bar__outer {
background-color: rgba(255, 255, 255, 0.28);
}
body.theme-light .greet-login-tip >>> .el-link.el-link--primary {
color: #ffffff;
}
body.theme-light .work-card-title,
body.theme-light .links-card-title,
body.theme-light .project-title {
color: #0f172a;
}
body.theme-light .work-card-title:before,
body.theme-light .links-card-title:before {
background: linear-gradient(180deg, #2563eb 0%, #38bdf8 100%);
box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
}
body.theme-light .work-stat,
body.theme-light .project-block {
background: #f8fbff;
border-color: #e2e8f0;
}
body.theme-light .work-stat--click:hover {
background: #eef6ff;
border-color: #bfdbfe;
box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
}
body.theme-light .work-stat-value {
color: #2563eb;
text-shadow: none;
}
body.theme-light .work-stat-label,
body.theme-light .link-label {
color: #334155;
}
body.theme-light .work-stat-hint,
body.theme-light .home-desc {
color: #64748b;
}
body.theme-light .doc-link >>> span {
color: #2563eb;
}
</style>