style: Update NetTestView to use webp format for Slack logo

This commit is contained in:
jxxghp
2024-07-25 08:18:52 +08:00
parent ea77d7e76d
commit f1dbab7d55
10 changed files with 9 additions and 35 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -2,7 +2,7 @@
import api from '@/api'
import douban from '@images/logos/douban.png'
import github from '@images/logos/github.png'
import slack from '@images/logos/slack.png'
import slack from '@images/logos/slack.webp'
import telegram from '@images/logos/telegram.webp'
import tmdb from '@images/logos/tmdb.png'
import wechat from '@images/logos/wechat.png'
@@ -157,36 +157,26 @@ async function netTest(index: number) {
if (result.success) {
target.status = 'OK'
target.message = '正常'
}
else {
} else {
target.status = 'Fail'
target.message = result.message
}
target.time = result.data?.time
target.btndisable = false
}
catch (error) {
} catch (error) {
console.error(error)
}
}
// 加载时测试所有连接
onMounted(async () => {
for (let i = 0; i < targets.value.length; i++)
await netTest(i)
for (let i = 0; i < targets.value.length; i++) await netTest(i)
})
</script>
<template>
<VList
lines="two"
border
rounded
>
<template
v-for="(target, index) of targets"
:key="target.name"
>
<VList lines="two" border rounded>
<template v-for="(target, index) of targets" :key="target.name">
<VListItem>
<template #prepend>
<VAvatar :image="target.image" />
@@ -195,30 +185,14 @@ onMounted(async () => {
{{ target.name }}
</VListItemTitle>
<VListItemSubtitle class="mt-1 me-2">
<VBadge
dot
location="start center"
offset-x="2"
:color="resolveStatusColor[target.status]"
class="me-3"
>
<VBadge dot location="start center" offset-x="2" :color="resolveStatusColor[target.status]" class="me-3">
<span class="ms-4">{{ target.message }}</span>
</VBadge>
<span
v-if="target.time"
class="text-xs text-wrap text-disabled"
>
{{ target.time }} ms
</span>
<span v-if="target.time" class="text-xs text-wrap text-disabled"> {{ target.time }} ms </span>
</VListItemSubtitle>
<template #append>
<VBtn
size="small"
icon="mdi-connection"
:disabled="target.btndisable"
@click="netTest(index)"
/>
<VBtn size="small" icon="mdi-connection" :disabled="target.btndisable" @click="netTest(index)" />
</template>
</VListItem>
<VDivider v-if="index !== targets.length - 1" />