Files
standardnotes-app-web/app/assets/templates/frontend/directives/account-menu.html.haml
2017-05-04 00:02:15 -05:00

123 lines
7.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
.panel.panel-default.panel-right.account-data-menu
.panel-body.large-padding
%div{"ng-if" => "!user"}
%div{"ng-if" => "!formData.confirmPassword"}
%p Enter your account information. You can also register for free using the default server address.
.small-v-space
%form.mt-5
%input.form-control{:name => 'server', :placeholder => 'Server URL', :required => true, :type => 'text', 'ng-model' => 'formData.url'}
%input.form-control{:autofocus => 'autofocus', :name => 'email', :placeholder => 'Email', :required => true, :type => 'email', 'ng-model' => 'formData.email'}
%input.form-control{:placeholder => 'Password', :name => 'password', :required => true, :type => 'password', 'ng-model' => 'formData.user_password'}
.checkbox{"ng-if" => "localNotesCount() > 0"}
%label
%input{"type" => "checkbox", "ng-model" => "formData.mergeLocal", "ng-bind" => "true", "ng-change" => "mergeLocalChanged()"}
Merge local notes ({{localNotesCount()}} notes)
%div{"ng-if" => "!formData.status"}
%button.btn.dark-button.half-button{"ng-click" => "loginSubmitPressed()"}
%span Sign In
%button.btn.dark-button.half-button{"ng-click" => "submitRegistrationForm()"}
%span Register
%br
.block.bold.center-align{"style" => "font-size: 14px;"}
%a.btn.mt-5{"ng-click" => "formData.showResetForm = !formData.showResetForm"} Passwords cannot be forgotten.
%div{"ng-if" => "formData.confirmPassword"}
%h3 Confirm your password.
%p.mt-5 Note that because your notes are encrypted using your password, Standard Notes does not have a password reset option. You cannot forget your password.
%form.mt-10
%input.form-control{:placeholder => 'Confirm Password', :name => 'password', :required => true, :type => 'password', 'ng-model' => 'formData.pw_confirmation'}
%button.btn.dark-button.btn-block{"ng-click" => "submitPasswordConfirmation()"}
%span Confirm
%em.block.center-align.mt-10{"ng-if" => "formData.status", "style" => "font-size: 14px;"} {{formData.status}}
.gray-bg.medium-padding{"ng-if" => "formData.showResetForm"}
%p{"style" => "font-size: 13px;"}
Because notes are locally encrypted using a secret key derived from your password, there's no way to decrypt these notes if you forget your password.
For this reason, Standard Notes cannot offer a password reset option. You
%span.bold must
make sure to store or remember your password.
%div{"ng-if" => "user"}
%h2 {{user.email}}
%p {{server}}
%div.bold.mt-10.blue{"delay-hide" => "true", "show" => "syncStatus.syncOpInProgress || syncStatus.needsMoreSync", "delay" => "1000"}
.spinner.inline.mr-5.blue
{{"Syncing" + (syncStatus.total > 0 ? ":" : "")}}
%span{"ng-if" => "syncStatus.total > 0"} {{syncStatus.current}}/{{syncStatus.total}}
%p.bold.mt-10.red.block{"ng-if" => "syncStatus.error"} Error syncing: {{syncStatus.error.message}}
%a.block.mt-15{"href" => "{{dashboardURL()}}", "target" => "_blank"} → Standard File Dashboard
%a.block.mt-5{"ng-click" => "showCredentials = !showCredentials"} Show Credentials
%section.gray-bg.mt-10.medium-padding{"ng-if" => "showCredentials"}
%label.block
Encryption key:
.wrap.normal.mt-1 {{encryptionKey()}}
%label.block.mt-5.mb-0
Server password:
.wrap.normal.mt-1 {{serverPassword() ? serverPassword() : 'Not available. Sign out then sign back in to compute.'}}
%a.block.mt-5{"ng-click" => "newPasswordData.changePassword = !newPasswordData.changePassword"} Change Password
%section.gray-bg.mt-10.medium-padding{"ng-if" => "newPasswordData.changePassword"}
%p.bold Change Password (Beta)
%p.mt-10 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.mt-5 If you have thousands of items, this can take several minutes — you must keep the application window open during this process.
%p.mt-5 After changing your password, you must log out of all other applications currently signed in to your account.
%p.bold.mt-5 It is highly recommended you download a backup of your data before proceeding.
%div.mt-10{"ng-if" => "!newPasswordData.status"}
%a.red.mr-5{"ng-if" => "!newPasswordData.showForm", "ng-click" => "showPasswordChangeForm()"} Continue
%a{"ng-click" => "newPasswordData.changePassword = false; newPasswordData.showForm = false"} Cancel
%div.mt-10{"ng-if" => "newPasswordData.showForm"}
%form
%input.form-control{"type" => "text", "ng-model" => "newPasswordData.newPassword", "placeholder" => "Enter new password"}
%input.form-control{"type" => "text", "ng-model" => "newPasswordData.newPasswordConfirmation", "placeholder" => "Confirm new password"}
%button.btn.dark-button.btn-block{"ng-click" => "submitPasswordChange()"} Submit
%p.italic.mt-10{"ng-if" => "newPasswordData.status"} {{newPasswordData.status}}
.medium-v-space
%h4 Local Encryption
%p Notes are encrypted locally before being sent to the server. Neither the server owner nor an intrusive entity can decrypt your locally encrypted notes.
%div.mt-5
%label Status:
{{encryptionStatusForNotes()}}
.mt-25{"ng-if" => "!importData.loading"}
%h4 Data Archives
.mt-5{"ng-if" => "user"}
%label.normal.inline{"ng-if" => "user"}
%input{"type" => "radio", "ng-model" => "archiveFormData.encrypted", "ng-value" => "true", "ng-change" => "archiveFormData.encrypted = true"}
Encrypted
%label.normal.inline
%input{"type" => "radio", "ng-model" => "archiveFormData.encrypted", "ng-value" => "false", "ng-change" => "archiveFormData.encrypted = false"}
Decrypted
%a.block.mt-5{"ng-click" => "downloadDataArchive()", "ng-class" => "{'mt-5' : !user}"} Download Data Archive
%label.block.mt-5
%input{"type" => "file", "style" => "display: none;", "file-change" => "->", "handler" => "importFileSelected(files)"}
.fake-link Import Data from Archive
%div{"ng-if" => "importData.requestPassword"}
Enter the account password associated with the import file.
%input{"type" => "text", "ng-model" => "importData.password"}
%button{"ng-click" => "submitImportPassword()"} Decrypt & Import
%p.mt-5{"ng-if" => "user"} Notes are downloaded in the Standard File format, which allows you to re-import back into this app easily. To download as plain text files, choose "Decrypted".
.spinner.mt-10{"ng-if" => "importData.loading"}
.mt-25
%h4 Analytics
%p
Help Standard Notes improve by sending anonymous data on general usage. Learn more
%a{"href" => "https://standardnotes.org/philosophy", "target" => "_blank"} here.
%div.mt-5
%label Status:
{{analyticsManager.enabled ? "Enabled" : "Disabled"}}
%a{"ng-click" => "analyticsManager.toggleStatus()"} {{analyticsManager.enabled ? "Disable" : "Enable"}}
%a.block.mt-25.red{"ng-click" => "destroyLocalData()"} {{ user ? "Sign out and clear local data" : "Clear all local data" }}