Commit Graph

128 Commits

Author SHA1 Message Date
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
Mo
a15014f003 Component view refactor (#770)
* refactor: simplify component-view lifecycle callbacks

* fix: reintroduce exhaustive-deps
2021-12-13 11:16:14 -06:00
Mo Bitar
dbc4de9a0e fix: don't show saving status if template note inserted to be interactable with advanced editor 2021-12-06 11:17:15 -06:00
Aman Harwara
31c48af01c feat: Add "Pin selected notes" button to editor title bar (#760) 2021-12-06 14:47:35 +05:30
Mo Bitar
82ee0974c1 feat: snjs upgrade and fixes 2021-12-05 11:04:46 -06:00
Mo Bitar
ba4fbd1c0a fix: unmount component on destroy 2021-11-10 08:30:38 -06:00
Vardan Hakobyan
b898e886a5 feat: remove broadcasting Extensions Manager events from ComponentView (#703)
* feat: remove `broadcast` from `ComponentView`

As "Extensions Manager" is removed, the related events' broadcasting is not needed anymore

* fix: restore `manualDealloc`
2021-10-25 17:08:37 +04:00
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
Aman Harwara
bbeab4f623 feat: Remove obselete code related to editor preferences (#691) 2021-10-17 10:54:02 -05:00
Aman Harwara
4ce9264572 fix: Reload textarea on spellcheck pref change (#690) 2021-10-17 08:10:41 -05:00
Aman Harwara
7dbfa2fde0 feat(preferences): Tools segment (#657) 2021-09-29 12:51:48 -05:00
Antonella Sgarlatta
083d8f592e fix: view note on protected notes warning not dismissing warning 2021-08-09 12:28:51 -03:00
Antonella Sgarlatta
7849de7e8f fix: delete unused removeAltKeyObserver from editor view 2021-08-09 11:08:32 -03:00
Antonella Sgarlatta
44bf907aa4 feat: toggle move to trash to delete permanently on alt key down 2021-07-28 16:18:05 -03:00
Antonella Sgarlatta
1be87cbef8 fix: disable delete note shortcut for inputs 2021-07-05 14:43:09 -03:00
Antonella Sgarlatta
6170bca0d8 fix: scroll position changing when entering new line on editor 2021-06-23 15:57:33 -03:00
Antonella Sgarlatta
2473a780d1 fix: scroll notes list when navigating with arrow keys 2021-06-16 14:13:03 -03:00
Antonella Sgarlatta
a85d2b9676 styles: remove faded style to disabled margin resizers 2021-06-16 12:24:44 -03:00
Antonella Sgarlatta
524bcd09cb fix: spacing between title and tags 2021-06-03 15:35:59 -03:00
Antonella Sgarlatta
c42f1cedda refactor: refactor autocomplete tag input in separate components and move shared logic to state 2021-06-03 12:47:14 -03:00
Antonella Sgarlatta
9513392f6c styles: reduce spacing when note has no tags 2021-06-02 19:51:13 -03:00
Antonella Sgarlatta
684a3fb0bf feat: add delete tag button and refactor NoteTag to separate component 2021-06-01 20:55:54 -03:00
Antonella Sgarlatta
b54de00b40 fix: fix tags container width 2021-05-31 16:35:42 -03:00
Antonella Sgarlatta
7ac5856205 feat: make tags container expandable 2021-05-27 21:18:06 -03:00
Antonella Sgarlatta
68bbcc6820 refactor: remove tags component from view 2021-05-26 18:56:56 -03:00
Antonella Sgarlatta
0d4456bc53 refactor: remove legacy tags code from editor view 2021-05-26 18:48:31 -03:00
Antonella Sgarlatta
a8d6080a6f feat: add tag on dropdown option click 2021-05-24 19:07:07 -03:00
Antonella Sgarlatta
be6893b8dc feat: add autocomplete tags input and dropdown 2021-05-24 17:06:09 -03:00
Antonella Sgarlatta
90250d22a3 feat: modify current tags to v4 style 2021-05-20 17:09:11 -03:00
Antonella Sgarlatta
68a0e1e5bc fix: fix enable editing on editor bar 2021-05-17 12:20:13 -03:00
Antonella Sgarlatta
97b999d18b feat: remove note options from legacy options menu 2021-05-13 14:47:51 -03:00
Antonella Sgarlatta
8302733a49 feat: add protect option to menu 2021-05-11 17:09:23 -03:00
Antonella Sgarlatta
02249ebaca fix: add delete permanently option, restore icon and show alerts for locked notes 2021-05-07 15:56:35 -03:00
Antonella Sgarlatta
33d4c7bcb8 styles: fix lower opacity applied to menu when note locked 2021-05-05 17:47:06 -03:00
Antonella Sgarlatta
2293a4a814 styles: add flex-grow to title and tags div 2021-05-04 18:58:25 -03:00
Antonella Sgarlatta
15db4767f5 feat: use pencil off icon for note bar 2021-05-03 16:42:07 -03:00
Antonella Sgarlatta
0330497d1d fix: change lock mentions to prevent editing 2021-04-30 16:48:56 -03:00
Antonella Sgarlatta
b70cc0e7e4 feat: add right-click context menu 2021-04-29 17:07:14 -03:00
Antonella Sgarlatta
a1d56abd2e Merge branch 'develop' into feature/multiple-selection 2021-04-28 14:53:15 -03:00
Mo Bitar
b93a35f965 fix: more accurate saving status + dont allow editor change while note is locked 2021-04-20 19:11:44 -05:00
Mo Bitar
64945abbcc fix: race condition when editor values read could belong to newly selected note as opposed to note for which save was triggered 2021-04-17 19:27:16 -05:00
Baptiste Grob
abfc588368 feat: multiple selected notes panel 2021-04-13 14:43:48 +02:00
Baptiste Grob
0f53361689 feat: select multiple notes in list 2021-04-12 14:54:43 +02:00
Mo Bitar
57ddeb3e09 feat: show offline status in saving indicator (#539)
Co-authored-by: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com>
2021-04-05 14:27:32 +02:00
Baptiste Grob
232d01795d refactor: remove unused import 2021-03-22 18:34:27 +01:00
Baptiste Grob
ac634333cf style: run prettier 2021-03-22 18:32:50 +01:00
Baptiste Grob
9f5c640bcd feat: show protected warning after protecting a note without protections 2021-03-22 18:32:31 +01:00
Baptiste Grob
bf6cfa398e fix: extend editor area to full height 2021-03-22 18:26:31 +01:00