From 576355533f7d304ca8ba6afcaf1b61e29201bc67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr> Date: Fri, 31 Dec 2021 13:02:26 +0100 Subject: [PATCH] add switch between delete and modify select mode --- src/App.vue | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/App.vue b/src/App.vue index 4d52ec45..026d0174 100644 --- a/src/App.vue +++ b/src/App.vue @@ -159,7 +159,7 @@ :key="'message-' + index" :class="['ui', message.level ? message.level : 'info', 'message']" > - <i class="close icon" @click="discardMessage(message)"></i> + <i class="close icon" @click="DISCARD_MESSAGE(message)"></i> <div class="header"> <i class="info circle icon"></i> Informations </div> @@ -194,8 +194,7 @@ <script> import frag from "vue-frag"; -import { mapState } from "vuex"; -import { mapGetters } from "vuex"; +import { mapMutations, mapState, mapGetters } from "vuex"; export default { name: "App", @@ -250,6 +249,7 @@ export default { }, methods: { + ...mapMutations(['DISCARD_MESSAGE']), logout() { this.$store.dispatch("LOGOUT"); }, @@ -258,10 +258,6 @@ export default { if (e.target.closest && !e.target.closest("#menu-dropdown")) this.menuIsOpen = false; }, - - discardMessage(message) { - this.$store.commit("DISCARD_MESSAGE", message) - } }, created() { -- GitLab