Skip to content

Commit

Permalink
fix: proxy provider style
Browse files Browse the repository at this point in the history
  • Loading branch information
Zephyruso committed Feb 20, 2025
1 parent dcdd87f commit ebeb17e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
8 changes: 5 additions & 3 deletions src/components/proxies/ProxyGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@ const availableProxies = computed(() => {
})
const proxiesCount = computed(() => {
if (availableProxies.value < renderProxies.value.length) {
return `${availableProxies.value}/${renderProxies.value.length}`
const all = proxyGroup.value.all?.length ?? 0
if (availableProxies.value < all) {
return `${availableProxies.value}/${all}`
}
return renderProxies.value.length
return all
})
const isLatencyTesting = ref(false)
Expand Down
21 changes: 12 additions & 9 deletions src/components/proxies/ProxyProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<div class="flex items-center gap-2">
<div class="text-lg font-medium sm:text-xl">
{{ proxyProvider.name }}
<span class="text-sm"> ({{ proxiesCount }}) </span>
<span class="ml-1 text-sm text-base-content/60"
>{{ $t('updated') }} {{ fromNow(proxyProvider.updatedAt) }}</span
>
<span class="text-sm font-normal text-base-content/60"> ({{ proxiesCount }}) </span>
<span class="text-sm font-normal text-base-content/60">
{{ $t('updated') }} {{ fromNow(proxyProvider.updatedAt) }}
</span>
</div>
<div class="flex-1" />
<div class="flex gap-2">
Expand Down Expand Up @@ -43,8 +43,9 @@
class="flex justify-between text-sm text-base-content/60"
>
<div>
{{ subscriptionInfo.used }} / {{ subscriptionInfo.total }} (
{{ subscriptionInfo.percentage }}% )
{{ subscriptionInfo.used }} / {{ subscriptionInfo.total }} ({{
subscriptionInfo.percentage
}}%)
</div>
<div>{{ subscriptionInfo.expirePrefix() }}: {{ subscriptionInfo.expireStr() }}</div>
</div>
Expand Down Expand Up @@ -131,10 +132,12 @@ const availableProxies = computed(() => {
return renderProxies.value.filter((proxy) => getLatencyByName(proxy) !== NOT_CONNECTED).length
})
const proxiesCount = computed(() => {
if (availableProxies.value < renderProxies.value.length) {
return `${availableProxies.value}/${renderProxies.value.length}`
const all = proxyProvider.value.proxies?.length ?? 0
if (availableProxies.value < all) {
return `${availableProxies.value}/${all}`
}
return renderProxies.value.length
return all
})
const subscriptionInfo = computed(() => {
Expand Down

0 comments on commit ebeb17e

Please sign in to comment.