mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 21:18:54 +03:00
Tabs Trackers, Peers & Content are empty #43 && Fix global pause/resume
This commit is contained in:
parent
8bc97073be
commit
2cdbc5b2a4
7 changed files with 119 additions and 115 deletions
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -12104,9 +12104,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vuetify": {
|
"vuetify": {
|
||||||
"version": "2.3.10",
|
"version": "2.3.12",
|
||||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.3.10.tgz",
|
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.3.12.tgz",
|
||||||
"integrity": "sha512-KzL/MhZ7ajubm9kwbdCoA/cRV50RX+a5Hcqiwt7Am1Fni2crDtl2no05UNwKroTfscrYYf07gq3WIFSurPsnCA=="
|
"integrity": "sha512-FSt1pzpf0/Lh0xuctAPB7RiLbUl7bzVc7ejbXLLhfmgm7zD7yabuhVYuyVda/SzokjZMGS3j1lNu2lLfdrz0oQ=="
|
||||||
},
|
},
|
||||||
"vuex": {
|
"vuex": {
|
||||||
"version": "3.5.1",
|
"version": "3.5.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "vuetorrent",
|
"name": "vuetorrent",
|
||||||
"version": "0.3.5",
|
"version": "0.3.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
"vue-router": "^3.4.5",
|
"vue-router": "^3.4.5",
|
||||||
"vue-toastification": "^1.7.8",
|
"vue-toastification": "^1.7.8",
|
||||||
"vue2-perfect-scrollbar": "^1.5.0",
|
"vue2-perfect-scrollbar": "^1.5.0",
|
||||||
"vuetify": "^2.3.4",
|
"vuetify": "^2.3.12",
|
||||||
"vuex": "^3.5.1",
|
"vuex": "^3.5.1",
|
||||||
"vuex-persist": "^3.1.3"
|
"vuex-persist": "^3.1.3"
|
||||||
},
|
},
|
||||||
|
|
|
@ -65,6 +65,9 @@ export default {
|
||||||
this.getTorrentFiles()
|
this.getTorrentFiles()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getTorrentFiles()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<v-card flat>
|
<v-card flat>
|
||||||
<v-card-text class="pa-0" style="font-size: 1.1em">
|
<perfect-scrollbar>
|
||||||
|
<v-card-text
|
||||||
|
class="pa-0"
|
||||||
|
style="font-size: 1.1em; max-height: 500px; min-height: 400px"
|
||||||
|
>
|
||||||
<v-simple-table>
|
<v-simple-table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -98,6 +102,7 @@
|
||||||
></v-progress-linear>
|
></v-progress-linear>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
</perfect-scrollbar>
|
||||||
</v-card>
|
</v-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { map, merge, cloneDeep } from 'lodash'
|
import { map, merge } from 'lodash'
|
||||||
import qbit from '@/services/qbit'
|
import qbit from '@/services/qbit'
|
||||||
import { codeToFlag, isWindows } from '@/helpers'
|
import { codeToFlag, isWindows } from '@/helpers'
|
||||||
|
|
||||||
|
@ -76,22 +76,12 @@ export default {
|
||||||
async getTorrentPeers() {
|
async getTorrentPeers() {
|
||||||
const { data } = await qbit.getTorrentPeers(
|
const { data } = await qbit.getTorrentPeers(
|
||||||
this.hash,
|
this.hash,
|
||||||
this.rid || undefined
|
this.rid + 1 || undefined
|
||||||
)
|
)
|
||||||
|
|
||||||
this.rid = data.rid
|
this.rid = data.rid
|
||||||
|
|
||||||
if (data.full_update) {
|
|
||||||
this.peersObj = data.peers
|
this.peersObj = data.peers
|
||||||
} else {
|
|
||||||
const tmp = cloneDeep(this.peersObj)
|
|
||||||
if (data.peers_removed) {
|
|
||||||
for (const key of data.peers_removed) {
|
|
||||||
delete tmp[key]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.peersObj = merge(tmp, data.peers)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -113,6 +103,9 @@ export default {
|
||||||
peers() {
|
peers() {
|
||||||
return map(this.peersObj, (value, key) => merge({}, value, { key }))
|
return map(this.peersObj, (value, key) => merge({}, value, { key }))
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getTorrentPeers()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -78,6 +78,9 @@ export default {
|
||||||
trackers() {
|
trackers() {
|
||||||
return this.tempTrackers
|
return this.tempTrackers
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getTorrentTrackers()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -300,7 +300,7 @@ class Qbit {
|
||||||
|
|
||||||
actionTorrents(action, hashes, extra) {
|
actionTorrents(action, hashes, extra) {
|
||||||
const params = {
|
const params = {
|
||||||
hashes: hashes.join('|'),
|
hashes: hashes.length ? hashes.join('|') : 'all',
|
||||||
...extra
|
...extra
|
||||||
}
|
}
|
||||||
const data = new URLSearchParams(params)
|
const data = new URLSearchParams(params)
|
||||||
|
|
Loading…
Reference in a new issue