diff --git a/src/components/PasswordProfile.vue b/src/components/PasswordProfile.vue index e72fbff..9118e38 100644 --- a/src/components/PasswordProfile.vue +++ b/src/components/PasswordProfile.vue @@ -81,6 +81,7 @@ var r = confirm(this.$t('DeleteProfileConfirm', 'Are you sure you want to delete this password profile?')); if (r === true) { message.success(this.$t('PasswordProfileSuccessfullyDeleted', 'Your password profile has been successfully deleted!')); + this.$emit('deleted'); return this.$store.dispatch('deletePassword', {id: this.password.id}); } }, diff --git a/src/views/Passwords.vue b/src/views/Passwords.vue index a63d235..1218920 100644 --- a/src/views/Passwords.vue +++ b/src/views/Passwords.vue @@ -1,73 +1,87 @@ @@ -75,10 +89,6 @@ import PasswordProfile from '../components/PasswordProfile.vue'; import {mapGetters} from 'vuex'; - function fetchPasswords(store) { - return store.dispatch('getPasswords') - } - export default { name: 'passwords-view', data(){ @@ -86,7 +96,7 @@ searchQuery: '', pagination: { number_of_pages: 1, - per_page: 5, + per_page: 4, current_page: 1 }, } @@ -106,10 +116,6 @@ this.pagination.current_page * this.pagination.per_page ); } - }, - preFetch: fetchPasswords, - beforeMount () { - fetchPasswords(this.$store); - }, + } }