Fixed #304: persistent message in playlist modal

merge-requests/330/head
Eliot Berriot 2018-07-21 14:47:12 +02:00
rodzic 8f8ded7483
commit 39d2c3028d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
2 zmienionych plików z 9 dodań i 4 usunięć

Wyświetl plik

@ -0,0 +1 @@
Fixed persistent message in playlist modal (#304)

Wyświetl plik

@ -7,15 +7,15 @@
<div class="description">
<template v-if="track">
<h4 class="ui header"><translate>Current track</translate></h4>
<div
<translate
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 }
</div>
</translate>
<div class="ui divider"></div>
</template>
<playlist-form></playlist-form>
<playlist-form :key="formKey"></playlist-form>
<div class="ui divider"></div>
<div v-if="errors.length > 0" class="ui negative message">
<div class="header"><translate>We cannot add the track to a playlist</translate></div>
@ -82,6 +82,7 @@ export default {
},
data () {
return {
formKey: String(new Date()),
errors: []
}
},
@ -124,6 +125,9 @@ export default {
watch: {
'$store.state.route.path' () {
this.$store.commit('playlists/showModal', false)
},
'$store.state.playlists.showModal' () {
this.formKey = String(new Date())
}
}
}