@@ -14,7 +14,7 @@ import type { RoutingRule } from "../../../generated/bindings";
1414import { useFormatters , useT } from "../../../i18n" ;
1515import type { AdvancedSettings } from "../../../lib/bridge" ;
1616import { getRuntimeBridgeMode } from "../../../lib/ksu-webui" ;
17- import { ruleIcon , ruleSummary } from "../helpers" ;
17+ import { isCatchAllRule , ruleIcon , ruleSummary } from "../helpers" ;
1818import { makePresetRule , RULE_PRESETS } from "../rule-presets" ;
1919
2020export function RoutingSection ( {
@@ -51,6 +51,7 @@ export function RoutingSection({
5151 const profileName = ( tag : string ) => profiles . find ( ( p ) => p . id === tag ) ?. remarks ;
5252 const domainStrategy4Xray = settings . domainStrategy ;
5353 const domainStrategy4Singbox = settings . domainStrategy4Singbox ;
54+ const catchAllIndex = routingRules . findIndex ( isCatchAllRule ) ;
5455
5556 return (
5657 < >
@@ -204,7 +205,21 @@ export function RoutingSection({
204205 key = { rule . id }
205206 icon = { ruleIcon ( rule ) }
206207 title = { rule . remarks || t ( "settings.routingRuleDefault" , { n : index + 1 } ) }
207- sub = { ruleSummary ( rule , t , formatters , profileName ) }
208+ sub = {
209+ < >
210+ { ruleSummary ( rule , t , formatters , profileName ) }
211+ { index === catchAllIndex && (
212+ < div style = { { color : "var(--warn)" , marginTop : 2 } } >
213+ { t ( "settings.routingCatchAll" ) }
214+ </ div >
215+ ) }
216+ { catchAllIndex >= 0 && index > catchAllIndex && rule . enabled && (
217+ < div style = { { color : "var(--on-surface-faint)" , marginTop : 2 } } >
218+ { t ( "settings.routingUnreachable" ) }
219+ </ div >
220+ ) }
221+ </ >
222+ }
208223 onClick = { ( ) => onEditRule ( rule ) }
209224 right = {
210225 < div style = { { display : "flex" , alignItems : "center" , gap : 6 } } >
0 commit comments