style: Update NetTestView to use webp format for Slack logo
BIN
src/assets/images/logos/emby.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
src/assets/images/logos/jellyfin.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
src/assets/images/logos/plex.jpeg
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
src/assets/images/logos/qbittorrent.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
src/assets/images/logos/slack.webp
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
src/assets/images/logos/synologychat.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/images/logos/transmission.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
src/assets/images/logos/vocechat.jpeg
Normal file
|
After Width: | Height: | Size: 11 KiB |
@@ -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" />
|
||||
|
||||