Skip to content

Commit

Permalink
fix: add tracker dialog bug #187
Browse files Browse the repository at this point in the history
* Update Trackers.vue

AddTrackers dialog bug fix

* rename dialog prop

Co-authored-by: Daan Wijns <dw.daanwijns@gmail.com>
  • Loading branch information
m4ximuel and WDaan committed Apr 3, 2021
1 parent 0651250 commit 7c7e40d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/components/Modals/TorrentDetailModal/Tabs/Trackers.vue
Expand Up @@ -48,7 +48,7 @@
>
Delete
</v-btn>
<v-dialog v-model="dialog" persistent max-width="290">
<v-dialog v-model="trackerDialog" persistent max-width="290">
<template #activator="{ on, attrs }">
<v-btn
color="accent"
Expand Down Expand Up @@ -77,7 +77,7 @@
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn color="red darken-1" text @click="addTrackers">
<v-btn color="red darken-1" text @click="closeAddTrackers">
Cancel
</v-btn>
<v-btn color="green darken-1" text @click="addTrackers">
Expand Down Expand Up @@ -129,7 +129,7 @@ export default {
{ text: 'Message', value: 'msg' }
],
tempTrackers: [],
dialog: false,
trackerDialog: false,
newTrackers: '',
selectedTrackers: []
}),
Expand All @@ -154,12 +154,16 @@ export default {
this.tempTrackers = data
},
async addTrackers() {
if (!this.newTrackers.length) return (this.dialog = false)
if (!this.newTrackers.length) return (this.trackerDialog = false)
qbit.addTorrenTrackers(this.hash, this.newTrackers)
this.newTrackers = ''
await this.getTorrentTrackers()
this.dialog = false
this.trackerDialog = false
},
closeAddTrackers() {
this.newTrackers = ''
this.trackerDialog = false
},
async DeleteTrackers() {
if (!this.selectedTrackers.length) return
Expand Down

0 comments on commit 7c7e40d

Please sign in to comment.