summaryrefslogtreecommitdiff
path: root/src/components/rules/Rules.tsx
diff options
context:
space:
mode:
authorLarvan2 <[email protected]>2026-07-05 17:36:35 +0800
committerLarvan2 <[email protected]>2026-07-05 17:36:35 +0800
commit30dfb51a61a6d6083640d411da8c63cb076318ab (patch)
tree457f95f9dafc6cf1196d35fdec5eb0d677667b23 /src/components/rules/Rules.tsx
parenta7a842ee25a5b7fc5aa0cd20e9a3086d747332bc (diff)
feat(rules): support enabling/disabling rules and show hit/entry countsHEADmaster
Wire up the mihomo rules API's extra fields (disabled, hitCount, hitAt) and the /rules/disable endpoint so each rule can be toggled on/off and shows its hit count. Also surface the rule provider's ruleCount for RuleSet-type rules, since their own size field is always -1.
Diffstat (limited to 'src/components/rules/Rules.tsx')
-rw-r--r--src/components/rules/Rules.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/rules/Rules.tsx b/src/components/rules/Rules.tsx
index c0b02ae..45c55fc 100644
--- a/src/components/rules/Rules.tsx
+++ b/src/components/rules/Rules.tsx
@@ -36,7 +36,7 @@ function Row({ index, style, data }: RowComponentProps<RulesRowProps>) {
const r = rules[index];
return (
<div style={style}>
- <Rule {...r} />
+ <Rule {...r} apiConfig={apiConfig} provider={provider} />
</div>
);
}