From accb38986ac90809681833568391dd0e813f1223 Mon Sep 17 00:00:00 2001
From: mediabot-pt <295750538+mediabot-pt@users.noreply.github.com>
Date: Mon, 6 Jul 2026 22:41:55 +0800
Subject: [PATCH] style: add color to action labels in rule summary text
\u4fdd\u53f7=green(#67c23a), \u5c01\u53f7/\u5220\u9664\u8d26\u53f7=red(#f56c6c), \u5c01\u53f7(\u7f13\u52117\u5929)=orange(#e6a23c)
---
web/src/views/RiskRules.vue | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/web/src/views/RiskRules.vue b/web/src/views/RiskRules.vue
index cc0110c..434e238 100644
--- a/web/src/views/RiskRules.vue
+++ b/web/src/views/RiskRules.vue
@@ -183,7 +183,7 @@
规则摘要
- {{ i + 1 }}. {{ ruleText(r) }}
+ {{ i + 1 }}.
@@ -387,22 +387,20 @@ const sortedRules = computed(() => {
const ruleText = (r) => {
const appText = r.applicable ? `(${applicableOptions.find(x=>x.value===r.applicable)?.label||r.applicable})` : ''
if (r.type === 'EXEMPT') {
- return `等级豁免:永久保留 ≥ ${rankDisplay(r.permRank)}、封存豁免 ≥ ${rankDisplay(r.sealExemptRank)} → 保号`
+ return `等级豁免:永久保留 ≥ ${rankDisplay(r.permRank)}、封存豁免 ≥ ${rankDisplay(r.sealExemptRank)} → 保号`
}
if (r.type === 'TASK') {
const reqs = (r.requirements||[]).filter(x => x.enabled).map(x => `${x.label} ≥ ${x.threshold}${x.unit}`).join('、')
- return `新人考核:${r.threshold||30}天内,${reqs} → 封号/删除账号${appText}`
+ return `新人考核:${r.threshold||30}天内,${reqs} → 封号/删除账号${appText}`
}
const metric = metricLabel(r.metric)
const cond = condLabel(r.condition)
const val = `${metric}${cond}${r.threshold}${r.unit||''}`
- if (r.type === 'DRATIO') {
- return `动态分享率:下载量 ≥ ${r.threshold}GB 时分享率 ≥ ${r.minRatio} → 封号(缓刑7天)${appText}`
+ if (r.type === 'DRATIO' || r.type === 'RATIO') {
+ const prefix = r.type === 'DRATIO' ? `动态分享率:下载量 ≥ ${r.threshold}GB 时分享率 ≥ ${r.minRatio}` : `分享率:${val}`
+ return `${prefix} → 封号(缓刑7天)${appText}`
}
- if (r.type === 'RATIO') {
- return `分享率:${val} → 封号(缓刑7天)${appText}`
- }
- return `${typeLabel(r.type)}:${val} → 封号/删除账号${appText}`
+ return `${typeLabel(r.type)}:${val} → 封号/删除账号${appText}`
}
const merged = computed(() => (Array.isArray(sites.value)?sites.value:[]).map(s => ({
siteId: s.siteId, names: s.names, siteType: s.siteType,