fix(progress): Remove striping on table view (#1490)

This commit is contained in:
Rémi Marseault 2024-01-30 08:03:32 +01:00 committed by GitHub
parent 37dae2e02c
commit 3256b1b186
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,27 +4,12 @@ import { formatPercent } from '@/helpers'
import { Torrent } from '@/types/vuetorrent'
import { computed } from 'vue'
const props = defineProps<{ torrent: Torrent; title: string; value: string }>()
const isTorrentActive = computed(() => {
return [
TorrentState.UPLOADING,
TorrentState.CHECKING_UP,
TorrentState.FORCED_UP,
TorrentState.ALLOCATING,
TorrentState.DOWNLOADING,
TorrentState.META_DL,
TorrentState.CHECKING_DL,
TorrentState.FORCED_DL,
TorrentState.CHECKING_RESUME_DATA,
TorrentState.MOVING
].includes(props.torrent.state)
})
defineProps<{ torrent: Torrent; title: string; value: string }>()
</script>
<template>
<td>
<v-progress-linear :model-value="torrent[value]" :max="1" :striped="isTorrentActive" :height="20" :color="`torrent-${torrent.state}`" rounded="sm" style="width: 10em">
<v-progress-linear :model-value="torrent[value]" :max="1" :height="20" :color="`torrent-${torrent.state}`" rounded="sm" style="width: 10em">
{{ formatPercent(torrent[value]) }}
</v-progress-linear>
</td>