diff --git a/src/App.vue b/src/App.vue index 7856645..44ffdbf 100644 --- a/src/App.vue +++ b/src/App.vue @@ -57,7 +57,7 @@ import Torrents from './components/Torrents.vue'; import AppFooter from './components/Footer.vue'; import LogsDialog from './components/LogsDialog.vue'; import { api } from './Api'; -import { mapActions, mapState, mapMutations } from 'vuex'; +import { mapActions, mapGetters, mapState, mapMutations } from 'vuex'; import Axios, { AxiosError } from 'axios'; export default Vue.extend({ @@ -88,7 +88,10 @@ export default Vue.extend({ clearTimeout(this.task); } }, - computed: mapState(['mainData', 'rid', 'config']), + computed: { + ...mapState(['mainData', 'rid']), + ...mapGetters(['config']), + }, methods: { ...mapMutations([ 'updateMainData', diff --git a/src/components/Drawer.vue b/src/components/Drawer.vue index 88c3a15..a4dc27a 100644 --- a/src/components/Drawer.vue +++ b/src/components/Drawer.vue @@ -52,7 +52,6 @@ v-for="(child, i) in item.filterGroups" :key="i" :group="child" - v-model="filter[child.select]" /> @@ -89,11 +88,6 @@ export default { data() { return { - filter: { - type: null, - category: null, - site: null, - }, basicItems: null, // { // 'icon': 'mdi-menu-up', @@ -179,7 +173,6 @@ export default { }, methods: { - ...mapMutations(['updateFilter']), async switchUi() { await api.switchToOldUi(); @@ -189,15 +182,6 @@ export default { this.$emit('input', Object.assign({}, this.value, {[key]: value})); }, }, - - watch: { - filter: { - handler() { - this.updateFilter(this.filter); - }, - deep: true, - }, - }, }; diff --git a/src/components/Torrents.vue b/src/components/Torrents.vue index 2ecfba6..9edca31 100644 --- a/src/components/Torrents.vue +++ b/src/components/Torrents.vue @@ -2,17 +2,25 @@
- + + mdi-delete - + mdi-play - + mdi-pause @@ -22,6 +30,7 @@ :items="torrents" item-key="hash" :hide-actions="torrents.length <= pagination.rowsPerPage" + v-class:hide-headers="hasSelected" select-all :pagination.sync="pagination" v-model="selectedRows" @@ -33,7 +42,7 @@ hide-details /> - {{ row.item.name }} + {{ row.item.name }} {{ row.item.size | formatSize }} {{ row.item.state }} {{ row.item.num_seeds }}/{{ row.item.num_complete }} {{ row.item.num_leechs }}/{{ row.item.num_incomplete }} - {{ row.item.dlspeed | formatSize }}/s - {{ row.item.upspeed | formatSize }}/s - {{ row.item.eta | formatDuration }} + {{ formatNetworkSpeed(row.item.dlspeed) }} + {{ formatNetworkSpeed(row.item.upspeed) }} + {{ row.item.eta | formatDuration({dayLimit: 100}) }} {{ row.item.ratio.toFixed(2) }} - {{ row.item.added_on | formatTimestamp }} + + + {{ row.item.added_on | formatAsDuration }} ago + + @@ -62,9 +75,10 @@