diff --git a/src/views/users/components/ModerationDropdown.vue b/src/views/users/components/ModerationDropdown.vue
index 892b8f39..d6e361ad 100644
--- a/src/views/users/components/ModerationDropdown.vue
+++ b/src/views/users/components/ModerationDropdown.vue
@@ -124,7 +124,7 @@ export default {
},
methods: {
getPasswordResetToken(nickname) {
- this.resetPasswordDialogOpen = true
+ this.$emit('open-reset-token-dialog')
this.$store.dispatch('GetPasswordResetToken', nickname)
},
handleConfirmationResend(user) {
diff --git a/src/views/users/index.vue b/src/views/users/index.vue
index 05bc93d1..2940f776 100644
--- a/src/views/users/index.vue
+++ b/src/views/users/index.vue
@@ -66,7 +66,10 @@
-
+
@@ -170,6 +173,10 @@ export default {
clearSelection() {
this.$refs.usersTable.clearSelection()
},
+ closeResetPasswordDialog() {
+ this.resetPasswordDialogOpen = false
+ this.$store.dispatch('RemovePasswordToken')
+ },
async createNewAccount(accountData) {
await this.$store.dispatch('CreateNewAccount', accountData)
this.createAccountDialogOpen = false
@@ -188,9 +195,8 @@ export default {
handleSelectionChange(value) {
this.$data.selectedUsers = value
},
- closeResetPasswordDialog() {
- this.resetPasswordDialogOpen = false
- this.$store.dispatch('RemovePasswordToken')
+ openResetPasswordDialog() {
+ this.resetPasswordDialogOpen = true
},
showDeactivatedButton(id) {
return this.$store.state.user.id !== id
diff --git a/src/views/users/show.vue b/src/views/users/show.vue
index 4748d3fe..aa826c07 100644
--- a/src/views/users/show.vue
+++ b/src/views/users/show.vue
@@ -5,8 +5,24 @@
{{ user.display_name }}
-
+
+
+
+
Password reset token was generated: {{ passwordResetToken }}
+
You can also use this link to reset password:
+ {{ passwordResetLink }}
+
+
+
@@ -94,10 +110,20 @@ export default {
components: { ModerationDropdown, Status },
data() {
return {
- showPrivate: false
+ showPrivate: false,
+ resetPasswordDialogOpen: false
}
},
computed: {
+ loading() {
+ return this.$store.state.users.loading
+ },
+ passwordResetLink() {
+ return this.$store.state.users.passwordResetToken.link
+ },
+ passwordResetToken() {
+ return this.$store.state.users.passwordResetToken.token
+ },
statuses() {
return this.$store.state.userProfile.statuses
},
@@ -115,8 +141,15 @@ export default {
this.$store.dispatch('FetchUserProfile', { userId: this.$route.params.id, godmode: false })
},
methods: {
+ closeResetPasswordDialog() {
+ this.resetPasswordDialogOpen = false
+ this.$store.dispatch('RemovePasswordToken')
+ },
onTogglePrivate() {
this.$store.dispatch('FetchUserProfile', { userId: this.$route.params.id, godmode: this.showPrivate })
+ },
+ openResetPasswordDialog() {
+ this.resetPasswordDialogOpen = true
}
}
}