Commit Graph

38 Commits

Author SHA1 Message Date
Mo
dfde84c2f6 fix: display correct app version for desktop 2022-01-05 15:50:40 +01:00
Vardan Hakobyan
f120af3b43 feat: handle unprotected session expiration (#779)
* feat: hide note contents if the protection expires when the protected note is open and wasn't edited for a while

* feat: handle session expiration for opened protected note for both plain advanced editors

* fix: if after canceling  session expiry modal only one unprotected note stays selected, show its contents in the editor

* refactor: handle session expiration for opened protected note (move the logic to web client)

* feat: handle the case of selecting "Don't remember" option in session expiry dialog

* test (WIP): add unit tests for protecting opened note after the session has expired

* test: add remaining unit tests

* refactor: move the opened note protection logic to "editor_view"

* refactor: reviewer comments
- don't rely on user signed-in/out status to require authentication for protected note
- remove unnecessary async/awaits
- better wording on ui

* refactor: reviewer's comments:
 - use snjs method to check if "Don't remember" option is selected in authentication modal
 - move the constant to snjs
 - fix eslint error

* refactor: avoid `any` type for `appEvent` payload

* test: add unit tests

* chore: update function name

* refactor: use simpler protection session event types

* refactor: protected access terminology

* refactor: start counting idle timer after every edit (instead of counting by interval in spite of edits)

* test: unit tests

* style: don't give extra brightness to the "View Note"/"Authenticate" button on hover/focus

* chore: bump snjs version

* chore: put snjs "beta" version

* fix: run protection timeout when the note is marked as protected

* chore: snjs version bump

* refactor: immediately lock the note if it's marked as "Protected"

* refactor: rename component, directive and some props

* refactor: remove extra check

* refactor: rename the method

* chore: update snjs version

Co-authored-by: Mo Bitar <me@bitar.io>
2021-12-20 20:54:37 +04:00
Karol Sójko
2e168df929 Revert "feat: handle unprotected session expiration (#747)"
This reverts commit 8db549f6f6.
2021-12-15 15:26:31 +01:00
Vardan Hakobyan
8db549f6f6 feat: handle unprotected session expiration (#747)
* feat: hide note contents if the protection expires when the protected note is open and wasn't edited for a while

* feat: handle session expiration for opened protected note for both plain advanced editors

* fix: if after canceling  session expiry modal only one unprotected note stays selected, show its contents in the editor

* refactor: handle session expiration for opened protected note (move the logic to web client)

* feat: handle the case of selecting "Don't remember" option in session expiry dialog

* test (WIP): add unit tests for protecting opened note after the session has expired

* test: add remaining unit tests

* refactor: move the opened note protection logic to "editor_view"

* refactor: reviewer comments
- don't rely on user signed-in/out status to require authentication for protected note
- remove unnecessary async/awaits
- better wording on ui

* refactor: reviewer's comments:
 - use snjs method to check if "Don't remember" option is selected in authentication modal
 - move the constant to snjs
 - fix eslint error

* refactor: avoid `any` type for `appEvent` payload

* test: add unit tests

* chore: update function name

* refactor: use simpler protection session event types

* refactor: protected access terminology

* refactor: start counting idle timer after every edit (instead of counting by interval in spite of edits)

* test: unit tests

* style: don't give extra brightness to the "View Note"/"Authenticate" button on hover/focus

* chore: bump snjs version

Co-authored-by: Mo Bitar <me@bitar.io>
2021-12-14 19:14:01 +04:00
Aman Harwara
b29dc8ecc6 fix: Last sync date padding (#768) 2021-12-10 19:06:35 +05:30
Aman Harwara
024d44f1ff fix: Password toggle triggering on Enter when checkbox is focused (#767) 2021-12-09 23:18:52 +05:30
Aman Harwara
88cc50e8b6 fix: Fix icon colors to be more themeable (#724) 2021-11-06 19:29:03 +05:30
Gorjan Petrovski
31222e1236 feat(preferences): extension modals into extension panes (#683)
* feat(preferences): show inline extensions in extensions pane

* wip

* wip

* refactor: convert ComponentView to React component

* refactor: convert ComponentView to React component

* chore: fix merge conflicts

* feat: don't show features whose `area` is "room", update modal items' icons in Preferences menu

* chore: fix TS error

* feat: don't show 2FA Manager in modal-based component

* feat: remove `ExtendedDataReloadComplete` event, since Extensions Manger is being removed from the app

* chore: avoid hardcoded values in svg image, optimize `if` condition

* chore: remove remnant comment

* fix: fix typescript errors

Co-authored-by: vardanhakobyan <vardan_live@live.com>
2021-10-25 12:45:36 +04:00
Mo
413fe47828 chore: update all dependencies (#699) 2021-10-22 14:47:41 -05:00
Aman Harwara
f4949249f2 feat: Use Menu component in the general account menu (#698) 2021-10-22 19:46:25 +05:30
Aman Harwara
29138ea597 fix: Fix spacing in "Help & feedback" button in general account menu (#693) 2021-10-19 13:36:57 +00:00
Aman Harwara
c8dc07d42b feat: Add quick settings menu with theme switcher and other changes (#673)
Co-authored-by: Mo Bitar <mo@standardnotes.org>
Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>
2021-10-19 04:28:46 +00:00
Aman Harwara
3953713f45 feat: Add app version & server to account menu (#682)
* feat: Add app version & server to account menu

* fix: Fix email bottom margin

* fix: Fix spacing of email & server in account menu

* feat: Move version to right of "Help & Feedback" button
2021-10-15 09:16:08 -05:00
Gorjan Petrovski
6f18664564 feat(preferences): no-subscription for non logged in users (#676)
* feat(preferences): no-subscription for non logged in users

* fix: check if user has account using application.hasAccount()
2021-10-11 17:29:41 +02:00
Aman Harwara
f1122f292e feat: New account menu and text input with icon & toggle (#665)
* feat: Add new icons

* Revert "feat: Add new icons"

This reverts commit 0acb403fe846dbb2e48fd22de35c3568c3cb4453.

* feat: Add new icons for account menu

* feat: Add new Icons

* feat: Add "currentPane" state to prefs view

* feat: Update account menu to new design

* feat: Add input component with icon & toggle

* fix: sync icon & function

* fix: Fix eye icon

* feat: Create re-usable checkbox

feat: Add "merge local" option

* feat: Allow using className on IconButton

* feat: Add disabled state on input

feat: Make toggle circle

* refactor: Move checkbox to components

* feat: Handle invalid email/password error

* feat: Implement new design for Create Account

* feat: Implement new account menu design

* feat: Add disabled option to IconButton

* feat: Set account menu pane from other component

* feat: Add 2fa account menu pane

feat: Add lock icon

* feat: Remove unnecessary 2FA menu pane

feat: Reset current menu pane on clickOutside

* feat: Change "Log in" to "Sign in"

* feat: Remove sync from footer

* feat: Change "Login" to "Sign in"

feat: Add spinner to "Syncing..."

refactor: Use then-catch-finally for sync

* feat: Use common enableCustomServer state

* feat: Animate account menu closing

* fix: Reset menu pane only after it's closed

* feat: Add keyDown handler to InputWithIcon

* feat: Handle Enter press in inputs

* Update app/assets/javascripts/components/InputWithIcon.tsx

Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>

* Update app/assets/javascripts/components/InputWithIcon.tsx

Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>

* refactor: Use server state from AccountMenuState

* Update app/assets/javascripts/components/AccountMenu/CreateAccount.tsx

Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>

* Update app/assets/javascripts/components/AccountMenu/ConfirmPassword.tsx

Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>

* feat: Use common AdvancedOptions

* feat: Add "eye-off" icon and toggle state

* feat: Allow undefined values

* refactor: Remove enableCustomServer state

* feat: Persist server option state

* feat: Add bottom-100 and cursor-auto util classes

refactor: Use bottom-100 and cursor-auto classes

* refactor: Invert ternary operator

* refactor: Remove unused imports

* refactor: Use toggled as prop instead of state

* refactor: Change "Log in/out" to "Sign in/out"

* refactor: Change "Login" to "Sign in"

* refactor: Remove hardcoded width/height

* refactor: Use success class

* feat: Remove hardcoded width & height from svg

* fix: Fix chevron-down icon

Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>
Co-authored-by: Antonella Sgarlatta <antonella@standardnotes.org>
2021-10-08 11:18:31 -05:00
Gorjan Petrovski
d89f6bfac1 fix: remove unused vars in account menu (#659) 2021-10-04 11:04:08 +02:00
Gorjan Petrovski
0e5692d8ab feat: slim account menu and icon buttons (#655)
* feat: footer icon for preferences menu

* feat: account footer icon

* feat: account menu icon and slimmed down account menu
2021-09-29 17:52:27 +02:00
Gorjan Petrovski
1294b94117 feat: integrate two factor authentication (#626)
* feat: integrate SNJS MFA with web

* fix: create rudimentary typings file for qrcode.react

* chore: lint fixes

* fix: address PR feedback

* fix: address PR feedback

* fix: address PR feedback 2

* fix: replace spread props on TwoFactorAuthWrapper component

* chore: change null check to undefined check
2021-09-06 17:15:34 +02:00
Antonella Sgarlatta
5ebdd4f13b fix: change setHost to setCustomHost 2021-07-05 14:39:48 -03:00
Antonella Sgarlatta
1bb27503fa fix: set minimum passcode length 2021-07-01 17:55:50 -03:00
Antonella Sgarlatta
ef108fe33d chore: update links to .com 2021-07-01 17:55:29 -03:00
VardanHakobyan
e9406b682e fix: the following is done:
- show cursor as pointer when hovering "Advanced Options"
- show error reporting identifier as bold text
- when closing account menu with opened "Sign in" form and then reopening account menu, don't show "Sign in" form
2021-06-24 12:51:26 +03:00
VardanHakobyan
6ba3fbe9ca refactor: better naming 2021-06-23 19:32:31 +03:00
VardanHakobyan
205c48b0e0 fix: add dependencies array to useEffect so that it doesn't run on every render 2021-06-21 19:20:38 +03:00
VardanHakobyan
33082fcd7a fix: prevent default action when activating "Import Backup" by keyboard 2021-06-17 13:57:00 +04:00
VardanHakobyan
a76213dd1f feat: change label to button for better accessibility, let users to import backup by keyboard as well 2021-06-17 13:36:39 +04:00
VardanHakobyan
9f142c05df style: set correct margins for "Advanced Options" button 2021-06-17 11:35:27 +04:00
VardanHakobyan
c897199d33 refactor: move user-related data to appStore 2021-06-16 17:00:13 +04:00
VardanHakobyan
018251838c refactor: read the required data from appState instead of passing by parent component 2021-06-16 16:20:23 +04:00
VardanHakobyan
17515848b4 fix: observe KeyStatusChanged event and correctly update hasProtections info 2021-06-16 16:00:14 +04:00
VardanHakobyan
6a3433d522 style: make "Advanced Options" button's styling similar to its previous "a" element's style 2021-06-16 15:18:06 +04:00
VardanHakobyan
96aaff5ff8 refactor: move all applicable parts to mobx instead of passing from parent to children components 2021-06-16 15:16:45 +04:00
VardanHakobyan
c1e88a8ac0 refactor: add hidden class and tabIndex for accessibility 2021-06-15 17:16:05 +04:00
VardanHakobyan
adfef38bdc refactor: reviewer's comment
- use Preact's `FunctionalComponent` instead of React's `FC` to keep the app more lightweight
- remove `@node_modules/` from imports
2021-06-15 12:07:03 +04:00
VardanHakobyan
42ea6a1ea9 refactor: separate DataBackup and ErrorReporting components, remove the original (large) AccountMenu component 2021-06-14 18:40:07 +04:00
VardanHakobyan
9de1b30291 fix: correctly update Merge local data checkbox' state 2021-06-11 15:04:38 +04:00
VardanHakobyan
abb0b6595e style: split AccountMenu to smaller components
- change link to button for "Advanced Options"
- show cursor as pointer on checkbox and its label
2021-06-11 15:01:56 +04:00
VardanHakobyan
8a2fa13d4e refactor: split AccountMenu to smaller components
Notes:
- remove `url` and keep only `server`, as they are duplicating each other
2021-06-10 18:38:44 +04:00