perf: 性能优化与代码质量改进

- 添加4个数据库索引提升查询性能
- 启用ESLint并配置React支持
- 修复ESLint错误(未使用的导入和状态)
- 简化Toast组件UI样式
- 移除重复文件(server.js.backup)
- 清理.gitignore中的.next目录

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Developer
2026-03-19 09:26:04 +08:00
co-authored by Claude Opus 4.6
parent 1e478c2eaa
commit 3975bbed73
116 changed files with 1827 additions and 209 deletions
+34 -39
View File
@@ -1755,53 +1755,53 @@ textarea:focus-visible {
.toast-stack {
position: fixed;
left: 50%;
left: 0;
right: 0;
bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 14px);
transform: translateX(-50%);
width: min(calc(100% - 28px), 480px);
display: grid;
gap: 8px;
display: flex;
flex-direction: column;
align-items: center;
z-index: 90;
pointer-events: none;
}
.toast {
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: 10px;
padding: 12px 13px;
border-radius: 15px;
background: var(--surface-elevated);
color: var(--text-on-dark);
box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
backdrop-filter: blur(18px);
}
.toast__icon,
.toast__close {
color: inherit;
padding: 10px 24px;
border-radius: 22px;
background: rgba(0, 0, 0, 0.75);
color: #fff;
font-size: 14px;
font-weight: 500;
text-align: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
pointer-events: auto;
width: fit-content;
max-width: 90%;
overflow: visible;
}
.toast__message {
line-height: 1.42;
}
.toast__close.icon-button {
width: 30px;
height: 30px;
border-radius: 10px;
display: inline;
font-size: 14px;
font-weight: 500;
color: #fff;
text-align: center;
line-height: 1.4;
white-space: normal;
unicode-bidi: bidi-override;
direction: ltr;
}
.toast--success {
background: linear-gradient(135deg, rgba(5, 150, 105, 0.96), rgba(6, 182, 212, 0.9));
background: rgba(0, 0, 0, 0.75);
}
.toast--error {
background: linear-gradient(135deg, rgba(220, 38, 38, 0.96), rgba(244, 63, 94, 0.92));
background: rgba(220, 38, 38, 0.9);
}
.toast--info {
background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(51, 65, 85, 0.94));
background: rgba(0, 0, 0, 0.75);
}
.bottom-nav {
@@ -2118,15 +2118,6 @@ textarea:focus-visible {
min-height: 54px;
}
.toast {
grid-template-columns: auto 1fr;
}
.toast__close {
grid-column: 2;
justify-self: end;
}
.bottom-nav__inner {
gap: 6px;
padding: 10px;
@@ -2186,6 +2177,10 @@ textarea:focus-visible {
padding: 20px;
color: #64748b;
}
.loading-spinner svg,
.is-spinning {
color: inherit;
}
@keyframes spin {
to { transform: rotate(360deg); }