Skip to content

Commit

Permalink
fix: global for sing-box
Browse files Browse the repository at this point in the history
  • Loading branch information
Zephyruso committed Feb 18, 2025
1 parent dda297a commit 624bc7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/sidebar/ProxiesCtrl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default defineComponent({
key={mode}
value={mode}
>
{t(mode.toLowerCase()) || mode}
{t(mode.toLowerCase())}
</option>
)
})}
Expand Down
13 changes: 3 additions & 10 deletions src/composables/proxies.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { isSingBox } from '@/api'
import { PROXY_TAB_TYPE } from '@/constant'
import { configs } from '@/store/config'
import {
Expand All @@ -24,19 +23,13 @@ const renderGroups = computed(() => {
return proxyProviederList.value.map((group) => group.name)
}

if (!isSingBox.value && configs.value?.mode.toUpperCase() === GLOBAL) {
if (configs.value?.mode.toUpperCase() === GLOBAL) {
return [GLOBAL]
}

const proxyGroups = [...proxyGroupList.value]

if (isSingBox.value) {
proxyGroups.push(GLOBAL)
}

return manageHiddenGroup.value
? proxyGroups
: proxyGroups.filter((name) => !hiddenGroupMap.value[name])
? proxyGroupList.value
: proxyGroupList.value.filter((name) => !hiddenGroupMap.value[name])
})

export const useProxies = () => {
Expand Down

0 comments on commit 624bc7b

Please sign in to comment.