Functioning password change

This commit is contained in:
Mo Bitar
2018-05-18 15:27:16 -05:00
parent d8fbab52bc
commit d7b9a021a4
11 changed files with 159 additions and 115 deletions

View File

@@ -76,42 +76,6 @@
%a.panel-row.condensed{"ng-click" => "openPasswordWizard('change-pw')"} Change Password
-# .notification.warning{"ng-if" => "newPasswordData.changePassword"}
-# %h1.title Change Password
-# .text
-# %p Since your encryption key is based on your password, changing your password requires all your notes and tags to be re-encrypted using your new key.
-# %p If you have thousands of items, this can take several minutes — you must keep the application window open during this process.
-# %p After changing your password, you must log out of all other applications currently signed in to your account.
-# %p.bold It is highly recommended you download a backup of your data before proceeding.
-# .panel-row{"ng-if" => "!newPasswordData.status"}
-# .horizontal-group{"ng-if" => "!newPasswordData.showForm"}
-# %a.red{"ng-click" => "showPasswordChangeForm()"} Continue
-# %a{"ng-click" => "newPasswordData.changePassword = false; newPasswordData.showForm = false"} Cancel
-# .panel-row{"ng-if" => "newPasswordData.showForm"}
-# %form.panel-form.stretch
-# %input{:type => 'password', "ng-model" => "newPasswordData.newPassword", "placeholder" => "Enter new password"}
-# %input{:type => 'password', "ng-model" => "newPasswordData.newPasswordConfirmation", "placeholder" => "Confirm new password"}
-# .button-group.stretch.panel-row.form-submit
-# .button.info{"type" => "submit", "ng-click" => "submitPasswordChange()"}
-# .label Submit
-# %a{"ng-click" => "newPasswordData.changePassword = false; newPasswordData.showForm = false"} Cancel
-#
-# %p.italic.mt-10{"ng-if" => "newPasswordData.status"} {{newPasswordData.status}}
%a.panel-row.condensed{"ng-if" => "securityUpdateAvailable()", "ng-click" => "clickedSecurityUpdate()"} Security Update Available
.notification.default{"ng-if" => "securityUpdateData.showForm"}
%p
%a{"href" => "https://standardnotes.org/help/security-update", "target" => "_blank"} Learn more.
%form.panel-form.stretch{"ng-if" => "!securityUpdateData.processing", "ng-submit" => "submitSecurityUpdateForm()"}
%p Enter your password to update:
%input.panel-row{:type => 'password', "ng-model" => "securityUpdateData.password", "placeholder" => "Enter password"}
.button-group.stretch.panel-row.form-submit
%button.button.info{"ng-type" => "submit"}
.label Update
.panel-row{"ng-if" => "securityUpdateData.processing"}
%p.info Processing...
.panel-section
%h3.title.panel-row Encryption
%h5.subtitle.info.panel-row{"ng-if" => "encryptionEnabled()"}