Fixed #304: persistent message in playlist modal
This commit is contained in:
parent
8f8ded7483
commit
39d2c3028d
|
@ -0,0 +1 @@
|
||||||
|
Fixed persistent message in playlist modal (#304)
|
|
@ -7,15 +7,15 @@
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<template v-if="track">
|
<template v-if="track">
|
||||||
<h4 class="ui header"><translate>Current track</translate></h4>
|
<h4 class="ui header"><translate>Current track</translate></h4>
|
||||||
<div
|
<translate
|
||||||
v-translate="{artist: track.artist.name, title: track.title}"
|
v-translate="{artist: track.artist.name, title: track.title}"
|
||||||
:template-params="{artist: track.artist.name, title: track.title}">
|
:translate-params="{artist: track.artist.name, title: track.title}">
|
||||||
"%{ title }", by %{ artist }
|
"%{ title }", by %{ artist }
|
||||||
</div>
|
</translate>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<playlist-form></playlist-form>
|
<playlist-form :key="formKey"></playlist-form>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<div v-if="errors.length > 0" class="ui negative message">
|
<div v-if="errors.length > 0" class="ui negative message">
|
||||||
<div class="header"><translate>We cannot add the track to a playlist</translate></div>
|
<div class="header"><translate>We cannot add the track to a playlist</translate></div>
|
||||||
|
@ -82,6 +82,7 @@ export default {
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
formKey: String(new Date()),
|
||||||
errors: []
|
errors: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -124,6 +125,9 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.route.path' () {
|
'$store.state.route.path' () {
|
||||||
this.$store.commit('playlists/showModal', false)
|
this.$store.commit('playlists/showModal', false)
|
||||||
|
},
|
||||||
|
'$store.state.playlists.showModal' () {
|
||||||
|
this.formKey = String(new Date())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue