mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-20 19:12:09 +08:00
fix(proxy): show a profile-defined GLOBAL in rule mode when it is the only group (#8607)
* fix(proxy): show a profile-defined GLOBAL in rule mode when it is the only group Rule mode renders only proxyView.groups, and the backend always moves GLOBAL out of that list. A profile whose only group is GLOBAL, or that has no proxy-groups, therefore showed the "no proxy info" empty state. Fall back to GLOBAL in that case, as v2.5.2 did before #7542. Fixes #8223 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(changelog): note the rule-mode GLOBAL fix Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: drop the regression test and append the changelog entry Per review: the test was only needed to confirm the fix locally, and new changelog entries go at the end of their list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: toBerlinWay <toBerlinWay@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
toBerlinWay
parent
aae5dc90ba
commit
1e4f709766
@@ -209,7 +209,13 @@ export const useRenderList = (
|
||||
|
||||
const renderGroups = useMemo(() => {
|
||||
if (!proxyView) return []
|
||||
if (mode === 'rule') return proxyView.groups
|
||||
// A profile whose only group is GLOBAL (mihomo then skips its built-in one)
|
||||
// or that has no proxy-groups has nothing else to show in rule mode.
|
||||
if (mode === 'rule') {
|
||||
return proxyView.groups.length || !proxyView.global
|
||||
? proxyView.groups
|
||||
: [proxyView.global]
|
||||
}
|
||||
const { global } = proxyView
|
||||
if (!global) return []
|
||||
const current = findCurrentGroupMember(proxyView, global)?.member
|
||||
|
||||
Reference in New Issue
Block a user