Commit Graph

68 Commits

Author SHA1 Message Date
Konstantinos Kaloutas
d13ba8d9e7 chore: refactoring 2023-06-08 16:59:09 +03:00
Tienson Qin
245008dc26 enhance: rebuild search index when prepare failed 2023-04-26 18:50:19 +08:00
Konstantinos Kaloutas
2b1031a747 fix: fix: block url handler 2023-04-03 12:45:55 +08:00
Andelf
3c0973013b refactor(fs): mv fs2 logic to logseq.common pkg 2023-03-28 09:14:42 +08:00
Andelf
31d7c8f836 refactor(fs): use rpath 2023-03-28 09:14:42 +08:00
Tienson Qin
011860e486 fix: multiple windows clash (#8874)
* fix: multiple windows clash

* enhance: force all the ipc callback result to be nil
2023-03-25 10:32:32 +08:00
Andelf
fb02c557f2 Revert "fix: electron menu handler(Redo, Undo, Copy) (#8466)"
This reverts commit 29da7386cb.
2023-02-20 01:35:16 +08:00
situ2001
29da7386cb fix: electron menu handler(Redo, Undo, Copy) (#8466)
* fix(electron): menu undo & redo not working
* refactor(electron): use editMenu from electron src code
* chore(electron): add FIXME comments
* fix(electron): menu copy & cut not working
* remove: custom fn in menu cut
* fix: add accelerator to menu copy item
2023-02-16 17:26:31 +08:00
Andelf
fbb6731740 refactor(mobile): use the same code base as electron quick-capture (#8529) 2023-02-08 09:05:32 +08:00
Gabriel Horner
2f91565127 Tweak wording of http server error messages 2023-01-03 14:04:32 -05:00
Charlie
51aaa02e76 Feat: APIs http server (#7699)
http server
2022-12-29 22:30:44 +08:00
Andelf
a1b731a77a fix(electron): quick captured text is cleared when editing current 2022-12-02 15:30:09 +08:00
Andelf
bb2ce46ce7 fix(editor): escape editing when inserting 2022-12-02 05:40:14 +08:00
Andelf
3cbaf1abed enhance(editor): rename quick-capture config keys 2022-11-25 12:33:22 +08:00
hkgnp
77dc686e85 enhance: Allow using config.edn to change if page redirect happens when inserting quick-capture (#7431)
* add option to edit config.edn for redirect to page upon inserting quick capture
2022-11-25 09:45:15 +08:00
Andelf
e2e5ba854f feat(electron): add page/append parameters to quickCapture (#7427)
* feat(electron): add page/append to quickCapture

fix: quickCapture not working on journal pages
enhance: handle quickCapture to the same block
enhance: handle page name when journals are not enabled
2022-11-23 16:39:42 +08:00
Tienson Qin
bc0ebf1889 fix: quick capture 2022-11-23 13:08:24 +08:00
hkgnp
0e84052310 [fix] If user is not editing the page, insert content to the cursor; Otherwise insert to the target page and set it as editing? 2022-11-22 21:45:03 +08:00
hkgnp
b80a0abc1a creating new branch for PR 2022-11-22 21:45:03 +08:00
Peng Xiao
35360a970d fix(whiteboard): url handling for whiteboard 2022-11-15 10:41:33 +08:00
Tienson Qin
09e7715e2f step 3 :file-sync/progress 2022-09-30 17:33:32 +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
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
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
Tienson Qin
e008a38540 fix: cloud icon is not shown when restarting the app 2022-09-01 19:59:43 +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
cc49f56a92 fix: hack to avoid text blink 2022-08-24 16:47:49 +08:00
Tienson Qin
c919b61c07 feat: Enter/Shift+Enter and Cmd+g/Cmd+Shift+g to jump to the next/prev 2022-08-24 16:47:49 +08:00
Konstantinos Kaloutas
322e3a730a fix: search input issues 2022-08-24 16:47:49 +08:00
Tienson Qin
fac1180a07 fix: disallow cutting blocks when find in page 2022-08-24 16:47:49 +08:00
Tienson Qin
b677d6f819 feat: find-in-page add results 2022-08-24 16:47:49 +08:00
Andelf
7dacef69b1 fix: quick-capture when in code editing 2022-06-20 15:40:27 +08:00
Andelf
2080481c73 feat(electron): impl quick capture x-callback-url 2022-06-20 15:40:27 +08:00
Tienson Qin
403bb10b14 Fix: creating new pages from bracketing text is broken #4971
close #4971
2022-04-23 06:50:22 +08:00
Junyi Du
644dde0f24 feat: logseq protocol open with file path 2022-04-21 18:46:35 +08:00
Tienson Qin
904eff6d9d Core outliner operations refactoring (#4880)
* Add outliner nested transact!

Copied the code mostly from https://github.com/logseq/logseq/pull/4671
by zhiyuan

* refactor: insert-blocks

* fix: insert-blocks

* fix: move cursor to the last block when inserting

* fix: replace the current block when inserting and its content is empty

* keep only :insert-blocks

* expose only :delete-blocks

* Use existing implementations for move-nodes-up-down and

indent/outdent.

* fix editing state not updated immediately

* fix editing status

* fix: avoid recursive copy

* fix: inserting blocks after an empty block

* Implement move-blocks with insert-blocks

* fix: block left

* Implement move-blocks-up-down with move-blocks

* fix: paste text

* Implement indent-outdent-blocks with move-blocks

* fix: indent/outdent

* feat: multiple blocks drag && drop

* fix: indent/outdent blocks

* fix: drag drop

* Port unit tests for outliner.core

* enhance: open collapsed parent when indenting blocks

* refactor: block selection

* fix: indent/outdent blocks with different levels

* Add instrument on invalid outliner structure

* fix: can't write a block if the page has any outdated blocks

* fix: editing status for empty page

* fix: multiple drag & drop

* fix: drag & drop disallows moving from parents to its child

* fix: public property

* fix: can't delete first empty block

* Remove unused code

* fix: e2e tests

A workaround is to not select/highlight the block when pressing esc if it has
fenced code.

* remove unused code

* Add batch transaction test

* fix: update :block/page when dragging targets' children to another page

* Add more tests

* Simplify extract

* Replace db/get-conn with db/get-db

* Simplify extracting blocks from ast

* Code cleanup

* Code cleanup

* Add outliner core fuzzy tests

* Remove unused code

* fix: cursor not jump to the upper block when pressing Enter in the beginning

* fix: Enter in the beginning of a non-empty block

* Fix lint warnings

* Add editor random e2e tests

* Fix typo

* enhance: move some fns and add some comments

* enhance(outliner): add page-block? util

* fix: increase td width to prevent content overflow

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* First pass at file tests for file-sync

Each action usually passes by 5th try

* Fix two incorrect calls caught by tests

* More test improvements

- Easier auth setup
- subdirectory is configurable
- list graphs api also exercised

* Address cleanup from #3839

- Remove unused translation key
- Delete or TODO commented code
- Capitalize notifications to users

* fix quick capture template not working

* enhance(sync): add logout

* enhance: add logout i18n

* fix(plugin): sometimes plugin settings of gui not work when entry from app settings

* enable show-brackets? toggle for orgmode [[file:./pages/demo.org][demo]]

* fix(sync): fix unfinishable sync loop

* feature: logseq protocol; refactor persistGraph

* fix: deeplink support

* fix: broadcast persist graph on opening new graph with logseq protocol

* feat: logseq protocol open action for page-name and uuid

* fix: logseq protocol graph param validation

* ux: copy logseq URL of block

* enhance: remove the redundant 'open' from logseq protocol (v0.1)

* ux: page dropdown button for copy page URL

* chore: logseq protocol comments

* don't create new contents file when changing format

Logseq now creates a new contents file when users try to toggle the
preferred format, which causes file duplications error.

* fix pasting in src block not working on iOS

close https://github.com/logseq/logseq/issues/4914

* fix playing video goes into editing mode on iOS

* fix copy to clipboard failure on iOS

* add Podfile item

* fix mobile toolbar order not persisting after restart

* test(e2e): add test for backspace and cursor pos (#4896)

* test(e2e): add test for backspace and cursor pos
* fix(test): refine, fix wrong helper

* fix(ui): warn about illegal git commit interval

* enhance(editor): allow global git cmd shortcut

* style(settings): line-space of general/journals

* enhance(editor): accept enter in dummy block

Fix #4931

* fix editing state not updated immediately

* fix: can't write a block if the page has any outdated blocks

TODO: clean outdated blocks

* fix: editing status for empty page

* Random tree for outliner core tests

* Add pre assertions and fn docs based on Zhiyuan's suggestions

* Made some changes based on Gabriel's suggestions

* fix: tests

* fix: save current block before moving

* Updated the timeout to 100ms based on llcc's suggestion

https://github.com/logseq/logseq/pull/4880#discussion_r851966301

* api-insert-new-block! supports replace-empty-target?

* fix: replace all :reuse-last-block? usage

Co-authored-by: rcmerci <rcmerci@gmail.com>
Co-authored-by: Yue Yang <g1enyy0ung@gmail.com>
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
Co-authored-by: llcc <lzhes43@gmail.com>
Co-authored-by: charlie <xyhp915@qq.com>
Co-authored-by: Junyi Du <junyidu.cn@gmail.com>
Co-authored-by: Andelf <andelf@gmail.com>
2022-04-19 11:14:38 +08:00
Junyi Du
8d9204edf2 chore: logseq protocol comments 2022-04-15 17:16:27 +08:00
Junyi Du
31e3617e20 feat: logseq protocol open action for page-name and uuid 2022-04-15 17:16:27 +08:00
Junyi Du
67532eff43 fix: broadcast persist graph on opening new graph with logseq protocol 2022-04-15 17:16:27 +08:00
Junyi Du
aa29a00b88 feature: logseq protocol; refactor persistGraph 2022-04-15 17:16:27 +08:00
rcmerci
1ed28b5ad4 fix(sync): lint 2022-04-04 22:31:35 +08:00
rcmerci
8a9ef0e4cf feat(login): update login & refresh tokens logic 2022-04-04 22:27:13 +08:00
rcmerci
b185eeb0a2 feat(sync): update local->remote logic 2022-04-04 22:20:25 +08:00
Junyi Du
9e150961d7 fix: persist other window's db on opening new window in another graph 2022-03-20 19:02:51 +08:00
Junyi Du
2b9c995d69 fix: only unregister main window on quitting to ensure fs watching integrity 2022-03-20 19:02:51 +08:00
Junyi Du
7bdbe82920 enhance: ask other windows to persist db 2022-03-20 19:02:51 +08:00
Junyi Du
c52e913e22 fix: only persist current graph instead of all graphs 2022-03-20 19:02:51 +08:00
Junyi Du
d425a60038 fix: persisting db before opening new window 2022-03-20 19:02:51 +08:00
Tienson Qin
aa0ce9a3b1 enhance: sync databases between multiple windows on Electron 2021-12-29 15:59:57 +08:00
Tienson Qin
94a401140c fix: graph unlink is not executed on all the windows 2021-12-21 23:05:28 +08:00