Password wizard wip

This commit is contained in:
Mo Bitar
2018-05-17 12:32:05 -05:00
parent 8176fcc3ab
commit d8fbab52bc
9 changed files with 398 additions and 223 deletions

View File

@@ -74,35 +74,29 @@
.panel-row
%a.panel-row.condensed{"ng-click" => "newPasswordData.changePassword = !newPasswordData.changePassword"} 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-click" => "showAdvanced = !showAdvanced"} Advanced
%div{"ng-if" => "showAdvanced"}
%a.panel-row{"ng-click" => "reencryptPressed()"} Resync All Items
%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"}

View File

@@ -0,0 +1,65 @@
.modal.medium
.content
.sn-component
.panel
.header
%h1.title {{title}}
%a.close-button{"ng-click" => "close()"} Close
.content
%div{"ng-if" => "step == 0"}
%div{"ng-if" => "changePassword"}
%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.
%div{"ng-if" => "securityUpdate"}
%p Welcome to the security update process.
%p.info Press Continue to proceed.
.panel-section{"ng-if" => "step > 0"}
%h3.title.panel-row Step {{step}} — {{titleForStep(step)}}
%div{"ng-if" => "step == 1"}
%p.panel-row
The entirety of your data will be re-encrypted and re-uploaded to your account. This is a generally safe process,
but unforeseen factors like poor network connectivity or a sudden shutdown of your computer may cause this process to fail.
It's best to be on the safe side before large operations like this.
.panel-row
.button-group
.button.info{"ng-click" => "downloadBackup(true)"}
.label Download Encrypted Backup
.button.info{"ng-click" => "downloadBackup(false)"}
.label Download Decrypted Backup
%div{"ng-if" => "step == 2"}
%p.panel-row
As a result of this process, your encryption keys will change.
Any devices on which you use Standard Notes will need to end their session. After this process completes, you'll be asked to sign back in.
%p.bold.panel-row Please sign out of all applications (excluding this one), including desktop, web, and mobile (iOS and Android).
%p.panel-row Press Continue only when you have completed signing out of all your devices.
%div{"ng-if" => "step == 3"}
%div{"ng-if" => "changePassword"}
%div{"ng-if" => "securityUpdate"}
%p.panel-row Enter your current password. We'll run this through our encryption scheme to generate strong new encryption keys.
.panel-row
%form
%input.form-control{:type => 'password', "ng-model" => "formData.currentPassword", "placeholder" => "Current Password", "sn-autofocus" => "true", "should-focus" => "true"}
%input.form-control{"ng-if" => "changePassword", :type => 'password', "ng-model" => "formData.newPassword", "placeholder" => "New Password"}
%input.form-control{"ng-if" => "changePassword", :type => 'password', "ng-model" => "formData.newPasswordConfirmation", "placeholder" => "Confirm New Password"}
%div{"ng-if" => "step == 4"}
%p.panel-row
Your data is being re-encrypted with your new keys and synced to your account.
%p.panel-row.danger
Do not close this window until this process completes.
.footer
%a.right{"ng-click" => "continue()", "ng-class" => "{'disabled' : lockContinue}"}
.spinner.small.inline.info{"ng-if" => "showSpinner", "style" => "margin-right: 5px;"}
{{continueTitle}}