Commit Graph

405 Commits

Author SHA1 Message Date
rcmerci
3661f9ad0f [wip] feat: file sync 2022-04-04 22:20:25 +08:00
Tienson Qin
a630983cdc fix lint warnings 2022-04-02 21:40:28 +08:00
Tienson Qin
b0999efa47 Switch back to blocks tree instead of virtual list for now 2022-04-02 21:40:28 +08:00
Junyi Du
4f533fd5a8 fix: load transit file on graph switching 2022-03-20 19:02:51 +08:00
Gabriel Horner
d8bc074be1 Move mobile startup to mobile.core/init to not have warning on every shadow reload
It is also the more appropriate place to have init code. Side effecting
on a namespace require should be avoided as much as possible

Cherry-pick #4482
2022-03-09 23:37:57 +08:00
Andelf
a2ce773aba feat(android): add fs watcher plugin 2022-03-09 23:37:57 +08:00
Tienson Qin
336a703e6e enhance: remove delay hack 2022-03-08 13:31:28 +08:00
Tienson Qin
8e6fb5613d enhance: backup files when there're differences between db and disk
Previously, files are backuped to logseq/bak when logseq detects
there're differences between the db and disk. But it has two problems:

1. Only a few of users know `logseq/bak`, other users think that their
data has been lost.
2. Files in the logseq/bak folder are never truncated.

This PR backups old file in DB with timestamp suffixes instead of
logesq/bak, and only keep the latest 10 versions of any changed file.
2022-03-08 12:58:59 +08:00
Andelf
b260648b60 feat(ios): add polling based file watcher 2022-03-04 18:03:33 +08:00
Junyi Du
f1aff93807 enhance: add pages-metadata.edn watcher behavior 2022-03-04 17:13:33 +08:00
Junyi Du
1905d1e32c enhance: update timestamp on pages-metadata is watched 2022-03-04 17:13:33 +08:00
llcc
08c63685d8 fix(mobile): unable to load and render excalidraw file 2022-03-04 11:07:55 +08:00
llcc
dd48d264e9 fix(mobile): log print error instead of js/alert
Avoid annoying javascript alert window
2022-02-28 15:54:29 +08:00
leizhe
86ea102b89 fix(android): app crashes 2022-02-20 23:41:02 +08:00
Junyi Du
89e13b58f9 fix: missing normalized for file watcher ipc 2022-02-19 23:01:20 +08:00
Gabriel Horner
c6d03b67ab Merge branch 'master' into dev/var-sizes-linter 2022-02-08 12:02:39 -05:00
Gabriel Horner
8a78f927b3 Fix bugs for nil and relative case 2022-02-08 15:05:18 +08:00
Gabriel Horner
2213a4e33d Add tests for get-file-path in #4010 2022-02-08 15:05:18 +08:00
leizhe
8beae2be0b address comment. Thanks Gabriel. 2022-02-08 15:05:18 +08:00
Gabriel Horner
e81678fc69 Mark most vars as cleanup-todo
Fixed a few that I knew how to QA and were low risk
2022-02-04 16:57:49 -05:00
leizhe
fb0bf97d52 feat(ios): sync current graph only when switching from other apps 2022-01-29 11:59:07 +08:00
leizhe
ce53a8ca2c use new function get-file-path in stat 2022-01-28 20:31:58 +08:00
leizhe
1f1f3f5a24 fix(mobile): support page rename 2022-01-28 20:31:58 +08:00
leizhe
2117f738fa fix(mobile): don't create theme/config files when newing graph 2022-01-28 20:31:58 +08:00
leizhe
ace96eb48a fix(mobile): decodeURI file-path in db 2022-01-24 13:26:04 +08:00
leizhe
0eed799ccf fix(mobile): diff when write conflicts occur 2022-01-24 13:26:04 +08:00
Gabriel Horner
89bef5b26e Merge remote-tracking branch 'origin/master' into test/add-clj-kondo-part-two 2022-01-12 15:38:57 -05:00
Tienson Qin
0f08340799 fix: pop up a saving confirmation dialog when losing focus 2022-01-12 11:52:28 +08:00
Gabriel Horner
7497d8b396 Lint a good chunk of src/main/frontend
Left some TODOs to discuss with others and others for me to finish
2022-01-11 17:34:54 -05:00
leizhe
c7b3bc5fa1 feat(ios): download icloud files when re-indexing 2022-01-06 20:26:57 +08:00
leizhe
3023208ace fix(iOS): allow readding files with # and %
close https://github.com/logseq/logseq/issues/3707
2022-01-06 18:46:31 +08:00
leizhe
6193e83e1c fix(android): only encode url on iOS 2022-01-06 18:46:31 +08:00
Tienson Qin
5fcd166b96 fix: android crash 2022-01-06 18:01:23 +08:00
Peng Xiao
17b5cdb9e8 feat: add a secret global flag to load graph progammtically (#3531)
* feat: add a secret global flag to load graph from a user defined dir

* fix: use LOGSEQ_OVERWRITE_OPEN_DIR env var to overwrite the openning graph dir

* e2e: add a test for load & check saved graph data

* fix: should also pass in process.env for testing fixtures

* feat: new way to set open dir folder

* fix: e2e

* fix: remove playwright global flag check

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2022-01-05 21:05:05 +08:00
Andelf
b1eb9117be enhance: reload custom.css when changed 2022-01-04 21:35:53 +08:00
Tienson Qin
b0372cc53d fix: typo 2022-01-04 17:38:36 +08:00
Tienson Qin
ec289c788f enhance: backup when add is notified and db content is not empty 2022-01-04 17:36:17 +08:00
leizhe
ba06e3db84 use js/encodeURI and js/decodeURI to process path on iOS 2021-12-29 00:28:22 +08:00
leizhe
f9acd6e312 fix(ios): encode file-path in db to fix write/read to config 2021-12-27 21:10:28 +08:00
Andelf
7024e9b4c3 fix(editor): refine file edting, fix state update
- update element state when switching files #3415
- notification when saved
- minor style change
- refine editor element id gen, use uuid
- add trailing newline to saved file

Fix #3415
2021-12-21 12:37:03 +08:00
leizhe
fd9df693c1 enhance(mobile): allow file deletion 2021-12-21 10:55:10 +08:00
leizhe
0acfd917b3 fix(ios): write file with special chars in filename
CJK, spaces, etc.
2021-12-21 10:55:10 +08:00
leizhe
3bcd0bdf3f fix(ios): failed to write files 2021-12-21 10:55:10 +08:00
leizhe
1b7857b631 fix(ios): read file with spaces/Chinese/Japanese in filename 2021-12-21 10:55:10 +08:00
leizhe
42019d1f9f fix(android): ignore reading files containing # or %
User can use "#" and "%" in page name, but those two chars will be
replaced by "_", as same as the behaviors on desktop.
2021-12-21 10:55:10 +08:00
leizhe
6109836dbc fix(android): don't read files started with #
`(.stat Filesystem (clj->js {:path file}))` returns its parent directory
if the file starting with a #, which leads to reading the directory endlessly.
2021-12-09 20:23:57 +08:00
Tienson Qin
881e65a9fa mobile: separate filecontainer from filepicker 2021-12-05 14:57:59 +08:00
Tienson Qin
d0d25b5ad4 fix(mobile): refresh 2021-11-27 17:46:32 +08:00
Tienson Qin
7101b8c491 fix: can't open graph again on Android 2021-11-27 13:10:34 +08:00
Tienson Qin
60d1a48fb0 fix: disable custom.js on mobile 2021-11-27 11:11:04 +08:00