Render dialog window for resetting password on Status view page, fix styles

This commit is contained in:
Angelina Filippova 2020-05-20 23:10:32 +03:00
parent 1d2ecc5255
commit 7aea244706
4 changed files with 45 additions and 19 deletions

View file

@ -27,6 +27,9 @@
:page="'userPage'" :page="'userPage'"
@open-reset-token-dialog="openResetPasswordDialog"/> @open-reset-token-dialog="openResetPasswordDialog"/>
</div> </div>
<reset-password-dialog
:reset-password-dialog-open="resetPasswordDialogOpen"
@close-reset-token-dialog="closeResetPasswordDialog"/>
<div class="status-container"> <div class="status-container">
<status :status="status" :account="user" :show-checkbox="false" :godmode="showPrivate"/> <status :status="status" :account="user" :show-checkbox="false" :godmode="showPrivate"/>
</div> </div>
@ -49,10 +52,11 @@
import Status from '@/components/Status' import Status from '@/components/Status'
import ModerationDropdown from '../users/components/ModerationDropdown' import ModerationDropdown from '../users/components/ModerationDropdown'
import RebootButton from '@/components/RebootButton' import RebootButton from '@/components/RebootButton'
import ResetPasswordDialog from '@/views/users/components/ResetPasswordDialog'
export default { export default {
name: 'UsersShow', name: 'UsersShow',
components: { ModerationDropdown, RebootButton, Status }, components: { ModerationDropdown, RebootButton, ResetPasswordDialog, Status },
data() { data() {
return { return {
showPrivate: false, showPrivate: false,
@ -94,6 +98,10 @@ export default {
accountExists(account, key) { accountExists(account, key) {
return account[key] return account[key]
}, },
closeResetPasswordDialog() {
this.resetPasswordDialogOpen = false
this.$store.dispatch('RemovePasswordToken')
},
onTogglePrivate() { onTogglePrivate() {
this.$store.dispatch('FetchUserStatuses', { userId: this.user.id, godmode: this.showPrivate }) this.$store.dispatch('FetchUserStatuses', { userId: this.user.id, godmode: this.showPrivate })
}, },
@ -113,6 +121,12 @@ export default {
margin-left: 28px; margin-left: 28px;
color: #606266; color: #606266;
} }
.password-reset-token {
margin: 0 0 14px 0;
}
.password-reset-token-dialog {
width: 50%
}
.reboot-button { .reboot-button {
padding: 10px; padding: 10px;
margin-left: 6px; margin-left: 6px;
@ -124,6 +138,9 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.reset-password-link {
text-decoration: underline;
}
.show-private-statuses { .show-private-statuses {
margin-left: 28px; margin-left: 28px;
margin-bottom: 20px; margin-bottom: 20px;
@ -164,6 +181,9 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.password-reset-token-dialog {
width: 85%
}
.recent-statuses { .recent-statuses {
margin: 20px 10px 15px 10px; margin: 20px 10px 15px 10px;
} }

View file

@ -45,14 +45,3 @@ export default {
} }
</script> </script>
<style rel='stylesheet/scss' lang='scss'>
.password-reset-token-dialog {
width: 50%
}
@media only screen and (max-width:480px) {
.password-reset-token-dialog {
width: 85%
}
}
</style>

View file

@ -234,17 +234,20 @@ export default {
.create-account > .el-icon-plus { .create-account > .el-icon-plus {
margin-right: 5px; margin-right: 5px;
} }
.password-reset-token {
margin: 0 0 14px 0;
}
.password-reset-token-dialog {
width: 50%
}
.reset-password-link {
text-decoration: underline;
}
.users-header-container { .users-header-container {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.password-reset-token {
margin: 0 0 14px 0;
}
.reset-password-link {
text-decoration: underline;
}
.users-container { .users-container {
h1 { h1 {
margin: 10px 0 0 15px; margin: 10px 0 0 15px;
@ -278,6 +281,9 @@ export default {
} }
@media only screen and (max-width:480px) { @media only screen and (max-width:480px) {
.password-reset-token-dialog {
width: 85%
}
.users-container { .users-container {
h1 { h1 {
margin: 0; margin: 0;

View file

@ -192,7 +192,6 @@ table {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.el-table--border::after, .el-table--group::after, .el-table::before { .el-table--border::after, .el-table--group::after, .el-table::before {
background-color: transparent; background-color: transparent;
} }
@ -211,6 +210,12 @@ table {
margin-left: 28px; margin-left: 28px;
color: #606266; color: #606266;
} }
.password-reset-token {
margin: 0 0 14px 0;
}
.password-reset-token-dialog {
width: 50%
}
.poll ul { .poll ul {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
@ -228,6 +233,9 @@ table {
.recent-statuses-header { .recent-statuses-header {
margin-top: 10px; margin-top: 10px;
} }
.reset-password-link {
text-decoration: underline;
}
.security-setting-button { .security-setting-button {
margin-top: 20px; margin-top: 20px;
width: 100%; width: 100%;
@ -279,6 +287,9 @@ table {
.el-timeline-item__wrapper { .el-timeline-item__wrapper {
padding-left: 18px; padding-left: 18px;
} }
.password-reset-token-dialog {
width: 85%
}
.recent-statuses { .recent-statuses {
margin: 20px 10px 15px 10px; margin: 20px 10px 15px 10px;
} }