feat: warning for protected note without protection

- Use `.sn-button` everywhere
- Delete permissions modal
- Capitalize "Clear session data"
This commit is contained in:
Baptiste Grob
2021-03-22 16:51:49 +01:00
parent cd7b5cc455
commit cc474da0c3
25 changed files with 418 additions and 476 deletions

View File

@@ -12,12 +12,11 @@
)
.sk-panel-row
.sk-h1 Sign in or register to enable sync and end-to-end encryption.
.sk-panel-row
.sk-button-group.stretch
.sk-button.info.featured(ng-click='self.state.formData.showLogin = true')
.sk-label Sign In
.sk-button.info.featured(ng-click='self.showRegister()')
.sk-label Register
.flex.gap-3.my-1
button.sn-button.info.flex-grow.text-base.py-3(ng-click='self.state.formData.showLogin = true')
| Sign In
button.sn-button.info.flex-grow.text-base.py-3(ng-click='self.showRegister()')
| Register
.sk-panel-row.sk-p
| Standard Notes is free on every platform, and comes
| standard with sync and encryption.
@@ -95,12 +94,10 @@
target='_blank'
) (Learn more)
.sk-panel-section.form-submit(ng-if='!self.state.formData.authenticating')
.sk-button-group.stretch
.sk-button.info.featured(
ng-click='self.submitAuthForm()',
ng-disabled='self.state.formData.authenticating'
)
.sk-label {{self.state.formData.showLogin ? "Sign In" : "Register"}}
button.sn-button.info.text-base.py-3.text-center(
ng-click='self.submitAuthForm()',
ng-disabled='self.state.formData.authenticating'
) {{self.state.formData.showLogin ? "Sign In" : "Register"}}
.sk-notification.neutral(ng-if='self.state.formData.showRegister')
.sk-notification-title No Password Reset.
.sk-notification-text
@@ -174,17 +171,16 @@
| or revoking an active session, require additional authentication
| like entering your account password or application passcode.
.sk-panel-row(ng-if="self.state.protectionsDisabledUntil")
button.sk-button.info(ng-click="self.enableProtections()")
span.sk-label.capitalize Enable protections
button.sn-button.info(ng-click="self.enableProtections()")
| Enable protections
.sk-panel-section
.sk-panel-section-title Passcode Lock
div(ng-if='!self.state.hasPasscode')
div(ng-if='self.state.canAddPasscode')
.sk-panel-row(ng-if='!self.state.formData.showPasscodeForm')
.sk-button.info(
button.sn-button.info(
ng-click='self.addPasscodeClicked(); $event.stopPropagation();'
)
.sk-label Add Passcode
) Add Passcode
p.sk-p
| Add a passcode to lock the application and
| encrypt on-device key storage.
@@ -211,12 +207,10 @@
placeholder='Confirm Passcode',
type='password'
)
.sk-button-group.stretch.sk-panel-row.form-submit
button.sk-button.info(type='submit')
.sk-label Set Passcode
a.neutral.sk-a.sk-panel-row(
button.sn-button.info.mt-2(type='submit') Set Passcode
button.sn-button.outlined.ml-2(
ng-click='self.state.formData.showPasscodeForm = false'
) Cancel
) Cancel
div(ng-if='self.state.hasPasscode && !self.state.formData.showPasscodeForm')
.sk-panel-section-subtitle.info Passcode lock is enabled
.sk-notification.contrast
@@ -245,7 +239,6 @@
.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='self.state.encryptionEnabled')
.sk-input-group
label.sk-horizontal-group.tight
@@ -265,17 +258,17 @@
)
p.sk-p Decrypted
.sk-panel-row
.sk-button-group.sk-panel-row.justify-left
.sk-button.info(ng-click='self.downloadDataArchive()')
.sk-label Download Backup
label.sk-button.info
.flex
button.sn-button.info(ng-click='self.downloadDataArchive()')
| Download Backup
label.sn-button.info.ml-2
input(
file-change='->',
handler='self.importFileSelected(files)',
style='display: none;',
type='file'
)
.sk-label Import Backup
)
| Import Backup
span(ng-if='self.isDesktopApplication()')
| Backups are automatically created on desktop and can be managed
| via the "Backups" top-level menu.
@@ -296,8 +289,8 @@
| local storage, and a new identifier will be created should you
| decide to enable error reporting again in the future.
.sk-panel-row
button(ng-click="self.toggleErrorReportingEnabled()").sk-button.info
span.sk-label {{ self.state.errorReportingEnabled ? 'Disable' : 'Enable'}} Error Reporting
button(ng-click="self.toggleErrorReportingEnabled()").sn-button.info
| {{ self.state.errorReportingEnabled ? 'Disable' : 'Enable'}} Error Reporting
.sk-panel-row
a(ng-click="self.openErrorReportingDialog()").sk-a What data is being sent?
.sk-panel-footer
@@ -313,7 +306,7 @@
ng-if='self.state.formData.showLogin || self.state.formData.showRegister'
)
| Cancel
a.sk-a.right.danger(
a.sk-a.right.danger.capitalize(
ng-click='self.destroyLocalData()',
ng-if=`
!self.state.formData.showLogin &&

View File

@@ -5,8 +5,7 @@
.sk-label.warning There was an issue loading {{ctrl.component.name}}.
.right
.sk-app-bar-item(ng-click='ctrl.reloadIframe()')
.sk-button.info
.sk-label Reload
button.sn-button.info Reload
.sn-component(ng-if='ctrl.expired')
.sk-app-bar.no-edges.no-top-edge.dynamic-height
.left
@@ -26,16 +25,14 @@
| Extensions are in a read-only state.
.right
.sk-app-bar-item(ng-click='ctrl.reloadStatus(true)')
.sk-button.info
.sk-label Reload
button.sn-button.info Reload
.sk-app-bar-item
.sk-app-bar-item-column
.sk-button.warning
a.sk-label(
href='https://standardnotes.org/help/41/expired',
rel='noopener',
target='_blank'
) Help
a.sn-button.warning(
href='https://standardnotes.org/help/41/expired',
rel='noopener',
target='_blank'
) Help
.sn-component(ng-if="ctrl.error == 'offline-restricted'")
.sk-panel.static
@@ -57,11 +54,10 @@
li.sk-p
strong Use the Desktop application.
.sk-panel-row
.sk-button.info(
button.sn-button.info(
ng-click='ctrl.reloadStatus()',
ng-if='!ctrl.reloading'
)
.sk-label Reload
) Reload
.sk-spinner.info.small(ng-if='ctrl.reloading')
.sn-component(ng-if="ctrl.error == 'url-missing'")
.sk-panel.static

View File

@@ -30,10 +30,9 @@
.sk-menu-panel-column(ng-if="ctrl.circle && ctrl.circleAlign == 'right'")
.sk-circle.small(ng-class='ctrl.circle')
.sk-menu-panel-column(ng-if='ctrl.hasButton')
.sk-button(
button.sn-button.small(
ng-class='ctrl.buttonClass',
ng-click='ctrl.clickAccessoryButton($event)'
)
.sk-label {{ctrl.buttonText}}
) {{ctrl.buttonText}}
.sk-menu-panel-column(ng-if='ctrl.spinnerClass')
.sk-spinner.small(ng-class='ctrl.spinnerClass')

View File

@@ -41,8 +41,7 @@
| Please ensure you are running the latest version of Standard Notes
| on all platforms to ensure maximum compatibility.
.sk-panel-footer
.sk-button.info(
button.sn-button.info(
ng-click='ctrl.nextStep()',
ng-disabled='ctrl.state.lockContinue'
)
.sk-label {{ctrl.state.continueTitle}}
) {{ctrl.state.continueTitle}}

View File

@@ -1,25 +0,0 @@
.sk-modal-background(ng-click='ctrl.deny()')
#permissions-modal.sk-modal-content
.sn-component
.sk-panel
.sk-panel-header
.sk-panel-header-title Activate Extension
a.sk-a.info.close-button(ng-click='ctrl.deny()') Cancel
.sk-panel-content
.sk-panel-section
.sk-panel-row
.sk-h2
strong {{ctrl.component.name}}
| would like to interact with your
| {{ctrl.permissionsString}}
.sk-panel-row
p.sk-p
| Extensions use an offline messaging system to communicate. Learn more at
a.sk-a.info(
href='https://standardnotes.org/permissions',
rel='noopener',
target='_blank'
) https://standardnotes.org/permissions.
.sk-panel-footer
.sk-button.info.big.block.font-bold(ng-click='ctrl.accept()')
.sk-label Continue

View File

@@ -6,44 +6,41 @@
.sk-panel-content
.sk-panel-section
.sk-panel-row.sk-p
| We've detected that the data on the server may not match
| We've detected that the data on the server may not match
| the data in the current application session.
.sk-p.sk-panel-row
.sk-panel-column
strong.sk-panel-row Option 1 — Restart App:
.sk-p
| Quit the application and re-open it.
.sk-p
| Quit the application and re-open it.
| Sometimes, this may resolve the issue.
.sk-p.sk-panel-row
.sk-panel-column
strong.sk-panel-row Option 2 (recommended) — Sign Out:
.sk-p
| Sign out of your account, then sign back in.
| Sign out of your account, then sign back in.
| This will ensure your data is consistent with the server.
| Be sure to download a backup of your data before doing so.
.sk-p.sk-panel-row
.sk-panel-column
strong.sk-panel-row Option 3 — Sync Resolution:
.sk-p
| We can attempt to reconcile changes by downloading all data from the
| server. No existing data will be overwritten. If the local contents of
| We can attempt to reconcile changes by downloading all data from the
| server. No existing data will be overwritten. If the local contents of
| an item differ from what the server has, a conflicted copy will be created.
div(ng-if='!ctrl.status.backupFinished')
.sk-p.sk-panel-row
| Please download a backup before we attempt to
| Please download a backup before we attempt to
| perform a full account sync resolution.
.sk-panel-row
.sk-button-group
.sk-button.info(ng-click='ctrl.downloadBackup(true)')
.sk-label Encrypted
.sk-button.info(ng-click='ctrl.downloadBackup(false)')
.sk-label Decrypted
.sk-button.danger(ng-click='ctrl.skipBackup()')
.sk-label Skip
.flex.gap-2
button.sn-button.info(ng-click='ctrl.downloadBackup(true)') Encrypted
button.sn-button.info(ng-click='ctrl.downloadBackup(false)') Decrypted
button.sn-button.danger(ng-click='ctrl.skipBackup()') Skip
div(ng-if='ctrl.status.backupFinished')
.sk-panel-row(ng-if='!ctrl.status.resolving && !ctrl.status.attemptedResolution')
.sk-button.info(ng-click='ctrl.performSyncResolution()')
.sk-label Perform Sync Resolution
button.sn-button.info(ng-click='ctrl.performSyncResolution()')
| Perform Sync Resolution
.sk-panel-row.justify-left(ng-if='ctrl.status.resolving')
.sk-horizontal-group
.sk-spinner.small.info
@@ -51,8 +48,8 @@
.sk-panel-column(ng-if='ctrl.status.fail')
.sk-panel-row.sk-label.danger Sync Resolution Failed
.sk-p.sk-panel-row
| We attempted to reconcile local content and server content, but were
| unable to do so. At this point, we recommend signing out of your account
| We attempted to reconcile local content and server content, but were
| unable to do so. At this point, we recommend signing out of your account
| and signing back in. You may wish to download a data backup before doing so.
.sk-panel-column(ng-if='ctrl.status.success')
.sk-panel-row.sk-label.success Sync Resolution Success