From ae96c6f5224cf8b288fca1936f4fb2e65084ce48 Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Fri, 3 Feb 2017 23:31:27 +0100 Subject: [PATCH] auto save default options and remove save button --- src/views/ConfigureOptions.vue | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/src/views/ConfigureOptions.vue b/src/views/ConfigureOptions.vue index e8967c9..6c9afb0 100644 --- a/src/views/ConfigureOptions.vue +++ b/src/views/ConfigureOptions.vue @@ -1,17 +1,21 @@ @@ -28,22 +32,12 @@ computed: mapGetters(['defaultPassword']), data(){ return { - options: null, optionsSaved: false } }, methods: { - saveDefault(){ - if (this.options !== null) { - this.$store.dispatch('saveDefaultPassword', {password: this.options}); - } - this.optionsSaved = true; - setTimeout(() => { - this.optionsSaved = false; - }, 3000); - }, updatePassword(password){ - this.options = password; + this.$store.dispatch('saveDefaultPassword', {password}); } } }