diff --git a/src/components/Torrents.vue b/src/components/Torrents.vue index 6e231a4..9cfc6f7 100644 --- a/src/components/Torrents.vue +++ b/src/components/Torrents.vue @@ -173,7 +173,7 @@ :color="row.item.state | stateColor(true)" class="text-center ma-0" > - + {{ row.item.progress | progress }} @@ -331,10 +331,6 @@ function getStateInfo(state: string) { }), }, filters: { - progressColorClass(progress: number) { - const color = progress >= 0.5 ? 'white' : 'black'; - return `${color}--text`; - }, formatNetworkSpeed(speed: number) { if (speed === 0) { return null; @@ -448,6 +444,12 @@ export default class Torrents extends Vue { === Math.min(this.torrents.length, this.pageOptions.rowsPerPage); } + getProgressColorClass(progress: number) { + const color = (progress >= 0.5 || (this as any).$vuetify.theme.dark) + ? 'white' : 'black'; + return `${color}--text`; + } + created() { this.pageOptions = this.$store.getters.config.pageOptions; }