diff options
| author | Larvan2 <[email protected]> | 2026-07-05 17:36:35 +0800 |
|---|---|---|
| committer | Larvan2 <[email protected]> | 2026-07-05 17:36:35 +0800 |
| commit | 30dfb51a61a6d6083640d411da8c63cb076318ab (patch) | |
| tree | 457f95f9dafc6cf1196d35fdec5eb0d677667b23 /src/components/rules/Rule.module.scss | |
| parent | a7a842ee25a5b7fc5aa0cd20e9a3086d747332bc (diff) | |
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/Rule.module.scss')
| -rw-r--r-- | src/components/rules/Rule.module.scss | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/components/rules/Rule.module.scss b/src/components/rules/Rule.module.scss index 48a22e7..f13cab1 100644 --- a/src/components/rules/Rule.module.scss +++ b/src/components/rules/Rule.module.scss @@ -10,6 +10,10 @@ &:hover { background-color: var(--bg-near-transparent); } + + &.disabled { + opacity: 0.45; + } } .left { @@ -79,3 +83,27 @@ font-weight: 600; letter-spacing: 0.02em; } + +.hitInfo { + display: flex; + align-items: center; + gap: 4px; + color: var(--color-text-secondary); + cursor: default; +} + +.spacer { + flex: 1; +} + +.wrapSwitch { + display: flex; + align-items: center; + transform: scale(0.7); + transform-origin: right center; + + &.pending { + opacity: 0.6; + pointer-events: none; + } +} |
