mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-04 16:31:37 +00:00
Fix applyMatch not closing modal
This commit is contained in:
parent
9bc7fa50db
commit
d569198e5d
1 changed files with 7 additions and 4 deletions
|
|
@ -567,12 +567,11 @@ export default {
|
||||||
},
|
},
|
||||||
async applyMatch(match) {
|
async applyMatch(match) {
|
||||||
this.parseMatchData(match)
|
this.parseMatchData(match)
|
||||||
console.log('Apply Match', match)
|
|
||||||
this.selectedMatch = match
|
this.selectedMatch = match
|
||||||
for (const key in this.selectedMatchUsage) {
|
for (const key in this.selectedMatchUsage) {
|
||||||
this.selectedMatchUsage[key] = true
|
this.selectedMatchUsage[key] = true
|
||||||
}
|
}
|
||||||
await this.submitMatchUpdate()
|
await this.submitMatchUpdate(true)
|
||||||
},
|
},
|
||||||
buildMatchUpdatePayload() {
|
buildMatchUpdatePayload() {
|
||||||
var updatePayload = {}
|
var updatePayload = {}
|
||||||
|
|
@ -626,7 +625,7 @@ export default {
|
||||||
|
|
||||||
return updatePayload
|
return updatePayload
|
||||||
},
|
},
|
||||||
async submitMatchUpdate() {
|
async submitMatchUpdate(closeOnSuccess = false) {
|
||||||
var updatePayload = this.buildMatchUpdatePayload()
|
var updatePayload = this.buildMatchUpdatePayload()
|
||||||
if (!Object.keys(updatePayload).length) {
|
if (!Object.keys(updatePayload).length) {
|
||||||
return
|
return
|
||||||
|
|
@ -655,7 +654,11 @@ export default {
|
||||||
this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
|
this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
|
||||||
}
|
}
|
||||||
this.clearSelectedMatch()
|
this.clearSelectedMatch()
|
||||||
this.$emit('selectTab', 'details')
|
if (closeOnSuccess) {
|
||||||
|
this.$emit('close')
|
||||||
|
} else {
|
||||||
|
this.$emit('selectTab', 'details')
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$toast.error(this.$strings.ToastFailedToUpdate)
|
this.$toast.error(this.$strings.ToastFailedToUpdate)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue