Commit Graph

135 Commits

Author SHA1 Message Date
Tienson Qin
20e1e77362 fix: remote graphs state when create/delete a remote graph 2022-11-08 16:58:39 +08:00
Tienson Qin
bf72cd6793 Merge branch 'master' into fix/sync-crash 2022-11-07 09:27:19 +08:00
Tienson Qin
22fe631415 chore: move reserved chars logic outside of <update-remote-files 2022-11-07 09:22:27 +08:00
Tienson Qin
9d29a51314 Add instructions when downloading files that have reserved chars 2022-11-07 09:22:27 +08:00
Tienson Qin
ed5e70c7e7 Skip downloading file names with reserved chars 2022-11-07 09:22:27 +08:00
Tienson Qin
dd0169b068 fix: notify users to switch to the new filename format
Notify users to switch to the new filename format if there're reserved
chars when syncing.

Also, this commit replace all `js/decodeURIComponent` with
`safe-decode-uri-component` to avoid UI crashes.
2022-11-07 09:22:27 +08:00
Tienson Qin
865ba9c69c fix: <sync-start returns a channel 2022-11-06 23:37:46 +08:00
Tienson Qin
530f683ac0 enhance: no need to notify matched password 2022-11-06 23:37:46 +08:00
Tienson Qin
4065ed353e reset *sync-entered when sync stopped 2022-11-06 23:37:46 +08:00
Tienson Qin
564926418f fix: sync crashes
1. make sure there's no sync reentrancy
2. there's no need to restore pwd after user input the password
2022-11-06 23:37:46 +08:00
Tienson Qin
46401c0598 enhance: remove pages-metadata.edn from sync 2022-11-05 16:12:19 +08:00
rcmerci
fcb5d206b2 fix: calculate s3-key length 2022-11-04 23:04:22 +08:00
rcmerci
e780272d12 enhance(sync): filter pages whose page-name is too long 2022-11-04 23:04:22 +08:00
Gabriel Horner
b3464c8c11 Remove unused var 2022-10-28 09:49:45 -04:00
Tienson Qin
7f7e21cdce fix: progressing number when downloading files 2022-10-28 21:11:58 +08:00
Tienson Qin
023d5a749c enhance: fast sync on mobile 2022-10-28 11:44:24 +08:00
Tienson Qin
3486692ed1 fix: sync status 2022-10-28 11:37:29 +08:00
Tienson Qin
257dda1b35 fix: cancel rsapi requests when paused 2022-10-24 12:54:35 +08:00
rcmerci
59add5203f enhance(sync): check remoteapi exceptions 2022-10-18 10:43:34 +08:00
Tienson Qin
127a4d1613 fix: create local versions on mobile if there's any conflict 2022-10-13 16:52:12 +08:00
rcmerci
b8707cd719 chore: fix lint 2022-10-13 16:49:47 +08:00
rcmerci
fdb11e6ed7 fix(sync): allow to sync-start when txid=nil(in graphs-txid.edn)
avoid to write txid=nil to graphs-txid.edn
2022-10-13 16:49:47 +08:00
Charlie
d53ac94bfc Enhance/pdf improvements (#6475)
Full-text search, highlights and assets alias support 
It also exposes a plugin API for highlight context menu   
    ```ts
    /**
       * Current it's only available for pdf viewer
       * @param label - displayed name of command
       * @param action - callback for the clickable item
       * @param opts - clearSelection: clear highlight selection when callback invoked
       */
      registerHighlightContextMenuItem: (
        label: string,
        action: SimpleCommandCallback,
        opts?: {
          clearSelection: boolean
        }
      ) => unknown
    ```
2022-10-09 20:44:18 +08:00
Tienson Qin
b6c0198f87 fix: lint warning 2022-09-30 17:33:32 +08:00
Tienson Qin
5f8d8e832c chore: remove unused *sync-starting? 2022-09-30 17:33:32 +08:00
rcmerci
fd91db1449 fix(sync): remove sync-stop in sync-start 2022-09-30 17:33:32 +08:00
rcmerci
0f496910cd Revert "step 5 :graphs-txid"
This reverts commit 2f81b17a49.
2022-09-30 17:33:32 +08:00
Tienson Qin
02b610eb07 step 5 :graphs-txid 2022-09-30 17:33:32 +08:00
Tienson Qin
cd26853499 fix: sync status not refreshed 2022-09-30 17:33:32 +08:00
Tienson Qin
4877f24ef2 fix: lint warning 2022-09-30 17:33:32 +08:00
Tienson Qin
09e7715e2f step 3 :file-sync/progress 2022-09-30 17:33:32 +08:00
Tienson Qin
7eff58625f fix: arguments 2022-09-30 17:33:32 +08:00
Tienson Qin
8e4fcb4f8c step 2: :file-sync/sync-state 2022-09-30 17:33:32 +08:00
Tienson Qin
308a4aeb47 refactor: step 1 file-sync/sync-manager 2022-09-30 17:33:32 +08:00
rcmerci
31cdc21bfb enhance(sync): cancel all rsapi requests when sync-stop 2022-09-29 21:58:27 +08:00
Tienson Qin
681c3e421e fix: cancel previous requests when sync needs to download/upload
This can avoid running multiple downloads/uploads at the same time.
2022-09-29 21:58:27 +08:00
Andelf
6a6974671f chore(deps): update file-sync libs 2022-09-29 19:36:42 +08:00
Andelf
b73829da05 feat(sync): allow cancel all request 2022-09-29 19:36:42 +08:00
Tienson Qin
c10b04b715 fix: clear sync-state when stopping the current graph's sync 2022-09-27 23:24:42 +08:00
Gabriel Horner
1f0e22275d Add ns docstrings for most ns in src/main
- Added to CI now that it passes
- Added no-doc for docstrings that don't add any more than what's in the
ns name or for ones where I didn't know the ns that well
2022-09-27 13:55:16 +08:00
Andelf
d1c7328a93 fix(android): use graph-uuid in call, update capacitor-file-sync 2022-09-24 00:39:29 +08:00
Andelf
ae114afbd8 Feat: sync progress for electron (#6662)
* fix: state shouldn't be returned in ipc

* feat: download && upload processing

* enhance(ui):  interaction of show password checkbox

* feat: time left

* feat: download progress

* Set download batch size to 100

* improve(ui): progress pane of file sync indicator

* improve(ui): progress pie of each file state

* improve(ui): progress pie of each file state

* improve(ui): progress pie of each downloading file

* fix: add last changed time

* enhance: time left

* fix: total needs to be larger than finished

* fix: wait for update-graphs-txid!

* enhance: show in-progress files first

* chore: ui polish

* improve(ui): persist stauts of sync files list toggle switch

* fix(ui): visibility of sync now button on mobile

* chore: remove ios static out after sync

* fix: debounce clicking on sync icon

* fix: repos not refreshed after unlink or delete

* enhance: automatically save page-metadata.edn to avoid sync when restart

* improve(ui): sync now shortcut for file sync progress pane

* enhance: data transfer icons

* fix: stop sync if switched to another graph

* fix: can't switch

* enhance: sort files first before uploading or downloading

* fix: clear current graph uuid when sync stops

* fix: separate progress by graphs

* fix: check files only in the current progress

* fix: prevent multiple sync managers for the same graph

* fix: remove redundant files watchers

* enhance(sync): re-exec remote->local-full-sync when exception

re-exec remote->local-full-sync when <update-local-files return exceptions

* enhance(sync): re-exec remote->local-full-sync when exception

re-exec remote->local-full-sync when <update-local-files return exceptions

* fix(sync): set-progress-callback, update rsapi

* fix(sync): uploading progress bar

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Co-authored-by: charlie <xyhp915@qq.com>
Co-authored-by: rcmerci <rcmerci@gmail.com>
2022-09-23 02:00:24 +08:00
rcmerci
41b4cdb938 fix(sync): check sync-state is valid to accept filewatcher events 2022-09-20 15:06:17 +08:00
rcmerci
5a006c59f8 fix(sync): add graph-uuid arg to <get-local-files-meta 2022-09-20 15:06:17 +08:00
Andelf
dfbb42a1b3 fix(sync): update rsapi, add graph-uuid to all fn 2022-09-20 15:06:17 +08:00
rcmerci
ef8d74d68b enhance(sync): add get-deletion-logs
remove local files according to deletion-logs when local->remote-full-sync
2022-09-19 14:59:43 +08:00
Tienson Qin
c300d6bc02 fix: sync status 2022-09-15 23:58:55 +08:00
Tienson Qin
40221d4799 fix: sync works but uploading/downloading files are not shown 2022-09-15 23:58:55 +08:00
Tienson Qin
a1e5d72925 fix: put check? in the go block 2022-09-14 22:01:19 +08:00
Tienson Qin
376cda0bd3 fix: disable creating remote graph when sync is not started yet
Also, don't show `password is required` when starting the sync.
2022-09-14 22:01:19 +08:00