mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-26 20:50:30 +08:00
fix: proxy-provider
This commit is contained in:
parent
afe93774b0
commit
5a84d6485e
@ -50,15 +50,10 @@ const ProxyProvider: React.FC = () => {
|
||||
const providers = useMemo(() => {
|
||||
if (!data) return []
|
||||
return Object.values(data.providers)
|
||||
.filter(provider => 'subscriptionInfo' in provider)
|
||||
.filter((provider) => provider.vehicleType !== 'Compatible')
|
||||
.sort((a, b) => {
|
||||
if (a.vehicleType === 'File' && b.vehicleType !== 'File') {
|
||||
return -1
|
||||
}
|
||||
if (a.vehicleType !== 'File' && b.vehicleType === 'File') {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
const order = { File: 1, Inline: 2, HTTP: 3 }
|
||||
return (order[a.vehicleType] || 4) - (order[b.vehicleType] || 4)
|
||||
})
|
||||
}, [data])
|
||||
const [updating, setUpdating] = useState(Array(providers.length).fill(false))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user