Merge privileges

This commit is contained in:
Mo Bitar
2018-12-11 12:52:15 -06:00
32 changed files with 1115 additions and 210 deletions

View File

@@ -27,9 +27,6 @@
%a.sk-panel-row{"ng-click" => "formData.showAdvanced = !formData.showAdvanced"}
Advanced Options
.sk-notification.neutral{"ng-if" => "formData.showRegister"}
.sk-notification-title No Password Reset.
.sk-notification-text Because your notes are encrypted using your password, Standard Notes does not have a password reset option. You cannot forget your password.
.sk-notification.unpadded.contrast.advanced-options.sk-panel-row{"ng-if" => "formData.showAdvanced"}
.sk-panel-column.stretch
@@ -47,12 +44,16 @@
%button.sk-button.info.featured{"type" => "submit", "ng-disabled" => "formData.authenticating"}
.sk-label {{formData.showLogin ? "Sign In" : "Register"}}
.sk-notification.neutral{"ng-if" => "formData.showRegister"}
.sk-notification-title No Password Reset.
.sk-notification-text Because your notes are encrypted using your password, Standard Notes does not have a password reset option. You cannot forget your password.
.sk-panel-row
%label
%input{"type" => "checkbox", "ng-model" => "formData.ephemeral", "ng-true-value" => "false", "ng-false-value" => "true"}
Stay signed in
.sk-panel-row
%label{"ng-if" => "notesAndTagsCount() > 0"}
.sk-panel-row
%input{"type" => "checkbox", "ng-model" => "formData.mergeLocal", "ng-bind" => "true", "ng-change" => "mergeLocalChanged()"}
Merge local data ({{notesAndTagsCount()}} notes and tags)
@@ -88,7 +89,10 @@
.sk-panel-row
%a.sk-a.info.sk-panel-row.condensed{"ng-click" => "openPasswordWizard('change-pw')"} Change Password
%a.sk-a.info.sk-panel-row.condensed{"ng-click" => "openPasswordWizard('change-pw')"}
Change Password
%a.sk-a.info.sk-panel-row.condensed{"ng-show" => "user", "ng-click" => "openPrivilegesModal('')"}
Manage Privileges
%a.sk-panel-row.justify-left.condensed.success{"ng-if" => "securityUpdateAvailable", "ng-click" => "openPasswordWizard('upgrade-security')"}
.inline.sk-circle.small.success.mr-8
.inline Security Update Available
@@ -123,19 +127,31 @@
%a.neutral.sk-a.sk-panel-row{"ng-click" => "formData.showPasscodeForm = false"} Cancel
%div{"ng-if" => "hasPasscode() && !formData.showPasscodeForm"}
.sk-panel-row
%p.sk-p
Passcode lock is enabled.
%span{"ng-if" => "isDesktopApplication()"} Your passcode will be required on new sessions after app quit.
.sk-panel-row.justify-left
.sk-horizontal-group
%a.sk-a.info{"ng-click" => "changePasscodePressed()"} Change Passcode
%a.sk-a.danger{"ng-click" => "removePasscodePressed()"} Remove Passcode
.sk-p
Passcode lock is enabled.
%span{"ng-if" => "isDesktopApplication()"} Your passcode will be required on new sessions after app quit.
.sk-notification.contrast
.sk-notification-title Options
.sk-notification-text
.sk-panel-row
.sk-horizontal-group
.sk-h4.sk-bold Autolock
%a.sk-a.info{"ng-repeat" => "option in passcodeAutoLockOptions", "ng-click" => "selectAutoLockInterval(option.value)",
"ng-class" => "{'info boxed' : option.value == selectedAutoLockInterval}"}
{{option.label}}
.sk-p The autolock timer begins when the window or tab loses focus.
.sk-panel-row
%a.sk-a.info.sk-panel-row.condensed{"ng-show" => "!user", "ng-click" => "openPrivilegesModal('')"} Manage Privileges
%a.sk-a.info.sk-panel-row.condensed{"ng-click" => "changePasscodePressed()"} Change Passcode
%a.sk-a.danger.sk-panel-row.condensed{"ng-click" => "removePasscodePressed()"} Remove Passcode
.sk-panel-section{"ng-if" => "!importData.loading"}
.sk-panel-section-title Data Backups
.sk-p
Download a backup of all your data.
.sk-panel-row
%form.sk-panel-form.sk-panel-row{"ng-if" => "encryptedBackupsAvailable()"}
.sk-input-group
%label
@@ -151,7 +167,7 @@
%label.sk-button.info
%input{"type" => "file", "style" => "display: none;", "file-change" => "->", "handler" => "importFileSelected(files)"}
.sk-label Import From Backup
.sk-label Import Backup
%span{"ng-if" => "isDesktopApplication()"} Backups are automatically created on desktop and can be managed via the "Backups" top-level menu.

View File

@@ -1,7 +1,7 @@
.sk-menu-panel-row.row{"ng-attr-title" => "{{desc}}", "ng-click" => "onClick($event)"}
.sk-menu-panel-column
.left
.sk-menu-panel-column{"ng-if" => "circle"}
.sk-menu-panel-column{"ng-if" => "circle && (!circleAlign || circleAlign == 'left')"}
.sk-circle.small{"ng-class" => "circle"}
.sk-menu-panel-column{"ng-class" => "{'faded' : faded || disabled}"}
.sk-label
@@ -13,6 +13,9 @@
%menu-row{"ng-repeat" => "row in subRows", "action" => "row.onClick()",
"label" => "row.label", "subtitle" => "row.subtitle", "spinner-class" => "row.spinnerClass"}
.sk-menu-panel-column{"ng-if" => "circle && circleAlign == 'right'"}
.sk-circle.small{"ng-class" => "circle"}
.sk-menu-panel-column{"ng-if" => "hasButton"}
.sk-button{"ng-click" => "clickButton($event)", "ng-class" => "buttonClass"}
.sk-label {{buttonText}}

View File

@@ -1,6 +1,6 @@
.background{"ng-click" => "deny()"}
.sk-modal-background{"ng-click" => "deny()"}
.content#permissions-modal
.sk-modal-content#permissions-modal
.sn-component
.sk-panel
.sk-panel-header

View File

@@ -0,0 +1,29 @@
.sk-modal-background{"ng-click" => "cancel()"}
.sk-modal-content#privileges-modal
.sn-component
.sk-panel
.sk-panel-header
.sk-panel-header-title Authentication Required
%a.close-button.info{"ng-click" => "cancel()"} Cancel
.sk-panel-content
.sk-panel-section
%div{"ng-repeat" => "credential in requiredCredentials"}
.sk-p.sk-bold.sk-panel-row
%strong {{promptForCredential(credential)}}
.sk-panel-row
%input.sk-input.contrast{"type" => "password", "ng-model" => "authenticationParameters[credential]",
"sn-autofocus" => "true", "should-focus" => "$index == 0", "sn-enter" => "submit()"}
.sk-panel-row
%label.sk-label.danger{"ng-if" => "isCredentialInFailureState(credential)"} Invalid authentication. Please try again.
.sk-panel-row
.sk-panel-row
.sk-horizontal-group
.sk-p.sk-bold Remember For
%a.sk-a.info{"ng-repeat" => "option in sessionLengthOptions", "ng-click" => "selectSessionLength(option.value)",
"ng-class" => "{'info boxed' : option.value == selectedSessionLength}"}
{{option.label}}
.sk-panel-footer.extra-padding
.sk-button.info.big.block.bold{"ng-click" => "submit()"}
.sk-label Submit

View File

@@ -0,0 +1,40 @@
.sk-modal-background{"ng-click" => "cancel()"}
.sk-modal-content#privileges-modal
.sn-component
.sk-panel
.sk-panel-header
.sk-panel-header-title Manage Privileges
%a.sk-a.close-button.info{"ng-click" => "cancel()"} Done
.sk-panel-content
.sk-panel-section
%table.sk-table
%thead
%tr
%th
%th{"ng-repeat" => "cred in availableCredentials"}
.priv-header
%strong {{credentialDisplayInfo[cred].label}}
.sk-p.font-small{"style" => "margin-top: 2px", "ng-show" => "!credentialDisplayInfo[cred].availability"} Not Configured
%tbody
%tr{"ng-repeat" => "action in availableActions"}
%td
.sk-p {{displayInfoForAction(action)}}
%th{"ng-repeat" => "credential in availableCredentials"}
%input{"type" => "checkbox", "ng-disabled" => "!credentialDisplayInfo[credential].availability", "ng-checked" => "isCredentialRequiredForAction(action, credential)", "ng-click" => "checkboxValueChanged(action, credential)"}
.sk-panel-section{"ng-if" => "sessionExpirey && !sessionExpired"}
.sk-p You will not be asked to authenticate until {{sessionExpirey}}.
%a.sk-a {"ng-click" => "clearSession()"} Clear Session
.sk-panel-footer
.sk-h2 About Privileges
.sk-panel-section.no-bottom-pad
.text-content
%p
Privileges represent interface level authentication for accessing certain items and features.
Note that when your application is unlocked, your data exists in temporary memory in an unencrypted state.
Privileges are meant to protect against unwanted access in the event of an unlocked application, but do not affect data encryption state.
%p
Privileges sync across your other devices (not including mobile); however, note that if you require
a "Local Passcode" privilege, and another device does not have a local passcode set up, the local passcode
requirement will be ignored on that device.