From 19de6694ca642f6d066c077ca5df3744585619bd Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 22 Jan 2019 13:09:40 -0700 Subject: [PATCH] Bring in the change password section This also changes the layout slightly in the user settings, but nothing detrimental. --- .../settings/tabs/_GeneralSettingsTab.scss | 18 +++++++ src/components/structures/UserSettings.js | 4 +- .../views/dialogs/SetPasswordDialog.js | 5 +- src/components/views/elements/Field.js | 5 ++ .../views/settings/ChangePassword.js | 39 +++++--------- .../views/settings/tabs/GeneralSettingsTab.js | 52 ++++++++++++++++++- src/i18n/strings/en_EN.json | 7 +-- 7 files changed, 94 insertions(+), 36 deletions(-) diff --git a/res/css/views/settings/tabs/_GeneralSettingsTab.scss b/res/css/views/settings/tabs/_GeneralSettingsTab.scss index caacd0d3c7..097d81dab4 100644 --- a/res/css/views/settings/tabs/_GeneralSettingsTab.scss +++ b/res/css/views/settings/tabs/_GeneralSettingsTab.scss @@ -88,4 +88,22 @@ .mx_GeneralSettingsTab_profileAvatarUpload { display: none; +} + +.mx_GeneralSettingsTab_changePassword { + display: block; +} + +.mx_GeneralSettingsTab_changePassword .mx_Field { + display: block; + margin-right: 100px; // Align with the other fields on the page +} + +.mx_GeneralSettingsTab_changePassword .mx_Field input { + display: block; + width: calc(100% - 20px); // subtract 10px padding on left and right +} + +.mx_GeneralSettingsTab_changePassword .mx_Field:first-child { + margin-top: 0; } \ No newline at end of file diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 65e1897137..f8d9e2dd84 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -1268,9 +1268,7 @@ module.exports = React.createClass({ ); diff --git a/src/components/views/dialogs/SetPasswordDialog.js b/src/components/views/dialogs/SetPasswordDialog.js index 42c35ad187..fe3a2216f4 100644 --- a/src/components/views/dialogs/SetPasswordDialog.js +++ b/src/components/views/dialogs/SetPasswordDialog.js @@ -116,9 +116,8 @@ export default React.createClass({