Commit Graph

405 Commits

Author SHA1 Message Date
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
Andelf
c6ff4e8084 chore: rm unused code 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
Andelf
bada72fe28 fix(mobile): stat should fail 2022-09-19 12:22:12 +08:00
Andelf
f71a80341e fix(mobile): unlink did not create parent dir correctly 2022-09-19 12:22:12 +08:00
Andelf
437b928fc4 fix(mobile): capacitor v4 readdir api 2022-09-19 12:22:12 +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
Tienson Qin
c074465b8a fix: readdir
also, fix warnings on persist var
2022-09-13 22:13:38 +08:00
Tienson Qin
6f262a10d7 fix: Capacitor readdir 2022-09-13 22:13:38 +08:00
Gabriel Horner
51c318e2da Enable two disabled linters and bump kondo dep
All the fixes were on used-underscored-binding
2022-09-09 12:14:32 +08:00
rcmerci
0b6328fcfa fix(sync): api calls fail when network offline 2022-09-08 18:36:02 +08:00
Gabriel Horner
6e3f784626 Fix global directory watcher not working for multiple windows
Fix also simplifies global config component and generalizes file watcher
to handle any global directory. Also fixed intermittent, annoying "object could not
be cloned" error
2022-09-08 12:34:27 +08:00
Gabriel Horner
51ed2f94f1 Encapsulate global config state and add global watcher
Correct merge with local state and testing is still TODO
2022-09-08 12:34:27 +08:00
Andelf
5b50e229e0 refactor(sync): rename graph-txid to graphs-txid 2022-09-08 11:38:59 +08:00
Andelf
9deb7f609a fix(mobile): wrong backup path calc 2022-09-08 11:38:59 +08:00
rcmerci
40025a8d19 fix lint 2022-09-06 20:27:16 +08:00
rcmerci
332b8de5a1 fix: es maybe nil 2022-09-06 20:27:16 +08:00
rcmerci
4f3d26c2ca fix: FileMetadata, <get-local-files-meta, <get-local-all-files-meta 2022-09-06 20:27:16 +08:00
Tienson Qin
00c325ff35 fix: deleted remote graph
This can happens when switching between different graphs,
`frontend.fs.sync/graphs-txid` might not be loaded before starting
sync.
2022-09-06 14:35:10 +08:00
Tienson Qin
47dbc1e585 fix: use uuid-string? instead 2022-09-06 13:42:06 +08:00
Tienson Qin
d70ada1825 fix: add uuid? pre check for <check-remote-graph-exists 2022-09-06 13:38:18 +08:00
Tienson Qin
3f5927d7c9 fix: remove unused check 2022-09-05 23:18:46 +08:00
rcmerci
7de5282db3 chore: move map->FileMetadata 2022-09-05 14:45:14 +08:00
rcmerci
c2ce13abe7 enhance: use gobj/get to impl ILookup 2022-09-05 14:45:14 +08:00
rcmerci
19fed2afb8 fix: FileMetadata support keyword access 2022-09-05 14:45:14 +08:00
rcmerci
56b0aecaa0 fix: FileMetadata add iequiv and ihash 2022-09-05 13:08:45 +08:00
Tienson Qin
86c18bd706 fix: add pre condition for sync-state 2022-09-05 11:09:33 +08:00
Tienson Qin
1f7269182b fix: remove tricky check 2022-09-05 11:03:12 +08:00
Andelf
ce0a2e5944 fix(sync): wrong stop-sync condition check 2022-09-05 10:37:06 +08:00
Tienson Qin
e9ee940873 fix: don't start sync if not logged in or it's not a remote graph 2022-09-05 10:37:06 +08:00
rcmerci
97aa8c0659 chore: remove outdated comments 2022-09-03 20:16:54 +08:00
rcmerci
b2cb89bd2f fix(lint): var used by testcase 2022-09-03 19:53:10 +08:00
Tienson Qin
cc66195b58 fix: remove monitor-dirs 2022-09-03 19:31:17 +08:00
Andelf
2cebce3d91 fix(android): crash at start, accessing illegal path 2022-09-01 16:48:46 +08:00
Charlie
01d879c18e feat!: File Sync (#5355)
- file sync for electron/ios/android
- age encryption of both file content and file path
- massive UI enhancement
- corresponding CI tasks

Co-authored-by: llcc <lzhes43@gmail.com>
Co-authored-by: rcmerci <rcmerci@gmail.com>
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Co-authored-by: Andelf <andelf@gmail.com>
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2022-09-01 00:31:49 +08:00
Tienson Qin
f4aa08fbd3 fix: stuck importing from edn/json
Also, this commit added the progress UI for importing and removed the
:file/writes core.async channel.
2022-08-26 13:00:42 +08:00
Andelf
fee4c3764e fix(android): handle path with spaces 2022-08-25 14:26:25 +08:00
Andelf
329f9590fd fix(mobile): special backup path handling 2022-08-19 18:18:04 +08:00
Andelf
1cf71089bf Refactor path handling on mobile platforms (#6402)
* refactor(mobile): use unescaped uri across app
* refactor(android): use uri for all path
2022-08-19 18:18:04 +08:00
charlie
818a009cdb fix(android): bak file when external file change event 2022-08-19 18:18:04 +08:00
Andelf
9146dad0a4 refactor: db content backup 2022-08-19 18:18:04 +08:00
charlie
005719cb06 fix(mobile): bak files 2022-08-19 18:18:04 +08:00
charlie
5373da2deb fix: safe path join 2022-08-19 18:18:04 +08:00
charlie
1a6379f118 improve: add safe path join 2022-08-19 18:18:04 +08:00