account menu sections
This commit is contained in:
@@ -2,24 +2,16 @@
|
||||
.panel-body
|
||||
|
||||
%section.gray-bg.medium-padding{"ng-init" => "showSN = true"}
|
||||
%h3{"ng-click" => "showSN = !showSN"} Standard Notes Account
|
||||
.small-v-space
|
||||
%account-vendor-account-section{"ng-if" => "showSN"}
|
||||
%account-new-account-section
|
||||
|
||||
%h4
|
||||
%a{"ng-click" => "showIO = !showIO"} Import/Export
|
||||
%section.gray-bg{"ng-if" => "showIO"}
|
||||
%import-export-menu{"ng-if" => "showIO"}
|
||||
%section.gray-bg.medium-padding
|
||||
%account-sync-section
|
||||
|
||||
%h4
|
||||
%a{"ng-click" => "showAdvanced = !showAdvanced"} Advanced
|
||||
%div{"ng-if" => "showAdvanced"}
|
||||
%section.gray-bg.medium-padding
|
||||
%h3 Sync Locations ({{syncProviders.length}})
|
||||
%account-sync-section
|
||||
%section.gray-bg.medium-padding
|
||||
%account-export-section
|
||||
|
||||
%section.gray-bg.medium-padding
|
||||
%h3 Encryption Keys ({{keys.length}})
|
||||
%account-keys-section
|
||||
%section.gray-bg.medium-padding
|
||||
%account-keys-section
|
||||
|
||||
%h4
|
||||
%a{"ng-click" => "destroyLocalData()"} Destroy all local data
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
%section.white-bg{"ng-repeat" => "key in keys track by key.name"}
|
||||
%label {{key.name}}
|
||||
%p.wrap {{key.key}}
|
||||
|
||||
%a{"ng-click" => "newKeyData.showForm = !newKeyData.showForm"} Add New Key
|
||||
%form{"ng-if" => "newKeyData.showForm"}
|
||||
%input{"ng-model" => "newKeyData.name", "placeholder" => "Name your key"}
|
||||
%input{"ng-model" => "newKeyData.key", "placeholder" => "Key"}
|
||||
%button.light{"ng-click" => "submitNewKeyForm()"} Add Key
|
||||
@@ -0,0 +1,31 @@
|
||||
%h3{"ng-click" => "showSection = !showSection"}
|
||||
%a Import or export data
|
||||
|
||||
%div{"ng-if" => "showSection"}
|
||||
.options{"style" => "font-size: 12px; margin-top: 4px;"}
|
||||
%label{"ng-if" => "user"}
|
||||
%input{"type" => "radio", "ng-model" => "archiveFormData.encryption_type", "ng-value" => "'mk'", "ng-change" => "archiveFormData.encryption_type = 'mk'"}
|
||||
Encrypted with Standard File key
|
||||
%label
|
||||
%input{"type" => "radio", "ng-model" => "archiveFormData.encryption_type", "ng-value" => "'ek'", "ng-change" => "archiveFormData.encryption_type = 'ek'"}
|
||||
{{user ? 'Encrypted with custom key' : 'Encrypted' }}
|
||||
%div{"ng-if" => "!user || (user && archiveFormData.encryption_type == 'ek')"}
|
||||
%input{"ng-model" => "archiveFormData.ek", "placeholder" => "Encryption key"}
|
||||
%label
|
||||
%input{"type" => "radio", "ng-model" => "archiveFormData.encryption_type", "ng-value" => "'none'", "ng-change" => "archiveFormData.encryption_type = 'none'"}
|
||||
Decrypted
|
||||
|
||||
%a{"ng-click" => "downloadDataArchive()"} Download Data Archive
|
||||
|
||||
%div{"ng-if" => "!importData.loading"}
|
||||
%label#import-archive
|
||||
%input{"type" => "file", "style" => "display: none;", "file-change" => "->", "handler" => "importFileSelected(files)"}
|
||||
%a.disabled
|
||||
%span
|
||||
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
|
||||
|
||||
.spinner{"ng-if" => "importData.loading"}
|
||||
@@ -0,0 +1,18 @@
|
||||
%h3{"ng-click" => "showSection = !showSection"}
|
||||
%a Manage keys
|
||||
|
||||
%div{"ng-if" => "showSection"}
|
||||
%h4 Encryption Keys
|
||||
|
||||
%div{"ng-if" => "showSection"}
|
||||
%p Keys are used to encrypt and decrypt your data.
|
||||
.mt-10
|
||||
%section.white-bg{"ng-repeat" => "key in keys track by key.name"}
|
||||
%label {{key.name}}
|
||||
%p.wrap {{key.key}}
|
||||
|
||||
%a.block.mt-10{"ng-click" => "newKeyData.showForm = !newKeyData.showForm"} Add New Key
|
||||
%form{"ng-if" => "newKeyData.showForm"}
|
||||
%input{"ng-model" => "newKeyData.name", "placeholder" => "Name your key"}
|
||||
%input{"ng-model" => "newKeyData.key", "placeholder" => "Key"}
|
||||
%button.light{"ng-click" => "submitNewKeyForm()"} Add Key
|
||||
@@ -1,23 +1,15 @@
|
||||
%div{"ng-if" => "user"}
|
||||
%h3 {{user.email}}
|
||||
%p {{serverURL}}
|
||||
%div{"ng-if" => "user"}
|
||||
%a{"ng-click" => "signOutPressed()"} Sign out
|
||||
%p Note: Signing out does not delete your local items, extensions, and keys.
|
||||
%label 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.
|
||||
%label Status:
|
||||
{{encryptionStatusForNotes()}}
|
||||
%div{"ng-if" => "!user"}
|
||||
%label Sign in or Register (optional)
|
||||
%p Enter your <a href="https://standardnotes.org" target="_blank">Standard Notes</a> account information.
|
||||
%h3{"ng-click" => "showForm = !showForm"}
|
||||
%a Add a sync account
|
||||
%div{"ng-if" => "showForm"}
|
||||
%p Enter your <a href="https://standardnotes.org" target="_blank">Standard File</a> account information.
|
||||
.small-v-space
|
||||
%form.account-form{'name' => "loginForm"}
|
||||
%input.form-control{:name => 'server', :placeholder => 'Server URL', :required => true, :type => 'text', 'ng-model' => 'loginData.url'}
|
||||
%input.form-control{:autofocus => 'autofocus', :name => 'email', :placeholder => 'Email', :required => true, :type => 'email', 'ng-model' => 'loginData.email'}
|
||||
%input.form-control{:placeholder => 'Password', :name => 'password', :required => true, :type => 'password', 'ng-model' => 'loginData.user_password'}
|
||||
%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" => "loginData.mergeLocal", "ng-bind" => "true", "ng-change" => "mergeLocalChanged()"}
|
||||
%input{"type" => "checkbox", "ng-model" => "formData.mergeLocal", "ng-bind" => "true", "ng-change" => "mergeLocalChanged()"}
|
||||
Merge local notes ({{localNotesCount()}} notes)
|
||||
%button.btn.dark-button.half-button{"ng-click" => "loginSubmitPressed()", "data-style" => "expand-right", "data-size" => "s", "state" => "buttonState"}
|
||||
%span Sign In
|
||||
@@ -26,7 +18,15 @@
|
||||
%br
|
||||
.block{"style" => "margin-top: 10px; font-size: 14px; font-weight: bold; text-align: center;"}
|
||||
%a.btn{"ng-click" => "showResetForm = !showResetForm"} Passwords cannot be forgotten.
|
||||
%em{"ng-if" => "loginData.status", "style" => "font-size: 14px;"} {{loginData.status}}
|
||||
%em{"ng-if" => "formData.status", "style" => "font-size: 14px;"} {{formData.status}}
|
||||
|
||||
%label.center-align.block.faded — OR —
|
||||
%a.block.center-align.medium-text{"ng-if" => "!formData.showAddLinkForm", "ng-click" => "formData.showAddLinkForm = true"} Add sync using secret link
|
||||
%form{"ng-if" => "formData.showAddLinkForm"}
|
||||
%input.form-control{:autofocus => 'autofocus', :name => 'url', :placeholder => 'Secret URL', :required => true, :type => 'url', 'ng-model' => 'formData.url'}
|
||||
%button.btn.dark-button.btn-block{"ng-click" => "submitExternalSyncURL()"}
|
||||
Add Sync Account
|
||||
%a.block.center-align.mt-5{"ng-click" => "formData.showAddLinkForm = false"} Cancel
|
||||
|
||||
%div{"ng-if" => "showResetForm"}
|
||||
%p{"style" => "font-size: 13px; text-align: center;"}
|
||||
@@ -0,0 +1,26 @@
|
||||
%h3{"ng-click" => "showSection = !showSection"}
|
||||
%a Your sync accounts ({{syncProviders.length}})
|
||||
|
||||
%div{"ng-if" => "showSection"}
|
||||
.small-v-space
|
||||
%section.white-bg{"ng-repeat" => "provider in syncProviders"}
|
||||
%label {{!provider.enabled ? 'Not enabled' : (provider.primary ? 'Main' : 'Secondary')}}
|
||||
%em{"ng-if" => "provider.keyName"} Using key: {{provider.keyName}}
|
||||
%p {{provider.url}}
|
||||
%section.inline-h
|
||||
%div{"ng-if" => "!provider.keyName || provider.showKeyForm"}
|
||||
%p
|
||||
%strong Choose encryption key:
|
||||
%select{"ng-model" => "provider.formData.keyName"}
|
||||
%option{"ng-repeat" => "key in keys", "ng-selected" => "{{key.name == provider.formData.keyName}}", "value" => "{{key.name}}"}
|
||||
{{key.name}}
|
||||
%button{"ng-click" => "saveKey(provider)"} Set
|
||||
|
||||
%div{"ng-if" => "!provider.enabled"}
|
||||
%button.light{"ng-click" => "enableSyncProvider(provider, true)"} Set as Main
|
||||
%button.light{"ng-if" => "syncProviders.length > 1", "ng-click" => "enableSyncProvider(provider, false)"} Add as Secondary
|
||||
%button.light{"ng-if" => "provider.keyName", "ng-click" => "changeEncryptionKey(provider)"} Change Encryption Key
|
||||
%button.light{"ng-click" => "removeSyncProvider(provider)"} Remove Provider
|
||||
%div{"style" => "height: 30px;", "delay-hide" => "true", "show" => "provider.syncOpInProgress", "delay" => "1000"}
|
||||
%strong{"style" => "float: left;"} Syncing: {{provider.syncStatus.statusString}}
|
||||
.spinner{"style" => "float: right"}
|
||||
@@ -1,27 +0,0 @@
|
||||
%section.white-bg{"ng-repeat" => "provider in syncProviders"}
|
||||
%label {{!provider.enabled ? 'Not enabled' : (provider.primary ? 'Main' : 'Secondary')}}
|
||||
%em{"ng-if" => "provider.keyName"} Using key: {{provider.keyName}}
|
||||
%p {{provider.url}}
|
||||
%section.inline-h
|
||||
%div{"ng-if" => "!provider.keyName || provider.showKeyForm"}
|
||||
%p
|
||||
%strong Choose encryption key:
|
||||
%select{"ng-model" => "provider.formData.keyName"}
|
||||
%option{"ng-repeat" => "key in keys", "ng-selected" => "{{key.name == provider.formData.keyName}}", "value" => "{{key.name}}"}
|
||||
{{key.name}}
|
||||
%button{"ng-click" => "saveKey(provider)"} Set
|
||||
|
||||
%div{"ng-if" => "!provider.enabled"}
|
||||
%button.light{"ng-click" => "enableSyncProvider(provider, true)"} Set as Main
|
||||
%button.light{"ng-if" => "syncProviders.length > 1", "ng-click" => "enableSyncProvider(provider, false)"} Add as Secondary
|
||||
%button.light{"ng-if" => "provider.keyName", "ng-click" => "changeEncryptionKey(provider)"} Change Encryption Key
|
||||
%button.light{"ng-click" => "removeSyncProvider(provider)"} Remove Provider
|
||||
%div{"style" => "height: 30px;", "delay-hide" => "true", "show" => "provider.syncOpInProgress", "delay" => "1000"}
|
||||
%strong{"style" => "float: left;"} Syncing: {{provider.syncStatus.statusString}}
|
||||
.spinner{"style" => "float: right"}
|
||||
|
||||
%a{"ng-click" => "newSyncData.showAddSyncForm = !newSyncData.showAddSyncForm"} Add external sync with Secret URL
|
||||
%form{"ng-if" => "newSyncData.showAddSyncForm"}
|
||||
%input.form-control{:autofocus => 'autofocus', :name => 'url', :placeholder => 'Secret URL', :required => true, :type => 'url', 'ng-model' => 'newSyncData.url'}
|
||||
%button.btn.dark-button.btn-block{"ng-click" => "submitExternalSyncURL()"}
|
||||
Add External Sync
|
||||
@@ -1,27 +0,0 @@
|
||||
.options{"style" => "font-size: 12px; margin-top: 4px;"}
|
||||
%label{"ng-if" => "user"}
|
||||
%input{"type" => "radio", "ng-model" => "archiveFormData.encryption_type", "ng-value" => "'mk'", "ng-change" => "archiveFormData.encryption_type = 'mk'"}
|
||||
Encrypted with Standard File key
|
||||
%label
|
||||
%input{"type" => "radio", "ng-model" => "archiveFormData.encryption_type", "ng-value" => "'ek'", "ng-change" => "archiveFormData.encryption_type = 'ek'"}
|
||||
{{user ? 'Encrypted with custom key' : 'Encrypted' }}
|
||||
%div{"ng-if" => "!user || (user && archiveFormData.encryption_type == 'ek')"}
|
||||
%input{"ng-model" => "archiveFormData.ek", "placeholder" => "Encryption key"}
|
||||
%label
|
||||
%input{"type" => "radio", "ng-model" => "archiveFormData.encryption_type", "ng-value" => "'none'", "ng-change" => "archiveFormData.encryption_type = 'none'"}
|
||||
Decrypted
|
||||
|
||||
%a{"ng-click" => "downloadDataArchive()"} Download Data Archive
|
||||
|
||||
%div{"ng-if" => "!importData.loading"}
|
||||
%label#import-archive
|
||||
%input{"type" => "file", "style" => "display: none;", "file-change" => "->", "handler" => "importFileSelected(files)"}
|
||||
%a.disabled
|
||||
%span
|
||||
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
|
||||
|
||||
.spinner{"ng-if" => "importData.loading"}
|
||||
Reference in New Issue
Block a user