diff --git a/src/components/TorrentList.vue b/src/components/TorrentList.vue index bea1b3f..a63a7e3 100644 --- a/src/components/TorrentList.vue +++ b/src/components/TorrentList.vue @@ -27,17 +27,17 @@
| + | Name ↑ ↓ | -+ | Seed ↑ ↓ | -+ |
Size
↑
↓
@@ -85,7 +85,7 @@
@@ -134,6 +134,9 @@ export default {
store.dispatch('torrentModule/reset')
},
methods: {
+ selectedSortableClass(headerName) {
+ return headerName === this.prevCol ? 'active' : ''
+ },
resetTorrentsAndToggleEditSearchQuery() {
this.torrents = []
this.toggleEditSearchQuery()
@@ -254,23 +257,19 @@ export default {
this.listLoaded = false;
this.editSearchQuery = false;
- console.log('query: ', query || this.query)
searchTorrents(query || this.query, 'all', this.currentPage, storage.token)
-// Promise.resolve({"success":true,"results":[]})
- .then(resp => {
- let data = resp.data;
- console.log('data results', data.results);
- this.torrentResponse = data.results;
- this.torrents = data.results;
+ .then(data => {
+ this.torrentResponse = [...data.results];
+ this.torrents = data.results;
+ this.listLoaded = true;
+ })
+ .then(this.updateResultCountInStore)
+ .then(this.findRelaseTypes)
+ .catch(e => {
+ const error = e.toString()
+ this.errorMessage = error.indexOf('401') != -1 ? 'Permission denied' : 'Nothing found';
this.listLoaded = true;
- })
- .then(this.findRelaseTypes)
- .then(this.updateResultCountInStore)
- .catch(e => {
- const error = e.toString()
- this.errorMessage = error.indexOf('401') != -1 ? 'Permission denied' : 'Nothing found';
- this.listLoaded = true;
- });
+ });
},
}
}
|
|---|