mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:37:08 +00:00
Reset snack message when hiding.
This is so that the same message will cause the snack to be shown again.
This commit is contained in:
@@ -65,6 +65,16 @@ export default {
|
|||||||
|
|
||||||
snackText (newVal) {
|
snackText (newVal) {
|
||||||
this.snack = !!newVal;
|
this.snack = !!newVal;
|
||||||
|
},
|
||||||
|
|
||||||
|
snack (newVal) {
|
||||||
|
// When the snack is hidden (one way or another), clear
|
||||||
|
// the text so that if we receive the same message again
|
||||||
|
// afterwards it will be shown. This way, if we get spammed
|
||||||
|
// we're also not triggering the snack too often.
|
||||||
|
if (!newVal) {
|
||||||
|
this.$store.commit('setSnackText', "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user