refactor(代理): 用户余量巡检与长样式出件,压回可读性棘轮

推送闸门抓到 UserApiSecretService 1278→1408、两枚 Vue 超过 800 行:
把用户级余量查询/缓存/巡检拆到 UserProxyBalanceService,两端组件的大段
样式移到同名 .css 由 scoped src 挂载。行为与选择器不变,只为让长文件棘轮
回到基线以内(不调基线、不整份回写)。
This commit is contained in:
2026-10-21 14:26:03 +08:00
parent 86d78160fd
commit 6096e85d32
10 changed files with 1237 additions and 1199 deletions
@@ -680,200 +680,4 @@ onUnmounted(() => {
defineExpose({ saveAll, reload })
</script>
<style scoped>
.secret-settings-body {
display: flex;
flex-direction: column;
gap: 14px;
max-height: 62vh;
overflow-y: auto;
padding-right: 4px;
}
.secret-card {
padding: 18px;
border: 1px solid #313b46;
border-radius: 10px;
background: #20252b;
}
.secret-card-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.secret-card-title {
color: #eef4fb;
font-size: 15px;
font-weight: 700;
}
.lock-tag {
display: inline-flex;
align-items: center;
margin-left: 8px;
padding: 1px 8px;
border: 1px solid #6b5a2e;
border-radius: 999px;
background: #2e2a1c;
color: #e6c76a;
font-size: 11px;
font-weight: 600;
vertical-align: middle;
}
.secret-card-desc {
margin-top: 4px;
color: #909ba8;
font-size: 12px;
line-height: 1.5;
}
.secret-input {
width: 100%;
height: 42px;
padding: 0 12px;
box-sizing: border-box;
border: 1px solid #3b4652;
border-radius: 10px;
background: #1b2026;
color: #dce6f0;
font-size: 13px;
outline: none;
}
.secret-input:focus {
border-color: #5b96d6;
}
.secret-input:disabled {
color: #707b86;
cursor: not-allowed;
opacity: .72;
}
.secret-actions {
display: flex;
align-items: center;
gap: 10px;
margin-top: 10px;
}
.check-btn {
height: 32px;
padding: 0 14px;
border: 1px solid #3c4a58;
border-radius: 8px;
background: #262e37;
color: #dbe5f0;
font-size: 12px;
font-weight: 700;
cursor: pointer;
white-space: nowrap;
flex-shrink: 0;
}
.check-btn:hover:not(:disabled) {
border-color: #4c647d;
}
.check-btn:disabled {
cursor: not-allowed;
opacity: .6;
}
.check-result {
color: #7f8a96;
font-size: 12px;
line-height: 1.5;
}
.check-result--ok {
color: #7fd6a4;
}
.check-result--fail {
color: #ff9b9b;
}
.check-result--warn {
color: #f0c674;
}
.proxy-field .field-label {
display: block;
}
.proxy-plan-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.proxy-plan-hint {
margin-top: 8px;
color: #7f8a96;
font-size: 12px;
line-height: 1.5;
}
.retention-block {
margin-top: 12px;
}
.field-label {
margin-bottom: 8px;
color: #a3afbb;
font-size: 12px;
}
.retention-options {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.retention-option {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 10px;
border-radius: 999px;
background: #1b2026;
color: #dce4ec;
font-size: 12px;
cursor: pointer;
}
.retention-option input {
margin: 0;
}
.retention-option--disabled {
cursor: not-allowed;
opacity: .6;
}
.secret-meta {
margin-top: 10px;
color: #7f8a96;
font-size: 12px;
}
.link-danger {
border: none;
background: transparent;
color: #ff9b9b;
font-size: 12px;
cursor: pointer;
padding: 0;
}
.link-danger:disabled {
cursor: not-allowed;
opacity: .55;
}
</style>
<style scoped src="./api-secret-settings-panel.css"></style>