refactor: CSS残留hex清理+内联样式提取+console.log降级+错误toast补全

- components.css: 10处hex替换为CSS变量(stoploss/watch/signal/alert-change/toast)
- pages.css: 20+处hex替换(ss-dot信号强度/step操作色/summary-tag/trade-type/reason-item)
- auth.css: 2处hex替换(login-error/login-success)
- base.css: 新增30+公共CSS class(cursor-pointer/flex-center/input-mini/icon-sm等)
- index.html: 41处内联style提取为CSS class(93→52)
- app.js: 14处console.log降级为console.debug(减少生产日志噪音)
- app.js: 5处用户可感知catch块补充showToast错误反馈
This commit is contained in:
selfrelease
2026-07-18 09:28:37 +08:00
parent b3c21c6f91
commit 03e095ded0
6 changed files with 140 additions and 93 deletions
+43 -1
View File
@@ -383,7 +383,7 @@
}
.scan-source-select option {
background: #1a1a2e;
background: var(--bg-dark);
color: var(--text-primary);
padding: 10px;
}
@@ -773,4 +773,46 @@
color: var(--text-muted);
line-height: 1.5;
}
/* ===== 内联样式提取的公共 class ===== */
.cursor-pointer { cursor: pointer; }
.margin-top-sm { margin-top: 8px; }
.margin-top-md { margin-top: 15px; }
.margin-bottom-sm { margin-bottom: 8px; }
.margin-bottom-md { margin-bottom: 12px; }
.margin-left-auto { margin-left: auto; }
.margin-right-sm { margin-right: 6px; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-md { font-size: 13px; }
.text-muted-2 { color: var(--text-muted); }
.text-secondary-2 { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.font-weight-600 { font-weight: 600; }
.flex-center { display: flex; align-items: center; gap: 4px; }
.flex-wrap-gap { display: flex; flex-wrap: wrap; gap: 6px; }
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hidden { display: none; }
.opacity-70 { opacity: 0.7; }
.padding-y-sm { padding: 8px 0; }
.max-height-scroll { max-height: 300px; overflow-y: auto; }
.icon-sm { width: 16px; height: 16px; vertical-align: -2px; margin-right: 4px; }
.icon-xs { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
.input-mini {
width: 60px; background: var(--bg-dark); border: 1px solid var(--border-color);
color: var(--text-primary); border-radius: 4px; padding: 2px 6px;
}
.input-mini-wide {
width: 80px; background: var(--bg-dark); border: 1px solid var(--border-color);
color: var(--text-primary); border-radius: 4px; padding: 2px 6px;
}
.badge-mini {
background: var(--bg-dark); padding: 1px 6px; border-radius: 8px; font-size: 10px;
}
.border-top-divider {
margin-top: 10px; border-top: 1px solid var(--border-color); padding-top: 10px;
}