Commit Graph

119 Commits

Author SHA1 Message Date
thecodrr
0bfc195e5f fix: send event if system clock is out of sync 2022-01-03 14:54:06 +05:00
thecodrr
f838826e42 fix: re-enable account password changing 2021-12-31 09:05:45 +05:00
thecodrr
1424756bca fix: turn off caching for notehistory collection 2021-12-22 09:58:28 +05:00
Abdullah Atta
630bb33b10 feat: add note version history (#20)
* feat: note version history

* fix bugs

* add tests for session history

* update tests

* add tests for restoring content

* add more tests

* update jsdoc

* return empty array if no session history present for a note

* init note history with await

* add note history versions limit

* cleanup note history after adding a new session

* fix tests

* add test for session cleanup

* test: add collector tests

* feat: dateEdited -> dateModified

* feat: migrate to liqe for searching

* chore: forceExit jest after test run

* feat: note version history

* fix bugs

* add tests for session history

* update tests

* add tests for restoring content

* add more tests

* update jsdoc

* return empty array if no session history present for a note

* init note history with await

* add note history versions limit

* cleanup note history after adding a new session

* fix tests

* add test for session cleanup

* init ContentHistory with await

* fix reference to db in init

* make sessionId in db

* check if note is locked through note metadata

* make cleanup method private

* use remove methods in notehistory and contenthistory

* restore note content via notes.add method if note is not locked

* move getting all items to seperate functions

* check if parsed json is valid

* deserialize a session only if it's sessionContent exists

* add locked property to sessionContent

* remove makeSessionId function

* update tests

* remove yarn.lock file

* update tests

Co-authored-by: ammarahm-ed <ammarahmed6506@gmail.com>
2021-12-21 13:41:08 +05:00
thecodrr
cadf77e09d fix: init trash & monographs after notes 2021-12-15 15:21:32 +05:00
ammarahm-ed
bc6c9bf15c fix: do not init monographs on app launch 2021-12-14 21:39:10 +05:00
thecodrr
1f6088a864 fix: allow setting ISSUES_HOST 2021-11-24 11:56:18 +05:00
thecodrr
7ed920e49e fix: clear file storage on user logout 2021-11-02 14:31:30 +05:00
thecodrr
05fcf5880d fix: disconnectSSE not defined 2021-10-30 13:51:40 +05:00
thecodrr
011a99d322 fix: improve syncing & merge conflict detection 2021-10-27 10:53:36 +05:00
thecodrr
67674cbc33 fix: improve sync & SSE reliability 2021-10-26 23:06:52 +05:00
thecodrr
888481b858 refactor: sendCheckUserStatusEvent -> checkIsUserPremium 2021-10-26 23:05:47 +05:00
thecodrr
6fab9ad1f3 chore: remove all comments 2021-10-22 16:29:03 +05:00
thecodrr
8cbe5f421a fix: clear auto sync timeout on manual sync 2021-10-04 12:48:14 +05:00
thecodrr
b6a5591966 Merge branch 'master' into attachments 2021-10-04 11:56:52 +05:00
thecodrr
71f7e25a17 fix: send attachmentsLoading event for single item op 2021-10-01 11:16:08 +05:00
thecodrr
6b619e5d3d feat: add upload/download cancellation support 2021-09-29 09:53:50 +05:00
thecodrr
7d16b8f388 feat: refactors and add support for upload/download progress 2021-09-26 11:47:13 +05:00
thecodrr
8ebda5b4fa fix: sse not connecting on user fetch or login 2021-09-15 12:47:22 +05:00
thecodrr
c77bdcd3ce feat: add db.debug for debug related functions 2021-09-15 11:47:10 +05:00
thecodrr
6033cf8740 inital work 2021-09-15 02:16:55 +05:00
thecodrr
765befa580 fix: Cannot read property 'error' of undefined 2021-09-02 13:45:33 +05:00
thecodrr
a500247b3c fix: reconnect SSE on token refresh 2021-08-31 12:11:46 +05:00
thecodrr
b701eec8ab fix: allow overriding SUBSCRIPTIONS_HOST 2021-07-24 12:30:02 +05:00
thecodrr
de3e821c1f feat: add offers api to get platform specific promo codes 2021-07-24 11:13:41 +05:00
thecodrr
d9bbb9fbab fix: improve content cleanup logic 2021-07-03 23:07:43 +05:00
thecodrr
f0dbe822c7 feat: cleanup orphaned content items 2021-07-03 14:50:59 +05:00
thecodrr
14fae70840 feat: send user id when fetching announcements 2021-06-28 10:05:39 +05:00
thecodrr
4e1519bbc8 feat: change automatic sync interval to 5s 2021-06-19 11:07:45 +05:00
thecodrr
73212bee0f fix: remove monographs on logout 2021-06-16 11:53:05 +05:00
thecodrr
5f5377bb0e fix: fetch monograph ids on login 2021-06-16 11:51:39 +05:00
thecodrr
09eac22eaf feat: monograph -> monographs 2021-06-15 11:57:00 +05:00
thecodrr
5bfd1c13d2 feat: init monographs on first publish/unpublish 2021-06-15 11:30:33 +05:00
thecodrr
a41e6c9f4f feat: use an internal monographs cache
This completely detaches monographs from notes allowing
much more flexibility and less bugs.
Since there is only a single source of truth, we can easily do things
like self destruct.
2021-06-15 10:09:10 +05:00
thecodrr
ee98a363b8 feat: implement monograph publishing client 2021-06-13 10:00:24 +05:00
thecodrr
aa3c9c49cd feat: announcement -> announcements 2021-06-12 09:25:04 +05:00
thecodrr
4a349a3c27 feat: add func to fetch recent announcement 2021-04-10 10:48:46 +05:00
thecodrr
65c71d7532 fix: clear timeout on user logout 2021-04-07 20:50:14 +05:00
thecodrr
bb41b8c9cb feat: re-enable trash auto cleanup after 7 days 2021-02-27 11:54:52 +05:00
thecodrr
b5a0b9e649 feat: remove trash collection 2021-02-16 16:56:06 +05:00
thecodrr
04a4344087 feat: add auto syncing to premium features 2021-02-15 21:07:46 +05:00
thecodrr
0d35f58c75 feat: expose connectSSE 2021-01-23 12:19:51 +05:00
thecodrr
aec57340c3 refactor: string event names to global event name consts 2021-01-23 10:50:07 +05:00
thecodrr
4e262e615e refactor: change all event strings to constants 2021-01-23 10:48:21 +05:00
thecodrr
0ed57e3620 test: fix all ci tests 2021-01-22 22:08:56 +05:00
thecodrr
086f7e9b50 feat: remove fetchUser call on db.init 2021-01-07 14:59:02 +05:00
thecodrr
6d9c5daa36 feat: get version 2021-01-05 14:07:02 +05:00
thecodrr
a085628f5e fix: refresh token if email got confirmed 2021-01-05 13:07:37 +05:00
thecodrr
b26b5e462e fix: refresh db on sse sync event 2020-12-29 15:32:56 +05:00
thecodrr
39a832495c fix: sse message parsing 2020-12-28 11:34:59 +05:00