Compare commits

...

1820 Commits

Author SHA1 Message Date
Elian Doran
8349204982
chore(docs): mention upcoming changes to branding
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
2025-06-05 09:03:57 +03:00
zadam
82a437f2a8 remove unnecessary debounce which caused missed changes 2024-05-30 06:55:45 +02:00
zadam
a64a0e52ec Merge branch 'refs/heads/stable'
# Conflicts:
#	package-lock.json
2024-05-30 06:46:36 +02:00
zadam
88c4171031 lock file 2024-05-30 06:46:22 +02:00
zadam
b6c7e2e48f error handling 2024-05-30 06:25:03 +02:00
zadam
305d28b5b3 remove warning about the relation map - trilium is sunsetting anyway, there's no point now in deprecating this feature, fixes #4779 2024-05-30 06:24:50 +02:00
zadam
a88bf68eb6 verify that the uploaded modified file is temporary
(cherry picked from commit a2711cfb7b5b454182393aa160e45ccbf52c949d)
2024-05-30 06:10:30 +02:00
zadam
8ebebecd93
Merge pull request #4772 from gigamonster256/macos-arm64
Support compiling native MacOS arm64 (Apple Silicon) builds
2024-05-30 06:06:08 +02:00
Caleb Norton
f0d30dbe49 Add macos arm64 to release script 2024-05-18 03:48:33 -05:00
Caleb Norton
d142d3261d support compiling native arm64 macos builds 2024-05-18 03:34:24 -05:00
zadam
25b49e1ca2 release 0.63.6 2024-05-18 06:17:21 +02:00
zadam
c7f19e04fa Merge remote-tracking branch 'origin/master' 2024-05-18 05:50:53 +02:00
zadam
a2711cfb7b verify that the uploaded modified file is temporary 2024-05-18 05:50:46 +02:00
zadam
f984b361ee
Merge pull request #4717 from MatMasIt/italian-translation
Italian translation of README
2024-05-05 05:13:26 +02:00
Mattia Mascarello
ac1e1ebe43 Forgot to translate a heading 2024-03-28 20:51:28 +01:00
Mattia Mascarello
499bfaea9b Added italian to other READMEs language section 2024-03-28 20:42:53 +01:00
Mattia Mascarello
fa4772b91e proofreading 2024-03-28 20:38:20 +01:00
Mattia Mascarello
fa7b190c6b Translated readme in italian 2024-03-28 19:23:01 +01:00
zadam
84feec2e7e Merge branch 'stable'
# Conflicts:
#	package-lock.json
2024-03-28 07:26:17 +01:00
zadam
3035473751 release 0.63.5 2024-03-28 07:11:39 +01:00
zadam
399458b52f package lock 2024-03-28 07:08:31 +01:00
zadam
becac5fbad fix rendering of math on non-root paths, closes #4713 2024-03-28 07:08:15 +01:00
zadam
1e26b31090 release 0.63.4 2024-03-28 07:00:01 +01:00
zadam
0ebd03869d use "n space" instead of zero length space to make it obvious there is a character there 2024-03-28 06:57:44 +01:00
zadam
a4a713f102 allow cancelling mention UI with escape, fixes #4692, #4684 2024-03-28 06:43:26 +01:00
zadam
83d5d6bbd8 fix copy link in browser, closes #4682 2024-03-27 20:42:36 +01:00
zadam
90f4c6b0d1 allow converting file attachments to file notes 2024-03-27 06:59:57 +01:00
zadam
bfb8aa6481 remove eslint 2024-03-06 07:17:51 +01:00
zadam
2bb4cccd82 fix excalidraw 0.17 integration 2024-03-06 07:13:30 +01:00
zadam
6fad5f2b51 Merge branch 'master' into excali-17-2 2024-03-06 06:53:19 +01:00
zadam
36357bdf86 update mermaid 2024-03-06 06:52:41 +01:00
zadam
80eaf10656 remove husky 2024-03-06 06:51:25 +01:00
zadam
f46ce0417d more prettier removals 2024-03-06 06:48:25 +01:00
zadam
6f1e6402f0 package upgrades + removal of prettier 2024-03-06 06:47:30 +01:00
zadam
bdfa13a8a0
Merge pull request #4676 from st3iny/fix/invisible-unchecked-todo
fix: invisible unchecked to-do items
2024-03-06 06:32:23 +01:00
Richard Steinmetz
d5622dfbf7 fix: invisible unchecked to-do items 2024-03-05 22:29:10 +01:00
zadam
0948853539 release 0.63.3 2024-03-03 06:58:18 +01:00
zadam
0ad337c8e8 add API method to erase a revision #4662 2024-03-03 06:34:43 +01:00
zadam
9565b0b43d
Merge pull request #4671 from AlexeiKharchev/master
Reduce warnings count caused by bin/copy-trilium.sh
2024-03-03 06:26:18 +01:00
zadam
a115b14136 fix highlighting search results with regexp characters in fulltext string, closes #4665 2024-03-02 07:35:52 +01:00
Alexei Kharchev
bb8bfc61ed Improved scriptes bin/copy-trilium.sh, bin/build-linux-x64.sh 2024-03-02 14:18:39 +08:00
zadam
2d19f073d9 fix searching fulltext with tags, closes #4661 2024-03-02 07:13:02 +01:00
Alexei Kharchev
ff5d5d20d9 Reduce warnings count caused by bin/copy-trilium.sh 2024-03-02 11:49:17 +08:00
zadam
1f95e88cfd release 0.63.2-beta 2024-02-17 22:47:50 +01:00
zadam
15677f7178
Update README.md 2024-02-16 12:16:58 +01:00
zadam
3a0bb91b77 fix 2024-02-16 11:25:23 +01:00
zadam
157f894c9b
Merge pull request #4642 from henrikx/patch-1
Fix ribbon tooltips getting stuck on the screen by setting a small delay before saving attributes in attributeeditor
2024-02-16 11:02:13 +01:00
zadam
e6dec701c0 Merge remote-tracking branch 'origin/master' 2024-02-16 10:42:30 +01:00
zadam
450b52f6da JSDoc improvements 2024-02-16 10:42:25 +01:00
zadam
4ef31eaf3d
Merge pull request #4635 from WantToLearnJapanese/WantToLearnJapanese-patch-unhoist-bookmark
Fix showing unhoist confirm dialogue for bookmarked notes.
2024-02-16 06:48:04 +01:00
zadam
2d865576cf Merge remote-tracking branch 'origin/master' 2024-02-16 06:46:38 +01:00
zadam
41e623b009 fix JSDoc, closes #4633 2024-02-16 06:46:32 +01:00
zadam
239786e7d1
Merge pull request #4632 from bavis-m/master
Add the -o option to the groupmod command used in start-docker.sh
2024-02-16 06:40:38 +01:00
zadam
89e1e47900 Merge remote-tracking branch 'origin/master' 2024-02-14 07:21:36 +01:00
zadam
67cb926233 PWA manifest fixes for extra auth, fixes #4611 2024-02-14 07:21:31 +01:00
henrikx
2f813dfc5d
Update attribute_editor.js 2024-02-09 10:58:41 +01:00
WantToLearnJapanese
a939599223
Fix showing unhoist confirm dialogue for bookmarked notes. 2024-02-02 16:36:54 +09:00
Mark
fb10e0ad33 Add the -o option to the groupmod command used in start-docker.sh when USER_GID is set, otherwise we won't be added to existing groups (e.g. you want node to run in the users (100) group) 2024-02-01 11:56:37 -08:00
zadam
46bd5bc1ef
Update README.md 2024-01-29 22:36:52 +01:00
zadam
5abfb5c08a revert unintended license changes 2024-01-28 23:09:57 +01:00
zadam
9357caeb5a activate parent note when deleting a note, #4601 2024-01-28 23:08:44 +01:00
zadam
6b58e59819 added keyboard shortcut for toggling the right pane, closes #4552 2024-01-28 08:58:40 +01:00
zadam
c6df25ece8 fix pin button shadow, closes #4595 2024-01-28 08:36:16 +01:00
zadam
ebd6276b5e CKEditor 41.0.0 2024-01-27 23:02:11 +01:00
zadam
92e8b155e4 Merge branch 'stable'
# Conflicts:
#	package.json
#	src/services/build.js
#	src/services/migration.js
2024-01-27 22:52:47 +01:00
zadam
e76093e75c release 0.62.6 2024-01-21 23:49:23 +01:00
zadam
4f8073daa7 Revert "don't tag beta images with latest #4590"
This reverts commit 47fb96faa81e67b59f7c15c2e3bad088dab47215.
2024-01-21 23:48:56 +01:00
zadam
47fb96faa8 don't tag beta images with latest #4590 2024-01-21 23:42:57 +01:00
zadam
6e33553146 fix migration 2024-01-21 23:11:27 +01:00
zadam
807941e6a5 disable scanning for links while migration is running #4535 2024-01-21 20:50:38 +01:00
zadam
1e30c0702e add indexes sooner in the migration process to speed it up #4535 2024-01-21 11:13:45 +01:00
zadam
69b686ba3b basic emoji #4119 2024-01-21 10:44:23 +01:00
zadam
ace5660809 add special characters to CKEditor build #4119 2024-01-21 10:33:16 +01:00
zadam
8bc99fd799 downgrades to try to fix flatpak build 2024-01-12 00:17:04 +01:00
zadam
f0c3a090a2 release 0.63.1-beta 2024-01-12 00:02:50 +01:00
zadam
17e063f01d updates 2024-01-12 00:02:45 +01:00
zadam
76c9873705 fix erase sync 2024-01-10 23:51:53 +01:00
zadam
2c7b774356 Merge branch 'stable' 2024-01-10 22:57:05 +01:00
zadam
390ad6d813 fix rendering image title in share renderer, closes #4578 2024-01-09 23:38:44 +01:00
zadam
77800d073f fix URL unescaping in improper place, #4566 2024-01-09 23:22:45 +01:00
zadam
1953c7896f support SVG image upload, fixes #4573 2024-01-09 23:13:33 +01:00
zadam
dff4f73366
Merge pull request #4571 from Nriver/master
fix typo in keyboard shortcuts description
2024-01-09 22:53:41 +01:00
zadam
cd43752f61 remove conflicting shortcut, fixes #4570 2024-01-09 22:52:13 +01:00
Nriver
23a5cea338 fix typo in keyboard shortcuts description 2024-01-08 10:20:23 +08:00
zadam
e2cb3c0d14 Merge branch 'stable'
# Conflicts:
#	package.json
#	src/services/build.js
#	src/services/notes.js
2024-01-08 00:21:46 +01:00
zadam
d6046efa1b release 0.62.5 2024-01-08 00:05:13 +01:00
zadam
ee608fcf46 unescape HTML before downloading images, #4566 2024-01-08 00:03:11 +01:00
zadam
894b08a1b8 correctly save attachment URL, #4566 2024-01-07 23:51:38 +01:00
zadam
4e549baedc fix auto-download of images, closes #4566 2024-01-07 23:45:40 +01:00
zadam
6b6e42e9ba document attachment ETAPI APIs in OpenAPI spec, fixes #4559 2024-01-07 23:11:55 +01:00
zadam
0404b78fb8 fix loading katex in share #4558 2024-01-07 22:52:16 +01:00
zadam
d63d42d87c Merge branch 'stable' 2024-01-07 22:46:23 +01:00
zadam
37baa4cd74
Merge pull request #4550 from spasche/zip-export-sort-children
sort children during export to ensure a more stable format
2024-01-07 22:38:14 +01:00
zadam
68e03c434e release 0.63.0-beta 2024-01-04 00:49:06 +01:00
zadam
394530921e downgrade electron 2024-01-03 23:50:29 +01:00
zadam
57ccd5a954 stronger light anonymization 2024-01-03 22:10:29 +01:00
zadam
a28d8843ac fix migration 2024-01-03 22:08:26 +01:00
Sylvain Pasche
cb523faaad
sort children during export to ensure a more stable format 2023-12-31 16:52:19 +01:00
zadam
f704cacdee bugfixes to sync 2023-12-30 00:34:46 +01:00
zadam
8dbc592563 add "copy image" context menu to also attachments, fixes #4514 2023-12-28 00:02:09 +01:00
zadam
439743d2b0 convert absolute image attachment URLs to relative without domain, fixes #4509 2023-12-27 23:22:40 +01:00
zadam
a3783131a2
Merge pull request #4522 from Nriver/master
fix decoding issue for request data chunks
2023-12-27 22:58:27 +01:00
zadam
8199073342 excali 17 2023-12-27 22:48:46 +01:00
zadam
33af9a3595 updates 2023-12-27 22:48:16 +01:00
Nriver
30c3c10524 fix decoding issue for request data chunks 2023-12-14 11:10:13 +08:00
zadam
df85a5eee4 Merge branch 'stable'
# Conflicts:
#	src/routes/api/revisions.js
#	src/services/bulk_actions.js
2023-12-11 23:07:15 +01:00
zadam
0ac397e7ff fix setNoteToParent API breakage, closes #4505 2023-12-11 23:05:05 +01:00
zadam
d243880099 release 0.62.4 2023-12-07 00:03:59 +01:00
zadam
2e23c521c3 electron upgrade 2023-12-06 23:54:17 +01:00
zadam
eb761b286f electron upgrade 2023-12-04 00:17:00 +01:00
zadam
d0f6ff5f98 fix erasing revisions 2023-12-04 00:11:24 +01:00
zadam
c35167f2f5 sometimes CPU info is not available #3957 2023-12-03 21:37:50 +01:00
zadam
84feaabc52 release 0.62.3 2023-11-27 23:37:24 +01:00
zadam
a6036859b8 normalize strings before calculation hashes, #4435 2023-11-27 23:23:55 +01:00
zadam
929f7f3114 add node version to app_info 2023-11-27 23:12:22 +01:00
zadam
9e914b9016 remove relation map from the demo document 2023-11-27 10:54:38 +01:00
zadam
947627d8a0 relation map deprecation - don't show it in menu to create new note 2023-11-27 10:50:17 +01:00
zadam
ed00797179 Merge branch 'stable'
# Conflicts:
#	package-lock.json
2023-11-27 10:41:07 +01:00
zadam
93dcce2217 dragging notes from note tree will automatically insert them as images where appropriate (image, canvas, mermaid) 2023-11-27 10:38:19 +01:00
zadam
686af0c6a1 when canvas and mermaid are inserted using "include note", we insert them as images 2023-11-27 10:22:54 +01:00
zadam
d07f02b95f contrary to what I believed encodeURIComponent() is available also in node.js, #4478 2023-11-27 10:15:29 +01:00
zadam
ad74952194 fix thumbnails with chinese titles, closes #4478 2023-11-27 10:10:27 +01:00
zadam
10f3df3ed4 make sure content is string for post-processing 2023-11-26 23:51:04 +01:00
zadam
18e2e6779b remove title to fix closing highlights list, fixes #4471 2023-11-24 23:51:12 +01:00
zadam
ed129c307b fix printing math, closes #4470 2023-11-24 00:17:20 +01:00
zadam
8742e4bfe9 make sure the promoted attributes don't take the whole screen in mobile, #4468 2023-11-24 00:04:49 +01:00
zadam
3b10bb742b pin versions 2023-11-22 20:46:20 +01:00
zadam
1f206a9c24 load panzoom from node_modules 2023-11-22 20:28:17 +01:00
zadam
f026646bb5 load split.js from node_modules 2023-11-22 20:26:20 +01:00
zadam
f9bfc8ad86 load printThis from node_modules 2023-11-22 20:22:16 +01:00
zadam
e70539ff48 load jquery-hotkeys from node_modules 2023-11-22 20:15:21 +01:00
zadam
a439be79b3 load jquery from node_modules 2023-11-22 20:11:41 +01:00
zadam
edf2dfe8f9 load mermaid from node_modules 2023-11-22 20:09:04 +01:00
zadam
0e4c49ea5b load box icons from node_modules 2023-11-22 20:06:44 +01:00
zadam
52cfd138d1 load force-graph from node_modules 2023-11-22 20:02:35 +01:00
zadam
258b97f833 Merge remote-tracking branch 'origin/master' 2023-11-22 19:58:59 +01:00
zadam
837b17d62a load day.js from node_modules 2023-11-22 19:58:54 +01:00
zadam
d82720f62f
Merge pull request #4461 from Nriver/master
fix typo
2023-11-22 19:47:48 +01:00
zadam
cf99345962 use .js extension for require() as a preparation for future migration to ESM 2023-11-22 19:34:48 +01:00
Nriver
9e54496d00 fix more typo 2023-11-22 10:41:44 +08:00
Nriver
8ae6598b8a fix typo 2023-11-22 10:37:23 +08:00
zadam
722299dd26 release 0.62.2 2023-11-21 20:49:24 +01:00
zadam
e2b1421bf3 electron upgrade 2023-11-21 20:48:43 +01:00
zadam
1f41d39bc7 docs 2023-11-21 20:46:48 +01:00
zadam
ce39d3b4ce Merge branch 'stable'
# Conflicts:
#	docs/backend_api/BNote.html
#	docs/backend_api/BackendScriptApi.html
#	docs/backend_api/services_backend_script_api.js.html
#	docs/frontend_api/FAttribute.html
#	docs/frontend_api/FBranch.html
#	docs/frontend_api/FNote.html
#	docs/frontend_api/FrontendScriptApi.html
#	docs/frontend_api/entities_fattachment.js.html
#	docs/frontend_api/entities_fattribute.js.html
#	docs/frontend_api/entities_fblob.js.html
#	docs/frontend_api/entities_fbranch.js.html
#	docs/frontend_api/entities_fnote.js.html
#	docs/frontend_api/global.html
#	docs/frontend_api/index.html
#	docs/frontend_api/services_frontend_script_api.js.html
#	package.json
#	src/services/backend_script_api.js
#	src/services/build.js
2023-11-21 20:46:24 +01:00
zadam
ef2ade849b release 0.61.15 2023-11-20 23:23:12 +01:00
zadam
88067c071c add api.backupNow() to backend API, closes #4455 2023-11-20 23:14:53 +01:00
zadam
f5018e9820 fix buggy http proxy initialization, closes #4453 2023-11-20 23:03:19 +01:00
zadam
1561f402f0 ckeditor 40.1.0 2023-11-20 22:29:05 +01:00
zadam
0d7889d212 Merge branch 'stable'
# Conflicts:
#	package-lock.json
2023-11-20 22:22:05 +01:00
zadam
19a10e59e9 fix edit history crossing note activation in canvas, #4437 2023-11-20 22:13:52 +01:00
zadam
746abb02d3 Merge branch 'stable'
# Conflicts:
#	package-lock.json
#	package.json
#	src/services/build.js
2023-11-16 23:57:25 +01:00
zadam
23351298c8 fix incorrect syntax/typo, closes #4443 2023-11-16 23:35:50 +01:00
zadam
426a8f75aa fix creating tree cycle by moving clone into another clone, closes #4442 2023-11-16 23:31:33 +01:00
zadam
999cf0d9e3 release 0.61.14 2023-11-16 00:21:34 +01:00
zadam
0afc41060a template LABEL should not be inherited #4349 2023-11-16 00:11:14 +01:00
zadam
6e2d76c2b4 release 0.62.1-beta 2023-11-14 00:57:51 +01:00
zadam
3abf74a9f3 fix katex CSS loading 2023-11-14 00:57:19 +01:00
zadam
5d52498da1 Merge branch 'stable' 2023-11-14 00:19:15 +01:00
zadam
cf068211ff change the way frontend detects content change which works even if no new blob is created, fixes #4434 2023-11-13 23:53:14 +01:00
zadam
0507c46ae9 revert general HTML support 2023-11-13 00:58:55 +01:00
zadam
69ed3644f9 add a note about hideHighlightWidget to options 2023-11-13 00:39:28 +01:00
zadam
b0c5894691 added hideHighlightWidget to built in attributes 2023-11-13 00:36:08 +01:00
zadam
f10fc7bd7f Revert "Add attribute disableHighlightsList to disable Highlights List Widget"
This reverts commit e7d98206f975d8c46e2fccb14d26e74a56377d74.
2023-11-13 00:34:09 +01:00
zadam
bdbaacaac9
Merge pull request #4421 from fang64/master
Add attribute disableHighlightsList to disable Highlights List Widget
2023-11-13 00:31:00 +01:00
zadam
2790f52e36
Merge pull request #4417 from ljgonzalez1/master
Migrate KaTeX@0.16.0 from `libraries` to KaTeX@0.16.9 in `node_modules`
2023-11-13 00:29:15 +01:00
zadam
6515dd7b23 fix assigning extension to attachment export filenames, closes #4415 2023-11-12 23:57:21 +01:00
zadam
5a38bf78e1 fix content renderer of protected canvas/mermaid notes, closes #4414 2023-11-12 23:43:04 +01:00
zadam
4bdb40904f fix loading reference link titles in read-only text notes, closes #4404 2023-11-12 22:57:04 +01:00
fang64
e7d98206f9 Add attribute disableHighlightsList to disable Highlights List Widget 2023-11-09 21:32:45 -05:00
Luis González
1939375161
Merge pull request #3 from ljgonzalez1/feat/migrate_katex_to_npm_v2
Feat/migrate katex to npm
2023-11-09 19:06:25 -03:00
Luis González
ec737d02b2 feat(src/routes/assets.js): Add KaTex support to assets route. 2023-11-09 18:33:36 -03:00
Luis González
927e5ede0c feat(src/routes/assets.js): Add KaTex support to assets route. 2023-11-09 18:21:53 -03:00
Luis González
3470347523 feat(package.json & package-lock.json): Add 'katex' package and update project version 2023-11-09 14:23:39 -03:00
Luis González
e25c86e947 Revert "🙈 gitignore" commits.
This reverts commits 30bd216500b77701d4dd49ea5b0e8eb5486b3e98, 9a587e8c8cb8b18d0d175c1dccbcaedcb2030906, 38e6008aa22198c254d0d9893c15ce309f37afe7, 5af1c7756c52ed17d90f4bd0f9c7008894989e15 and c8d6f20c3be78994cabbb909b23be81f23ee0c7e.

It reverts pr #2 from my branch
2023-11-09 13:16:50 -03:00
Luis González
fb1478f2dd
Merge pull request #2
Add OS and IDE files to the gitignore + Add documentation
2023-11-09 12:07:12 -03:00
Luis González
c8d6f20c3b 🙈 gitignore(.gitignore): Include macOS and Linux system files 2023-11-09 11:59:04 -03:00
Luis González
5af1c7756c 🙈 gitignore(.idea/.gitignore): Ignore IntelliJ IDE specific files 2023-11-09 11:55:54 -03:00
Luis González
38e6008aa2 🙈 gitignore: Expand to ignore JetBrains IDEs, VisualStudioCode, and Kate templates. 2023-11-09 11:55:52 -03:00
Luis González
9a587e8c8c 🙈 gitignore: Add rules to maintain empty folders and all gitignore files. 2023-11-09 11:55:33 -03:00
Luis González
30bd216500 🙈 gitignore: Update documentation in gitignore and sort ignored folder/files by category. 2023-11-09 11:42:07 -03:00
Luis González
a3ce5b5d28
Merge pull request #1 from ljgonzalez1/feat/update_katex_0.16.9
Update Katex from 0.16.0 to 0.16.9
2023-11-08 17:16:59 -03:00
Luis González
b17848609b Update Katex from 0.16.0 to 0.16.9 2023-11-08 17:15:15 -03:00
zadam
e9ece21d20 release 0.62.0-beta 2023-11-06 23:13:25 +01:00
zadam
b700f069fe reduce flickering while hoisted 2023-11-06 23:11:57 +01:00
zadam
40fb6aa168 move the unhoist button to the right 2023-11-06 22:28:25 +01:00
zadam
341480e7cf scroll padding widget only on text and code notes 2023-11-06 22:26:17 +01:00
zadam
bde311fd76 upgrades 2023-11-06 22:23:18 +01:00
zadam
f8bc03feaf Merge branch 'stable' 2023-11-06 22:14:15 +01:00
zadam
7fc1eb5262 release 0.61.13 2023-11-06 00:21:41 +01:00
zadam
531e9d4aff graceful handling of sync error 2023-11-06 00:15:35 +01:00
zadam
e0d4766c2d fix recursion in the inline image processing 2023-11-05 21:50:08 +01:00
zadam
ab4e83771c fix throwing empty error 2023-11-04 22:53:09 +01:00
zadam
803b6df40c release 0.61.12 2023-11-04 00:16:19 +01:00
zadam
1ebdb0f5e1 emergency disabling of image compression since it appears to make problems in migration to 0.61 2023-11-04 00:10:54 +01:00
zadam
df5951ce46 improve sync debug info 2023-11-04 00:02:31 +01:00
zadam
809ffa0c6e small refactor of ordinal() func 2023-11-03 13:49:18 +01:00
zadam
6dd466ddaf updates 2023-11-03 12:23:14 +01:00
zadam
a45b801a84 reverted incomplete work on export per-directory metadata 2023-11-03 12:18:38 +01:00
zadam
f8ade4d0c5 Merge remote-tracking branch 'origin/master' 2023-11-03 12:15:46 +01:00
zadam
889cb1d7b1 Merge branch 'stable'
# Conflicts:
#	package.json
2023-11-03 12:15:39 +01:00
zadam
d3a477b8f2 release 0.61.11 2023-11-03 11:46:53 +01:00
zadam
4db042736c
Merge pull request #4371 from rauenzi/pwa-manifest
Update webmanifest for wider compatibility
2023-11-03 11:25:17 +01:00
zadam
612e4406b5 refactored TOC and Highlights close buttons and added a button to quickly access options 2023-11-03 10:44:14 +01:00
zadam
76f874ef6d refactoring of the complex note tree entitiesReloadedEvent 2023-11-03 08:58:57 +01:00
zadam
f37f47ce5b fixes to stable sorting 2023-11-03 01:11:47 +01:00
zadam
45ed436426 added runOnBranchChange event #4108 2023-11-02 23:26:32 +01:00
Zack Rauen
9314cf87c5 Update manifest for wider compatibility
Partially fixes #920
2023-11-01 12:30:01 -04:00
zadam
0efc42081d more tests 2023-11-01 00:41:35 +01:00
zadam
7d80fe19e0 add backend API methods to access options, attachments, revisions, etapi tokens 2023-10-31 22:26:56 +01:00
zadam
de8c351e25 reduce indent of TOC when larger headings are not being used, fixes #4363 2023-10-31 00:18:03 +01:00
zadam
695c9d5cf3 more note etapi tests 2023-10-30 23:51:53 +01:00
zadam
8690228d98 etapi test infrastructure plus a basic note creation test 2023-10-29 23:24:11 +01:00
zadam
01093d05d7 qswitch-electron, qswitch-server npm scripts 2023-10-29 18:39:53 +01:00
zadam
690caf7da1 Merge branch 'beta'
# Conflicts:
#	package-lock.json
#	package.json
2023-10-29 16:43:31 +01:00
zadam
a9b63111ae qstart-electron, qstart-server npm scripts 2023-10-29 16:42:30 +01:00
zadam
eb0a68d0ab note list should show the prefix, #4362 2023-10-29 01:02:55 +02:00
zadam
48e98b2ac3 add api.runAsyncOnBackendWithManualTransactionHandling() variant and add toast warnings about improper usage. 2023-10-29 00:51:23 +02:00
zadam
ed1a731950 extra hint on "noproxy directly in the setting", #3934 2023-10-24 23:15:18 +02:00
zadam
4660c154e9 refactor 2023-10-24 23:10:52 +02:00
zadam
ef974ab1f5 add shell as enabled by default #4347 2023-10-24 23:00:46 +02:00
zadam
bacae67374 fix import 2023-10-24 00:14:15 +02:00
zadam
cc20d17bd2 npm upgrades && docs 2023-10-24 00:13:20 +02:00
zadam
494b240015 Merge branch 'beta'
# Conflicts:
#	src/public/app/layouts/desktop_layout.js
2023-10-24 00:09:37 +02:00
zadam
1cd391a132 mermaid 10.5.1 2023-10-22 23:57:28 +02:00
zadam
1c15527d95 added "greater than 0" and "less than 2" for ancestor depth, fixes #4343 2023-10-22 23:52:21 +02:00
zadam
7af79ec33b limit mermaid width, #4340 2023-10-21 23:24:43 +02:00
zadam
4294c043d8 enabled CKEditor HTML support 2023-10-21 23:19:14 +02:00
zadam
e5b925abf8 added extra elements to the html sanitizer 2023-10-21 18:03:06 +02:00
zadam
90c0a4a437 respect safeImport flag when sanitizing imported content 2023-10-21 17:54:07 +02:00
zadam
692f7868bc updated demo document so that canvas and mermaid have generated export attachments 2023-10-21 17:36:08 +02:00
zadam
5282af55f6 render attachment SVG when sharing mermaid 2023-10-21 17:32:07 +02:00
zadam
aefc4c6bd2 ckeditor 40 2023-10-21 17:24:47 +02:00
zadam
b39ba76505 add ability to insert mermaid diagram into text notes as image 2023-10-21 00:23:16 +02:00
zadam
9d918e7a54 fix image zooming 2023-10-20 23:44:30 +02:00
zadam
4773f9392b don't log known slow queries 2023-10-20 09:36:57 +02:00
zadam
5c10fc26be Merge branch 'beta'
# Conflicts:
#	package.json
#	src/public/app/layouts/desktop_layout.js
2023-10-20 09:15:48 +02:00
zadam
38db7f9db7 style tweaks #4338 2023-10-19 23:54:36 +02:00
zadam
5163e50e7d use mtime instead of ctime for backups #4321 2023-10-19 23:02:37 +02:00
zadam
5115b33446 release 0.61.10-beta 2023-10-19 09:33:51 +02:00
zadam
b01fe5ead9 add canvas properties with a button to copy reference to clipboard which allows inserting canvas as an image into text notes 2023-10-19 09:20:23 +02:00
zadam
b1d4a258a1 move FAB down in canvas 2023-10-19 09:03:49 +02:00
zadam
ca041bb658 fix expanded status when moving note trees 2023-10-19 08:58:04 +02:00
zadam
52244ddc99 Merge branch 'beta'
# Conflicts:
#	docs/backend_api/BAttachment.html
#	docs/backend_api/BNote.html
#	docs/backend_api/BackendScriptApi.html
#	package-lock.json
#	package.json
2023-10-19 01:13:45 +02:00
zadam
87a60e325f added ctime to backup list #4321 2023-10-19 00:51:38 +02:00
zadam
0a172d8bc1 add api.runOutsideOfSync() to backend script API, #4327 2023-10-19 00:29:03 +02:00
zadam
67a12d3c4d improve sync error logging 2023-10-19 00:13:11 +02:00
zadam
5b2ba3646d removed maxTouchPoints condition for detection of mobile browsers, #4316 2023-10-18 23:23:20 +02:00
zadam
148bff9f77 show existing backups and anonymized DBs, #4321 2023-10-18 23:16:47 +02:00
zadam
2132cf3bdc nodejs 18.18.2 2023-10-18 09:40:00 +02:00
zadam
d5271c17e3 fix sync bug 2023-10-18 09:37:36 +02:00
zadam
b764761e58 run local dev with TRILIUM_SAFE_MODE as a safety precaution 2023-10-18 09:36:49 +02:00
zadam
c666fc3b98 make sure exact noteId match comes on the top in search 2023-10-18 09:33:24 +02:00
zadam
ba34df2e15 typo 2023-10-18 09:24:13 +02:00
zadam
840ac2d63e updates 2023-10-14 21:15:06 +02:00
zadam
5dd4586ebe added webViewSrc to builtin attrs 2023-10-14 21:09:20 +02:00
zadam
bd7fa16e96 Merge remote-tracking branch 'origin/master' 2023-10-09 23:08:32 +03:00
zadam
846ac9305e don't anonymize option notes 2023-10-09 23:08:25 +03:00
zadam
db8014c0ef
Merge pull request #4298 from rauenzi/share
Add ~shareTemplate and #shareExternalLink
2023-10-09 22:28:20 +03:00
Zack Rauen
a3540772dd Merge remote-tracking branch 'upstream/master' into share 2023-10-08 17:19:32 -04:00
zadam
137703ada4 add promoted attributes widget to the mobile version, closes #4314 2023-10-08 22:58:31 +03:00
Zack Rauen
ec6b8476f9 Adjust shared notes search api 2023-10-08 14:54:37 -04:00
zadam
d09d3f5a96 release 0.61.9-beta 2023-10-07 23:02:47 +03:00
zadam
3d15aeae58 def value 2023-10-07 23:02:33 +03:00
zadam
9765892d18 fix loading canvas notes created in 0.61.7-beta, closes #4313 2023-10-07 21:49:25 +03:00
zadam
00f5924251 jsdocs 2023-10-07 20:57:53 +03:00
zadam
99d0f22403 Merge branch 'beta'
# Conflicts:
#	package-lock.json
2023-10-07 20:51:26 +03:00
zadam
78f8a37587 added total result count to the note list widget 2023-10-06 22:02:09 +03:00
zadam
86d62866f2 catch JSON stringify error, #4310 2023-10-05 21:54:59 +02:00
zadam
1dc3fafcbf improve anonymization 2023-10-03 23:17:15 +02:00
zadam
7f06952d9e improve anonymization 2023-10-03 23:14:02 +02:00
zadam
78b6614eea fix docker-compose.yml #2239 2023-10-03 11:21:14 +02:00
zadam
9665e872c2 fix importing inline images within markdown within zip, closes #4301 2023-10-03 09:40:31 +02:00
zadam
9db0a062ed fix calculating revision attachment size 2023-10-03 09:05:30 +02:00
zadam
055bb39e4d Merge remote-tracking branch 'origin/beta' into beta 2023-10-02 22:02:31 +02:00
zadam
1261a06a30 order by note size + attachments + revisions, closes #4295 2023-10-02 22:02:25 +02:00
zadam
91eb3c45d5 added "save revision" to note actions menu 2023-10-02 15:29:45 +02:00
zadam
3944235592 -console.log 2023-10-02 15:25:12 +02:00
zadam
5be61e6142 saving / viewing canvas revisions 2023-10-02 15:24:40 +02:00
zadam
62ccf798ee allow deleting custom launchers, fixes #4291 2023-09-30 22:38:06 +02:00
Zack Rauen
d259931bd2 Add new attributes in appropriate locations 2023-09-30 00:48:34 -04:00
Zack Rauen
7729aad1e9 Allow external link notes in share tree 2023-09-30 00:44:10 -04:00
zadam
70d6bd0157 release 0.61.8-beta 2023-09-29 00:54:45 +02:00
zadam
e5555beea9 logging reason for frontend reload 2023-09-28 23:47:19 +02:00
zadam
9767b6269a upgrade code mirror to 5.65.15 and fix modes requiring multiplex or overlay, fixes #4279 2023-09-28 01:02:27 +02:00
zadam
7e486fda06 electron update 2023-09-28 00:27:00 +02:00
zadam
9f726304aa sync fix, #4288 2023-09-28 00:24:53 +02:00
Zack Rauen
614cc4dd82 Allow users to use their own share template 2023-09-27 14:34:07 -04:00
zadam
3e8f09d306 allow shrinking note title text in the tree to make space for the "add note" button https://github.com/zadam/trilium/discussions/4287 2023-09-26 00:14:28 +02:00
zadam
613b83e638
Merge pull request #4281 from rauenzi/jump-to-toc
Fix jump to ToC for nested headers
2023-09-25 23:33:00 +02:00
zadam
4ac609ff57
Merge pull request #4280 from rauenzi/promoted-alias
Add option for promoted aliases
2023-09-25 23:30:39 +02:00
zadam
c14ce2c428
Merge pull request #4278 from Nriver/master
sort mime types alphabetically
2023-09-25 23:28:22 +02:00
zadam
984bd726e9 add support for "bottom" sort, closes #4277 2023-09-25 23:25:00 +02:00
zadam
964abf390b API docs 2023-09-25 23:11:24 +02:00
zadam
af24758ad4 Merge branch 'beta'
# Conflicts:
#	docs/backend_api/BAttachment.html
#	docs/backend_api/BNote.html
#	docs/backend_api/becca_entities_bnote.js.html
#	docs/frontend_api/FAttribute.html
#	docs/frontend_api/FBranch.html
#	docs/frontend_api/FNote.html
#	docs/frontend_api/FrontendScriptApi.html
#	docs/frontend_api/entities_fattachment.js.html
#	docs/frontend_api/entities_fattribute.js.html
#	docs/frontend_api/entities_fblob.js.html
#	docs/frontend_api/entities_fbranch.js.html
#	docs/frontend_api/entities_fnote.js.html
#	docs/frontend_api/global.html
#	docs/frontend_api/index.html
#	docs/frontend_api/services_frontend_script_api.js.html
#	package-lock.json
2023-09-25 23:11:07 +02:00
zadam
528d94a8fb accept custom widgets as classes instead of instances, #4274 2023-09-25 23:05:54 +02:00
zadam
be918628c3 global API docs 2023-09-25 23:04:03 +02:00
zadam
602b9ae64a API docs 2023-09-23 00:04:32 +02:00
zadam
602a166e36 added info, confirm, prompt dialogs 2023-09-23 00:04:16 +02:00
zadam
2e69cc8331
Merge pull request #4267 from rauenzi/tray
Add hotkey option to toggle hide to tray
2023-09-22 23:52:47 +02:00
zadam
aaad858395 save scroll and zoom in canvas 2023-09-22 23:44:03 +02:00
Zack Rauen
b266c327e4 Fix jump to ToC for nested headers 2023-09-22 05:52:06 -04:00
Zack Rauen
149462e3ab Add option for promoted alias 2023-09-22 04:58:06 -04:00
Nriver
237d309406 sort mime types alphabetically 2023-09-22 09:58:37 +08:00
zadam
48248224f8 release 0.61.7-beta 2023-09-21 23:38:18 +02:00
zadam
79e5e3b65f more logging for sync 2023-09-21 18:13:14 +02:00
zadam
d0383f3044 remove debian packaging hack 2023-09-21 12:44:20 +02:00
zadam
62ecd1ad76 node 18.18.0 2023-09-21 12:29:11 +02:00
zadam
75b7706c2c mermaid 10.4.0 2023-09-21 12:24:44 +02:00
zadam
584b176643 hiding useless/misleading buttons from excalidraw 2023-09-21 12:03:40 +02:00
zadam
a16555bbff don't save appState in canvas - app state should be reset after each load 2023-09-21 11:54:54 +02:00
zadam
a749e24147 fix creating revisions for non-text notes #4176 2023-09-21 11:38:38 +02:00
zadam
bb81f110dd improved error handling 2023-09-21 11:16:03 +02:00
zadam
5dd6f49104 chart js 0.16.0 2023-09-19 23:59:05 +02:00
zadam
bc6be44b19 better error condition checks 2023-09-19 23:48:55 +02:00
zadam
8075265753 fix migration, closes #4262 2023-09-18 23:45:00 +02:00
Zack Rauen
9d69024758 Add hotkey option to toggle hide to tray
Fixes #3043
2023-09-18 04:38:23 -04:00
zadam
40ca949890 fixes for tooltip auto-disappearing handling 2023-09-14 00:40:49 +02:00
zadam
035113db4d Merge branch 'beta'
# Conflicts:
#	package-lock.json
2023-09-14 00:19:19 +02:00
zadam
4a67f63abd better error message in image attachment + upgrades 2023-09-14 00:18:56 +02:00
zadam
d9666210f1 make sure that the hidden note is never selected when hoisted to root to avoid e.g. erroneous deletion 2023-09-13 16:57:24 +02:00
zadam
925bba134e formatting 2023-09-13 09:10:56 +02:00
zadam
d46801ff1f refactoring, tab switching handling shouldn't be on the widget level 2023-09-13 09:01:55 +02:00
zadam
7848c7e319
Merge pull request #4251 from rauenzi/tab-navigation
Add keyboard shortcuts for tabs
2023-09-13 00:22:01 +02:00
zadam
65e53741e7
Merge pull request #4255 from Compositr/master
Add new datePattern and monthPattern replacers
2023-09-13 00:19:04 +02:00
Zack Rauen
a83e8ff91a Switch back to window scope 2023-09-11 18:03:49 -04:00
Compositr
542e2579df
feat: add new datePattern replacers for shortmonth
* `{shortMonth3}` 3-letter months, e.g. Sep, Oct, Nov, Dec
* `{shortMonth4}` 4-letter months, e.g. Sept, Octo, Nove, Dece
2023-09-12 07:35:46 +10:00
Compositr
81d64e020e
feat: add new datePattern replacer {ordinal}
* {ordinal} is replaced with the ordinal date (e.g. 1st, 2nd, 3rd) etc.
2023-09-12 07:30:30 +10:00
zadam
9413cd2296 comment explaining scope in keyboard actions 2023-09-11 22:54:36 +02:00
zadam
5b85713bf3 saving export meta file per directory 2023-09-11 00:12:12 +02:00
Zack Rauen
15254e2dfc Add keyboard shortcuts for tabs 2023-09-08 22:53:21 -04:00
zadam
5f6d562bf8 add ability to excalidraw to follow links 2023-09-08 23:00:43 +02:00
zadam
f37dc66074 add support for storing canvas libraries in note attachments plus storing exported SVG in attachment 2023-09-08 21:53:57 +02:00
zadam
c881b39860 Merge branch 'beta'
# Conflicts:
#	package-lock.json
2023-09-08 01:10:12 +02:00
zadam
0b84524807 fix refreshing note actions on note/tab switch, closes #4247 2023-09-08 00:43:18 +02:00
zadam
5218f7b7a6
Merge pull request #4246 from SiriusXT/open-note-custom
Add openAttachmentCustom
2023-09-08 00:31:20 +02:00
zadam
8062bb7e2a fix reloading unprotected note title to the document.title after entering protected session, fixes #4244 2023-09-08 00:28:00 +02:00
zadam
806062c8d1 fix undelete attachments 2023-09-08 00:22:48 +02:00
zadam
83f19c0537 fix protecting attachments 2023-09-08 00:19:30 +02:00
siriusXT
0424728012 Add openAttachmentCustom 2023-09-07 06:33:51 +00:00
zadam
3a83d58b25 release 0.61.6-beta 2023-09-06 23:57:29 +02:00
zadam
6fa9d996e8 ckeditor 39.0.2 2023-09-06 23:23:42 +02:00
siriusXT
1ea3d238e0 Fix right click bookmark bug
(cherry picked from commit 92e43bc051e5c70cfbec57db66318abea98f1f08)
2023-09-06 23:11:51 +02:00
zadam
eb273b7dbb lib upgrades 2023-09-06 23:11:02 +02:00
zadam
55374ac4d9
Merge pull request #4240 from SiriusXT/LauncherWidget
Fix right click bookmark bug
2023-09-06 23:10:54 +02:00
zadam
8070c00b5f API docs 2023-09-06 23:05:03 +02:00
zadam
da8025f1e4 Merge branch 'beta' 2023-09-06 23:00:45 +02:00
zadam
d2263c68f8 provide note dates in the frontend API, fixes #4232 2023-09-06 22:54:31 +02:00
siriusXT
92e43bc051 Fix right click bookmark bug 2023-09-06 14:49:01 +00:00
zadam
40971afe4f API docs build 2023-09-06 09:25:00 +02:00
zadam
90fc4b8293 Merge branch 'beta'
# Conflicts:
#	docs/backend_api/BAttachment.html
#	docs/backend_api/BRevision.html
#	docs/backend_api/BackendScriptApi.html
#	docs/backend_api/becca_entities_battachment.js.html
#	docs/backend_api/becca_entities_bblob.js.html
#	docs/backend_api/becca_entities_brevision.js.html
#	docs/frontend_api/FNote.html
#	docs/frontend_api/FrontendScriptApi.html
#	docs/frontend_api/entities_fattachment.js.html
#	docs/frontend_api/entities_fblob.js.html
#	docs/frontend_api/services_frontend_script_api.js.html
#	package-lock.json
#	src/public/app/services/frontend_script_api.js
2023-09-06 09:24:41 +02:00
zadam
97d8b19868 add missing API docs 2023-09-06 09:23:13 +02:00
zadam
2bc7da91a6 add createLink() returns jsDoc, #4235 2023-09-06 09:20:32 +02:00
zadam
2b4cbb5f6b fix clipperInbox handling for new note creation, closes #4219 2023-09-05 23:24:01 +02:00
zadam
72b2a6ecb6
Merge pull request #4225 from SiriusXT/master
Click the button to reset the zoom level
2023-09-05 23:01:50 +02:00
zadam
7b662b04ff fix orderby with multiple labels, closes #4220 2023-09-05 23:00:08 +02:00
zadam
f8e4a665bd fixed search parser tests 2023-09-05 22:48:20 +02:00
zadam
f9a27dd90c add imageStyle alignBlockLeft, alignBlockRight, fixes #4215 2023-09-05 22:16:45 +02:00
zadam
641985737f fix FNote.getContent() #4210 2023-09-05 22:02:26 +02:00
zadam
121e4ba2ea fix displaying 1 / 0 in find widget 2023-09-05 21:00:24 +02:00
zadam
01474ecd2d sync fixes 2023-09-05 00:30:09 +02:00
zadam
82e4e28e7b fix 2023-09-04 23:57:42 +02:00
SnnBcd xt
06eb522a8c Click the button to reset the zoom level 2023-09-01 06:40:36 +00:00
SnnBcd xt
21098be307 Click the button to reset the zoom level 2023-09-01 03:30:39 +00:00
zadam
886ee0dbcb fix sync exception 2023-08-31 00:14:35 +02:00
zadam
6f7fbacca1 add "api.runOnFrontend()" to the backend script API 2023-08-30 23:18:16 +02:00
zadam
f5ddabc042
Merge pull request #4202 from eliandoran/feature/jump_to_note_list
Use a list instead of dropdown for jump-to-note
2023-08-30 22:17:04 +02:00
vaifix
8da5b90aea Fix bug: Calendar display incorrect tooltips.
(cherry picked from commit 58fe3a62af03fd2202d8191068e8a6190801721e)
2023-08-30 00:20:42 +02:00
zadam
23848526c0
Merge pull request #4197 from dvai/master
fix some bugs
2023-08-30 00:19:53 +02:00
zadam
e7d57bc08f Merge remote-tracking branch 'origin/beta' into beta
# Conflicts:
#	package-lock.json
2023-08-30 00:11:52 +02:00
zadam
041758766a allow specifying date created in the ETAPI, #4199 2023-08-30 00:11:32 +02:00
Elian Doran
69980c798b note autocomplete: Use backspace icon for delete text 2023-08-28 23:07:08 +03:00
Elian Doran
4de6a803e9 jump to note list: Remove scroll when not needed 2023-08-28 22:30:42 +03:00
Elian Doran
748c5064b5 jump to note list: Improve scroll bar position 2023-08-28 22:21:54 +03:00
Elian Doran
c6e8966ecd jump to note: Improve position of close button 2023-08-28 22:15:36 +03:00
Elian Doran
8c247ba7c6 jump to note list: Improve layout 2023-08-28 22:12:14 +03:00
Elian Doran
52b5711ecd jump to note: Add "Create and link child note" 2023-08-28 21:51:40 +03:00
vaifix
58fe3a62af Fix bug: Calendar display incorrect tooltips. 2023-08-28 20:43:03 +08:00
Elian Doran
af4d0c3ba6 jump to note list: Improve layout slightly 2023-08-26 17:52:01 +03:00
Elian Doran
4bba0aa842 jump to note list: Re-enable styling 2023-08-26 17:52:01 +03:00
Elian Doran
ae9af8ea23 jump to note list: Use a proper height to the container 2023-08-26 17:52:01 +03:00
Elian Doran
eea29aba0e jump to note list: Don't close jump to note results on lost focus 2023-08-26 17:51:58 +03:00
Elian Doran
abbd0b50eb jump to note list: Use a fixed container instead of dropdown 2023-08-26 17:51:47 +03:00
vaifix
739ab28763 Resolve autocomplete error 2023-08-25 13:01:53 +08:00
zadam
c551eae651
Merge pull request #4188 from rauenzi/master
Update JSDoc & API Docs
2023-08-21 23:46:40 +02:00
Zack Rauen
d5aea26960 Update API Docs 2023-08-21 04:18:14 -04:00
Zack Rauen
d3730ac1a9 Fix and improve JSDoc for APIs 2023-08-21 04:15:53 -04:00
zadam
f2a510e4c5 cleanup of old migrations, since upgrading to 0.61 is possible only from 0.60. 2023-08-18 15:56:38 +02:00
zadam
4717242dc7 force migration to 0.60 first before 0.61 #4132 2023-08-18 15:55:59 +02:00
zadam
b5ef09e779 hide canvas buttons which don't work, #4182 2023-08-18 15:33:20 +02:00
zadam
d706b3a447 fix saving revisions for non-text types, closes #4176 2023-08-17 16:39:57 +02:00
zadam
6c96cca3a5 add 200ms timeout to api.getTextEditor() and similar #4174 2023-08-17 16:31:04 +02:00
zadam
c1865f8564 small refactor 2023-08-17 09:09:06 +02:00
zadam
515c5411a6 release 0.61.5-beta 2023-08-16 23:02:15 +02:00
zadam
3f7a5504c7 prettier config 2023-08-16 20:31:14 +02:00
zadam
8c7c37cf98 updates 2023-08-16 20:12:22 +02:00
zadam
d93e00adce
Merge pull request #4168 from soulsands/button-style
fix: launcher-button style
2023-08-16 00:02:26 +02:00
zadam
0e16e48db6 scroll beyond last line in text/code editor, fixes #2728 2023-08-15 22:50:13 +02:00
zadam
c0f48c0e99 mermaid 10.3.1 2023-08-15 10:30:30 +02:00
zadam
abedf2bba4 fix pasting into ckeditor, upgrade to v39.0.1 2023-08-15 10:25:23 +02:00
zadam
bb0137b2fd fix displaying options / book on firefox, closes #4165 2023-08-15 10:25:23 +02:00
zadam
6c54c7d17d save enex images as attachment, fixes #4163 2023-08-15 10:25:23 +02:00
“soulsands”
cd95adcecb fix: launcher-button style 2023-08-15 16:11:13 +08:00
zadam
90255ac55b release 0.61.4-beta 2023-08-10 23:49:37 +02:00
zadam
e741c2826c release 0.61.4-beta 2023-08-10 23:48:27 +02:00
zadam
026992db78 release 0.61.4-beta 2023-08-10 23:46:42 +02:00
zadam
33780c1e17 fix note tooltip code rendering 2023-08-10 13:50:25 +02:00
zadam
ede9c43f67 API docs 2023-08-10 13:40:26 +02:00
zadam
5c12ac4eee fix CKEditor crashing 2023-08-10 13:40:15 +02:00
zadam
522518cf0d disambiguous query 2023-08-09 23:12:31 +02:00
zadam
1d869d25c2 fix #clipperInbox, closes #4153 2023-08-09 23:00:42 +02:00
zadam
a9cdd93cb4 added options to disable auto-opening of promoted attributes and edited notes ribbon tabs, closes #4151 2023-08-09 22:50:41 +02:00
zadam
4240da349d add shared info to mobile layout, closes #4147 2023-08-09 00:02:45 +02:00
zadam
c257bc07a8 clipper now creates notes with image attachments instead of image notes 2023-08-09 00:01:31 +02:00
zadam
00eaa16985 clipper now creates notes with image attachments instead of image notes 2023-08-08 23:42:47 +02:00
zadam
fefb059564 clipper now creates notes with image attachments instead of image notes 2023-08-08 23:07:59 +02:00
zadam
9166765ced fix include note sizing when in readonly mode, closes #4135 2023-08-08 22:56:45 +02:00
zadam
6ae7661603 note path validation 2023-08-02 23:23:31 +02:00
zadam
30e75056bd release 0.61.3-beta 2023-07-31 23:03:45 +02:00
zadam
530e56dcb5 fixed comment 2023-07-31 22:59:47 +02:00
zadam
63675bfbae make migration 223 NOOP 2023-07-30 21:54:01 +02:00
zadam
696ce38083 ckeditor 38.1.1 2023-07-30 00:32:16 +02:00
zadam
12014b9f4d sync fixes and refactorings 2023-07-29 23:35:08 +02:00
zadam
e8b52f9e6c sync fixes and refactorings 2023-07-29 23:25:02 +02:00
zadam
04b125afc0 sync fixes and refactorings 2023-07-29 21:59:20 +02:00
zadam
2a7fe85020 VACUUM database after migration 2023-07-28 16:22:10 +02:00
zadam
119050e355 fix migration 2023-07-28 16:13:31 +02:00
zadam
72122d0f95 fix blobIds - they shouldn't contain + and / characters 2023-07-28 15:55:26 +02:00
zadam
bd22863bb7 release 0.61.2-beta 2023-07-28 00:06:23 +02:00
zadam
ce3834eb9e blob erasure is not synced, need to clean them up before each content hash check 2023-07-27 23:57:12 +02:00
zadam
8edb5428e5 small sync fixes and refactorings 2023-07-27 23:22:08 +02:00
zadam
527718eff7 add indices on blobId 2023-07-27 21:40:47 +02:00
zadam
5b0f487f3f handle ERR_* errors gracefully 2023-07-27 14:50:18 +02:00
zadam
a3fa8341ba handle ERR_CONNECTION_RESET gracefully 2023-07-27 10:55:34 +02:00
zadam
04813743e2 fix zooming speed, closes #4121 2023-07-25 22:33:35 +02:00
zadam
ddf75cd5e5 note tooltip displays the whole note with scrollbar, other behavior changes. closes #4120 2023-07-25 22:27:15 +02:00
zadam
d0e5ad5b7e release 0.61.1-beta 2023-07-24 23:47:57 +02:00
zadam
b4631e927c Merge remote-tracking branch 'origin/master' 2023-07-24 23:47:27 +02:00
zadam
b7bc843a37 fix demo document statistics, closes #4117 2023-07-24 23:46:02 +02:00
zadam
98d65f8767
Merge pull request #4114 from SiriusXT/master
Fix bugs in highlights,v0.61.0-beta
2023-07-24 22:58:20 +02:00
zadam
0599891ec0
Merge pull request #4001 from dymani/reopen-in-place
Reopen recently closed tab/split in place
2023-07-24 22:52:14 +02:00
zadam
cc06701565 swiftshader deletion is no longer needed 2023-07-24 22:33:36 +02:00
SnnBcd xt
40683985cd Fix bugs in highlights 2023-07-22 19:13:03 +00:00
zadam
074e13a889 release 0.61.0-beta 2023-07-22 17:51:08 +02:00
zadam
98b0baefe2 Merge remote-tracking branch 'origin/master' into next61
# Conflicts:
#	src/public/app/widgets/buttons/note_actions.js
2023-07-22 17:49:29 +02:00
zadam
3aad0ebc95 Merge remote-tracking branch 'origin/next61' into next61 2023-07-22 17:48:17 +02:00
zadam
479d720a6e upgrades 2023-07-22 17:48:09 +02:00
zadam
e4892c9888 fixed order of multi-valued promoted attributes, closes #4105 2023-07-20 23:22:31 +02:00
zadam
f8c9178c5d fix migration 2023-07-18 23:23:52 +02:00
zadam
83049c95c3 defensive copies of owned attrs 2023-07-17 22:56:36 +02:00
zadam
bc8f531b33 fix a bug which caused immedate deletion of created attributes 2023-07-17 22:53:54 +02:00
zadam
23278f54cb force refresh before activating the attribute detail dialog, fixes #4077 2023-07-17 22:41:37 +02:00
zadam
18801fb3e1 more filtering of note actions based on note type 2023-07-17 22:32:07 +02:00
zadam
dc0a0dcf09
Merge pull request #4098 from AndrewPluzhnikov/fix-search-in-text
Disable Search in note button in global search context.
2023-07-17 22:30:49 +02:00
zadam
04c306b360 support combination of shared and cloned in the note tree, fixes #4097 2023-07-17 22:26:41 +02:00
zadam
d6a4f1db13 share tree should include branch prefixes, fixes #4096 2023-07-17 22:19:03 +02:00
zadam
84c4b368c8 updated better-sqlite binaries for node 18/electron 25 2023-07-17 21:39:25 +02:00
Andrew Pluzhnikov
4307f25205 Disable Search in note button in global search context.
This button doesn't actually do anything in the global search window, so
it should be greyed out/disabled.
2023-07-16 10:40:34 -07:00
zadam
48f03f7a1b API docs 2023-07-15 12:07:45 +02:00
zadam
9d24499fef upgrade excalidraw to 0.15.2 2023-07-15 12:01:09 +02:00
zadam
df97b269a7 autocomplete upgrade to 0.38.1 2023-07-15 11:45:18 +02:00
zadam
ee6fb98a0d jquery 3.7.0 2023-07-15 11:41:36 +02:00
zadam
13e30e5855 dayjs frontend update 2023-07-15 11:38:01 +02:00
zadam
5ab2ec0f13 little fixes for the datetime promoted attr 2023-07-15 11:29:29 +02:00
zadam
8465d7fa68 Merge remote-tracking branch 'origin/master' into next61 2023-07-15 11:27:42 +02:00
zadam
d153fc7ba5
Merge pull request #4090 from harishkumarc/datetime-attribute
added date and time attribute capability
2023-07-15 11:26:53 +02:00
zadam
1a7c2d4c32 fix hiding toc with multiple splits, closes #4093 2023-07-15 11:19:05 +02:00
zadam
b3381a3b53 reimplemented triggering search from URL, fixes #385 2023-07-15 10:59:30 +02:00
zadam
ac0d61e9b4 add mindmap mermaid example to demo document 2023-07-15 10:44:38 +02:00
zadam
b13a6ced19 cleanup 2023-07-15 10:33:29 +02:00
zadam
b61aab06b5 nodejs upgrade 2023-07-15 10:32:26 +02:00
zadam
64b86b2666 use marked instead of commonmark to convert MD to HTML, which supports e.g. tables, closes #2026 2023-07-15 10:31:50 +02:00
zadam
27e6fa9526 Merge branch 'stable' into next61 2023-07-15 10:10:29 +02:00
zadam
3d31742285 fix FNote.isHiddenCompletely() which returned false for _hidden 2023-07-15 09:50:07 +02:00
zadam
2b2f4fbc07 comment 2023-07-15 09:48:30 +02:00
zadam
513bf252cd don't display export for backend log note, fixes #4076 2023-07-15 09:35:03 +02:00
zadam
f591e954f3 capitalization of options titles 2023-07-15 09:26:18 +02:00
zadam
59de1925a9 decreased padding 2023-07-14 22:14:07 +02:00
zadam
6c1011341c add help button to attachment detail as well 2023-07-14 22:02:30 +02:00
zadam
906082a6b2 add help button to attachment list 2023-07-14 21:59:43 +02:00
zadam
30bcd1764a check the attachment after upload 2023-07-14 21:28:32 +02:00
zadam
cea54aecad check the attachment after conversion 2023-07-14 21:18:56 +02:00
zadam
ff6f2a4d44 zoom for the attachment images 2023-07-14 21:08:00 +02:00
zadam
5f6fded833 zoom for the attachment images 2023-07-14 21:06:15 +02:00
zadam
fed5f1a7d2 fix content renderer for mermaid 2023-07-14 20:03:28 +02:00
zadam
a06ee1ced1 added new mermaid diagram examples to the demo document 2023-07-14 20:00:53 +02:00
zadam
332b92791e upgrade mermaid to 10.2.4 2023-07-14 19:56:37 +02:00
zadam
d4a9461460 force graph upgrade 2023-07-14 19:45:10 +02:00
zadam
2dac6ab281 DB migration should convert only "perfect candidates" to attachments 2023-07-14 18:24:15 +02:00
zadam
4d00404f55 more actions triggering new tab should respect current hoisting 2023-07-14 18:15:31 +02:00
zadam
3adab07ddb common style for options number inputs 2023-07-14 18:05:19 +02:00
zadam
3d0c3652ce file note should reload after uploading new revision 2023-07-14 17:55:28 +02:00
zadam
c3f5bb5518 image note should reload after uploading new revision 2023-07-14 17:52:35 +02:00
zadam
b2d460d5c1 update demo document with images converted to attachments 2023-07-14 17:06:38 +02:00
zadam
d475346a09 renamed attachment's parentId to more fitting ownerId 2023-07-14 17:01:56 +02:00
zadam
ca41806bc2 import and export fixes 2023-07-13 23:54:47 +02:00
zadam
a748710b01 make file attachments accessible in revisions dialog 2023-07-10 20:30:04 +02:00
zadam
ac9a4b3afc fixes in etapi tests 2023-07-10 19:10:07 +02:00
zadam
b7f0fd2db3 Merge branch 'master' into next61
# Conflicts:
#	package-lock.json
#	src/public/app/services/note_content_renderer.js
#	src/public/app/widgets/note_tree.js
#	src/routes/routes.js
#	src/services/consistency_checks.js
#	src/services/notes.js
#	src/services/task_context.js
2023-07-10 18:20:36 +02:00
harishkumarchellappa
7d6c847d47 added date and time attribute capability 2023-07-10 17:24:34 +05:30
zadam
6ec6d66f17
Merge pull request #4084 from AndrewPluzhnikov/fix-868
Implement saving of global search string.
2023-07-09 23:52:36 +02:00
zadam
977089cc28
Merge pull request #4083 from viperdc/patch-1
Update docker_healthcheck.js
2023-07-09 23:47:55 +02:00
zadam
c3f8975166 small refactorings of clipper code 2023-07-09 22:58:34 +02:00
zadam
639f80b603
Merge pull request #4075 from manto89/feature/add-clippings-existing
Feature/add clippings existing url
2023-07-09 22:43:34 +02:00
Andrew Pluzhnikov
927da84d3b Implement saving of global search string.
This implements point 1 of issue 868.

After performing a search, when returning to the global search tab the
previous search term is now retained and preselected, making it easier
to repeat the same search or modify it.
2023-07-06 20:26:55 -07:00
viperdc
b8c9943deb
Update docker_healthcheck.js
Correcting ini location for HTTPS health-check bypass.
2023-07-06 19:02:51 -04:00
manto89
bb6ab0fe45 Fix clipping html with parser when using web-clipper 2023-07-02 12:52:16 +02:00
manto89
0c86dece5f Fix clipType searching for web-clipper 2023-07-02 12:51:23 +02:00
zadam
b7b0bd80ed padding of right pane 2023-06-30 23:01:57 +02:00
zadam
f06207207b fix styling for videos 2023-06-30 16:36:03 +02:00
zadam
068684101f remove the option to show CKEditor banner 2023-06-30 15:58:42 +02:00
zadam
f78d96a3d4 refactoring of server and suppressing error during conversion of attachment into note 2023-06-30 15:44:30 +02:00
zadam
a0d958bf12 refactor uploading files 2023-06-30 15:25:45 +02:00
zadam
0802b81807 improved error logging in frontend 2023-06-30 12:14:58 +02:00
zadam
192e399cb5 typos 2023-06-30 11:18:34 +02:00
zadam
fc564f6aed fix eslint validation 2023-06-30 00:02:25 +02:00
zadam
eb34f9c64f small refactorings and fixes 2023-06-29 23:32:19 +02:00
zadam
48029cea7c small refactorings 2023-06-29 22:10:13 +02:00
zadam
f4ec4e58c7 fixed image styles 2023-06-29 21:30:26 +02:00
zadam
faa402fcda API docs 2023-06-29 20:54:58 +02:00
zadam
788841d256 fix mentions 2023-06-29 12:19:01 +02:00
zadam
b7c37fdf58 cleanup 2023-06-29 11:44:28 +02:00
zadam
a46c5a2243 use isLabelTruthy() for most binary labels 2023-06-29 00:14:12 +02:00
zadam
430f2975f8 make "excludeFromNoteMap" overridable with note.isLabelTruthy(), #4058 2023-06-29 00:04:30 +02:00
zadam
dd8226ff4c comment 2023-06-28 21:33:09 +02:00
zadam
807b442c7a fix froca update of erased blob 2023-06-28 21:28:41 +02:00
zadam
a452e4add5 sync fixes 2023-06-28 21:05:31 +02:00
zadam
48b30b985e attachment upload 2023-06-28 20:53:55 +02:00
zadam
05d2f4fe96 Merge branch 'stable' 2023-06-27 23:15:20 +02:00
zadam
85a75fc186 getOwnedAttributes() should not make a copy, consistent with similar methods 2023-06-27 23:03:17 +02:00
zadam
ddda4d9867 fix constructing result note path in the jump to note dialog, closes #4054 2023-06-27 22:57:13 +02:00
zadam
42c8059ae1
Merge pull request #4057 from dymani/master
Fix closing parenthesis
2023-06-27 21:38:36 +02:00
dymani
0f4eb8ff4c fix closing parenthesis 2023-06-28 02:31:17 +08:00
zadam
8ee537e2eb API comments 2023-06-27 00:14:13 +02:00
zadam
8eb091445b
Merge pull request #4032 from mechanarchy/patch-1
Ignore SQL comments in query console
2023-06-26 23:05:42 +02:00
mechanarchy
1fc23c948e
Fix SQL comment handling 2023-06-23 09:06:14 +10:00
zadam
cb2b97635a centering icons in note book vertically 2023-06-22 23:34:05 +02:00
zadam
8fb42e4517
Merge pull request #4049 from SiriusXT/master
Fix bugs in toc and improve related codes
2023-06-22 22:34:47 +02:00
zadam
edae1a5d1c
Merge pull request #4050 from kianmeng/fix-typos
Fix typos
2023-06-22 22:33:09 +02:00
zadam
08398a1417 fix search scripts, closes #4048 2023-06-22 22:30:26 +02:00
Kian-Meng Ang
712304bbc6 Fix typos
Found via `codespell -S ./libraries,./package-lock.json -L tabel,tabels,uptodate,isnt,edn,falsy`
2023-06-23 00:27:04 +08:00
SiriusXT
afb893c157 Fix bugs in toc and improve related codes 2023-06-22 15:38:36 +08:00
manto89
ebccd48013 Don't search note by url if url begins with 'about:' 2023-06-21 18:06:28 +02:00
manto89
54065672aa Normalize behaviour with the other create method for web-clipper 2023-06-21 16:10:06 +02:00
manto89
8394ce8002 Change method when adding a new note.
Add reference to new backend method
2023-06-21 13:09:49 +02:00
zadam
176784834f simple formatter for source view of text HTML notes 2023-06-20 23:59:36 +02:00
zadam
a47004bb4e shift migrations after upmerge 2023-06-20 23:32:31 +02:00
zadam
995f1c9fc4 Merge branch 'stable' into next61
# Conflicts:
#	src/etapi/etapi.openapi.yaml
#	src/etapi/notes.js
#	src/public/app/widgets/type_widgets/editable_text.js
#	src/services/app_info.js
2023-06-20 23:30:45 +02:00
zadam
1f3b6feaff Merge branch 'master' into next61
# Conflicts:
#	src/public/app/widgets/note_tree.js
2023-06-20 23:28:41 +02:00
zadam
8095c77b91 cache icon count to make filtering more responsive on slower connections, #4044 2023-06-20 21:31:25 +02:00
zadam
6cfd18b29b read filter values in icon selector only after async events, #4044 2023-06-20 21:19:56 +02:00
zadam
defd997424 release 0.60.4 2023-06-19 23:26:50 +02:00
zadam
5905950c17 fix notePosition assignment for new children of root 2023-06-19 00:29:36 +02:00
zadam
691fccb769 fix keyboard navigation in the note tree, fixes #4036 2023-06-18 23:45:48 +02:00
zadam
bbe3f436d3 avoid scrolling to active node without a reason, fixes #4031 2023-06-18 21:50:22 +02:00
mechanarchy
af053b61fc
Ignore SQL comments in query console 2023-06-17 17:06:17 +10:00
zadam
e22f77eae7 release 0.60.3 2023-06-15 23:23:37 +02:00
zadam
3223e76787 etapi ZIP import 2023-06-15 23:21:40 +02:00
zadam
74400dad97 fix race condition between script execution and saving, closes #4028 2023-06-15 21:51:41 +02:00
zadam
1b68adf3e4 compatibility with online excalidraw tool 2023-06-15 21:34:42 +02:00
zadam
a2cd6f92d7 compatibility with online excalidraw tool 2023-06-15 21:34:02 +02:00
zadam
3ff5fe61b2 unified file and image upload WIP 2023-06-15 01:26:38 +02:00
zadam
75c6afd1c3 fix loading of string content saved as binary 2023-06-14 22:21:22 +02:00
zadam
8d2958738f add option to hide the "Powered by CKEditor" banner 2023-06-14 00:51:05 +02:00
zadam
0496412f4a cleanup of unused options 2023-06-14 00:38:48 +02:00
zadam
f80a20d18c don't use non-existing btn-xs 2023-06-14 00:31:15 +02:00
zadam
34c642a49a rename attachment 2023-06-14 00:28:59 +02:00
zadam
2ebbc33081 fix revision rename DB migration 2023-06-13 23:39:42 +02:00
zadam
ac56056f65 Merge branch 'master' into next61
# Conflicts:
#	package-lock.json
#	src/routes/api/recent_changes.js
2023-06-13 23:25:35 +02:00
zadam
6f16b4caec Merge branch 'beta' 2023-06-13 23:24:09 +02:00
zadam
bea39f37ee stop click propagation in tree item actions 2023-06-13 00:12:55 +02:00
mechanarchy
6548149107 Update etapi.js
(cherry picked from commit b97ebe9f03e84d01402f26b97fd0418a14a8d946)
2023-06-12 23:21:38 +02:00
zadam
fbc805a221
Merge pull request #4019 from mechanarchy/patch-2
Fix attempted ETAPI token rename after cancel
2023-06-12 23:21:13 +02:00
zadam
6015a067ec sql console outputs results of CTEs, fixes #2800 2023-06-12 23:18:57 +02:00
mechanarchy
4a1ecd906b Update entrypoints.js
(cherry picked from commit 08ec866dd269eca54b37db32284ede1402d560c3)
2023-06-12 23:13:40 +02:00
zadam
41844cf817
Merge pull request #4017 from mechanarchy/patch-1
Fix SQL Console error messages
2023-06-12 23:12:35 +02:00
zadam
004cfe1965 allow creating backups via ETAPI, #4014 2023-06-12 23:09:29 +02:00
mechanarchy
b97ebe9f03
Update etapi.js 2023-06-10 17:36:23 +10:00
mechanarchy
08ec866dd2
Update entrypoints.js 2023-06-10 07:44:23 +10:00
zadam
2bdd538d7d release 0.60.2-beta 2023-06-08 22:46:52 +02:00
zadam
6e69cafe54 fix showing deleted notes in the recent changes dialog, closes #4013 2023-06-08 22:45:44 +02:00
zadam
38839532d5 file upload WIP 2023-06-06 12:31:38 +02:00
zadam
0234ff5fca share support for attachment file download 2023-06-06 00:16:32 +02:00
zadam
44bcfd47c0 share support for attachment images 2023-06-05 23:05:05 +02:00
zadam
69c7eb14aa fixes 2023-06-05 21:14:33 +02:00
zadam
00453fc151 attachment ETAPI tests WIP 2023-06-05 17:00:58 +02:00
zadam
5c393f959d got rid of .isDeleted on froca entities (the property is not available there) 2023-06-05 16:26:05 +02:00
zadam
e6bf6424e8 rename loadresults methods/properties for clarity that they don't contain entities, only rows 2023-06-05 16:12:02 +02:00
zadam
57702a07a2 attachment ETAPI support WIP 2023-06-05 09:44:36 +02:00
zadam
3b3f6082a7 attachment ETAPI support WIP 2023-06-05 09:23:42 +02:00
zadam
49241ab318 merge 2023-06-05 00:12:08 +02:00
zadam
93addac8bb Merge branch 'master' into next61
# Conflicts:
#	src/becca/entities/bnote.js
#	src/public/app/components/note_context.js
#	src/public/app/layouts/desktop_layout.js
#	src/public/app/services/note_content_renderer.js
#	src/public/app/services/utils.js
#	src/public/app/widgets/ribbon_widgets/file_properties.js
#	src/public/app/widgets/ribbon_widgets/note_info_widget.js
#	src/services/notes.js
2023-06-05 00:09:55 +02:00
zadam
fe908759d1 rename "note revision" to just "revision" 2023-06-04 23:02:49 +02:00
zadam
779751a234 rename "note revision" to just "revision" 2023-06-04 23:01:40 +02:00
zadam
cb9feab7b2 got rid of the hot/cold blob, all blobs are "cold" now 2023-06-04 22:50:07 +02:00
zadam
b79631a35d setContent refactoring 2023-06-04 20:51:08 +02:00
zadam
c177aaa901 refactoring of highlight list 2023-06-04 17:46:37 +02:00
zadam
eff3e1df85
Merge pull request #3988 from SiriusXT/Highlighted-Text
Show highlighted text in the right pane
2023-06-04 12:37:19 +02:00
zadam
b46d5f4a71 add blobId to the ETAPI #4005 2023-06-04 12:00:04 +02:00
SiriusXT
5b421d51b5 Merge branch 'Highlighted-Text' of https://github.com/SiriusXT/trilium into Highlighted-Text 2023-06-04 16:02:32 +08:00
SiriusXT
8852e8e531 Show highlighted text in right panel 2023-06-04 16:02:30 +08:00
zadam
8bc84cfaf6
Merge pull request #4004 from dymani/default-shortcuts
Fix shortcuts not resetting to default
2023-06-03 23:09:31 +02:00
SnnBcd
cde13dc580
Merge branch 'zadam:master' into Highlighted-Text 2023-06-04 00:24:08 +08:00
dymani
282d135f0f Fix shortcuts not resetting to default 2023-06-03 22:03:54 +08:00
SiriusXT
3e3d7aa4d7 Show highlighted text in right panel 2023-06-03 17:12:06 +08:00
SiriusXT
446c41d020 Show highlighted text in right panel 2023-06-03 17:00:15 +08:00
SiriusXT
33fdad5159 Show highlighted text in right panel 2023-06-03 14:43:20 +08:00
SiriusXT
463d145cb7 Merge branch 'Highlighted-Text' of https://github.com/SiriusXT/trilium into Highlighted-Text 2023-06-03 11:55:59 +08:00
SiriusXT
1413756d00 Show highlighted text in right panel 2023-06-03 11:55:50 +08:00
zadam
d3bf325f19 added some comments to openapi spec 2023-06-03 00:32:16 +02:00
zadam
c4f69fd9cb don't allow patching relation's value in ETAPI #3998 2023-06-03 00:21:46 +02:00
dymani
50ec17433d Fix move pane button after reopen split 2023-06-03 05:59:53 +08:00
dymani
2c8eb82d42 Reopen recently closed tab/split in place 2023-06-03 05:54:33 +08:00
zadam
af67cf64b1
Merge pull request #3984 from dymani/move-pane
Add buttons to reorder split panes
2023-06-02 16:07:15 +02:00
zadam
095da691a4 Merge remote-tracking branch 'origin/master' 2023-06-02 16:05:10 +02:00
zadam
7e71029d1c use note size format also in file properties 2023-06-02 16:05:02 +02:00
SnnBcd
045ee18237
Merge branch 'zadam:master' into Highlighted-Text 2023-06-02 21:02:31 +08:00
zadam
e47c3a27b0 remove the workaround test 2023-06-01 23:18:50 +02:00
zadam
ced99f8ac8
Merge pull request #3995 from mm21/master
Add ETAPI test to repro inherited attribute issue for cloned note #3994
2023-06-01 23:15:10 +02:00
zadam
0c4492bcd0 invalidate attribute cache on branch create/update, fixes #3994 2023-06-01 23:14:17 +02:00
zadam
d9359c7c55 downgrade excalidraw to 0.14.2, #3979 2023-06-01 22:51:34 +02:00
mm21
86a080e7ec Add ETAPI test to repro inherited attribute issue for cloned note #3994 2023-06-01 17:20:11 +00:00
SiriusXT
0a66809bf0 Not show when nothing is checked in the options 2023-06-01 20:38:55 +08:00
SiriusXT
ecfdde2f2a Show highlighted text in the right pane 2023-06-01 20:17:00 +08:00
zadam
758dba9ba5 fix event 2023-06-01 00:13:08 +02:00
zadam
ae42e0efc7 refactoring 2023-06-01 00:07:57 +02:00
zadam
b5cfc28912 rename inheritableAttributeCache to __inheritableAttributeCache for consistency 2023-05-31 23:21:06 +02:00
zadam
c802bf7d8b
Merge pull request #3990 from mm21/master
Add ETAPI tests to repro inherited attribute issue #3989 and workaround
2023-05-31 22:55:57 +02:00
mm21
9e5a02094c Add ETAPI tests to repro inherited attribute issue and workaround 2023-05-31 17:11:42 +00:00
dymani
58253567cd Simplify noteContextReorder event call 2023-06-01 00:48:37 +08:00
SiriusXT
92d5aeae41 Show highlighted text in the right panel 2023-05-31 22:34:24 +08:00
SiriusXT
d2d286a4ff Show highlighted text in the left pane 2023-05-31 21:47:43 +08:00
zadam
a6ade790c6 script api docs 2023-05-31 14:35:08 +02:00
zadam
a9dae7823f script api docs 2023-05-31 14:00:37 +02:00
SiriusXT
86861f6ec3 Show highlighted text in the left pane 2023-05-31 18:32:33 +08:00
zadam
d26a0fae17 if a note context has sub contexts, then it has to be saved even if empty, fixes #3985 2023-05-31 00:03:20 +02:00
zadam
375dba3264 fixed infinite recursion with search notes 2023-05-30 23:54:11 +02:00
zadam
74044754e2 Merge remote-tracking branch 'origin/master' 2023-05-30 22:59:23 +02:00
zadam
64aed9b462 display icon for non-supported note types in content renderer 2023-05-30 22:52:48 +02:00
zadam
5428cafa50
Merge pull request #3963 from SiriusXT/master
keep this window on top
2023-05-30 22:37:10 +02:00
dymani
735852b3c1 Use noteContextReorder event instead 2023-05-31 01:53:55 +08:00
zadam
f4b5d43899 inline file attachments when exporting single HTML file 2023-05-29 23:42:08 +02:00
zadam
235b779dec detect existing attachment in target note 2023-05-29 22:37:19 +02:00
dymani
2a39906993 Cleanup 2023-05-30 04:22:51 +08:00
dymani
e1b67e20ec Add buttons to move split panes 2023-05-30 03:44:05 +08:00
zadam
df17840dbc fixes attachments 2023-05-29 13:02:25 +02:00
zadam
9d52f80c2f linking attachments finished 2023-05-29 10:21:34 +02:00
zadam
0aa119af2c attachments WIP 2023-05-29 00:19:54 +02:00
zadam
c2f70031d0 Merge branch 'master' into next61
# Conflicts:
#	package-lock.json
#	package.json
#	src/public/app/entities/fnote.js
#	src/public/app/services/link.js
2023-05-28 16:57:48 +02:00
SiriusXT
1a2beb941e keep this window on top 2023-05-27 14:23:50 +08:00
SiriusXT
01b2887b36 Keep this window on top. 2023-05-27 14:18:26 +08:00
SiriusXT
5286d4a97c Merge branch 'master' of https://github.com/SiriusXT/trilium 2023-05-27 14:14:31 +08:00
zadam
bf6106f4dc release 0.60.1-beta 2023-05-26 23:11:53 +02:00
zadam
82efc92413 lib upgrades 2023-05-26 23:11:37 +02:00
zadam
34481df2e7 Merge remote-tracking branch 'origin/master' 2023-05-26 11:14:22 +02:00
zadam
ad4631018a right click on external link should not open the link, fixes #3971 2023-05-26 11:13:49 +02:00
zadam
ef89eede17
Merge pull request #3974 from soulsands/fix-edited-note
fix getEditedNotesOnDate
2023-05-26 11:05:57 +02:00
zadam
6878877acd Merge remote-tracking branch 'origin/master' 2023-05-26 10:55:50 +02:00
zadam
611a983461 images in note list preview should be shrinked to fit into view, fixes #3965 2023-05-26 10:54:08 +02:00
zadam
8e913cb453 wip 2023-05-26 10:36:05 +02:00
baiyongjie
9d49264258 cleaup 2023-05-26 14:54:13 +08:00
baiyongjie
6098d62dcc fix getEditedNotesOnDate 2023-05-26 14:36:21 +08:00
zadam
580ceec6b3
Merge pull request #3959 from soulsands/fix-search
fix search
2023-05-25 23:36:35 +02:00
SiriusXT
79dca12274 top 2023-05-23 20:50:03 +08:00
SiriusXT
66c25e7f29 Bring this window to the top 2023-05-23 15:55:35 +08:00
SiriusXT
dc4983a013 Bring this window to the top 2023-05-23 15:49:03 +08:00
SiriusXT
039959a48b Put this window top. 2023-05-23 15:44:26 +08:00
SiriusXT
63be25f5bb put window on top 2023-05-23 11:14:23 +08:00
SiriusXT
ce7489049f put window on top 2023-05-23 10:32:24 +08:00
baiyongjie
b3d5938665 fix search 2023-05-23 09:30:55 +08:00
zadam
579ed7e194 attachment content rendering 2023-05-21 18:14:17 +02:00
zadam
e20fac19ba attachment WIP 2023-05-20 23:46:45 +02:00
zadam
9e9fb2979f Merge branch 'master' into next61
# Conflicts:
#	package-lock.json
#	package.json
#	src/public/app/components/note_context.js
#	src/public/app/services/open.js
#	src/public/app/widgets/buttons/note_actions.js
#	src/public/app/widgets/find_in_code.js
#	src/public/app/widgets/type_widgets/canvas.js
#	src/services/options.js
2023-05-20 20:55:57 +02:00
zadam
7fc2824325 ignore husky install error 2023-05-20 14:23:22 +02:00
zadam
0728f540ab locked versions 2023-05-18 23:57:18 +02:00
zadam
4913a5a5fa release 0.60.0-beta 2023-05-18 23:31:57 +02:00
zadam
14dd2b8827 cleanup 2023-05-18 23:05:28 +02:00
zadam
4e9e7eba48 Merge remote-tracking branch 'origin/master' 2023-05-18 13:46:53 +02:00
zadam
f3bc604516 Merge branch 'stable'
# Conflicts:
#	src/public/app/widgets/toc.js
2023-05-18 13:46:41 +02:00
zadam
bd278e291a
Merge pull request #3948 from soulsands/tooltip
Normalize tooltip style
2023-05-18 13:42:18 +02:00
zadam
074820dae5 cleanup of find in text implementation 2023-05-18 13:41:32 +02:00
zadam
1089e84f56
Merge pull request #3947 from SiriusXT/master
FindInText: Automatically search the selected text
2023-05-18 13:27:37 +02:00
baiyongjie
ed3d81ce62 normalize tooltip style 2023-05-18 16:41:07 +08:00
SnnBcd xt
57aa0a0fe1 findInText: Automatically search the selected text 2023-05-18 07:29:21 +00:00
zadam
88a961180f cleanup note open custom 2023-05-17 23:57:32 +02:00
zadam
1f8798d7ac upgrades 2023-05-17 23:47:30 +02:00
zadam
bd8429a0ba
Merge pull request #3944 from SiriusXT/toc
toc scrolls smoothly
2023-05-17 23:13:41 +02:00
zadam
af95d387b9 Merge remote-tracking branch 'origin/master' into next60
# Conflicts:
#	src/public/app/services/open.js
#	src/public/app/widgets/buttons/note_actions.js
2023-05-17 23:10:02 +02:00
zadam
da348075e8
Merge pull request #3923 from soulsands/fix-include
fix included note display
2023-05-17 23:06:50 +02:00
SnnBcd xt
d24d3af87d Other elements in the scroll-container (including text search) scroll smoothly 2023-05-17 12:03:38 +00:00
SnnBcd xt
085c0e76ca toc scrolls smoothly 2023-05-17 10:18:58 +00:00
zadam
d7d98b29a7
Merge pull request #3940 from SiriusXT/open-note-custom
Open note custom
2023-05-16 23:55:17 +02:00
zadam
cb3b03537c
Merge pull request #3938 from meichthys/keyboardshortcut
Change KeybaordLauncher to KeyboardShortcut
2023-05-16 22:37:00 +02:00
SnnBcd xt
7c7bea5e3a Open notes with custom software. 2023-05-16 14:01:55 +00:00
SnnBcd xt
9fc474504b Open notes with custom software 2023-05-16 11:57:28 +00:00
SnnBcd xt
412fd105c9 open-note-custom-test 2023-05-16 06:22:15 +00:00
MeIchthys
470a0c7b21
Update launchbar_command_launcher.html to refer to shortcuts 2023-05-15 10:21:40 -04:00
MeIchthys
9968cba348
singluarify 'mirrors' 2023-05-15 10:15:14 -04:00
MeIchthys
aee520a209
Change keyboardLauncher to keyboardShortcut 2023-05-15 10:12:43 -04:00
MeIchthys
cf4201b084
update keyboardlauncher to keyboardShortcut 2023-05-15 10:11:07 -04:00
zadam
76196ed42c Merge remote-tracking branch 'origin/master' into next60 2023-05-14 17:32:59 +02:00
zadam
6089a369e3 added missing font files #3933 2023-05-13 16:29:18 +02:00
zadam
092db03729 update montserrat for better cyrillic support, fixes #3933 2023-05-13 16:28:32 +02:00
zadam
239c14a5df fix search in "view source", closes #3929 2023-05-13 16:00:41 +02:00
zadam
8a6002c6be fix search in "view source", closes #3929 2023-05-13 15:58:32 +02:00
zadam
38781d33ac Merge remote-tracking branch 'origin/master' into next60
# Conflicts:
#	src/public/app/widgets/type_widgets/editable_text.js
2023-05-13 15:43:35 +02:00
zadam
0518cdbe8e
Merge pull request #3928 from meichthys/auto-flex-note-title
Auto flex note title in tree
2023-05-13 15:42:12 +02:00
MeIchthys
4849dacd52
auto flex note title in tree 2023-05-12 10:14:34 -04:00
baiyongjie
7cf47520d4 fix included note display 2023-05-11 10:54:20 +08:00
baiyongjie
8eb0a4e1cb fix cursor position when Jumping from note to included note
(cherry picked from commit 6a9aa5eedaf27d8b077d200cca659eef541b2143)
2023-05-11 00:22:06 +02:00
zadam
ad2a7a2da3
Merge pull request #3920 from soulsands/fix-include
fix cursor position when Jumping from note to included note
2023-05-11 00:21:21 +02:00
baiyongjie
6a9aa5eeda fix cursor position when Jumping from note to included note 2023-05-10 18:08:25 +08:00
zadam
04524ae8e4
Merge pull request #3918 from meichthys/ribbon_more_obvious
Make active ribbon item more obvious
2023-05-09 23:46:45 +02:00
zadam
04caba9f5b fix parsing the authentication header with password containing a colon, closes #3916 2023-05-09 23:44:43 +02:00
zadam
cc1f831a6a don't allow setting image quality to empty value, #3894 2023-05-09 23:32:06 +02:00
zadam
331d280075 TOC scrolls smoothly (on readonly), #3911 2023-05-09 23:14:56 +02:00
MeIchthys
46ed61d38a
Make active ribbon item more obvious 2023-05-09 16:29:04 -04:00
zadam
ff5d3a5f0c import WIP 2023-05-09 00:05:27 +02:00
zadam
626af84f42 refactoring + uploading attachments WIP 2023-05-08 00:02:08 +02:00
zadam
b05ce12e7b adding links to owning note and list to attachments 2023-05-07 23:32:30 +02:00
zadam
274505188b fix "go to note" from note autocomplete 2023-05-07 21:29:09 +02:00
zadam
f85209a72f getting rid of attributes like data-note-path in favor of the whole nav state in URLs 2023-05-07 21:18:21 +02:00
zadam
291f0e79d9 make a special backup before migrating to 0.60 2023-05-07 15:46:17 +02:00
zadam
64db5e2542 cleanup of app.js, wwww 2023-05-07 15:23:46 +02:00
zadam
c4a2ff5fa1 fix hamburger icon in canvas, #3780 2023-05-07 12:09:38 +02:00
zadam
9f5f0aeddd fix hamburger icon in canvas 2023-05-07 11:54:04 +02:00
zadam
4d5612e845 fix updating non-text notes 2023-05-07 11:20:51 +02:00
zadam
371f174756 run hiddenSubtreeService.checkHiddenSubtree() also periodically, useful for server deployments, #3907 2023-05-07 10:54:06 +02:00
zadam
5676ff9b2e
Merge pull request #3909 from mm21/etapi-generated-client
Enable generated etapi client
2023-05-07 10:50:05 +02:00
zadam
aa8c0fdad8
Merge pull request #3908 from mm21/etapi-attribute-position
Allow etapi to update attribute fields isInheritable, position
2023-05-07 10:48:25 +02:00
zadam
8284c673f9 can't allow opening externally on attachment list 2023-05-07 10:43:51 +02:00
zadam
cc02546ed3 Merge remote-tracking branch 'origin/master' into next60
# Conflicts:
#	src/routes/api/options.js
#	src/services/import/zip.js
#	src/services/options_init.js
2023-05-07 09:41:33 +02:00
mm21
d09132dd60 Revert path param changes for POST 2023-05-07 00:32:42 +00:00
mm21
ec662d01d0 Revert "Update etapi test"
This reverts commit 4aeecfdfa94f993e97b0a182e374d7c1d236be09.
2023-05-07 00:18:39 +00:00
mm21
ad0b98e2a1 Omit attributeId/branchId path params from postAttribute/postBranch in etapi.openapi.yaml 2023-05-07 00:18:28 +00:00
mm21
3cafad3bf4 Remove isInheritable from PATCH 2023-05-06 23:42:48 +00:00
zadam
fbea3ed94f
Merge pull request #3901 from Nriver/master
customize search engine
2023-05-06 23:02:12 +02:00
zadam
0ab18e3069
Merge pull request #3897 from contributor/feature/ZipExportDocumentTitle
zip export/import improvements
2023-05-06 22:52:05 +02:00
zadam
2aa987c072 fixes for zip export/import in regard to attachments 2023-05-06 22:50:28 +02:00
zadam
a06ddc439d improving import WIP 2023-05-06 15:07:38 +02:00
zadam
f6944b8219 introducing meta types for import/export, fixes for attachments export 2023-05-06 14:38:45 +02:00
zadam
fa3cbb4645 grammar 2023-05-05 23:41:11 +02:00
zadam
6dfc72c065 many small fixes from Intellij analysis 2023-05-05 23:17:23 +02:00
zadam
0af6f91d21 exposing blobs in APIs 2023-05-05 22:21:51 +02:00
mm21
4aeecfdfa9 Update etapi test 2023-05-05 18:41:29 +00:00
mm21
79d4dcf5f1 Enable generated etapi client 2023-05-05 18:33:26 +00:00
mm21
26a6ef8c03 Allow etapi to update attribute fields isInheritable, position 2023-05-05 18:27:26 +00:00
zadam
5e1f81e53e getting rid of note complement WIP 2023-05-05 16:37:39 +02:00
zadam
9cdcbb3125 fix runOnNoteContentChange event 2023-05-05 15:42:53 +02:00
zadam
35338e9ec6 fix runOnNoteContentChange event 2023-05-05 15:40:44 +02:00
zadam
78d83b8826 fix note size calculation with blobs 2023-05-05 15:18:55 +02:00
zadam
8edf06d28d small refactorings 2023-05-04 22:16:18 +02:00
zadam
ecd2a5cbac Merge remote-tracking branch 'origin/master' into next60 2023-05-04 21:01:53 +02:00
zadam
c0cf319521 upgrade electron to 25 and node to 18 2023-05-04 21:01:25 +02:00
contributor
bb9631476e bump metaFile format version 2023-05-04 19:56:11 +03:00
contributor
386e8dd32e zip import - remove html tags added by Trilium 2023-05-04 19:56:02 +03:00
Nriver
61616f708f add default options for search engine options 2023-05-04 18:01:51 +08:00
Nriver
8ce499e958 add runtime check for search engine options 2023-05-04 16:20:09 +08:00
Nriver
22587ee6b5 customize search engine 2023-05-04 14:57:33 +08:00
zadam
9b32d86f78 take branch prefix into account while sorting, fixes #3896 2023-05-03 23:42:44 +02:00
zadam
5ea8226996
Merge pull request #3777 from PhilippOesch/#3689
change downdown border to light border
2023-05-03 23:25:35 +02:00
zadam
fbffc6b2b5 inline attachment images into single HTML export 2023-05-03 23:17:07 +02:00
zadam
cd01886eb2 attachment revision upload 2023-05-03 22:49:24 +02:00
contributor
bb8fd2b054 zip export - set note title as document.title 2023-05-03 16:19:28 +03:00
zadam
d8bc9c2982 attachment actions 2023-05-03 10:23:20 +02:00
zadam
d232694dec tree context menu to convert notes into attachments 2023-05-02 23:04:41 +02:00
zadam
735ac55bb8 fixes, allowing conversion of note into an attachment 2023-05-02 22:46:39 +02:00
zadam
c9aab9b479
Merge pull request #3893 from mirrorcult/2023-05-01/ensure-note-return-branch
Return created/existing branch in `EnsureNoteIsPresentInParent`
2023-05-02 21:12:43 +02:00
Kara
53c87f3d25 Return created/existing branch in EnsureNoteIsPresentInParent 2023-05-01 12:41:22 -05:00
zadam
4f1fafdf75
Merge pull request #3870 from soulsands/perf-count
perf: improve descendant count performance
2023-04-28 21:53:41 +02:00
zadam
330e7ac08e copying attachments WIP 2023-04-25 00:01:58 +02:00
zadam
49fb913eab erasing unused attachments 2023-04-24 21:22:34 +02:00
zadam
4b074365e7 Merge branch 'master' into next60 2023-04-24 20:21:45 +02:00
zadam
0896000fcd Merge branch 'stable' 2023-04-24 20:21:22 +02:00
Castor
e007aba067
Update note_map.js 2023-04-24 13:43:19 +08:00
zadam
a6eda2479f
Merge pull request #3871 from soulsands/config-debug
chore: debugger config for vscode developers
2023-04-23 22:32:29 +02:00
zadam
eff567ee48 wrong password login screen should return 401 so that it counts to the rate limiter, fixes #3867 2023-04-23 22:22:05 +02:00
zadam
d3c2c314ac
Merge pull request #3866 from soulsands/custom-match
fix:  match custom path strictly
2023-04-23 22:12:55 +02:00
baiyongjie
89681977b5 perf: improve descendant count performance 2023-04-23 15:36:34 +08:00
baiyongjie
e10a7ea9a6 chore: debugger config for vscode developers 2023-04-23 15:26:46 +08:00
soulsands
c3c6d73bb2 fix: match custom path strictly 2023-04-22 19:37:49 +08:00
zadam
5e2efca933 scheduled erasure of attachments WIP 2023-04-21 00:19:17 +02:00
zadam
e71b0d82a1 scheduled attachment deletion WIP 2023-04-20 00:11:09 +02:00
zadam
c6c162cdda restore revision with attachments 2023-04-19 22:47:33 +02:00
zadam
8b46d6c718 Merge branch 'stable' into next60 2023-04-19 22:03:44 +02:00
zadam
e24d5a6f83 collapse command will collapse the whole tree, including the current active note path, fixes #3664 2023-04-19 21:24:51 +02:00
zadam
e28fbf4617 fixes 2023-04-17 23:21:28 +02:00
zadam
0e4a040ed8 fixes of new attachment URLs 2023-04-17 22:40:53 +02:00
zadam
b84670d503 Merge branch 'master' into next60 2023-04-17 22:27:21 +02:00
zadam
8725f7cfb2 Merge branch 'stable'
# Conflicts:
#	src/services/build.js
2023-04-17 22:26:01 +02:00
zadam
83d8908ee8 release 0.59.4 2023-04-17 21:40:35 +02:00
zadam
af9ef83742
Merge pull request #3827 from soulsands/eslint-format
Eslint  and formating enhancement
2023-04-17 20:44:47 +02:00
zadam
3eafdadd1f
Merge branch 'master' into eslint-format 2023-04-17 20:44:34 +02:00
zadam
1d3272e9f8 fix displaying error message in mermaid, closes #3841 2023-04-16 23:41:40 +02:00
zadam
447b8f0f0c
Merge pull request #3848 from soulsands/auto-reload
chore: dev auto reload
2023-04-16 23:30:23 +02:00
zadam
aaf6e3bace
Merge pull request #3847 from soulsands/perf-build
Perf: building improvement
2023-04-16 23:27:55 +02:00
zadam
44c61b8e7d
Merge pull request #3846 from soulsands/highlighter
change match-hightlighter config
2023-04-16 23:27:24 +02:00
zadam
8226f62ded download offline images from libreoffice, fixes #3842 2023-04-16 23:11:18 +02:00
zadam
d3b17f586d
Merge pull request #3839 from soulsands/activate
Activating after removal of subContexts conforms to mainContexts
2023-04-16 22:11:32 +02:00
zadam
a556ba0959
Merge pull request #3838 from soulsands/patch-1
chore: remove install in script switch-electron
2023-04-16 22:09:52 +02:00
zadam
ad40cd72ff
Merge pull request #3833 from soulsands/es-version
fix: upgrade version to support top level await
2023-04-16 20:51:17 +02:00
zadam
9a22c3fce7
Merge pull request #3837 from soulsands/fix-tree
fix: correct moving active node
2023-04-16 20:50:11 +02:00
zadam
63e044ffdf refactoring 2023-04-16 11:28:24 +02:00
zadam
2e794ee38f fixes 2023-04-16 09:26:52 +02:00
zadam
a1d4e062ed refactoring of "some path" WIP 2023-04-16 09:22:24 +02:00
Castor
d2d2a28885
Update ws.js 2023-04-15 19:42:09 +08:00
baiyongjie
ead4242735 chore: dev auto reload 2023-04-15 17:58:40 +08:00
baiyongjie
30a8c6b579 perf: building improvement 2023-04-15 17:45:10 +08:00
baiyongjie
25df8f9c52 change match-hightlighter config 2023-04-15 11:01:24 +08:00
baiyongjie
65d2389b2e update eslint config & fix lint 2023-04-15 09:57:50 +08:00
zadam
7aa26580ba refactoring of "some path" WIP 2023-04-15 00:06:13 +02:00
zadam
e4376bb9f2 isRoot check 2023-04-14 20:24:28 +02:00
zadam
f01657e1dd refactorings 2023-04-14 16:49:06 +02:00
soulsands
0c08126752 activating after removal of subContexts conforms to mainContexts 2023-04-13 21:16:10 +08:00
Castor
ea64adc2f9
chore: remove install in script switch-electron
hi.
No need to install since it's already in position.
2023-04-13 17:56:28 +08:00
baiyongjie
ad8ec68443 fix: correct active tree node after moving an clone node 2023-04-13 11:05:53 +08:00
baiyongjie
5e5fe2ccf3 fix: upgrade version to support top level await 2023-04-12 10:05:26 +08:00
zadam
34ecd77bd4 note revision save also saves attachments 2023-04-11 23:24:39 +02:00
zadam
6cf0fe0b73 attachments have a position 2023-04-11 22:55:50 +02:00
zadam
3f8bf7cacc renamed openTabs to openNoteContexts 2023-04-11 22:00:04 +02:00
zadam
17128c5874 navigation state is more nicely and completely serialized into URL 2023-04-11 21:41:55 +02:00
zadam
9e71c44c76 open attachment by double click 2023-04-11 18:05:57 +02:00
zadam
54c0268593 attachment improvements 2023-04-11 17:45:51 +02:00
zadam
a5f0b2a81e Merge remote-tracking branch 'origin/next60' into next60 2023-04-11 17:02:53 +02:00
zadam
a154bea016 Merge branch 'master' into next60 2023-04-11 17:02:24 +02:00
soulsands
2a34c8fa66 Merge remote-tracking branch 'up/master' into eslint-format 2023-04-11 01:02:07 +08:00
zadam
15a11daf38 Merge branch 'master' into next60
# Conflicts:
#	package-lock.json
#	package.json
2023-04-10 18:52:30 +02:00
zadam
5e88e24693 package upgrades 2023-04-10 18:50:55 +02:00
soulsands
988c5c6a25 chore: config 2023-04-11 00:37:38 +08:00
soulsands
d98c46a275 chore: share editor config 2023-04-11 00:21:24 +08:00
soulsands
185b206627 chore: husky 2023-04-11 00:21:24 +08:00
soulsands
cfb04f7d8a chore: add eslint config 2023-04-11 00:21:24 +08:00
zadam
dba0c9f373 Merge branch 'stable'
# Conflicts:
#	src/services/build.js
2023-04-09 23:30:41 +02:00
zadam
ee60652746 eslint config 2023-04-09 23:08:24 +02:00
zadam
fbc79eae62
Merge pull request #3818 from soulsands/fix-lint
Fix lint
2023-04-09 22:54:02 +02:00
zadam
b356a634d1
Merge pull request #3817 from soulsands/add-font
feat: add Microsoft YaHei font (for Chinese)
2023-04-09 22:47:46 +02:00
zadam
b2ed5a01b3
Merge pull request #3816 from soulsands/fix-attr-ui
fix:don't break words for CJK text
2023-04-09 22:47:02 +02:00
zadam
839b172b92 fix duplicating subtree with internal links, closes #3813 2023-04-09 22:45:31 +02:00
soulsands
745e120a0b fix: remove unused variable 2023-04-08 21:13:37 +08:00
soulsands
a0ac603260 fix:Remove duplicates in character class 2023-04-08 21:07:48 +08:00
soulsands
181ddce887 fix: remove misleading await 2023-04-08 20:49:25 +08:00
soulsands
50043f889b fix: remove duplication 2023-04-08 20:00:42 +08:00
soulsands
49d1c5140e fix: equal 2023-04-08 19:54:59 +08:00
soulsands
ab7a07a318 fix: remove extra params 2023-04-08 19:51:39 +08:00
soulsands
306e7abb47 feat: add Microsoft YaHei font (for Chinese) 2023-04-08 18:41:18 +08:00
soulsands
cec4dfa6c3 fix:don't break words for CJK text 2023-04-08 14:56:37 +08:00
zadam
21813a7b83
Merge pull request #3814 from soulsands/persistent-cache
Perf: add persistent http cache in prod
2023-04-07 21:48:00 +02:00
zadam
293573a0cd don't update attribute detail while composing CJK characters, fixes #3812 2023-04-07 21:45:27 +02:00
soulsands
8695228537 perf: add persistent http cache in prod 2023-04-07 19:55:18 +08:00
zadam
24866a3e25 fix click events propagating from context menu being closed, fixes #3805
(cherry picked from commit e871edc8f347e6add552abe67d94a68793558802)
2023-04-06 23:16:32 +02:00
zadam
e871edc8f3 fix click events propagating from context menu being closed, fixes #3805 2023-04-06 23:05:03 +02:00
zadam
517f1992a1 remove fallback resize window handlers, such old browsers are not supported 2023-04-06 21:30:37 +02:00
zadam
e6adf3a522
Merge pull request #3808 from soulsands/fix-resize
Fix: correct note-map resizing
2023-04-06 21:28:01 +02:00
zadam
32e9fd291d promotes attributes tab should be always visible when available, fixes #3806 2023-04-06 21:25:13 +02:00
zadam
8229a97ffb capitalizing ribbon widget names #3806 2023-04-06 21:20:19 +02:00
soulsands
6612a3a550 fix: correct note-map resizing 2023-04-06 21:06:08 +08:00
zadam
c44be53673 awaiting on triggered events/commands in the frontend API, fixes #3799 2023-04-05 22:07:08 +02:00
zadam
5d6d9ab6d6 wip attachment support 2023-04-03 23:47:24 +02:00
zadam
d100b0dc07 allow #newNotesOnTop=false to negate previous setting, closes #3796 2023-04-03 21:08:32 +02:00
zadam
a0e9ac73c9 Merge remote-tracking branch 'origin/stable' into stable
# Conflicts:
#	src/services/build.js
2023-04-03 21:00:02 +02:00
zadam
2bc78ccafb wip attachment widget 2023-04-01 23:55:04 +02:00
zadam
53aebf1448 wip attachment widget 2023-04-01 13:58:53 +02:00
zadam
2e9ce962df
Merge pull request #3695 from Nriver/master
add natural sort for notes, introduce new label #sortNatural
2023-03-30 23:49:48 +02:00
zadam
fa406d3ded wip attachment widget 2023-03-30 23:48:26 +02:00
Nriver
93ad83d2ae add #sortLocale label for natural sort. rephrase feature description. 2023-03-30 11:06:10 +08:00
zadam
72b1cc4d89 fixed loading of parent to froca when e.g. sharing (cloning into not yet loaded _share parent) 2023-03-29 23:16:45 +02:00
zadam
e70cca4736 fix trailing slash in shared note in IE, closes #3782 2023-03-29 23:07:47 +02:00
zadam
d354c91d7c sort icons by how much they are used, #3784 2023-03-29 22:40:50 +02:00
zadam
2d7b5e4aa2 Merge branch 'stable'
# Conflicts:
#	src/services/build.js
2023-03-29 22:37:44 +02:00
zadam
b542a28673 Merge branch 'stable' 2023-03-27 23:35:40 +02:00
zadam
ed52919f9e release 0.59.3 2023-03-27 23:06:14 +02:00
zadam
45a74a046c release 0.59.3 2023-03-27 23:03:27 +02:00
zadam
3192531d4c don't trigger menu items on right click, #3764 2023-03-27 22:49:41 +02:00
Philipp Oeschger
351bb760ae change downdown border to light border 2023-03-27 01:42:50 +02:00
zadam
79a6baca6f adjust logo sizing/positioning 2023-03-26 23:23:13 +02:00
zadam
f9645e8971 Merge branch 'stable' 2023-03-26 23:11:47 +02:00
zadam
7611c83148
Merge pull request #3773 from mm21/master
Add svg icons
2023-03-26 23:11:04 +02:00
zadam
9881e6de3e fix hangup on highlighting empty tokens, closes #3772 2023-03-26 23:09:15 +02:00
Matt
53b4f0e0d5 Add svg icons 2023-03-26 19:29:52 +00:00
zadam
9a645c24ca
Merge pull request #3771 from eltociear/add-readme_ja
Add Japanese README
2023-03-26 21:10:21 +02:00
zadam
682d821b67
Merge pull request #3766 from meichthys/patch-7
Move .tree-actions left to accomodate wider windows scrollbar and adjust boarder
2023-03-26 20:58:59 +02:00
zadam
71afffaac1
Merge pull request #3765 from meichthys/patch-5
Add bottom border to note-book-header
2023-03-26 20:58:12 +02:00
zadam
a099876088 fix escaping in sql console results 2023-03-26 20:50:37 +02:00
Ikko Eltociear Ashimine
cf904a874e Add links 2023-03-26 20:34:46 +09:00
Ikko Eltociear Ashimine
5a32a7ce18 minor fix 2023-03-26 20:33:59 +09:00
Ikko Eltociear Ashimine
6d6221636c Add Japanese README 2023-03-26 20:25:17 +09:00
MeIchthys
8a4caaf6fb
Add border to tree-actions section and adjust padding 2023-03-24 15:17:17 -04:00
MeIchthys
fa6d1879dd
Move .tree-actions left to accomodate wider windows scrollbar 2023-03-24 14:46:09 -04:00
MeIchthys
874b6c71a3
Add bottom border to note-book-header 2023-03-24 11:29:16 -04:00
zadam
9be524ef89 attachment improvements 2023-03-24 10:57:32 +01:00
zadam
fd8a2d4d92 hide global menu after changing note/context 2023-03-24 09:32:06 +01:00
zadam
0b270ee87a remove "hide included images" feature since with attachments it's no longer necessary 2023-03-24 09:17:17 +01:00
zadam
5cc5859211 migrate images to attachments 2023-03-24 09:13:35 +01:00
zadam
bd489d5780 node upgrades 2023-03-24 07:45:18 +01:00
zadam
cd72ea524e promoted and inherited attributes should be shown grouped based on the owning note, #3761 2023-03-23 23:47:28 +01:00
zadam
56e8506cb9
Merge pull request #3756 from meichthys/note-book-card-margin
Use same margin all around note-book-card
2023-03-23 23:20:50 +01:00
MeIchthys
c86be990d6
Use same margin all around note-book-card 2023-03-21 16:19:09 -04:00
zadam
a24c56a9d5 fixes 2023-03-20 23:11:32 +01:00
zadam
95e38a037b scrollbar tweak color 2023-03-20 20:50:18 +01:00
zadam
256b800d0e scrollbar tweak color 2023-03-20 20:48:52 +01:00
zadam
b3c4c850db Merge branch 'master' into next60 2023-03-20 20:21:30 +01:00
zadam
6b1f9d3243 add #newNotesOnTop, closes #3734
(cherry picked from commit d31b5ac99fadfaeaf23fd809598fd0f816b629e2)
2023-03-19 22:27:12 +01:00
dymani
117f1101e4 Fix typo in backend API createOrUpdateLauncher()
(cherry picked from commit b3f47bb2b6617ed8a43c6235b7a9d153dc58eb95)
2023-03-19 22:27:12 +01:00
zadam
4284116280
Merge pull request #3736 from dymani/master
Fix typo in backend API createOrUpdateLauncher()
2023-03-19 22:26:16 +01:00
zadam
d31b5ac99f add #newNotesOnTop, closes #3734 2023-03-19 22:23:58 +01:00
dymani
b3f47bb2b6 Fix typo in backend API createOrUpdateLauncher() 2023-03-18 10:18:34 +08:00
zadam
64d8c7a657 add a check for the hidden note existence, #3728 2023-03-17 22:14:50 +01:00
zadam
4c3fcc3ea6 fix sanitization of autocomplete against XSS 2023-03-17 22:04:49 +01:00
zadam
5ad47d3866 fix cache invalidation upon note title change 2023-03-17 20:44:26 +01:00
zadam
e698aa5822 uploading image to attachment 2023-03-16 20:13:34 +01:00
zadam
1fdb23746a uploading image to attachment 2023-03-16 18:34:39 +01:00
zadam
9cd5bdeb53 fix note revision 2023-03-16 17:49:35 +01:00
zadam
e6183b9a1d improved saving 2023-03-16 17:43:37 +01:00
zadam
d83005fe4d improved saving attachment 2023-03-16 16:37:31 +01:00
zadam
2b84f1be00 unify .setContent() .getContent() handling across notes, revisions, attachments 2023-03-16 15:19:26 +01:00
zadam
bb45c67e60 Merge branch 'stable' into next60 2023-03-16 13:39:28 +01:00
zadam
147160ed45 fix dead references in consistency_checks.js 2023-03-16 13:30:33 +01:00
zadam
515fb4e5db blob WIP 2023-03-16 13:29:11 +01:00
zadam
b6efc954bd blob WIP 2023-03-16 12:17:55 +01:00
zadam
eee05a4d01 blob WIP 2023-03-16 12:11:00 +01:00
zadam
dc97400dbf ancillary => attachment 2023-03-16 11:03:28 +01:00
zadam
e16bedfab4 WIP blobs 2023-03-16 11:02:07 +01:00
zadam
5a8e216dec WIP blob 2023-03-15 22:44:08 +01:00
zadam
1faf8225c7 Merge branch 'master' into next60 2023-03-15 20:19:47 +01:00
zadam
bfbb531863
Merge pull request #3719 from meichthys/patch-sqlconsole
Fixes #3718
2023-03-15 16:41:07 +01:00
MeIchthys
48ba73e06d
Fixes #3718 2023-03-15 09:56:26 -04:00
zadam
c922322ed3
Merge pull request #3152 from spasche/scrollbar-color
use same variable as Firefox for scrollbar thumb
2023-03-14 22:16:39 +01:00
zadam
53aaffd0f5
Merge pull request #3652 from eliandoran/fix/infinite_loop_autocompletion
Infinite loop when searching for '' in Jump to note
2023-03-14 22:13:40 +01:00
zadam
63a70f2ffa release 0.59.2 2023-03-14 21:15:08 +01:00
zadam
d8e9086bde
Merge pull request #3710 from meichthys/patch-3
Capitalize Ribbon Widget titles for consistency
2023-03-14 21:12:38 +01:00
zadam
af4470ead1
Merge pull request #3709 from PJB3005/23-03-14-mermaid-code-mode
Avoid EditableCode inheriting mode from previous notes.
2023-03-14 21:12:01 +01:00
zadam
7cda81ec68 fix default keyboard shortcuts for mac forward, back, closes #3708 2023-03-14 21:07:14 +01:00
MeIchthys
b1153f8d01
Capitalize Inherited Attributes for consistency 2023-03-14 16:01:08 -04:00
MeIchthys
54e21bf249
Capitalize Owned Attributes title 2023-03-14 15:58:40 -04:00
Pieter-Jan Briers
eebf329983 Avoid EditableCode inheriting mode from previous notes.
Previously, if CodeMirror doesn't support a mode explicitly the mode wouldn't be updated on refresh. This means editors like Mermaid would get their mode "inherited" from the previous mode you had open.

Now the mode is set to text/plain if CodeMirror doesn't support the note's MIME type.

P.S. some of the mermaid diagrams in the demo data have their MIME type incorrectly set to text/plain rather than text/mermaid, so it doesn't reproduce on all diagrams in the demo data.
2023-03-14 20:56:12 +01:00
zadam
7b1d6c3937
Merge pull request #3685 from holoword/holoword/issue3677
“Docker non-root healthcheck”
2023-03-14 20:44:35 +01:00
holo
e6803e9a9b “Docker non-root healthcheck” 2023-03-15 00:01:25 +00:00
zadam
0b24011468 docker_healthcheck.js should not create log files, #3677 2023-03-14 20:32:35 +01:00
zadam
2699c995ee
Merge pull request #3701 from meichthys/patch-2
Add `onenote` Scheme to html sanitizer
2023-03-14 20:23:21 +01:00
MeIchthys
697f6ee2a9
Add onenote Scheme to html sanitizer 2023-03-13 10:36:25 -04:00
zadam
35429f6a93
Merge pull request #3693 from meichthys/patch-1
📝Emojify Readme
2023-03-12 23:10:43 +01:00
zadam
29eae4eeb6 fixed jsdoc 2023-03-12 23:05:54 +01:00
zadam
8de67b6945 small fixes / refactoring 2023-03-12 21:37:13 +01:00
zadam
4f63284d41
Merge pull request #3699 from new-sashok724/unix-sockets
Support listening on the unix socket
2023-03-12 21:31:37 +01:00
zadam
0c806024fb added some extra allowed URI schemes, fixes #3692 2023-03-12 21:20:34 +01:00
Сашка724ая
9a08aa2ab5
Fix healthcheck and some messages 2023-03-11 20:57:16 +11:00
Сашка724ая
02f218389b
support listening on unix sockets 2023-03-11 20:21:32 +11:00
Nriver
d3ec9f022c add natural sort for notes, introduce new label #sortNatural 2023-03-10 14:35:36 +08:00
MeIchthys
4cd54e5a9a
Emojify Readme 2023-03-09 11:51:13 -05:00
zadam
5225a99995 wip 2023-03-09 09:38:02 +01:00
zadam
929f8ef720 note ancillary/attachment backported from dev branch 2023-03-08 09:01:23 +01:00
zadam
6b4800d2d6 port error clarifications 2023-03-08 07:31:10 +01:00
zadam
f60e4a1355 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	package-lock.json
2023-03-07 23:07:06 +01:00
zadam
03897c5c9d use more precise detection of a mobile browser, fixes #3680 2023-03-07 23:06:55 +01:00
zadam
ef90f1ff3f
Merge pull request #3676 from jrao1/allow-labels-when-adding-notes-via-clipper
Allow arbitrary labels to be added via web clipper
2023-03-07 22:53:11 +01:00
zadam
177a67f59b content null check in full text search, #3672 2023-03-06 23:23:56 +01:00
zadam
1e551581f8 content null check in full text search, #3672 2023-03-06 23:23:32 +01:00
zadam
62c2547557 #run should respect inheritance, fixes #3669 2023-03-06 23:00:29 +01:00
J Rao
2389ab30f8 sanitize label value 2023-03-06 21:28:09 +08:00
J Rao
fdffc27bb6 Allow arbitrary labels to be added via web clipper 2023-03-06 21:21:09 +08:00
zadam
540d19c67c fix import of ZIP with images with no meta file, closes #3649 2023-03-02 08:44:55 +01:00
zadam
46eebdc7aa
Update README.md 2023-03-01 10:48:34 +01:00
zadam
700c6ffc75
Update README.md 2023-03-01 10:48:11 +01:00
zadam
6b013c05cc
added awesome-trilium to README 2023-03-01 10:47:27 +01:00
zadam
f541bf186c release 0.59.1 2023-02-28 23:39:34 +01:00
zadam
9eb3075f65 Merge remote-tracking branch 'origin/master' into next59
# Conflicts:
#	bin/tpl/anonymize-database.sql
2023-02-28 23:25:51 +01:00
zadam
e2b8dfe96a fix autocomplete showing hidden paths, closes #3654 2023-02-28 23:23:48 +01:00
zadam
f883fde74a small search refactorings 2023-02-28 23:23:17 +01:00
zadam
ae6f2624a0
Merge pull request #3650 from eliandoran/fix/vertical_align_table_cells
Centered vertical align does not seem to work on merged table cells
2023-02-28 00:02:29 +01:00
zadam
ee2953a5e1 fix display of note revision content, #3637 2023-02-27 22:58:02 +01:00
zadam
ec8ed65feb submenu choice of template should override child: settings, fixes #3628 2023-02-27 21:07:32 +01:00
zadam
b70699ce1c make the active fancytree selector more specific than the normal color setting 2023-02-27 21:01:25 +01:00
Elian Doran
5820f874fc Fix infinite loop in autocompletion
In some cases, the token used for highlighting autocompletion gets to be
empty, resulting in an infinte loop. One such case is searching for `''`
(without the backticks).
2023-02-27 01:00:30 +02:00
Elian Doran
44c0ecdbfa Fix middle vertical align on table cells
For merged cells, middle vertical alignment would not work properly (it
was either aligned to the top or bottom).
2023-02-26 22:45:58 +02:00
zadam
7be9db8b84 fix ctrl+click opening note twice, closes #3630 2023-02-22 22:59:31 +01:00
zadam
69d7684b0d fix refreshing option cache on sync, closes #3623 2023-02-22 22:10:41 +01:00
zadam
a88582c610
Update README-ZH_CN.md 2023-02-21 10:38:37 +01:00
zadam
3fd0c01c05
Update README.ru.md 2023-02-21 10:38:12 +01:00
zadam
c16537aecf
Update README.md 2023-02-21 10:37:53 +01:00
zadam
79f1eb6e5e improvements in the anonymization script 2023-02-20 21:21:32 +01:00
zadam
fc67dd4d0a release 0.59.0-beta 2023-02-19 21:36:05 +01:00
zadam
232dad66d1 trim imported text 2023-02-19 21:34:37 +01:00
zadam
ed30ec27e7 update demo API examples 2023-02-17 23:34:29 +01:00
zadam
eaab82551f API migration to remove deprecated calls 2023-02-17 23:23:53 +01:00
zadam
d343ff0d23 removed deprecated widgets from frontend API 2023-02-17 23:04:49 +01:00
zadam
400b14e021 removed remnants of dev branch 2023-02-17 16:44:04 +01:00
zadam
760c7b73ad api docs 2023-02-17 16:30:14 +01:00
zadam
97cadc3acf cleaned up unused backend log widget 2023-02-17 16:27:37 +01:00
zadam
7d0117bd28 unneeded changes from dev 2023-02-17 16:24:47 +01:00
zadam
956682f2c7 update docs 2023-02-17 16:15:58 +01:00
zadam
4558e349b5 node update 2023-02-17 15:05:27 +01:00
zadam
6f7b554cdc preparing 0.59 without ocr/pdf, userguide, note ancillaries 2023-02-17 14:49:45 +01:00
zadam
42e08284b0 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	package-lock.json
#	src/public/app/widgets/mermaid.js
2023-02-15 23:47:41 +01:00
zadam
127486fdf5 removed deprecated API methods 2023-02-15 23:45:25 +01:00
zadam
4ffe36e4d0 added options for OCR and extract text from PDF 2023-02-15 16:08:00 +01:00
zadam
85403321cf tweaks 2023-02-15 15:57:33 +01:00
zadam
22cea63863 unneeded await 2023-02-15 15:09:34 +01:00
zadam
c95c5bb471 fix lost content data after CKEditor crash, closes #3584 2023-02-15 15:08:59 +01:00
zadam
cbabaa6b0c move advanced menu slightly below to not overlay the text 2023-02-15 14:49:58 +01:00
zadam
520ffecd36 ancillary type widget 2023-02-15 14:32:12 +01:00
zadam
b1e2b5ba8e reimplement note source to open in a new tab 2023-02-14 16:06:49 +01:00
zadam
896a4fe981 show mermaid errors, fixes #3610 2023-02-13 23:46:04 +01:00
zadam
e9a2cacb5b release 0.58.8 2023-02-13 21:50:54 +01:00
zadam
c190296bf9 refactoring 2023-02-13 16:22:34 +01:00
zadam
e411ad0eb1 Merge branch 'master' into dev 2023-02-13 15:58:02 +01:00
zadam
17085e5578 fix hidden subtree appearing after collapse, #2922 2023-02-13 15:09:57 +01:00
zadam
33d6bb69c0 refresh note list on pageSize update 2023-02-10 13:21:00 +01:00
zadam
44629e6a0a upgrades 2023-02-10 12:29:07 +01:00
zadam
78d61f157e fix docker healthcheck 2023-02-10 12:20:27 +01:00
zadam
3c0ba09a62 fix docker build 2023-02-10 11:40:56 +01:00
zadam
e57d325bd6 fix docker build 2023-02-10 11:24:31 +01:00
zadam
260bc93a66 reimplement docker healtcheck into node.js to take into account configuration, #3582 2023-02-10 11:09:56 +01:00
zadam
a9296e2a39 update node.js to 18 2023-02-10 10:44:38 +01:00
zadam
8371703090 Merge branch 'master' into dev 2023-02-10 10:41:12 +01:00
zadam
fc7da015fe fix image display with slash in title, closes #3591 2023-02-10 10:23:02 +01:00
zadam
adf222b5e8 fix consistency check to re-parent note from search parent to root 2023-02-10 10:12:58 +01:00
zadam
ade22ea825 recover notes into root only if no other valid branch exists, #3590 2023-02-10 10:09:06 +01:00
zadam
2c8fb90ecb
Merge pull request #3590 from eliandoran/feature/fix_broken_reference_check
Fix broken reference consistency check
2023-02-10 09:58:24 +01:00
zadam
c67644a2e3 fix filing entity changes for deleted notes 2023-02-10 09:16:32 +01:00
zadam
346f6edd7e fix filing entity changes for deleted notes 2023-02-10 08:55:26 +01:00
Elian Doran
92f586486f Fix broken reference consistency check
If a branch was identified with a missing parent, the branch would be
moved to root. However, the ID of the branch would be changed as a
result of that, and this resulted in the creation of a new branch
instead of updating the old one. Deleting the old one first solves the
issue.
2023-02-05 01:12:13 +02:00
zadam
15607becc6 Merge branch 'master' into dev
# Conflicts:
#	package-lock.json
#	src/public/app/entities/fnote.js
#	src/services/notes.js
2023-02-02 23:35:41 +01:00
zadam
e7c6d912a4 fix undeleting notes with a relation, closes #3583 2023-02-01 23:06:55 +01:00
zadam
290f7e2101 fix sharing of templates, #3562 2023-02-01 22:58:40 +01:00
zadam
460b5fb3a4 fix sharing of templates, #3562 2023-02-01 22:55:31 +01:00
zadam
88e09eb279 ocr wip 2023-02-01 21:07:23 +01:00
zadam
5e0fbea3b3 fix disabled: on attribtue changed script in demo document, fixes #3564 2023-02-01 07:29:37 +01:00
zadam
7b2c3afe4c always open the note in URL, closes #3571 2023-01-31 23:20:11 +01:00
zadam
2e181d0fb1 toggling the left pane will toggle the focus between tree and detail, #3563 2023-01-31 22:35:01 +01:00
zadam
68a03211ce fix padding on launcher when collapsed 2023-01-31 22:25:46 +01:00
zadam
37ba76fdd8 refactored note attachment into note ancillary 2023-01-28 13:13:46 +01:00
zadam
78954268ab small attribute optimizations 2023-01-27 16:59:59 +01:00
zadam
b0528b62d8 small attribute optimizations 2023-01-27 16:57:23 +01:00
zadam
2b4dfaef7f small attribute optimizations 2023-01-27 08:46:04 +01:00
zadam
ad887c4b12 added image OCR and parsing text from PDF (and OCR of PDF images) 2023-01-26 20:32:27 +01:00
zadam
63c62df787 ocr 2023-01-26 09:42:11 +01:00
zadam
c68a67d148 ocr test 2023-01-25 15:20:53 +01:00
zadam
bd8568809f export/import attachments 2023-01-25 09:55:29 +01:00
zadam
0bfb2631df fix saving mermaid attachment 2023-01-24 23:09:00 +01:00
zadam
3c57f08ef7 added checksum to note_attachment 2023-01-24 16:55:48 +01:00
zadam
a7b103e07a add a button to temporarily hide TOC, closes #3555 2023-01-24 16:24:51 +01:00
zadam
64e7150765 fix undeleting note when its relation points to yet-undeleted note 2023-01-24 09:43:10 +01:00
zadam
a888f9aa04 recalculate maxEntityChangeId after rollbacked transaction 2023-01-24 09:35:00 +01:00
zadam
2e9dbda077 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	package.json
2023-01-24 09:20:15 +01:00
zadam
c474e65cae saving attachments when editing 2023-01-24 09:19:49 +01:00
zadam
f59e19d93b fixes to note attachment handling 2023-01-23 23:37:58 +01:00
zadam
8a33645360 migrating canvas etc. 2023-01-23 16:57:28 +01:00
zadam
339d8a7378 initial implementation of note attachments 2023-01-22 23:36:05 +01:00
zadam
f2a19c56b1 add excludeFromNoteMap to a day template instead of journal root, #3547 2023-01-21 11:13:40 +01:00
zadam
a98fd509c6 release 0.58.7 2023-01-17 23:14:58 +01:00
zadam
a3149aecf4 fix migration for DBs which did not have _hidden tree created, closes #3536 2023-01-17 23:13:21 +01:00
zadam
6a6ae359b6 Merge branch 'master' into dev
# Conflicts:
#	package-lock.json
#	package.json
#	src/public/app/widgets/dialogs/note_revisions.js
#	src/services/handlers.js
#	src/services/hidden_subtree.js
#	src/services/search/services/parse.js
2023-01-17 22:20:10 +01:00
zadam
2fa1d812f6 _hidden note does not inherit attributes from root, fixes #3537 2023-01-17 22:14:53 +01:00
zadam
ef825371cf fix "root" note in autocomplete when hoisted into another subtree 2023-01-17 21:15:05 +01:00
zadam
b567775129 small fixes of steel blue theme 2023-01-17 21:06:30 +01:00
zadam
58d71bf8e3 release 0.58.6 2023-01-16 22:39:28 +01:00
zadam
9fd0b85ff2 doc note for the back/forward launchers 2023-01-16 22:37:21 +01:00
zadam
a5e21ea5f3 simplified/fixed close tab button 2023-01-16 22:28:55 +01:00
zadam
98620887d4 fix demo steel blue main menu icon 2023-01-16 22:19:36 +01:00
zadam
9eff08144c extra check that hidden tree is not created until migration is completed 2023-01-16 08:06:19 +01:00
zadam
4ba72bc8d3 fixed standalone anonymize script 2023-01-15 21:05:03 +01:00
zadam
f50a9c250a many small issues found by intellij analysis 2023-01-15 21:04:17 +01:00
zadam
743979266a fix history navigation buttons in server, #3527 2023-01-15 19:46:32 +01:00
zadam
4f98c960ec fix note revision for images 2023-01-15 19:23:28 +01:00
zadam
424b624ea9 small mermaid fixes 2023-01-15 13:48:01 +01:00
zadam
a004a8b092 fix loading custom themes in Options, closes #3528 2023-01-15 12:54:38 +01:00
zadam
df0f52aff9 clarified comment 2023-01-14 23:16:57 +01:00
zadam
f7bd72ba2f release 0.58.5 2023-01-14 23:02:39 +01:00
zadam
038c0e78a6 fix options check in froca 2023-01-14 23:01:02 +01:00
zadam
2a2cbcd68b fix duplicate unique key in migration, #3526 2023-01-14 22:57:39 +01:00
zadam
be654e7a31 fix duplicate unique key in migration, #3526 2023-01-14 22:55:22 +01:00
zadam
32bd74fe27 build website improvements 2023-01-14 22:50:04 +01:00
zadam
14da697a4e put firing of the runOnNoteContentChange on entity level instead of service level, #3436 2023-01-14 12:57:50 +01:00
zadam
2525857c20 fix null content when protecting notes, closes #3523 2023-01-14 00:01:24 +01:00
zadam
c97ada3434 docs improvements 2023-01-13 23:54:47 +01:00
zadam
c924790f3e Merge remote-tracking branch 'origin/dev' into dev 2023-01-13 21:11:36 +01:00
zadam
a110f24b05 Merge branch 'master' into dev 2023-01-13 21:11:23 +01:00
zadam
8eaef3e1d8 add runOnNoteContentChange into the autocomplete 2023-01-13 14:28:41 +01:00
zadam
082caf98e8 restore all "named" notes quickly after their deletion, #3517 2023-01-13 11:53:25 +01:00
zadam
60602a2264 fix creating notes into options, #3517 2023-01-13 11:34:35 +01:00
zadam
9479f1c1a1 toggling archived notes caused appearance of hidden subtree, fixes #3519 2023-01-13 11:25:58 +01:00
zadam
88bc7402a2 hidden notes should not appear in the global search unless hoisted into it, #3516 2023-01-13 10:09:41 +01:00
zadam
e7b3c3239b fix migration of bookmarks to also migrate bookmarkFolder #3514 2023-01-13 08:43:18 +01:00
zadam
4f4c3ef3f3 fix enex checkboxes for mac, closes #3511 2023-01-12 16:45:11 +01:00
zadam
d7b0719788 script to build the docs website 2023-01-12 16:37:30 +01:00
zadam
7a457e4509 Merge remote-tracking branch 'origin/master' into dev 2023-01-12 15:25:59 +01:00
zadam
decfeb366c zoom factor should be rounded to 1 floating point digit 2023-01-12 08:27:08 +01:00
zadam
420175f5ef release 0.58.4 2023-01-11 23:44:33 +01:00
zadam
bdfdc0402d update content should parse out links #3509 2023-01-11 23:22:51 +01:00
zadam
bb8496cb3f ETAPI method to create note revision, #3509 2023-01-11 23:18:51 +01:00
zadam
4bdb94fbaa ancestorDepth should be treated as string in ETAPI, fixes #3510 2023-01-11 23:08:57 +01:00
zadam
05c04a35a7 API docs integrate into user docs 2023-01-10 22:48:56 +01:00
zadam
4385a02f6b transform 2023-01-10 16:51:50 +01:00
zadam
397dd68666 Merge remote-tracking branch 'origin/dev' into dev 2023-01-10 16:33:35 +01:00
zadam
edbb60f2b5 Merge branch 'master' into dev
# Conflicts:
#	src/routes/api/sender.js
#	src/services/import/enex.js
2023-01-10 16:33:31 +01:00
zadam
5bf9c253f2 toc fix 2023-01-10 16:16:13 +01:00
zadam
b0cc177d84 make heading regex in TOC case insensitive 2023-01-10 15:06:21 +01:00
zadam
c60f25fb7c more flexible heading regex 2023-01-10 00:00:46 +01:00
zadam
4ab90b694f fix 2023-01-09 23:15:02 +01:00
zadam
87636f27ba Merge branch 'master' into dev
# Conflicts:
#	src/routes/api/sender.js
#	src/services/import/enex.js
2023-01-09 23:02:19 +01:00
zadam
571cb6d0eb fix dynamic module import 2023-01-09 22:32:49 +01:00
zadam
f738787202 expand regex to account for more attributes in en-media tag in ENEX import, fixes #3503 2023-01-08 20:50:08 +01:00
zadam
4ae1b6e07b sender route should respect inbox, #3502 2023-01-08 20:40:38 +01:00
zadam
41b8f6882c note content renderer should load reference link titles, fixes #3499 2023-01-08 20:31:55 +01:00
zadam
43c5163f66 renamed closing commands 2023-01-08 13:58:51 +01:00
zadam
8a2a9b2ea6 Merge branch 'stable'
# Conflicts:
#	src/services/import/enex.js
2023-01-08 13:24:10 +01:00
zadam
c70272e756 fix creation date in ENEX import for mac files, closes #3496 2023-01-08 13:23:07 +01:00
zadam
843f5d0da1 gitignore 2023-01-08 12:54:55 +01:00
zadam
2242397280 fix 2023-01-08 12:46:26 +01:00
zadam
8a641e1b4f added "inherit" relation, #3493 2023-01-06 20:31:55 +01:00
zadam
f86fb0d0a2 added TRILIUM_SYNC_SERVER_HOST env. variable to prevent prod sync issues 2023-01-06 15:14:04 +01:00
zadam
a863da1dce becca should also keep correct branch order, e.g. for export, #2346 2023-01-06 15:07:18 +01:00
zadam
d7cae7d5bb improvements in API docs generation 2023-01-05 23:38:41 +01:00
zadam
19f4870280 transform api docs script WIP 2023-01-05 16:52:39 +01:00
zadam
ac51d0d569 Merge branch 'master' into dev
# Conflicts:
#	package-lock.json
#	package.json
2023-01-05 16:17:33 +01:00
zadam
218f526a92 fix order by note content size, closes #3488 2023-01-05 15:52:07 +01:00
zadam
161b45aa12
Merge pull request #3489 from Nriver/master
use api.showMessage instead of alert
2023-01-05 15:24:42 +01:00
zadam
397629587c Merge remote-tracking branch 'origin/master' 2023-01-05 15:23:31 +01:00
zadam
034098fd06 don't use alert, #3483 2023-01-05 15:23:22 +01:00
Nriver
e03cc01e15 use api.showMessage instead of alert 2023-01-05 09:02:40 +08:00
zadam
0995c56506 release 0.58.3-beta 2023-01-04 22:36:31 +01:00
zadam
3a5fa2954d Merge remote-tracking branch 'origin/master' 2023-01-03 22:36:56 +01:00
zadam
398480415e package-lock.json 2023-01-03 22:36:41 +01:00
zadam
81013ed21a Merge branch 'stable'
# Conflicts:
#	package-lock.json
#	package.json
2023-01-03 22:35:45 +01:00
zadam
53360c147a npm script improvements 2023-01-03 22:34:31 +01:00
zadam
9e47da3f03
Merge pull request #3150 from zadam/dependabot/npm_and_yarn/json-schema-and-jsprim-0.4.0
Bump json-schema and jsprim
2023-01-03 22:32:36 +01:00
zadam
faefe10c15
Merge pull request #3423 from zadam/dependabot/npm_and_yarn/terser-5.16.1
Bump terser from 5.10.0 to 5.16.1
2023-01-03 22:32:15 +01:00
zadam
a4d3150a24
Merge pull request #2739 from zadam/dependabot/npm_and_yarn/nanoid-3.3.1
Bump nanoid from 3.1.30 to 3.3.1
2023-01-03 22:31:57 +01:00
zadam
e1f0676891
Merge pull request #3197 from zadam/dependabot/npm_and_yarn/dump-db/minimist-1.2.7
Bump minimist from 1.2.5 to 1.2.7 in /dump-db
2023-01-03 22:31:08 +01:00
zadam
792ac9b77d
Merge pull request #3408 from zadam/dependabot/npm_and_yarn/qs-6.5.3
Bump qs from 6.5.2 to 6.5.3
2023-01-03 22:30:42 +01:00
zadam
bbbd2f7e82
Merge pull request #3481 from contributor/feature/safeVsCodeLaunch
Safe Vs Code debug launch
2023-01-03 22:29:36 +01:00
zadam
d910191e83
Merge pull request #3480 from contributor/feature/pageUrlSanitizeUrl
Fix pageUrl and clipping selection can create multiple notes for the same Url
2023-01-03 22:28:37 +01:00
zadam
e8a9389e6d remove console.log 2023-01-03 21:44:47 +01:00
zadam
6dce13bc34 export root note fix, #2346 2023-01-03 21:30:49 +01:00
contributor
71cdea3902 fix vscode launch can break release app data 2023-01-03 21:39:35 +02:00
contributor
85a6e8b47e fix clipping selection can create multiple notes for the same Url
sanitize was replacing '&' char to '&'and changing actual Url
2023-01-03 21:18:23 +02:00
contributor
f02ad63e97 npm i @braintree/sanitize-url 2023-01-03 21:18:23 +02:00
contributor
977399a73e refac: better naming 2023-01-03 21:18:23 +02:00
zadam
5d4a2f2064 jsdoc 2023-01-03 15:02:01 +01:00
zadam
c5ab6fa2fa jsdoc fixes to make export simpler 2023-01-03 14:31:46 +01:00
zadam
b80bf0ffb6 docs updated 2023-01-03 13:54:27 +01:00
zadam
bff7434921 rename becca entities to have B-prefix, #3476 2023-01-03 13:52:37 +01:00
zadam
da161c7ce0 rename shaca entities to have F-prefix, #3476 2023-01-03 13:40:21 +01:00
zadam
977a47bc27 rename froca entities to have F-prefix, #3476 2023-01-03 13:35:10 +01:00
zadam
957640f163 Merge branch 'master' into dev 2023-01-02 22:53:03 +01:00
zadam
291ef87c9b fix edit button 2023-01-02 22:32:05 +01:00
zadam
115bf0af4d fix button paddings 2023-01-02 21:08:20 +01:00
zadam
e40f1fd11a fix inclusion of the image into the correct position in ENEX import, closes #3468 2023-01-01 21:02:54 +01:00
zadam
797ddf6205 search hit with exact note title match gets a strong score boost, closes #3470 2022-12-30 23:14:48 +01:00
zadam
ca4e1c19a7 make utils.normalize null-safe, #3469 2022-12-30 21:00:42 +01:00
zadam
d2b906bc1b global menu can open the user guide 2022-12-30 17:41:45 +01:00
zadam
94dcaae12d renamed Help to User Guide 2022-12-30 17:28:19 +01:00
zadam
df47679c7f added option for help sha256 2022-12-30 17:10:07 +01:00
zadam
d6f3b79f20 improvs 2022-12-29 23:12:38 +01:00
zadam
c7556d9163 backend api for ZIP export 2022-12-29 21:15:34 +01:00
zadam
16c3833a36 fix 2022-12-29 14:25:25 +01:00
zadam
007e45ad8c fix import and replace tree 2022-12-29 14:21:35 +01:00
zadam
b9b8b35342 Merge branch 'master' into dev
# Conflicts:
#	src/services/import/zip.js
2022-12-29 10:27:23 +01:00
zadam
dd82b0f958 Merge remote-tracking branch 'origin/master' 2022-12-29 10:25:54 +01:00
zadam
f150c223bc improved ZIP import validation and error handling 2022-12-29 10:25:49 +01:00
zadam
e76290e598 Merge branch 'master' into dev 2022-12-29 10:07:04 +01:00
zadam
4f771cfa7a
Merge pull request #3467 from contributor/feature/enex-pageUrl
Evernote import - use pageUrl attribute for enex source-url
2022-12-29 09:57:43 +01:00
contributor
aa3b26c965 Evernote import - use pageUrl attribute for enex source-url 2022-12-29 01:27:17 +02:00
zadam
f4cf04232f release 0.58.2-beta 2022-12-29 00:12:54 +01:00
zadam
d36cf47974 no-dir npm scripts 2022-12-28 23:17:59 +01:00
zadam
f809da58ec fix occurrences of 'root' branch 2022-12-28 13:09:49 +01:00
zadam
ff1f01be8c erase deleted notes in the migration 2022-12-28 12:58:53 +01:00
zadam
0ddaa8f5c2 migration fixes 2022-12-27 21:17:40 +01:00
zadam
620bed73bb put back the removed widgets, the BC break is not worth it 2022-12-27 15:05:12 +01:00
zadam
c177d2b97b fix migration 2022-12-27 14:52:32 +01:00
zadam
0758c82983 hidden subtree is now built as "predictable" to avoid duplicating it in sync 2022-12-27 14:44:28 +01:00
zadam
ecc2ed7d73 formatting 2022-12-27 10:22:50 +01:00
zadam
4b779d7512 small refactors in sync 2022-12-27 09:53:25 +01:00
zadam
701911b766 release 0.58.1-beta 2022-12-26 23:57:31 +01:00
zadam
5fea90491c zip import WIP 2022-12-26 23:46:39 +01:00
zadam
d665b7e584 import refactoring 2022-12-26 22:51:16 +01:00
zadam
7a8bbdced8 fix cursor in the textarea, closes #3459 2022-12-26 20:07:04 +01:00
zadam
affd8062e2 escape note titles in note map 2022-12-26 10:52:28 +01:00
zadam
45b94ecaeb zip import refactoring 2022-12-26 10:38:31 +01:00
zadam
acda37e334 wip import zip as help 2022-12-25 23:36:56 +01:00
zadam
2cfc43a4fd
Merge pull request #3456 from WPum/patch-1
sync chinese readme with the english version
2022-12-25 19:53:34 +01:00
WPum
fb789b7bd8
sync chinese readme with the english version 2022-12-25 23:42:44 +08:00
zadam
b906efb23b fix ZIP import without metadata 2022-12-25 14:10:12 +01:00
zadam
f249d6cb26 fix sorting after cloning/moving notes into sorted parent, closes #3453 2022-12-25 13:46:31 +01:00
zadam
afb6e860ea fix docs 2022-12-25 13:06:06 +01:00
zadam
435e042ae9 fix docs 2022-12-25 13:03:22 +01:00
zadam
d64df5e3e7 fix comment 2022-12-25 13:03:04 +01:00
zadam
bd59802ca4 create new sortNotes backend API method and deprecate old sortNotesByTitle 2022-12-25 13:01:50 +01:00
zadam
7c98ade72b fix missing doc resources for launchers, closes #3455 2022-12-25 11:58:24 +01:00
zadam
c6485f8e03 fix assuming that trilium is exposed on the root path, closes #3452 2022-12-25 10:48:51 +01:00
zadam
a083917db1 fix context menu in browser for launchers, closes #3454 2022-12-25 10:33:31 +01:00
zadam
3b5f2b86d5 release 0.58.0-beta 2022-12-24 22:09:05 +01:00
zadam
f08fbf7bca fix migration 2022-12-24 21:25:34 +01:00
zadam
e2b227df34 make initialization of launchers more robust 2022-12-24 14:42:35 +01:00
zadam
4c51588270 custom widget launchers should not be initialized in safe mode 2022-12-24 13:57:42 +01:00
zadam
b13ea72152 autorefresh bookmarks on #bookmarkFolder change 2022-12-24 13:31:38 +01:00
zadam
5a2907b670 delete preview takes into account strong/weak branches 2022-12-24 13:15:19 +01:00
zadam
b6f7c604c7 fix share migration 2022-12-24 12:54:17 +01:00
zadam
c5fb2cccd5 fix bookmark's ID 2022-12-24 12:26:32 +01:00
zadam
1d1e6ae782 disallow dropping notes before/after available/visible launchers 2022-12-24 07:22:05 +01:00
zadam
bff33932d9 fix migration to not rely on branchId 2022-12-24 07:17:22 +01:00
zadam
392b89e6dd exported links to "named" notes should be preserved upon import 2022-12-23 23:08:30 +01:00
zadam
5ae0a5cf1e randomize existing fixed branchIds so it's clear they should not be relied upon 2022-12-23 21:13:00 +01:00
zadam
1a1fb126c1 randomize existing fixed branchIds so it's clear they should not be relied upon 2022-12-23 20:55:37 +01:00
zadam
5c4db266a4 code should not rely on fixed branch IDs since they can change after move 2022-12-23 20:40:58 +01:00
zadam
e5e0add1a2 fixed history navigation buttons 2022-12-23 20:17:04 +01:00
zadam
e1d20b8ff8 fix relation map buttons 2022-12-23 19:47:49 +01:00
zadam
c6a05d8853 fix calendar widget when hoisted into hidden subtree 2022-12-23 15:46:33 +01:00
zadam
c34bccf7e8 note map can display notes if hoisted in hidden subtree 2022-12-23 15:32:11 +01:00
zadam
0441e7396a small fixes 2022-12-23 15:07:48 +01:00
zadam
698eb53006 small fixes 2022-12-23 14:18:40 +01:00
zadam
3804d2df8c search should find notes in hidden subtree when hoisted into it 2022-12-23 14:02:18 +01:00
zadam
7147cc267e small fixes 2022-12-22 23:38:57 +01:00
zadam
29713de6cd small fixes 2022-12-22 23:11:12 +01:00
zadam
46f40ee534 fix options 2022-12-22 22:52:04 +01:00
zadam
a882ad41c5 small fixes 2022-12-22 21:01:52 +01:00
zadam
062e8c4b84 allow configuration of log, backup etc. directories per env variables, closes #3446 2022-12-22 19:50:00 +01:00
zadam
0f0ca51bd6 updated launcher info pages 2022-12-22 19:02:41 +01:00
zadam
af654a171f execute all DB migrations in one transaction 2022-12-22 18:53:04 +01:00
zadam
186e06bc01 descs for execute button 2022-12-22 18:37:32 +01:00
zadam
4cc9bdf5e4 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package-lock.json
2022-12-22 18:16:06 +01:00
zadam
e05e4bec32 fix old migration to avoid unique constraints problems, closes #3447 2022-12-22 15:11:20 +01:00
zadam
5a3882f388 fixed comments 2022-12-22 14:59:20 +01:00
zadam
8ec2547b4a backend API to create a launcher 2022-12-22 14:57:00 +01:00
zadam
059c339c09 fix warnings in ckeditor 2022-12-21 23:10:13 +01:00
zadam
724f99f17c add prefix "_" to "named" IDs 2022-12-21 16:11:00 +01:00
zadam
1b24276a4a always use template strings instead of string concatenation 2022-12-21 15:19:05 +01:00
zadam
ea006993f6 added a "script executor" ribbon widget 2022-12-20 23:46:44 +01:00
zadam
7a46159539 code buttons into the floating buttons (WIP) 2022-12-20 23:20:59 +01:00
zadam
50faa40bad apply color label also on note map, #3443 2022-12-20 20:41:51 +01:00
zadam
9d9305300c scale the whole edit widget, not just the icon 2022-12-20 20:25:52 +01:00
zadam
c89455f93f edit button grows and shakes on the first display #2483 2022-12-20 20:20:24 +01:00
zadam
7c6d67f1ad migration comments 2022-12-19 23:49:41 +01:00
zadam
8c4dda45ef bookmark buttons should behave similarly as other launcher buttons in respect to context menu, ctrl-click, left click 2022-12-19 23:19:47 +01:00
zadam
db5e76fe8c allow access to share api root note only if there's share index, #3434 2022-12-19 21:39:12 +01:00
zadam
5413a1aa79 create new runOnNoteContentChange event, #3436 2022-12-18 23:53:47 +01:00
zadam
e41104208a added today launcher 2022-12-18 23:25:35 +01:00
zadam
5fca606730 added note hoisting option to the note launcher 2022-12-18 22:05:06 +01:00
zadam
0de0b6fd06 sync status widget fix 2022-12-18 20:29:17 +01:00
zadam
db6dbc7821 can't create non-launcher notes into the launcher subtree 2022-12-18 20:12:43 +01:00
zadam
e5171e434b fix small gap between menu and submenu where hover can disappear 2022-12-18 19:45:36 +01:00
zadam
2df7d99a91 routes refactoring 2022-12-18 16:12:29 +01:00
zadam
6def541e78 improve compatibility with common js, #3436 2022-12-18 12:58:26 +01:00
zadam
5af506e268 reimplementation of frontend's api.addButtonToToolbar() to smoothen the upgrade 2022-12-17 21:46:51 +01:00
zadam
967919b400 fix note preloading in tab loading 2022-12-17 13:33:57 +01:00
zadam
575f09d97f fix display of title buttons 2022-12-17 13:28:53 +01:00
zadam
c28383de4f full search shows search errors, closes #3221 2022-12-17 13:07:42 +01:00
zadam
c496519095 Merge remote-tracking branch 'origin/master' 2022-12-17 11:58:36 +01:00
zadam
ecaa9a1d56 quick search shows search errors #3221 2022-12-17 11:58:30 +01:00
zadam
d34a0a9fc0 hidden subtree is not archived anymore 2022-12-16 16:00:49 +01:00
zadam
b202b43bf5 added watchdog for CKEditor to recover from crashes, fixes #3227 2022-12-15 21:45:47 +01:00
zadam
648dd73fa1 mermaid 9.3.0 2022-12-15 20:37:59 +01:00
zadam
1640a8aa7d Merge remote-tracking branch 'origin/master' 2022-12-15 18:58:54 +01:00
zadam
698a6bf91c ckeditor 35.4.0 2022-12-15 18:58:47 +01:00
dependabot[bot]
c409d7ff2a
Bump qs from 6.5.2 to 6.5.3
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-15 15:39:13 +00:00
dependabot[bot]
f8dd175837
Bump terser from 5.10.0 to 5.16.1
Bumps [terser](https://github.com/terser/terser) from 5.10.0 to 5.16.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.10.0...v5.16.1)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-15 15:39:04 +00:00
zadam
195c6a4089 backend log improvements 2022-12-15 16:38:05 +01:00
zadam
6c431ae5ed fix enex import splitting image/resource into multiple chunks, closes #3424 2022-12-15 14:14:21 +01:00
zadam
8c01a77a7a docs update 2022-12-14 23:51:56 +01:00
zadam
239c68a33c docs update 2022-12-14 23:51:28 +01:00
dependabot[bot]
df3212c304
Bump minimist from 1.2.5 to 1.2.7 in /dump-db
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-14 22:50:02 +00:00
zadam
4026c2be4f Merge branch 'next58'
# Conflicts:
#	src/public/app/widgets/note_tree.js
#	src/services/tree.js
2022-12-14 23:48:58 +01:00
zadam
c6614bc85b removed logging 2022-12-14 23:45:55 +01:00
zadam
31b3af4129 label update should trigger parent resort, fixes #3366 2022-12-14 23:44:26 +01:00
zadam
c4b0c44919 change of archived label should force a reload of the parents since it can change its visibility status, fixes #3422 2022-12-14 19:26:39 +01:00
zadam
223ca95829 added error logs to bug report template 2022-12-14 12:28:08 +01:00
zadam
b9ae68d559 small fixes 2022-12-14 12:26:04 +01:00
zadam
e7470e31a0 Merge branch 'stable' 2022-12-14 11:20:55 +01:00
zadam
1b6d0c9bbc global menu improvements 2022-12-14 10:29:14 +01:00
zadam
75639c53f0 unhoist button on the left 2022-12-14 10:18:29 +01:00
zadam
587387dd46 improved error handling in case of errors during initial tabs loading 2022-12-14 10:00:33 +01:00
zadam
ffb3c044fa release 0.57.5 2022-12-13 23:08:52 +01:00
DynamoFox
921f75beba Fix missing share.js in public/app-dist folder; Delete unused public/app folder (Docker build)
(cherry picked from commit f45478260ece4e8700d38c8626a3b584bda513b8)
2022-12-13 22:40:28 +01:00
zadam
f739259407
Merge pull request #3410 from DynamoFox/fix-missing-sharejs-file
Fix missing share.js in public/app-dist folder; Delete unused public/app folder (Docker build)
2022-12-13 22:39:28 +01:00
zadam
173b28062e advanced submenu is available in mobile 2022-12-13 22:29:26 +01:00
zadam
4f51f73b89 mobile interface should not create new tabs 2022-12-13 21:45:57 +01:00
zadam
ca968a9e31 hoisting support in mobile view WIP 2022-12-13 16:57:46 +01:00
zadam
2957e1d78a improvements in mobile layout for launchbar 2022-12-12 23:48:34 +01:00
zadam
d1b989ac12 Merge remote-tracking branch 'origin/stable' into next58 2022-12-12 21:43:56 +01:00
zadam
e3047ee450 Merge remote-tracking branch 'origin/master' into next58 2022-12-12 21:43:45 +01:00
DynamoFox
f45478260e Fix missing share.js in public/app-dist folder; Delete unused public/app folder (Docker build) 2022-12-12 21:39:10 +01:00
zadam
1bfd26ee8f release 0.57.4 2022-12-11 23:24:24 +01:00
zadam
bbdb7375ff
Merge pull request #3406 from deajan/fix-powershell-exec-policy
Fix powershell exec policy
2022-12-11 23:16:37 +01:00
zadam
23322455a3 mobile layout now has launchbar 2022-12-11 22:26:18 +01:00
zadam
c1d4d3fc8a mobile layout improvements 2022-12-11 21:27:03 +01:00
Orsiris de Jong
fc40e54261 Remove unnecessary powershell scripts 2022-12-11 18:24:29 +01:00
Orsiris de Jong
87e833d373 Use inline powershell launcher, add unicode support for batch 2022-12-11 18:23:50 +01:00
zadam
dcfa9c4c0b mobile layout has floating buttons 2022-12-11 13:54:12 +01:00
zadam
c231b3cb79 styling changes of buttons 2022-12-11 13:20:37 +01:00
zadam
1f468f81cc Merge remote-tracking branch 'origin/next58' into next58
# Conflicts:
#	src/public/app/components/note_context.js
2022-12-10 14:37:02 +01:00
zadam
494f8d2153 fix reopening the very last tab, closes #3397 2022-12-10 14:35:58 +01:00
zadam
0f822b2761 global note map should not rehoist 2022-12-09 16:54:22 +01:00
zadam
5ac332960e note launchers by default open in the active note context but follow the same logic with ctrl/middle click as links 2022-12-09 16:48:00 +01:00
zadam
dfb462cf35 introduced new exception classes for structured error reporting 2022-12-09 16:13:22 +01:00
zadam
342ae6e5e2 introduced new exception classes for structured error reporting 2022-12-09 16:04:13 +01:00
zadam
eaf195e0c8 Merge remote-tracking branch 'origin/stable' into next58 2022-12-09 15:19:06 +01:00
zadam
9460cfdc55 Merge remote-tracking branch 'origin/master' into next58 2022-12-09 15:18:51 +01:00
zadam
c44bc60667 when opening a note from hidden subtree, make sure we're hoisted 2022-12-08 23:36:49 +01:00
zadam
8d6801bb85 new split should keep the hoisted note 2022-12-08 23:29:08 +01:00
zadam
c22b6b29e0 options fixes 2022-12-08 15:29:14 +01:00
zadam
44997f5cd1 options fixes 2022-12-08 15:18:41 +01:00
zadam
95f4195ca7 shortcuts layout fix 2022-12-08 14:27:21 +01:00
zadam
73eb585398 fixed migrations 2022-12-08 13:45:56 +01:00
DynamoFox
57d381b990 Fix missing boxicons icons; Add missing boxicons LICENSE file from upstream
(cherry picked from commit d06d4ba4373d6ccce72a656c809a9f9928796c15)
2022-12-08 00:01:09 +01:00
zadam
e5ba6ff496
Merge pull request #3394 from DynamoFox/fix-missing-boxicons-icons
Fix missing boxicons icons; Add missing boxicons LICENSE file from upstream
2022-12-08 00:00:20 +01:00
zadam
128023d34e attempt to fix the ws crash, #3374 2022-12-07 23:58:22 +01:00
zadam
653f80f7d8 WIP 2022-12-07 23:37:40 +01:00
DynamoFox
d06d4ba437 Fix missing boxicons icons; Add missing boxicons LICENSE file from upstream 2022-12-07 20:32:19 +01:00
zadam
2a68bdb690 raw conversion of all options tabs 2022-12-07 16:02:08 +01:00
zadam
5f6a10ef22 options widget work 2022-12-07 15:37:53 +01:00
zadam
2ad19ddd36 generate hidden subtree declaratively 2022-12-07 12:46:41 +01:00
zadam
5fc9f5f3f9 improvements 2022-12-06 23:48:44 +01:00
zadam
b9632a7814 rename note types to camelCase 2022-12-06 23:01:42 +01:00
zadam
f336435adb appearance options broken up into individual widgets 2022-12-06 22:43:35 +01:00
zadam
9e83368f87 appearance tab in hidden subtree 2022-12-06 17:05:21 +01:00
zadam
d619a7a2d7 rename "widget" type to "content-widget" 2022-12-06 16:23:49 +01:00
zadam
012fb1f50b rename "widget" type to "content-widget" 2022-12-06 16:23:30 +01:00
zadam
d64b575e60 added isBeingDeleted to be able to recognize that note is being deleted while still leaving it accessible 2022-12-06 16:11:43 +01:00
zadam
aec2c2d5cd appearance options as a special note 2022-12-05 23:57:29 +01:00
zadam
0d06d5ccee dump-db should not contain node_modules in release artifacts 2022-12-04 23:49:16 +01:00
zadam
74fdaad032 mobile fix 2022-12-04 22:59:09 +01:00
zadam
d3bf0c1d8e bookmark migration 2022-12-04 20:05:18 +01:00
zadam
27ce273d29 bookmarks use cloning 2022-12-04 13:16:05 +01:00
zadam
cd60ad4267 improvements 2022-12-03 21:11:49 +01:00
zadam
56e01046c8 Merge branch 'master' into next58 2022-12-03 13:28:21 +01:00
zadam
518a413de7 fix internal link creation, closes #3376 2022-12-03 13:26:33 +01:00
zadam
29923af17d Merge remote-tracking branch 'origin/next58' into next58 2022-12-03 13:01:10 +01:00
zadam
99a5774148 Merge branch 'master' into next58
# Conflicts:
#	package-lock.json
2022-12-03 13:01:03 +01:00
zadam
46fdd15857 release 0.57.3 2022-12-02 22:44:40 +01:00
zadam
42cd333694 clarification on the 5 minute sync auth leeway 2022-12-02 22:12:07 +01:00
zadam
aaa69f696b Merge remote-tracking branch 'origin/master' 2022-12-02 22:07:41 +01:00
zadam
8ce9dcf4aa fix webmanifest and robots.txt 2022-12-02 22:06:18 +01:00
zadam
130ded91ff
Merge pull request #3375 from DynamoFox/fix-dockerfile-to-generate-webpack-bundle
Fix missing webpack bundle generation in Docker container build
2022-12-02 21:09:50 +01:00
DynamoFox
851465da62 Fix missing webpack bundle generation in Docker container build 2022-12-02 18:15:03 +01:00
zadam
b85f335561 launcher improvements 2022-12-02 16:46:14 +01:00
zadam
7b36709e18 Merge remote-tracking branch 'origin/master' into next58 2022-12-02 15:28:04 +01:00
zadam
0d50cdb0f5 Merge remote-tracking branch 'origin/next58' into next58 2022-12-02 15:27:30 +01:00
zadam
eec2ff043e Merge branch 'master' into next58 2022-12-02 15:27:09 +01:00
zadam
0480f391d3 release 0.57.2 2022-12-01 22:56:29 +01:00
zadam
36c98e919a fix cursor jumping problem when having same note open in two tabs, closes #3365 2022-12-01 22:50:53 +01:00
zadam
0e68e8069b launcher improvements 2022-12-01 16:22:04 +01:00
zadam
7aa801fc1f notes with #keyboardShortcut don't need reload to take effect 2022-12-01 13:24:34 +01:00
zadam
fc080f785b moving components to its own directory 2022-12-01 13:07:23 +01:00
zadam
1a6c9be065 renamed shortcuts to launchers 2022-12-01 10:16:57 +01:00
zadam
b55c2d3dbc shortcut improvements 2022-12-01 10:03:04 +01:00
zadam
720fb0f73e refactorted shortcut handling into a service 2022-12-01 00:17:15 +01:00
zadam
0985314fb7 shortcut improvements 2022-11-30 16:57:51 +01:00
zadam
e759b4846a shortcut improvements 2022-11-29 16:16:57 +01:00
zadam
dacc2444c4
Merge pull request #3357 from agentydragon/stuff
Add Ctrl+PgUp/Dn for tab switching, pointer to Electron docs
2022-11-29 00:06:03 +01:00
zadam
8ea3608bf1 each stripped tag will be replace by a space, #3355 2022-11-29 00:00:45 +01:00
zadam
eecfce3cc9 shortcuts use templates 2022-11-28 23:39:23 +01:00
Rai
a402c79287 Add Ctrl+PgUp/Dn for tab switching, pointer to Electron docs 2022-11-27 19:33:05 -08:00
zadam
a459230aa9 shortcuts improvements 2022-11-27 23:43:25 +01:00
zadam
e4f57ab2fe fix path resolution bug when path is outside of hosted subtree 2022-11-27 15:50:01 +01:00
zadam
6a9ac6f90a shortcuts improvements 2022-11-26 14:57:39 +01:00
zadam
6883b71ce7 shortcut improvements 2022-11-25 15:29:57 +01:00
zadam
70552d58ac global menu styling improvements 2022-11-25 09:21:56 +01:00
zadam
c7bda4d0be global menu ref 2022-11-24 22:59:09 +01:00
zadam
e4e20c8007 Revert "open window before loading becca"
This reverts commit 2fbcd9aaf758c99bc59f81f524faa3e703aff227.
2022-11-23 23:49:49 +01:00
zadam
2fbcd9aaf7 open window before loading becca 2022-11-23 23:31:05 +01:00
zadam
ee667634ab Merge branch 'stable' 2022-11-23 22:48:52 +01:00
zadam
7a8c69a6f9 fix jumping cursor position after closing a dialog, fixes #3325 2022-11-23 22:48:32 +01:00
zadam
723db97094 fix jumping cursor position after closing a dialog, fixes #3325 2022-11-23 22:47:20 +01:00
zadam
65be882b49 optimize initial render 2022-11-22 23:53:08 +01:00
zadam
48765cc87d optimize initial render 2022-11-22 22:45:50 +01:00
zadam
e2f6191229 upgrades 2022-11-22 20:48:04 +01:00
zadam
19126b7c6d Merge branch 'master' into next58
# Conflicts:
#	libraries/ckeditor/ckeditor.js
#	libraries/ckeditor/ckeditor.js.map
#	package-lock.json
#	package.json
#	src/public/app/layouts/desktop_layout.js
2022-11-22 20:46:08 +01:00
zadam
a76bef1a28 docker should use webpacked frontend files, fixes #3322 2022-11-21 21:15:04 +01:00
zadam
a259bd8c3a release 0.57.1-beta 2022-11-20 23:43:38 +01:00
zadam
4001953fd7 Merge remote-tracking branch 'origin/master' 2022-11-20 23:43:31 +01:00
zadam
9a6df54832 release 0.57.1-beta 2022-11-20 23:43:17 +01:00
zadam
29327bbc5d
Merge pull request #3333 from DynamoFox/rate-limit-other-auth-routes
Rate limit some more ETAPI auth routes; loginRateLimiter now doesn't count successful auth to ETAPI routes
2022-11-20 23:35:10 +01:00
zadam
bcb3a707f4 option tabs refactored 2022-11-20 23:20:42 +01:00
zadam
0a67af4f46 refactoring option templates to use "options-section" class 2022-11-20 20:33:50 +01:00
zadam
b3c0b36ba6 refactor imageoptions to use updateOption() 2022-11-20 20:11:27 +01:00
zadam
a3783b0113 options dialog refactoring into more standard widget structure 2022-11-20 18:29:15 +01:00
DynamoFox
059dca905c Rate limit some more ETAPI auth routes; loginRateLimiter now doesn't count successful auth to ETAPI routes 2022-11-19 18:45:26 +01:00
zadam
02d908df1e added option to disable tray, closes #2612 2022-11-18 21:47:14 +01:00
zadam
1a95e459eb moved options to new tabs Images/Spellcheck 2022-11-18 21:38:36 +01:00
zadam
ae0c5a0c09 moved auto read only options to code/text tabs 2022-11-18 21:27:25 +01:00
zadam
6f238f5f1a create "disableTray" option 2022-11-18 21:08:32 +01:00
zadam
6cec8bcda8 "erase" button to the right 2022-11-17 23:14:01 +01:00
zadam
d388b4d814 add "erase all deleted notes now" also to recent changes 2022-11-17 23:12:36 +01:00
zadam
d9dac00a01 add TRILIUM_NO_UPLOAD_LIMIT to disable the upload limit, #3164 2022-11-17 22:54:45 +01:00
zadam
4961d9bb89 avoid errors on dead backlinks, #3289 2022-11-14 21:03:14 +01:00
zadam
89e319c7a2 fix backlink generation for drag & dropped links, fixes #3314 2022-11-14 20:30:52 +01:00
zadam
f7e56cbffe release 0.57.0-beta 2022-11-12 20:40:45 +01:00
zadam
3f115a7657 api docs 2022-11-12 20:40:40 +01:00
zadam
8fad8a1ce9 enabled advanced list features, fixes #3308 2022-11-10 23:22:37 +01:00
zadam
1b242a905b use CMD/meta key for opening link in a new tab on mac, #3303 2022-11-10 23:16:41 +01:00
zadam
c6e766f5c6 added a context menu for image to copy, #1954 2022-11-09 23:41:25 +01:00
zadam
055bd77bd6 Remove "Content of this note cannot be displayed" in the book format, fixes #3301 2022-11-08 23:06:56 +01:00
zadam
76f34e3eaf small tweaks of linewrap option 2022-11-08 22:55:11 +01:00
zadam
acf3f5013c
Merge pull request #3299 from Banbury/code-options-linebreak
Added option to toggle line wrapping for Code notes
2022-11-08 22:49:02 +01:00
zadam
7f6edefad4 note about using password to login to web, #3297 2022-11-08 22:42:36 +01:00
zadam
60fc621cd4 add keyboard action to force creating note revisions, #2147 2022-11-08 22:36:15 +01:00
zadam
bf4776a33c note hoisting should be done on "hovered", not active note, closes #2124 2022-11-08 22:19:16 +01:00
zadam
81a59f48e6 Merge remote-tracking branch 'origin/master' 2022-11-08 21:28:58 +01:00
zadam
68eb04741d remove console.log 2022-11-08 21:27:49 +01:00
Banbury
1037d814ec Added option to toggle line wrapping for Code notes 2022-11-08 14:48:17 +01:00
zadam
e201f3536a fix jsdoc for createNoteLink 2022-11-08 10:11:52 +01:00
zadam
3cb368c4de search link map will display only direct results 2022-11-07 23:56:53 +01:00
zadam
df9f6ce33a link map improvements 2022-11-07 23:19:38 +01:00
zadam
b3c87156c2 library upgrades 2022-11-07 21:26:13 +01:00
zadam
d29a633529 fix 2022-11-07 21:11:42 +01:00
zadam
c92b451033 cleanup of hidden notes 2022-11-06 15:18:32 +01:00
zadam
3122d0cc6b move share root to hidden subtree 2022-11-06 14:44:26 +01:00
zadam
f1eaa20e47 note map fixes 2022-11-06 14:38:41 +01:00
zadam
1d8b02055e Merge branch 'stable' 2022-11-06 14:24:37 +01:00
zadam
a7f4bf8289 fix updating note detail after change from another client, closes #3292 2022-11-06 14:19:40 +01:00
zadam
8b0c60a046 improvements to notemap in relation to search 2022-11-05 22:32:50 +01:00
zadam
3d4776f577 better titles in delete dialog, #3290 2022-11-05 15:30:15 +01:00
zadam
8a539dc514 don't filter on root hoisted note 2022-11-03 21:40:42 +01:00
zadam
a707e7abf4
Merge pull request #3288 from eliandoran/feature/filter_edited_notes_when_hoisted
Filter "Edited notes" when hoisted or in a workspace
2022-11-03 21:38:56 +01:00
zadam
0fc9b2f203 fix codemirror loading, closes #3282 2022-11-03 21:14:56 +01:00
Elian Doran
9a4b72606d Filter "Edited Notes" when hoisted or in a workspace
Previously, when the user opened a day note the "Edited Notes" section would indicate all
the notes edited in that day, regardless of whether the user was inside a workspace or
hoisted a note.

Now the "Edited Notes" section filters out the notes if the user has a hoisted note.
2022-11-03 20:28:56 +02:00
zadam
0a02e5be83 Merge remote-tracking branch 'origin/master' 2022-11-01 22:49:45 +01:00
zadam
2467464433 add possibility to define a share index, closes #3265 2022-11-01 22:49:37 +01:00
zadam
eb68ab6776 Merge branch 'stable' 2022-11-01 19:10:16 +01:00
zadam
44b85d252d fix paste after, closes #3276 2022-11-01 13:39:29 +01:00
zadam
38d6fddc61 redirect /share to /share/, closes #3264 2022-10-30 09:05:12 +01:00
zadam
299007f66e
Merge pull request #3256 from DeerTears/patch-1
Fix spelling mistake in README.md
2022-10-29 14:35:52 +02:00
Emberlynn Bland
47a92c8be8
Fix spelling mistake
"bult-in" -> "built-in"
2022-10-28 19:20:43 -06:00
zadam
9bc6cf7067
Merge pull request #3253 from nemec/master
Allow Mac users to close and re-open window
2022-10-28 20:08:38 +02:00
zadam
521d95021b fix refocusing find widget, closes #3252 2022-10-28 20:05:53 +02:00
Dan Nemec
5bc4d07aad Allow Mac users to close and re-open window 2022-10-27 19:59:41 -05:00
zadam
51aa9a0d6e Merge branch 'stable' 2022-10-27 23:04:55 +02:00
zadam
64d3ec940c release 0.56.2 2022-10-27 22:41:15 +02:00
zadam
6c37f2ce71 package-lock.json 2022-10-27 22:41:01 +02:00
zadam
75bd38885b use trilium version number in asset paths to avoid caching issues 2022-10-27 20:34:53 +02:00
zadam
b499640db8 use trilium version number in asset paths to avoid caching issues WIP 2022-10-26 23:50:54 +02:00
zadam
999a9da299 upgrade mermaid to 9.1.7
(cherry picked from commit 441a59305b514ce17e75c00824915171a3eb1cd8)
2022-10-26 20:16:16 +02:00
zadam
441a59305b upgrade mermaid to 9.1.7 2022-10-26 20:15:42 +02:00
zadam
b74f5a0a33 Merge branch 'stable' 2022-10-26 20:12:22 +02:00
zadam
7d732eb73b fix deleting note from task manager, closes #3239 2022-10-26 19:14:49 +02:00
zadam
44b68326a0 close hanging autocomplete on dialog close, fixes #3241 2022-10-26 16:52:44 +02:00
zadam
d5732d7731 api docs 2022-10-26 16:52:00 +02:00
zadam
4e3d48fe7d allow specifying rootNote for date API functions, #3237 2022-10-26 14:23:56 +02:00
zadam
c7acfd4d4e fix clicking internal link in the ckeditor toolbar, closes #3236 2022-10-26 14:11:20 +02:00
zadam
af6d738d56 updated boxicons to 2.1.4, update icon index + search also within term array, fixes #3233 2022-10-25 23:01:09 +02:00
zadam
06e6fec4ca increment db and sync version due to new note type 2022-10-23 21:16:15 +02:00
zadam
12943cc808 Merge branch 'master' into next57
# Conflicts:
#	package-lock.json
2022-10-23 21:13:09 +02:00
zadam
bbde7141b0 fix wrong display of included note in read only text, closes #3225 2022-10-23 14:34:37 +02:00
zadam
f6ad1c6aa7 release 0.56.1 2022-10-22 23:07:24 +02:00
zadam
c1127ec429 fix running of runOnNoteCreation hook, #3219 2022-10-22 21:34:38 +02:00
dependabot[bot]
6ec734df13
Bump json-schema and jsprim
Bumps [json-schema](https://github.com/kriszyp/json-schema) and [jsprim](https://github.com/joyent/node-jsprim). These dependencies needed to be updated together.

Updates `json-schema` from 0.2.3 to 0.4.0
- [Release notes](https://github.com/kriszyp/json-schema/releases)
- [Commits](https://github.com/kriszyp/json-schema/compare/v0.2.3...v0.4.0)

Updates `jsprim` from 1.4.1 to 1.4.2
- [Release notes](https://github.com/joyent/node-jsprim/releases)
- [Changelog](https://github.com/TritonDataCenter/node-jsprim/blob/v1.4.2/CHANGES.md)
- [Commits](https://github.com/joyent/node-jsprim/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: json-schema
  dependency-type: indirect
- dependency-name: jsprim
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-22 14:03:30 +00:00
zadam
867f7f3f59 don't display "workspace templates", #3219 2022-10-22 16:03:21 +02:00
zadam
1c52303bb3 don't display "workspace templates", #3219 2022-10-22 16:01:15 +02:00
zadam
876e6caa23 better handling of incorrect operators 2022-10-22 15:58:15 +02:00
zadam
34f07b4376 better inbox desc 2022-10-22 15:22:42 +02:00
zadam
ffc28c8485 better inbox desc 2022-10-22 15:22:03 +02:00
zadam
913e9ef6e0 Merge remote-tracking branch 'origin/master' 2022-10-22 15:01:17 +02:00
zadam
14fb9c76b0 fix backlinks in day note subtree, fixes #3158 2022-10-22 15:01:10 +02:00
zadam
c5435009d7
Merge pull request #3213 from agentydragon/both-protos
Check both http and https in DockerHealthcheck
2022-10-22 14:00:45 +02:00
Rai
1d3132e447 Check both http and https in DockerHealthcheck
I've been getting Docker reporting my Trilium container as unhealthy
because wget was trying to talk HTTP to it while it was expecting
HTTPS.
2022-10-20 23:29:23 -07:00
zadam
63eb22c7ac fix print color to black, closes #3202 2022-10-20 22:32:06 +02:00
zadam
657c54efd4 fix print color to black, closes #3202 2022-10-20 22:31:08 +02:00
zadam
4f1f632a7d fix activating notes in the hidden subtree 2022-10-16 23:11:46 +02:00
zadam
7e83d3a54d Merge remote-tracking branch 'origin/master' into next57 2022-10-16 21:25:03 +02:00
zadam
c11cf41f30 don't create app icon for flatpak/debian linux builds, fixes #3201 2022-10-16 20:52:10 +02:00
zadam
8d30d5d689 Merge remote-tracking branch 'origin/master' into next57 2022-10-16 11:24:24 +02:00
zadam
01910d3231 flathub release script 2022-10-15 21:09:27 +02:00
zadam
e22af42cd0 release 0.56.0-beta 2022-10-15 12:49:56 +02:00
zadam
70c9292413 codemirror 5.65.9 2022-10-15 12:22:09 +02:00
zadam
c16f7a5e02 Merge branch 'master' into next55
# Conflicts:
#	electron.js
#	package-lock.json
#	package.json
#	src/public/app/layouts/desktop_layout.js
#	src/public/app/widgets/note_tree.js
#	src/services/port.js
2022-10-15 12:09:25 +02:00
zadam
b9c22fcbc8 Merge remote-tracking branch 'origin/master' 2022-10-15 12:03:13 +02:00
zadam
4012ec7498 Merge branch 'stable'
# Conflicts:
#	src/public/app/widgets/attribute_widgets/attribute_detail.js
2022-10-15 12:03:03 +02:00
zadam
7d6d466284
Merge pull request #3199 from DaiYuANg/master
update pwa manifest support deploy in sub folder
2022-10-15 12:00:41 +02:00
DaiYuANg
36842f4a58 update pwa manifest support deploy in sub folder 2022-10-15 13:01:48 +08:00
zadam
dc62cf4805 ckeditor 35.2.1 2022-10-14 22:39:28 +02:00
zadam
ed8acc7ee3 switch-server, switch-electron npm scripts to ease rebuilding better-sqlite3 2022-10-14 21:59:43 +02:00
zadam
4116fe0a20 fix propagation of noteTypeMimeChanged event to global scope to fix e.g. edit button switching depending on note type 2022-10-14 20:36:40 +02:00
zadam
a4e99662cb edit button should get refreshed based on type change 2022-10-13 23:52:53 +02:00
zadam
c6d4eb486e fix toc with > 10 items on the same level, closes #3182 2022-10-09 22:20:11 +02:00
zadam
c2308b7a5d fix comment 2022-10-09 21:34:01 +02:00
zadam
3e07c08043 basic auth etapi should require "etapi" username 2022-10-09 21:33:32 +02:00
zadam
5a3c50d9fb extra null relation checks in notemap 2022-10-08 22:24:58 +02:00
zadam
3e4a9f63fa support basic auth in ETAPI 2022-10-08 20:59:11 +02:00
zadam
6d4ef4ee3d improved error handling of wrong port configuration, #3177 2022-10-01 15:32:30 +02:00
zadam
20ff5627d8 ckeditor 35.1.0 2022-09-28 22:55:53 +02:00
zadam
1d26fd6bf0 added "note color" 2022-09-25 14:19:30 +02:00
zadam
a9c0daa51a FIXME comment on virtual branches 2022-09-24 23:03:38 +02:00
zadam
e3b2bbdca5 Merge remote-tracking branch 'origin/master' 2022-09-24 22:38:27 +02:00
zadam
d905f7cc26 include icon into reference links 2022-09-24 22:38:20 +02:00
zadam
fe3f24cdb0
Merge pull request #3161 from oc013/docker-compose-example
Update docker-compose sample to use node user home dir and pull directly from docker hub
2022-09-24 13:14:28 +02:00
oc013
971c709e87
Update docker-compose sample to use node user home dir 2022-09-23 21:12:50 -04:00
zadam
7f78937543 keyboardShortcut attr detail help 2022-09-23 22:51:17 +02:00
zadam
41dac2bd1b keyboardShortcut attr detail help 2022-09-23 22:50:49 +02:00
zadam
85bf2a5706 fix hidden backlinks, closes #3158 2022-09-22 23:29:20 +02:00
zadam
ce7937a3a3 Merge remote-tracking branch 'origin/master' 2022-09-22 22:53:29 +02:00
zadam
7bb9d33245 0 offset of context menu, fixes #3157 2022-09-22 22:53:22 +02:00
zadam
1be89c094b
Merge pull request #3153 from charlesdagenais/master
improve "open" button behaviour for files when in browser
2022-09-22 22:48:33 +02:00
Charles Dagenais
73ad557784 improve "open" button behaviour for files when in browser 2022-09-21 21:56:59 -04:00
zadam
9f744153e3 fix TODO script example 2022-09-22 00:00:32 +02:00
zadam
0c196ae3a5 fix deleting / erasing note 2022-09-21 23:58:54 +02:00
Sylvain Pasche
a904e82d72 use same variable as Firefox for scrollbar thumb
Use --active-item-background-color variable for scrollbar thumb
background color on WebKit browsers (which is already used for Firefox).
This should improve visibility of the scrollbar.
2022-09-21 23:29:17 +02:00
zadam
15ed381f85 release 0.55.1 2022-09-21 22:43:34 +02:00
zadam
180051d252 added "scrolling-container" class, fixes #3147 2022-09-19 23:15:54 +02:00
zadam
a19c58703f Merge remote-tracking branch 'origin/master' 2022-09-19 23:12:20 +02:00
zadam
fc43d9222a fix erasing notes - becca should be reloaded afterwards, closes #3146 2022-09-19 23:12:12 +02:00
zadam
af6bf08243
Merge pull request #3143 from charlesdagenais/master
add file properties widget in mobile layout
2022-09-19 22:44:23 +02:00
zadam
fb6a0bc2a6
Merge pull request #3142 from spasche/zip-import-skip-bad-url
let import continue when malformed URLs are encountered
2022-09-19 22:42:31 +02:00
Charles Dagenais
1f61c1b3b6 add file properties info in mobile view 2022-09-18 12:40:00 -04:00
Sylvain Pasche
fc69f3b8f3 let import continue when malformed URLs are encountered
In case of malformed URLs in imported HTML, keep original URL instead
of having the import get stuck.
2022-09-18 18:18:42 +02:00
zadam
d4658b9c2a bring back the possibility to close the floating buttons again, closes #3116 2022-09-18 14:57:44 +02:00
zadam
84f72edf1d use button CSS variables in more places 2022-09-18 13:52:19 +02:00
zadam
552d872047 more standard window-all-closed handling 2022-09-18 10:05:49 +02:00
zadam
47235965d5 api log close button 2022-09-18 08:48:01 +02:00
zadam
24e4455e91 Merge remote-tracking branch 'origin/master' 2022-09-17 23:06:43 +02:00
zadam
ea35b0c800 Merge branch 'api-log-capture' 2022-09-17 23:06:42 +02:00
zadam
1a30087426 api log implementation 2022-09-17 23:06:17 +02:00
zadam
5e9d004ca2
Merge pull request #3139 from jph/add-methods-to-etapi-spec
Add another ETAPI method to the api spec file.
2022-09-17 14:13:31 +02:00
jph
513d1c020c Add another ETAPI method to the api spec file. 2022-09-17 10:47:44 +10:00
zadam
05231bd1c2 stop #workspaceTemplate from being inherited (should have the same special behavior as #template) 2022-09-16 23:03:02 +02:00
zadam
b816773d02 add #workspaceTemplate which works as workspace-scoped template, closes #3137 2022-09-16 22:44:52 +02:00
zadam
3c49ea6cb1 make context sub-menu scrollable, fix #3136 2022-09-16 22:12:09 +02:00
zadam
539eac4be7
Merge pull request #3134 from jph/add-note-content-to-api-spec
Add get note content to ETAPI spec
2022-09-16 21:08:53 +02:00
James Hynes
8a6ead6d86 fix a couple of api shortcomings
* add note content to openapi spec file
* add test for get note content api endpoint
2022-09-16 13:18:01 +10:00
zadam
01a7ed8311 fix zooming in server install 2022-09-15 23:10:54 +02:00
zadam
cf6330dee6 allow deleting notes from note actions button, closes #3131 2022-09-15 23:09:24 +02:00
zadam
6c39b6f548 fix "excludeFromNoteMap" on journal instead of "excludeFromTreeMap" 2022-09-15 00:04:26 +02:00
zadam
e7ef1b86cc zoom buttons in main menu, closes #2894 2022-09-14 23:28:29 +02:00
zadam
3663d56917 api log capture WIP 2022-09-14 16:50:52 +02:00
zadam
135064a18f drag & drop from tree will insert links to notes, closes #227 2022-09-13 23:36:59 +02:00
zadam
7233f58767 flatpak release script fixes 2022-09-12 23:14:00 +02:00
zadam
78238381a7 release 0.55.0-beta 2022-09-12 22:37:41 +02:00
zadam
ca03c41205 flatpak release script should support beta channel 2022-09-12 22:35:22 +02:00
zadam
9b8474a728 Merge branch 'stable'
# Conflicts:
#	package-lock.json
2022-09-12 21:44:49 +02:00
zadam
ecfce409d8 fix "ghost split", closes #3115 2022-09-07 23:39:35 +02:00
zadam
b091e2222e separated editable code buttons into separate widget which also fixes scrolling issue 2022-09-04 23:09:42 +02:00
zadam
e8b8198eb8 added Montserrat-Regular.ttf to fix boldness on mac, closes #3094 2022-09-04 16:50:45 +02:00
zadam
261f1f0bf2 fix electron 2022-09-04 14:01:34 +02:00
zadam
8588ed5eec remove port scanning for an available port #3036 2022-09-04 14:00:39 +02:00
zadam
f161488c13 focus existing window on port conflict, closes #3036 2022-09-04 14:00:34 +02:00
zadam
563808144e small fixes to tray and closing windows 2022-09-04 13:59:58 +02:00
zadam
3c1f826ead add support for the persistent #sortDirection and #sortFoldersFirst (one time UI action exists), closes #3046 2022-09-04 13:59:34 +02:00
zadam
b2a63afc28 limit max imported file size to 250 MiB, #3108 2022-09-03 15:11:03 +02:00
zadam
86d3a695ac fix handling of parenthesis without explicit AND operator, closes #3096 2022-08-28 14:40:24 +02:00
zadam
7f566178d3
Merge pull request #3095 from agentydragon/trilium-docs-noformat
Add some docs to note.js
2022-08-28 13:51:33 +02:00
Rai
4af55d055e revert 2022-08-27 13:46:16 -07:00
Rai
be000be960 Merge branch 'master' into trilium-docs-noformat 2022-08-27 13:45:22 -07:00
Rai
afb6180cce update docs 2022-08-27 13:42:44 -07:00
Rai
d63156a0d6 Add some docs to note.js (for backend scripting docs) 2022-08-27 13:40:01 -07:00
zadam
2556cd5aaa fix share.js in case there's no menu 2022-08-27 21:34:21 +02:00
zadam
7109a12afd Merge branch 'stable'
# Conflicts:
#	bin/release-flatpack.sh
2022-08-27 13:19:29 +02:00
zadam
700e9fd912 fix release-flatpack.sh 2022-08-26 23:52:09 +02:00
zadam
6547b66228 release 0.54.3 2022-08-26 22:16:49 +02:00
zadam
e9090b9154 added a release flatpack script
(cherry picked from commit e70a7bad1af3b3287217bc603c896226a66e9ea3)
2022-08-26 22:09:48 +02:00
zadam
5b73fe949e defensive programming, #3089 2022-08-26 22:08:05 +02:00
zadam
35fab7a23c fixes overwriting attributes after clicking on a relation in the attribute editor, closes #3090 2022-08-26 22:02:40 +02:00
zadam
bf6d79f4ad
Merge pull request #3088 from DynamoFox/fix-update-button-if-update-checking-is-disabled
Fix the update to latest version button in the dropdown menu if update checking is disabled
2022-08-24 23:24:19 +02:00
zadam
24286c2a6c remove all alert() usages, fixes #3086 2022-08-24 23:20:05 +02:00
DynamoFox
09641d9465 Fix the update to latest version button in the dropdown menu, now it doesn't appear at all if update checking was disabled 2022-08-24 22:07:04 +02:00
zadam
e70a7bad1a added a release flatpack script 2022-08-23 23:48:13 +02:00
zadam
d386966342 Merge remote-tracking branch 'origin/master' 2022-08-23 22:32:43 +02:00
zadam
09cfaeb9c4 focus autocomplete on new tab even if there are workspaces, fixes #3083 2022-08-23 22:32:27 +02:00
zadam
934b1ad8c6
Merge pull request #3080 from DynamoFox/rate-limit-etapi-login-route
Rate limit the /auth/login route of ETAPI
2022-08-22 19:37:59 +02:00
zadam
80dcb45415 disable compression for electron / desktop builds 2022-08-22 19:29:58 +02:00
zadam
ad8b7f67b1 Merge remote-tracking branch 'origin/master' 2022-08-22 19:27:43 +02:00
zadam
67b8f3206c
Merge pull request #3078 from sigaloid/master
Add compression middleware
2022-08-22 19:27:16 +02:00
DynamoFox
b965f77f4a Rate limit the /auth/login route of ETAPI 2022-08-22 11:50:58 +02:00
sigaloid
84fc00465e Fix minor typo 2022-08-20 20:33:10 -04:00
Matt
9b0c8a19f9
Merge branch 'zadam:master' into master 2022-08-20 21:30:54 +00:00
sigaloid
8e7d26bf4f Add compression 2022-08-20 17:30:35 -04:00
zadam
df351a8d09 trilium safe mode now disables GPU usage 2022-08-20 22:39:59 +02:00
zadam
9ce0421ae7
Merge pull request #3075 from sigaloid/master
Filter excludeFromNoteMap from backlinks
2022-08-20 22:31:37 +02:00
sigaloid
c85ec957ec Filter excludeFromNoteMap from backlinks 2022-08-18 23:12:58 -04:00
zadam
e93dd176c0
Merge pull request #3074 from sigaloid/master
Add shareDescription tag for HTML meta tags
2022-08-18 23:11:56 +02:00
sigaloid
10676a8d0c Add shareDescription 2022-08-17 15:18:34 -04:00
zadam
8abcf571e8 fixes for undefined parent note #3066 2022-08-16 23:46:56 +02:00
zadam
78bca2477d fix creating virtual "none" note in becca, closes #3066 2022-08-16 23:38:11 +02:00
zadam
f241bc564c
Merge pull request #3065 from sigaloid/master
Add Flatpak to README
2022-08-15 23:46:40 +02:00
sigaloid
65942213de Add Flatpak to README 2022-08-15 12:01:55 -04:00
zadam
28f620d51d update demo document, closes #3061 2022-08-14 15:05:10 +02:00
zadam
aebdbdf8be fix falsy check in setting custom widget positions, closes #3060 2022-08-14 15:00:18 +02:00
zadam
bb3734052a
Merge pull request #3058 from eliandoran/bugfix/upload_filename_encoding
Fix UTF-8 file name encoding for uploads (fixes #3013)
2022-08-14 14:53:44 +02:00
zadam
9a691c8227
Merge pull request #3057 from eliandoran/bugfix/max_content_width
Fix max content width not working (fixes #3056)
2022-08-14 14:52:49 +02:00
zadam
3bd2732cee
Merge pull request #3059 from eliandoran/bugfix/relation_map_crash
Fix relation map crash on missing inverse pair (fixes #3055)
2022-08-14 14:50:52 +02:00
Elian Doran
ddb57e35f3 Fix relation map crash on missing inverse pair (fixes #3055) 2022-08-14 04:30:00 +03:00
Elian Doran
d1f3ce0957 Fix UTF-8 file name encoding for uploads (fixes #3013) 2022-08-14 04:14:34 +03:00
Elian Doran
d73da33b08 Fix max content width not working (fixes #3056) 2022-08-14 02:43:09 +03:00
zadam
201ef7fcd5 fix "show recent note" button, closes #3051 2022-08-09 21:49:37 +02:00
zadam
5705efc998 fix electron 2022-08-09 21:34:18 +02:00
zadam
2694bcff67 launchbar WIP 2022-08-08 23:13:31 +02:00
zadam
df7c089344 Merge branch 'master' into next55 2022-08-08 20:45:35 +02:00
zadam
6dee1f38f7
Merge pull request #3048 from DaiYuANg/master
add manifest.webmanifest into desktop make pwa install on ipad
2022-08-08 20:28:29 +02:00
DaiYuANg
87e2f50c6d add manifest.webmanifest into desktop make pwa install on ipad 2022-08-08 21:51:04 +08:00
zadam
616e2c1c29 add support for the persistent #sortDirection and #sortFoldersFirst (one time UI action exists), closes #3046 2022-08-07 23:51:23 +02:00
zadam
2335e40262 release 0.54.2 2022-08-07 23:20:59 +02:00
zadam
3a07c5fcc0 release 0.54.2 2022-08-07 23:18:03 +02:00
zadam
3c26e00fe1 launchbar WIP 2022-08-07 15:34:59 +02:00
zadam
fc920becac launchbar WIP 2022-08-07 13:23:03 +02:00
zadam
8d608c3c1c launchbar WIP 2022-08-06 23:49:25 +02:00
zadam
08aa65bddb launchbar WIP 2022-08-06 15:00:56 +02:00
zadam
54900b35dc launchbar WIP 2022-08-06 13:47:27 +02:00
zadam
7696702a2a launchbar WIP 2022-08-05 19:15:28 +02:00
zadam
42cade17cb launchbar WIP 2022-08-05 16:44:26 +02:00
zadam
7565458332 launchbar WIP 2022-08-04 23:00:32 +02:00
zadam
b86dbc088d small fixes to tray and closing windows 2022-08-04 21:19:57 +02:00
zadam
0681ec9057
Merge pull request #3038 from DynamoFox/support-reverse-proxy-trust
Add optional support to trust reverse proxies (via X-Forwarded-For)
2022-08-04 21:14:48 +02:00
DynamoFox
912f79f1af Add optional support to trust reverse proxies (via X-Forwarded-For) 2022-08-04 00:19:54 +02:00
zadam
82c596d1e3 Merge branch 'master' into next55 2022-08-03 22:23:58 +02:00
zadam
b6f1611218 less accented backlinks background (in dark mode esp.) 2022-08-03 19:24:26 +02:00
zadam
869c910801 fix "bulk actions" dialog title 2022-08-03 19:17:13 +02:00
zadam
b3097b59c7 remove port scanning for an available port #3036 2022-08-03 00:19:29 +02:00
zadam
5ec359e929 focus existing window on port conflict, closes #3036 2022-08-02 22:53:06 +02:00
zadam
ffd73c0e57 release 0.54.1-beta 2022-08-02 21:56:34 +02:00
zadam
12af3d05f0 hoisted note should be expanded after tree collapse 2022-08-02 20:38:48 +02:00
zadam
30b2d15f3d fix creating new calendar on each date note request 2022-08-02 18:25:05 +02:00
zadam
23c06ebed8 fix backend script error reporting, closes #3033 2022-08-02 18:15:54 +02:00
zadam
8acd3851b0 cssClass label cannot be applied on the root widget because of note splits, fixes #3032 2022-08-02 17:33:52 +02:00
zadam
1f6222a653 fix notemap resize + upgrade of force-graph 2022-08-02 17:17:27 +02:00
zadam
8a39699acd fix note map with noteId = 'none' 2022-08-02 17:01:49 +02:00
zadam
dff2d3e989 launchbar WIP 2022-08-02 17:01:09 +02:00
zadam
53affed8d3 fix note map with noteId = 'none' 2022-08-02 17:00:47 +02:00
zadam
a316ac5b35 fix docker build 2022-08-02 00:20:08 +02:00
zadam
aed0a8126c release 0.54.0-beta 2022-08-01 22:37:40 +02:00
zadam
edff1be16d added 197 NOOP migration to make sure the old versions don't attempt to process protected notes with 16 byte IV 2022-08-01 22:28:02 +02:00
zadam
0beee408cf fix following links with no href 2022-08-01 22:26:03 +02:00
zadam
e5fdd5128a fix password protected notes rejection 2022-08-01 19:56:09 +02:00
zadam
46deceedc9 optional basic auth for shared notes, closes #2781 2022-07-31 21:45:32 +02:00
zadam
3ebfaec1bc allow per workspace calendars, fixes #2959 2022-07-31 09:33:14 +02:00
zadam
4c93334d90 fix focusing ribbon tabs when using keyboard navigation on the tree 2022-07-30 23:43:20 +02:00
zadam
7c90f1a56d increasing DB and sync version because of encryption IV change 2022-07-30 23:29:30 +02:00
zadam
c727a2bc1b fix error message on removing bulk actions from search, closes #3027 2022-07-30 14:06:25 +02:00
zadam
6c43b92bf1 mermaid export button WIP 2022-07-29 00:32:28 +02:00
zadam
ef6b7a85d5 don't display mermaid if the note is encrypted without protected session 2022-07-28 23:59:41 +02:00
zadam
6d990de450 Merge remote-tracking branch 'origin/stable' 2022-07-28 23:48:05 +02:00
zadam
91bc9eec93 cleanup 2022-07-28 22:44:55 +02:00
zadam
698ffd886d cleanup 2022-07-28 22:44:28 +02:00
zadam
5a37547b37 use 16 bytes IV for newly encrypted data, closes #3017 2022-07-28 22:42:02 +02:00
zadam
80887fd3c1 export notes via ETAPI, #3012 2022-07-24 21:30:29 +02:00
zadam
5444cc2009 floating button container WIP 2022-07-24 14:30:42 +02:00
zadam
b8a89ee52a rename "backlinks.js" as it's not liked by some adblockers, #3003 2022-07-21 21:46:47 +02:00
zadam
bed0db9fa0 prevent zooming the whole app when ctrl + zoom on the canvas note, fixes #3002 2022-07-20 23:39:40 +02:00
zadam
1afa32502f add CSS variables for CKEditor table caption, fixes #2998 2022-07-20 23:22:07 +02:00
zadam
d825a1a45a remove checkForUpdates from login screen 2022-07-20 00:11:12 +02:00
zadam
0e41f9d1bc
Merge pull request #3000 from sigaloid/master
Add config setting to disable update check
2022-07-20 00:05:34 +02:00
zadam
0f92468ab2 bootstrap 4.6.2 2022-07-20 00:03:21 +02:00
zadam
f890e9917f add #toc label to control Table of Contents visibility per note, #2985 2022-07-19 23:56:29 +02:00
zadam
8902cb3117 prevent paste on middle click, fixes #2995 2022-07-19 23:41:22 +02:00
zadam
61a0397963 Merge remote-tracking branch 'origin/master' 2022-07-19 23:32:21 +02:00
zadam
8f5983fa01 add jsdocs to note.cloneTo, closes #2996 2022-07-19 23:32:03 +02:00
sigaloid
fb1b6ea34a Fix login setting 2022-07-19 17:08:58 -04:00
sigaloid
cce55eee63 Make updates default checked 2022-07-19 16:59:27 -04:00
sigaloid
20975fc635 Add option to check for updates when setting up server 2022-07-19 16:55:57 -04:00
sigaloid
e42c527a19 Add default setting 2022-07-19 16:23:10 -04:00
sigaloid
500946c10b Fix type 2022-07-19 16:09:59 -04:00
sigaloid
f3662d1048 Add network configuration 2022-07-19 16:01:27 -04:00
zadam
82d71797a7
Merge pull request #2994 from thfrei/excalidraw-v012
wip: Excalidraw Upgrade v0.11-v0.12
2022-07-17 21:09:27 +02:00
Tom Free
e82fa5ee82 better comments for constructor 2022-07-17 14:16:17 +02:00
Tom Free
3e7aa3d762 remove obsolete code, update doc 2022-07-17 14:09:58 +02:00
zadam
57c5b6d61f added an option to define a "min TOC headings", #2985 2022-07-16 00:15:45 +02:00
zadam
e6358afb62 mitigate flickering in note tooltip, #2988 2022-07-15 23:35:17 +02:00
Tom Free
4ca59dcc5c upgrade to excalidraw v0.12, fix breaking changes 2022-07-14 23:49:30 +02:00
zadam
9114b1befb make sure the headings in TOC contain text only, https://github.com/zadam/trilium-web-clipper/issues/42 2022-07-14 23:39:16 +02:00
zadam
52812c27a1 useMaxWidth for mermaid pie widget, fixes #2984 2022-07-14 23:00:35 +02:00
zadam
377922eccf added getTargetNote to froca's attribute, fixes #2981 2022-07-11 23:15:16 +02:00
zadam
0d2a112839 fix build revision in the about dialog, closes #2980 2022-07-11 23:05:03 +02:00
zadam
ea20d23d11 Merge branch 'stable' 2022-07-10 23:47:04 +02:00
zadam
1dfc37704f fix note title escaping in export dialog 2022-07-10 22:32:00 +02:00
zadam
27261683bb added excalidraw mention to README.md 2022-07-10 22:21:55 +02:00
zadam
1e5c18f6ff focus icon search input after showing up, closes #2979 2022-07-10 22:13:21 +02:00
zadam
5cbcf6e6be etapi fix misleading error message 2022-07-10 22:09:13 +02:00
zadam
0c4e5d2a19 find box can be used also on render notes 2022-07-10 22:01:21 +02:00
zadam
570fabdc4a add highlighting to search results, closes #2977 2022-07-10 15:52:02 +02:00
zadam
89a4165c77 fixes in event propagation 2022-07-10 15:01:05 +02:00
zadam
1ad406ced5 electron search is not used anymore 2022-07-10 12:22:52 +02:00
zadam
7cdc181b47 upgrade to KaTeX 0.16.0 2022-07-09 22:35:04 +02:00
zadam
af16a5856a Merge branch 'next54' 2022-07-09 22:30:43 +02:00
zadam
ea3bce25d9 release 0.53.2 2022-07-09 13:40:41 +02:00
zadam
9b4ef6ea5e fix node size in a note map when note has hidden image notes, closes #2965 2022-07-09 13:27:57 +02:00
zadam
c2c724aa00 Merge remote-tracking branch 'origin/stable' 2022-07-08 22:21:41 +02:00
zadam
95bbf5f405 fix TOC widget not finding the heading by index, closes #2962 2022-07-08 22:17:56 +02:00
zadam
12b3302687 sanitize note title && attrs just to be sure 2022-07-06 23:09:16 +02:00
zadam
c575d47f0e Merge remote-tracking branch 'origin/master' 2022-07-06 21:31:57 +02:00
zadam
02affece91 use fenced code block style for markdown export, closes #2963 2022-07-06 21:31:11 +02:00
zadam
2f1a7e2093
Merge pull request #2961 from mwr0007/master
Remove period from left pane toggle button tooltip
2022-07-05 23:31:29 +02:00
zadam
4fc686bbbc sanitize note title 2022-07-05 22:40:41 +02:00
Michael Redman
d1a763feef
Remove period from left pane toggle tooltip 2022-07-05 06:06:45 -05:00
zadam
6972ae889a converted relation map buttons to floating pattern 2022-07-03 23:10:13 +02:00
zadam
19c65e240e Merge remote-tracking branch 'origin/master' into next54 2022-07-03 22:38:45 +02:00
zadam
ef49d20470 release 0.53.1-beta 2022-07-01 22:50:19 +02:00
zadam
0d4275a260 fix saving new protected note revisions, closes #2951 2022-07-01 22:49:10 +02:00
zadam
dbf1ac1e9d Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package-lock.json
#	package.json
#	src/services/build.js
2022-07-01 22:34:19 +02:00
zadam
e7db262559 release 0.52.4 2022-07-01 00:11:53 +02:00
zadam
3faae63b84 set correct content type for error messages 2022-07-01 00:01:29 +02:00
zadam
94867e07df Merge remote-tracking branch 'origin/master' 2022-06-29 22:46:50 +02:00
zadam
33c272e86a fix dragging out tab creating multiple windows, closes #2944 2022-06-29 22:44:17 +02:00
zadam
aa4dade1e5 fix dragging out tab creating multiple windows, closes #2944 2022-06-29 22:38:35 +02:00
zadam
7435cd4dc6
Merge pull request #2943 from vgwidt/master
fix typo on advanced options page
2022-06-29 22:04:44 +02:00
vgwidt
194ae41d19 fix typo on advanced options page 2022-06-24 14:00:32 +09:00
zadam
42e262a1c2 10x speed-up of event propagation 2022-06-23 23:03:35 +02:00
zadam
ae46b3df58 fix typo in the custom widget location 2022-06-23 22:17:47 +02:00
zadam
e51276f532 floating buttons WIP 2022-06-21 23:27:34 +02:00
zadam
2e1bef2df7 fix ctrl+enter navigation for reference links, closes #2932 2022-06-20 23:11:52 +02:00
zadam
6b3077df0e fixed git graph demo to work with latest mermaid 2022-06-19 21:19:58 +02:00
zadam
1434effa22 upgraded mermaid to 9.1.2 2022-06-19 21:16:30 +02:00
zadam
67e69f1940 release 0.53.0-beta 2022-06-19 14:49:48 +02:00
zadam
046db503d3 added excalidraw to the demo document 2022-06-19 14:27:25 +02:00
zadam
9827e30a61 simple dedicated health check endpoint for docker 2022-06-19 14:15:31 +02:00
zadam
e21a1b56fa
Merge pull request #2928 from bill88t/master
Add a very basic docker health check
2022-06-19 14:14:22 +02:00
zadam
08e12e7349 no need to create template relation if there is already one owned 2022-06-19 14:06:00 +02:00
zadam
5ed1631a35 resort attributes for display 2022-06-19 12:18:13 +02:00
Bill Sideris
8ac776f305 Slowly making it an oneliner, added line check 2022-06-19 12:39:20 +03:00
zadam
981fac8e50 #template label is not inherited through template since it's meant to mark the template note only 2022-06-19 11:36:29 +02:00
Bill Sideris
8bb8ab96f1 a bit better 2022-06-19 12:23:00 +03:00
Bill Sideris
0b0d1b59b9 update it to check for login 200 2022-06-18 17:21:41 +03:00
Bill Sideris
57609a5952 Add docker health check 2022-06-18 17:10:26 +03:00
zadam
4f86d769be web view fixes + disclaimer 2022-06-18 15:52:09 +02:00
zadam
6cb5144c09 add score to note title matches as opposed to note path, #2927 2022-06-18 14:45:41 +02:00
zadam
aee350b07b small bulk action fixes 2022-06-17 23:12:52 +02:00
zadam
5ca7e39852 fix putting new attribute correctly into becca 2022-06-17 23:04:46 +02:00
zadam
540aba39db vertical navigation in options 2022-06-16 23:00:40 +02:00
zadam
9a8e677baf converted options dialog to new pattern 2022-06-16 22:53:11 +02:00
zadam
c5bc23d511 fixed confirmDeleteNoteBoxWithNote 2022-06-16 21:30:05 +02:00
zadam
7ac8dc6785 converted prompt dialog to new pattern 2022-06-16 21:13:09 +02:00
zadam
049261a8ee scope dialog CSS 2022-06-16 20:20:56 +02:00
zadam
1d037d3f0f converted confirm dialog to new pattern 2022-06-16 20:19:26 +02:00
zadam
b45df29937 prevent pasting notes into search parent note 2022-06-16 20:02:40 +02:00
zadam
ec087ed328 converted info dialog to new pattern 2022-06-16 19:53:33 +02:00
zadam
9707094686 converted delete notes dialog to new pattern 2022-06-16 19:41:29 +02:00
zadam
eb8e5eafb6 converted note revisions to new pattern 2022-06-16 19:29:18 +02:00
zadam
e140daa952 converted protected session password dialog to new pattern 2022-06-16 15:28:51 +02:00
zadam
3255607b09 converted markdown import dialog to new pattern 2022-06-16 15:15:42 +02:00
zadam
36c210d0dd converted export dialog to new pattern 2022-06-16 15:04:57 +02:00
zadam
595e16cc6f converted import dialog to new pattern 2022-06-16 14:21:24 +02:00
zadam
40bbe380d3 converted move to dialog to new pattern 2022-06-16 14:08:33 +02:00
zadam
683b4ac73a converted clone to dialog to new pattern 2022-06-16 14:02:43 +02:00
zadam
e0ad256194 fix add link + note type chooser combo 2022-06-16 13:21:27 +02:00
zadam
0468ca6814 converted add link dialog to new pattern 2022-06-16 11:03:04 +02:00
zadam
6ebf7ae94e converted jump to note dialog to new pattern 2022-06-16 10:42:49 +02:00
zadam
5ccaf8b3b9 fix multiple parents indication on note tree 2022-06-15 23:07:09 +02:00
zadam
0e01c19414 don't show hidden notes in search results 2022-06-15 22:50:22 +02:00
zadam
1347d3fcc2 converted note type chooser dialog to new pattern 2022-06-15 00:10:32 +02:00
zadam
ebd715ca1b converted include note dialog to new pattern 2022-06-14 23:51:16 +02:00
zadam
73574ac890 converted password not set dialog to new pattern 2022-06-14 23:32:16 +02:00
zadam
ca44edd48c converted sort by dialog to new pattern 2022-06-14 23:19:41 +02:00
zadam
312ffc110a converted branch prefix dialog to new pattern 2022-06-14 23:07:42 +02:00
zadam
bc87bf12cf converted backend log dialog to new pattern 2022-06-14 23:00:24 +02:00
zadam
11412a258b converted recent changes dialog to new pattern 2022-06-14 22:55:07 +02:00
zadam
bc35efd565 Merge branch 'stable' 2022-06-14 22:46:58 +02:00
zadam
416a723160 Merge remote-tracking branch 'origin/master' 2022-06-14 22:46:52 +02:00
zadam
10322c5d0f
Merge pull request #2920 from st3iny/fix/2919/docker-image-clean-exit
Fix docker image not exiting cleanly
2022-06-14 22:24:18 +02:00
Richard Steinmetz
7775d90b9a
Fix docker image not exiting cleanly
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2022-06-14 10:34:07 +02:00
zadam
fac9fef652 release 0.52.3 2022-06-13 23:41:52 +02:00
zadam
f0ab1fb5a1 Merge pull request #2917 from bill88t/master
Added the USER_UID & USER_GID env variables
2022-06-13 23:23:30 +02:00
zadam
f86fb129b6 Merge remote-tracking branch 'origin/master' 2022-06-13 23:18:57 +02:00
zadam
63cabb13b6
Merge pull request #2917 from bill88t/master
Added the USER_UID & USER_GID env variables
2022-06-13 23:17:59 +02:00
zadam
d3ee0aa8a8 Merge branch 'stable'
# Conflicts:
#	src/routes/api/files.js
#	src/routes/api/note_revisions.js
#	src/routes/api/notes.js
#	src/services/image.js
2022-06-13 23:04:54 +02:00
zadam
6256bcde2d note revisions and file properties buttons respect protected session 2022-06-13 23:03:56 +02:00
zadam
df3fdb59c5 fix saving note revisions, closes #2915 2022-06-13 22:54:08 +02:00
zadam
4cec856e21 simplified updating note content 2022-06-13 22:38:59 +02:00
Bill Sideris
8a43688a65 Added the USER_UID & USER_GID env variables 2022-06-13 12:43:10 +03:00
zadam
7edcd5d746 Merge remote-tracking branch 'origin/master' 2022-06-13 00:00:24 +02:00
zadam
ec6d93b34f converted help dialog to new pattern 2022-06-13 00:00:15 +02:00
zadam
0c6efb0cb7
Merge pull request #2914 from st3iny/enh/noid/trilium-data-dir-docker-start
Fix TRILIUM_DATA_DIR permissions in start-docker.sh
2022-06-12 23:31:15 +02:00
zadam
f8fd8e47a9 added rename note bulk action 2022-06-12 23:29:11 +02:00
Richard Steinmetz
566111ce82
Fix TRILIUM_DATA_DIR permissions in start-docker.sh
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2022-06-12 23:25:33 +02:00
zadam
7ba619c71d converted note source dialog to new pattern 2022-06-12 19:38:28 +02:00
zadam
b678d87c80 converted about dialog to new pattern 2022-06-12 14:03:59 +02:00
zadam
4aaa0f8d8c change tree node icon for selected notes to quickly bring up bulk action dialog 2022-06-12 13:57:22 +02:00
zadam
1bfc5fb77f calculate affected counts and take into account includeDescendants when executing 2022-06-12 10:35:30 +02:00
zadam
63f0e441b9 trigger execute bulk actions 2022-06-12 00:05:46 +02:00
zadam
041b4ea442 Merge remote-tracking branch 'origin/master' 2022-06-11 23:29:59 +02:00
zadam
2115b76047 bulk action dialog converted to widget 2022-06-11 23:29:52 +02:00
zadam
117db9f1cc
Merge pull request #2910 from sigaloid/master
Add toast messages prior to possibly long operations
2022-06-11 22:15:34 +02:00
sigaloid
b530bc548f Add messages prior to possibly long operations 2022-06-11 13:27:41 -04:00
zadam
8e23c15763 Merge branch 'next53'
# Conflicts:
#	src/services/builtin_attributes.js
2022-06-10 23:02:51 +02:00
zadam
23e9bcfdc5 release 0.52.2 2022-06-09 23:39:48 +02:00
zadam
96c4934c00 new default keyboard shortcuts alt+up/down/left/right for moving notes on Mac 2022-06-09 23:38:07 +02:00
zadam
31fb02f810 titleTemplate should be sanitized on import 2022-06-09 21:01:02 +02:00
zadam
5fdb462ed5 fix activating ribbon tabs after note switch 2022-06-08 23:44:43 +02:00
zadam
7d76fb8bf5 merge fix 2022-06-08 22:52:17 +02:00
zadam
0f7fa7a7b7 Merge branch 'master' into next53
# Conflicts:
#	package-lock.json
#	src/routes/api/search.js
2022-06-08 22:51:18 +02:00
zadam
e206d9cc68 fix selected note text color 2022-06-08 22:27:36 +02:00
zadam
2d33f570f4 fix bulk/search action delete 2022-06-08 22:25:00 +02:00
zadam
15f8173add fix ugly hover close button 2022-06-07 20:11:43 +02:00
zadam
51bbc23270 Merge branch 'master' into next53 2022-06-06 22:27:21 +02:00
zadam
7609bc78ec allow ignoring DB version for skipping uncritical migrations in case of a downgrade 2022-06-06 22:27:06 +02:00
zadam
b4ac41eff8 fix handlers import, closes #2900 2022-06-06 21:59:44 +02:00
zadam
f9bee7cd4e introduced bulk action groups 2022-06-05 23:36:46 +02:00
zadam
f272238dde fix backend implementation of bulk actions 2022-06-05 23:13:09 +02:00
zadam
433003cf38 fix migration 2022-06-05 22:50:02 +02:00
zadam
773cefe21d refactorings of search actions to bulk actions 2022-06-05 22:46:37 +02:00
zadam
88fa51a34e refactorings of search actions to bulk actions 2022-06-05 22:32:23 +02:00
zadam
4211d0feda Merge branch 'master' into next53 2022-06-05 22:25:14 +02:00
zadam
de1c76ee3c typo 2022-06-05 21:24:52 +02:00
zadam
ec4fac421b release 0.52.1-beta 2022-06-05 15:00:25 +02:00
zadam
f587e0dfd9 added new runOnNoteDeletion, runOnBranchCreation, runOnBranchDeletion, #2898 2022-06-05 14:58:19 +02:00
zadam
b5214e6cea disabled button theme/CSS tweaks 2022-06-05 14:35:23 +02:00
zadam
5fbaed61c1 fix "cut to note", closes #2895, #1182 2022-06-03 22:05:18 +02:00
zadam
9ce3e7e7d2 bulk actions WIP 2022-06-03 17:29:08 +02:00
zadam
e1cd09df36 implement shift-click to select notes in between clicked and active note, closes #2647 2022-06-03 09:42:35 +02:00
zadam
27b55eb3ee make openOnFocus=false explicit 2022-06-03 08:07:27 +02:00
zadam
8fcc76ad6d fix debounce webpack 2022-06-02 23:26:40 +02:00
zadam
ab0f0c5ced fix debounce webpack 2022-06-02 23:25:59 +02:00
zadam
4837dd050b fix bug when giving focus again to autocomplete input when coming back from note type chooser 2022-06-02 23:21:17 +02:00
zadam
c0c38a4b49 Merge branch 'master' into next53 2022-06-02 22:32:29 +02:00
zadam
15a9ff4450 when closing / clearing last tab, close all splits 2022-06-02 22:28:25 +02:00
zadam
0a4f419e5e fix when searching for "note.", closes #2889 2022-06-02 17:41:23 +02:00
zadam
7fa531b3d6 add openSplitWithNote() frontend api method, #2891 2022-06-02 17:36:30 +02:00
zadam
3cfca27b54 expose ability to create note revisions in backend API #2890 2022-06-02 17:25:58 +02:00
zadam
93f0596b16 select template when creating note, closes #2813 2022-06-02 14:16:49 +02:00
zadam
b204014a11 create note from template WIP 2022-05-31 23:27:45 +02:00
zadam
98b579524c create note from template WIP 2022-05-31 22:45:57 +02:00
zadam
88586b0f25 Merge branch 'master' into next53 2022-05-31 22:21:29 +02:00
zadam
103aa95ccf removed duplicated search action 2022-05-31 14:22:52 +02:00
zadam
339a6d7817 don't check for null content in consistency checks because it's too slow for large databases #2887 2022-05-31 14:09:46 +02:00
zadam
f252badba6 skeleton for bulk assign attributes 2022-05-30 22:43:20 +02:00
zadam
fe27c80078 added enter/leave protected session into the mobile frontend 2022-05-30 22:32:15 +02:00
zadam
8052574950 rename iframe to web view 2022-05-30 20:59:54 +02:00
zadam
f19adf3ee0 add the ability to sort notes by folders first, closes #2649 2022-05-30 20:50:53 +02:00
zadam
dcf31f8f95 toc fixes 2022-05-30 17:45:59 +02:00
zadam
93dd9274e7 fix relative address of lodash debounce, closes #2882 2022-05-30 13:22:28 +02:00
zadam
cce3f9a700 TOC widget WIP 2022-05-29 21:44:26 +02:00
zadam
01155ad535 use webview instead of iframe 2022-05-29 17:42:09 +02:00
zadam
ee217d6306 added iframe note type 2022-05-28 22:19:29 +02:00
zadam
ca35527aeb release 0.52.0-beta 2022-05-27 22:13:24 +02:00
dependabot[bot]
102bfcebd0
Bump nanoid from 3.1.30 to 3.3.1
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.30 to 3.3.1.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.30...3.3.1)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 20:26:50 +00:00
986 changed files with 93052 additions and 111529 deletions

View File

@ -7,7 +7,7 @@ body:
attributes:
label: Trilium Version
description: What version of Trilium are you using?
placeholder: 0.48.0-beta
placeholder: 0.57.0-beta
validations:
required: true
- type: dropdown
@ -44,3 +44,9 @@ body:
description: A clear and concise description of the bug and any additional information.
validations:
required: true
- type: textarea
attributes:
label: Error logs
description: Please provide error logs, see [wiki page](https://github.com/zadam/trilium/wiki/Error-logs) for instructions on how to submit them.
validations:
required: false

3
.gitignore vendored
View File

@ -11,3 +11,6 @@ cert.crt
server-package.json
.idea/httpRequests/
data/
data-test/
tmp/
.eslintcache

View File

@ -2,7 +2,7 @@ image:
file: .gitpod.dockerfile
tasks:
- before: nvm install 16.15.0 && nvm use 16.15.0
- before: nvm install 18.18.2 && nvm use 18.18.2
init: npm install
command: npm run start-server

4
.idea/dataSources.xml generated
View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="SQLite - document.db" uuid="30cef30d-e704-484d-a4ca-5d3bfc2ece63">
<data-source source="LOCAL" name="document.db" uuid="2a4ac1e6-b828-4a2a-8e4a-3f59f10aff26">
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/../trilium-data/document.db</jdbc-url>
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/data/document.db</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>

15
.idea/git_toolbox_prj.xml generated Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxProjectSettings">
<option name="commitMessageIssueKeyValidationOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
<option name="commitMessageValidationEnabledOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
</component>
</project>

View File

@ -1,7 +1,7 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="JSUnfilteredForInLoop" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />

3
.idea/misc.xml generated
View File

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

20
.vscode/launch.json vendored
View File

@ -1,18 +1,24 @@
{
"version": "0.2.0",
"configurations": [
// nodemon should be installed globally, use npm i -g nodemon
{
"type": "node",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"name": "nodemon start-server",
"program": "${workspaceFolder}/src/www",
"request": "launch",
"name": "start-server",
"restart": true,
"runtimeExecutable": "nodemon",
"env": {
"TRILIUM_ENV": "dev",
"TRILIUM_DATA_DIR": "./data"
},
"skipFiles": [
"<node_internals>/**"
],
"env": {
"TRILIUM_ENV": "dev"
},
"type": "node",
"outputCapture": "std",
"program": "${workspaceFolder}/src/www"
}
},
]
}

4
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"files.eol": "\n"
}

View File

@ -1,9 +1,12 @@
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
FROM node:16.15.0-alpine
FROM node:18.18.2-alpine
# Create app directory
WORKDIR /usr/src/app
# Bundle app source
COPY . .
COPY server-package.json package.json
# Install app dependencies
@ -18,14 +21,16 @@ RUN set -x \
nasm \
libpng-dev \
python3 \
&& npm install --production \
&& apk del .build-dependencies
&& npm install \
&& apk del .build-dependencies \
&& npm run webpack \
&& npm prune --omit=dev \
&& cp src/public/app/share.js src/public/app-dist/. \
&& cp -r src/public/app/doc_notes src/public/app-dist/. \
&& rm -rf src/public/app
# Some setup tools need to be kept
RUN apk add --no-cache su-exec
# Bundle app source
COPY . .
RUN apk add --no-cache su-exec shadow
# Add application user and setup proper volume permissions
RUN adduser -s /bin/false node; exit 0
@ -33,3 +38,5 @@ RUN adduser -s /bin/false node; exit 0
# Start the application
EXPOSE 8080
CMD [ "./start-docker.sh" ]
HEALTHCHECK --start-period=10s CMD exec su-exec node node docker_healthcheck.js

View File

@ -1,49 +1,57 @@
# Trilium笔记
# Trilium Notes
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md)
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) | [Italian](https://github.com/zadam/trilium/blob/master/README.it.md)
[![Join the chat at https://gitter.im/trilium-notes/Lobby](https://badges.gitter.im/trilium-notes/Lobby.svg)](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Trilium Notes是一个层的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://github.com/zadam/trilium/wiki/Screenshot-tour)以快速了解:
Trilium Notes 是一个层次化的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://github.com/zadam/trilium/wiki/Screenshot-tour)以快速了解:
![](https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png)
Ukraine is currently suffering from Russian aggression, please consider donating to [one of these charities](https://old.reddit.com/r/ukraine/comments/s6g5un/want_to_support_ukraine_heres_a_list_of_charities/).
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="600"/>
<img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="600"/>
## 特性
* 笔记可以排列成任意深的树。单个笔记可以放在树中的多个位置(请参阅[克隆](https://github.com/zadam/trilium/wiki/Cloning-notes)
* 丰富的所见即所得笔记编辑功能,包括带有markdown[自动格式化功能的](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)表格,图像和[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support)
* 丰富的所见即所得笔记编辑功能,包括带有 Markdown [自动格式化功能的](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)表格,图像和[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support)
* 支持编辑[使用源代码的笔记](https://github.com/zadam/trilium/wiki/Code-notes),包括语法高亮显示
* 笔记之间快速[导航](https://github.com/zadam/trilium/wiki/Note-navigation),全文搜索和[笔记挂起](https://github.com/zadam/trilium/wiki/Note-hoisting)
* 笔记之间快速[导航](https://github.com/zadam/trilium/wiki/Note-navigation),全文搜索和[笔记聚焦](https://github.com/zadam/trilium/wiki/Note-hoisting)
* 无缝[笔记版本控制](https://github.com/zadam/trilium/wiki/Note-revisions)
* 笔记[属性](https://github.com/zadam/trilium/wiki/Attributes)可用于笔记组织,查询和高级[脚本编写](https://github.com/zadam/trilium/wiki/Scripts)
* [同步](https://github.com/zadam/trilium/wiki/Synchronization)与自托管同步服务器
* 有一个[第三方提供的同步服务器托管服务](https://trilium.cc/paid-hosting)
* 公开地[分享](https://github.com/zadam/trilium/wiki/Sharing)(发布)笔记到互联网
* 具有按笔记粒度的强大的[笔记加密](https://github.com/zadam/trilium/wiki/Protected-notes)
* 使用自带的 Excalidraw 来绘制图表(笔记类型“画布”)
* [关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map),用于可视化笔记及其关系
* [脚本](https://github.com/zadam/trilium/wiki/Scripts)-请参阅[高级展示](https://github.com/zadam/trilium/wiki/Advanced-showcases)
* 可用性和性能均能很好地扩展至超过10万个笔记
* 针对智能手机和平板电脑进行触摸优化的[移动前端](https://github.com/zadam/trilium/wiki/Mobile-frontend)
* [脚本](https://github.com/zadam/trilium/wiki/Scripts) - 请参阅[高级功能展示](https://github.com/zadam/trilium/wiki/Advanced-showcases)
* 在拥有超过 10 万条笔记时仍能保持良好的可用性和性能
* 针对智能手机和平板电脑进行优化的[用于移动设备的前端](https://github.com/zadam/trilium/wiki/Mobile-frontend)
* [夜间主题](https://github.com/zadam/trilium/wiki/Themes)
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import)和[Markdown导入导出](https://github.com/zadam/trilium/wiki/Markdown)
* [Web Clipper](https://github.com/zadam/trilium/wiki/Web-clipper)可轻松保存Web内容
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) [Markdown 导入导出](https://github.com/zadam/trilium/wiki/Markdown)功能
* 使用[网页剪藏](https://github.com/zadam/trilium/wiki/Web-clipper)轻松保存互联网上的内容
## 构建
Trilium是作为桌面应用程序Linux和Windows或服务器上托管的Web应用程序Linux提供的。Mac OS桌面版本可用[不受支持](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support)。
Trilium 可以用作桌面应用程序Linux 和 Windows或服务器Linux上托管的 Web 应用程序。虽然有 macOS 版本的桌面应用程序,但它[不受支持](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support)。
* 如果要在桌面上使用Trilium请从[最新版本](https://github.com/zadam/trilium/releases/latest)下载适用于您平台的二进制[版本](https://github.com/zadam/trilium/releases/latest),解压缩该软件包并运行`trilium`可执行文件。
* 如果要在服务器上安装Trilium请遵循[此页面](https://github.com/zadam/trilium/wiki/Server-installation)。
* 当前仅支持经过测试最新的Chrome和Firefox浏览器。
* 如果要在桌面上使用 Trilium请从[最新版本](https://github.com/zadam/trilium/releases/latest)下载适用于您平台的二进制版本,解压缩该软件包并运行`trilium`可执行文件。
* 如果要在服务器上安装 Trilium请参考[此页面](https://github.com/zadam/trilium/wiki/Server-installation)。
* 当前仅支持(测试过)最近发布的 Chrome 和 Firefox 浏览器。
Trilium 也提供 Flatpak
[<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium)
## 文档
[有关文档页面的完整列表请参见Wiki。](https://github.com/zadam/trilium/wiki/)
[有关文档页面的完整列表,请参见 Wiki。](https://github.com/zadam/trilium/wiki/)
[中文Wiki在这里](https://github.com/baddate/trilium/wiki/)
* [Wiki 的中文翻译版本](https://github.com/baddate/trilium/wiki/)
您还可以阅读[个人知识库模式](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base)以获取有关如何使用Trilium的灵感。
您还可以阅读[个人知识库模式](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base),以获取有关如何使用 Trilium 的灵感。
## 贡献
@ -51,7 +59,7 @@ Trilium是作为桌面应用程序Linux和Windows或服务器上托管的W
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/zadam/trilium)
在本地克隆并运行
者克隆本仓库到本地,并运行
```
npm install
@ -60,7 +68,15 @@ npm run start-server
## 致谢
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市场上最好的所见即所得编辑器,互动性强且聆听能力强的团队
* [FancyTree](https://github.com/mar10/fancytree) - 一个非常丰富的关于树的库,强大的没有对手。没有它Trilium Notes将不会如此。
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市面上最好的所见即所得编辑器,拥有互动性强且聆听能力强的团队
* [FancyTree](https://github.com/mar10/fancytree) - 一个非常丰富的关于树的库,强大到没有对手。没有它Trilium Notes 将不会如此。
* [CodeMirror](https://github.com/codemirror/CodeMirror) - 支持大量语言的代码编辑器
* [jsPlumb](https://github.com/jsplumb/jsplumb)强大的可视化连接库。- 用于[关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map)
* [jsPlumb](https://github.com/jsplumb/jsplumb) - 强大的可视化连接库。用于[关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map)
## 捐赠
你可以通过 GitHub Sponsors[PayPal](https://paypal.me/za4am) 或者比特币 (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2) 来捐赠。
## 许可证
本程序是自由软件:你可以再发布本软件和/或修改本软件,只要你遵循 Free Software Foundation 发布的 GNU Affero General Public License 的第三版或者任何(由你选择)更晚的版本。

93
README.it.md Normal file
View File

@ -0,0 +1,93 @@
# Trilium Notes
## Trilium è in manutenzione - vedi i dettagli in https://github.com/zadam/trilium/issues/4620
Le discussioni preliminari sull'organizzazione si stanno svolgendo in [Trilium Next discussions](https://github.com/orgs/TriliumNext/discussions).
[![Join the chat at https://gitter.im/trilium-notes/Lobby](https://badges.gitter.im/trilium-notes/Lobby.svg)](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) | [Italian](https://github.com/zadam/trilium/blob/master/README.it.md)
Trilium Notes è un'applicazione per appunti ad organizzazione gerarchica, studiata per la costruzione di archivi di conoscenza personali di grandi dimensioni.
Vedi [fotografie](https://github.com/zadam/trilium/wiki/Screenshot-tour) per una panoramica veloce:
<a href="https://github.com/zadam/trilium/wiki/Screenshot-tour"><img src="https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png" alt="Trilium Screenshot" width="1000"></a>
L'Ucraina si sta difendendo dall'aggressione russa, considera [donare all'esercito ucraino o a organizzazioni umanitarie](https://standforukraine.com/).
<p float="left">
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="400"/>
<img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="570"/>
</p>
## 🎁 Funzionalità
* Gli appunti possono essere organizzati in un albero di profondità arbitraria. Un singolo appunto può essere collocato in più posti nell'albero (vedi [clonazione](https://github.com/zadam/trilium/wiki/Cloning-notes))
* Ricco editor visuale (WYSIWYG), con supporto -tra l'altro- per tabelle, immagini ed [espressioni matematiche](https://github.com/zadam/trilium/wiki/Text-notes#math-support) e con [formattazione automatica](https://github.com/zadam/trilium/wiki/Text-notes#autoformat) per markdown
* Supporto per la modifica di [appunti con codice sorgente](https://github.com/zadam/trilium/wiki/Code-notes), con evidenziazione della sintassi
* [Navigazione veloce](https://github.com/zadam/trilium/wiki/Note-navigation) tra gli appunti, ricerca testuale completa e [fissaggio degli appunti](https://github.com/zadam/trilium/wiki/Note-hoisting)
* Supporto integrato ed automatico per le [revisioni degli appunti](https://github.com/zadam/trilium/wiki/Note-revisions)
* Gli [attributi](https://github.com/zadam/trilium/wiki/Attributes) degli appunti possono essere utilizzati per l'organizzazione, per l'interrogazione e per lo scripting avanzato (prorgrammazione).
* [Sincronizzazione](https://github.com/zadam/trilium/wiki/Synchronization) con un server di sincronizzazione auto-ospitato
* c'è un [servizio di terze parti per ospitare server di sincronizzazione](https://trilium.cc/paid-hosting)
* [Condivisione](https://github.com/zadam/trilium/wiki/Sharing) (pubblicazione) di appunti sull'internet pubblico
* Robusta [crittografia](https://github.com/zadam/trilium/wiki/Protected-notes) configurabile singolarmente per ogni appunto
* Disegno di diagrammi con Excalidraw (tipo di appunto "canvas")
* [Mappe relazionali](https://github.com/zadam/trilium/wiki/Relation-map) e [mappe di collegamenti](https://github.com/zadam/trilium/wiki/Link-map) per visualizzare gli appunti e le loro relazioni
* [Scripting](https://github.com/zadam/trilium/wiki/Scripts) - vedi [Esempi avanzati](https://github.com/zadam/trilium/wiki/Advanced-showcases)
* [API REST](https://github.com/zadam/trilium/wiki/ETAPI) per l'automazione
* Si adatta bene sia in termini di usabilità che di prestazioni fino ad oltre 100 000 appunti
* Interfaccia utente ottimizzata per il [mobile](https://github.com/zadam/trilium/wiki/Mobile-frontend) (smartphone e tablet)
* [Tema Notturno](https://github.com/zadam/trilium/wiki/Themes)
* Supporto per importazione ed esportazione da e per [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) e [Markdown import](https://github.com/zadam/trilium/wiki/Markdown)
* [Web Clipper](https://github.com/zadam/trilium/wiki/Web-clipper) per il salvataggio facile di contenuti web
Dai un'occhiata a [awesome-trilium](https://github.com/Nriver/awesome-trilium) per temi, script, plugin e altro di terze parti.
## 🏗 Rilasci
Trilium è fornito come applicazione desktop (Linux e Windows) o come applicazione web ospitata sul tuo server (Linux). La versione desktop per Mac OS è disponibile, ma [non è supportata](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support).
* Se vuoi usare Trilium sul tuo desktop, scarica il rilascio binario per la tua piattaforma dall'[ultimo rilascio](https://github.com/zadam/trilium/releases/latest), decomprimi l'archivio e avvia l'eseguibile ```trilium```.
* Se vuoi installare Trilium su un server, segui [questa pagina](https://github.com/zadam/trilium/wiki/Server-installation).
* Per ora solo Chrome e Firefox sono i browser supportati (testati).
Trilium è anche disponibile su Flatpak:
[<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium)
## 📝 Documentazione
[Vedi la wiki per una lista completa delle pagine di documentazione.](https://github.com/zadam/trilium/wiki/)
Puoi anche leggere ["Patterns of personal knowledge base"](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base) per avere un'ispirazione su come potresti utilizzare Trilium.
## 💻 Contribuire
Usa un ambiente di sviluppo basato su browser
[![Apri in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/zadam/trilium)
O clona localmente ed esegui
```
npm install
npm run start-server
```
## 📢 Riconoscimenti
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - miglior editor visuale (WYSIWYG) sul mercato, squadra di sviluppo attenta e reattiva
* [FancyTree](https://github.com/mar10/fancytree) - libreria per alberi molto ricca di funzionalità, senza pari. Trilium Notes non sarebbe lo stesso senza di essa.
* [CodeMirror](https://github.com/codemirror/CodeMirror) - editor di codice con supporto per un'enorme quantità di linguaggi.
* [jsPlumb](https://github.com/jsplumb/jsplumb) - libreria per la connettività visuale senza pari. Utilizzata per [mappe relazionali](https://github.com/zadam/trilium/wiki/Relation-map) e [mappe di collegamenti](https://github.com/zadam/trilium/wiki/Link-map).
## 🤝 Supporto
È possibile supportare Trilium attraverso Github Sponsors, [PayPal](https://paypal.me/za4am) o Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2).
## 🔑 Licenza
Questo programma è software libero: è possibile redistribuirlo e/o modificarlo nei termini della GNU Affero General Public License come pubblicata dalla Free Software Foundation, sia la versione 3 della Licenza, o (a propria scelta) qualsiasi versione successiva.

83
README.ja.md Normal file
View File

@ -0,0 +1,83 @@
# Trilium Notes
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) | [Italian](https://github.com/zadam/trilium/blob/master/README.it.md)
Trilium Notes は、大規模な個人知識ベースの構築に焦点を当てた、階層型ノートアプリケーションです。概要は[スクリーンショット](https://github.com/zadam/trilium/wiki/Screenshot-tour)をご覧ください:
<a href="https://github.com/zadam/trilium/wiki/Screenshot-tour"><img src="https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png" alt="Trilium Screenshot" width="1000"></a>
ウクライナは現在、ロシアの侵略から自国を守っています。[ウクライナ軍や人道的な慈善団体への寄付](https://standforukraine.com/)をご検討ください。
<p float="left">
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="400"/>
<img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="570"/>
</p>
## 🎁 特徴
* ノートは、任意の深さのツリーに配置できます。単一のノートをツリー内の複数の場所に配置できます ([cloning](https://github.com/zadam/trilium/wiki/Cloning-notes) を参照)
* マークダウン[オートフォーマット](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)による、表、画像、[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support)などの豊富な WYSIWYG ノート編集機能
* シンタックスハイライトを含む[ソースコード付きノート](https://github.com/zadam/trilium/wiki/Code-notes)の編集をサポート
* [ノート間のナビゲーション](https://github.com/zadam/trilium/wiki/Note-navigation)、全文検索、[ノートホイスト](https://github.com/zadam/trilium/wiki/Note-hoisting)が高速かつ簡単に行えます
* シームレスな[ノートのバージョン管理](https://github.com/zadam/trilium/wiki/Note-revisions)
* ノート[属性](https://github.com/zadam/trilium/wiki/Attributes)は、ノート整理、クエリ、高度な[スクリプト](https://github.com/zadam/trilium/wiki/Scripts)に使用できます
* 自己ホスト型同期サーバーとの[同期](https://github.com/zadam/trilium/wiki/Synchronization)
* [同期サーバーをホストするサードパーティ・サービス](https://trilium.cc/paid-hosting)があります
* 公開インターネットへのノートの[共有](https://github.com/zadam/trilium/wiki/Sharing)(公開)
* ノートごとの粒度を持つ強力な[ノート暗号化](https://github.com/zadam/trilium/wiki/Protected-notes)
* 組み込みの Excalidraw を使用した図のスケッチ (ノート タイプ"キャンバス")
* ノートとその関係を可視化するための[関係図](https://github.com/zadam/trilium/wiki/Relation-map)と[リンクマップ](https://github.com/zadam/trilium/wiki/Link-map)
* [スクリプティング](https://github.com/zadam/trilium/wiki/Scripts) - [高度なショーケース](https://github.com/zadam/trilium/wiki/Advanced-showcases)を参照
* 自動化のための [REST API](https://github.com/zadam/trilium/wiki/ETAPI)
* ユーザビリティとパフォーマンスの両方で 100 000 ノート以上に拡張可能
* スマートフォンとタブレット向けのタッチ最適化[モバイルフロントエンド](https://github.com/zadam/trilium/wiki/Mobile-frontend)
* [ナイトテーマ](https://github.com/zadam/trilium/wiki/Themes)
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) と [Markdown のインポートとエクスポート](https://github.com/zadam/trilium/wiki/Markdown)
* Web コンテンツを簡単に保存するための [Web クリッパー](https://github.com/zadam/trilium/wiki/Web-clipper)
サードパーティのテーマ、スクリプト、プラグインなどは、 [awesome-trilium](https://github.com/Nriver/awesome-trilium) をチェックしてください。
## 🏗 ビルド
Trilium は、デスクトップアプリケーションLinux、Windowsまたはサーバー上でホストされるウェブアプリケーションLinuxとして提供されます。 Mac OS のデスクトップビルドも利用可能ですが、 [unsupported](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support) となっています。
* デスクトップで Trilium を使用したい場合は、 [latest release](https://github.com/zadam/trilium/releases/latest) からお使いのプラットフォームのバイナリリリースをダウンロードし、パッケージを解凍して ``trilium`` の実行ファイルを実行してください。
* サーバーに Trilium をインストールする場合は、[このページ](https://github.com/zadam/trilium/wiki/Server-installation)に従ってください。
* 現在、対応(動作確認)しているブラウザは、最近の Chrome と Firefox のみです。
Trilium は Flatpak としても提供されます:
[<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium)
## 📝 ドキュメント
[ドキュメントページの全リストはwikiをご覧ください。](https://github.com/zadam/trilium/wiki/)
また、[個人的な知識基盤のパターン](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base)を読むと、 Trilium の使い方のヒントを得ることができます。
## 💻 コントリビュート
ブラウザベースの開発環境を使用
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/zadam/trilium)
または、ローカルにクローンして実行
```
npm install
npm run start-server
```
## 📢 シャウトアウト
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市場で最高の WYSIWYG エディター、非常にインタラクティブで聞き上手なチーム
* [FancyTree](https://github.com/mar10/fancytree) - 真の競争相手がいない、非常に機能豊富なツリーライブラリです。 Trilium Notes は、これなしでは成り立たないでしょう。
* [CodeMirror](https://github.com/codemirror/CodeMirror) - 膨大な数の言語をサポートするコードエディタ
* [jsPlumb](https://github.com/jsplumb/jsplumb) - 競合のないビジュアルコネクティビティライブラリです。[関係図](https://github.com/zadam/trilium/wiki/Relation-map)、[リンク図](https://github.com/zadam/trilium/wiki/Link-map)で使用。
## 🤝 サポート
GitHub スポンサー、[PayPal](https://paypal.me/za4am)もしくは Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2) にて Trilium をサポートすることができます。
## 🔑 ライセンス
このプログラムはフリーソフトウェアです:フリーソフトウェア財団が発行した GNU Affero General Public License のバージョン3、またはそれ以降のバージョンのいずれかに従って、再配布および/または改変することができます。

View File

@ -1,17 +1,29 @@
> [!IMPORTANT]
> The TriliumNext team has received the original Trilium Notes repository (`zadam/trilium`). We will soon enter the process in which TriliumNext will become the original Trilium Notes again.
>
> For now, we invite you to have a look at the [TriliumNext](https://github.com/TriliumNext/Notes) repo. You should be able to migrate to TriliumNext without any problems from the original Trilium.
>
> Thanks to @zadam for his original work and for allowing us to continue using the Trilium Notes name once again.
# Trilium Notes
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md)
[![Join the chat at https://gitter.im/trilium-notes/Lobby](https://badges.gitter.im/trilium-notes/Lobby.svg)](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) | [Italian](https://github.com/zadam/trilium/blob/master/README.it.md)
[![Join the chat at https://gitter.im/trilium-notes/Lobby](https://badges.gitter.im/trilium-notes/Lobby.svg)](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases. See [screenshots](https://github.com/zadam/trilium/wiki/Screenshot-tour) for quick overview:
![](https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png)
Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases.
Ukraine is currently suffering from Russian aggression, please consider donating to [one of these charities](https://old.reddit.com/r/ukraine/comments/s6g5un/want_to_support_ukraine_heres_a_list_of_charities/).
See [screenshots](https://github.com/zadam/trilium/wiki/Screenshot-tour) for quick overview:
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="600"/>
<a href="https://github.com/zadam/trilium/wiki/Screenshot-tour"><img src="https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png" alt="Trilium Screenshot" width="1000"></a>
## Features
Ukraine is currently defending itself from Russian aggression, please consider [donating to Ukrainian Army or humanitarian charities](https://standforukraine.com/).
<p float="left">
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="400"/>
<img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="570"/>
</p>
## 🎁 Features
* Notes can be arranged into arbitrarily deep tree. Single note can be placed into multiple places in the tree (see [cloning](https://github.com/zadam/trilium/wiki/Cloning-notes))
* Rich WYSIWYG note editing including e.g. tables, images and [math](https://github.com/zadam/trilium/wiki/Text-notes#math-support) with markdown [autoformat](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)
@ -23,6 +35,7 @@ Ukraine is currently suffering from Russian aggression, please consider donating
* there's a [3rd party service for hosting synchronisation server](https://trilium.cc/paid-hosting)
* [Sharing](https://github.com/zadam/trilium/wiki/Sharing) (publishing) notes to public internet
* Strong [note encryption](https://github.com/zadam/trilium/wiki/Protected-notes) with per-note granularity
* Sketching diagrams with built-in Excalidraw (note type "canvas")
* [Relation maps](https://github.com/zadam/trilium/wiki/Relation-map) and [link maps](https://github.com/zadam/trilium/wiki/Link-map) for visualizing notes and their relations
* [Scripting](https://github.com/zadam/trilium/wiki/Scripts) - see [Advanced showcases](https://github.com/zadam/trilium/wiki/Advanced-showcases)
* [REST API](https://github.com/zadam/trilium/wiki/ETAPI) for automation
@ -32,7 +45,9 @@ Ukraine is currently suffering from Russian aggression, please consider donating
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) and [Markdown import & export](https://github.com/zadam/trilium/wiki/Markdown)
* [Web Clipper](https://github.com/zadam/trilium/wiki/Web-clipper) for easy saving of web content
## Builds
Check out [awesome-trilium](https://github.com/Nriver/awesome-trilium) for 3rd party themes, scripts, plugins and more.
## 🏗 Builds
Trilium is provided as either desktop application (Linux and Windows) or web application hosted on your server (Linux). Mac OS desktop build is available, but it is [unsupported](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support).
@ -40,13 +55,17 @@ Trilium is provided as either desktop application (Linux and Windows) or web app
* If you want to install Trilium on server, follow [this page](https://github.com/zadam/trilium/wiki/Server-installation).
* Currently only recent Chrome and Firefox are supported (tested) browsers.
## Documentation
Trilium is also provided as a Flatpak:
[<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium)
## 📝 Documentation
[See wiki for complete list of documentation pages.](https://github.com/zadam/trilium/wiki/)
You can also read [Patterns of personal knowledge base](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base) to get some inspiration on how you might use Trilium.
## Contribute
## 💻 Contribute
Use a browser based dev environment
@ -58,17 +77,17 @@ npm install
npm run start-server
```
## Shoutouts
## 📢 Shoutouts
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - best WYSIWYG editor on the market, very interactive and listening team
* [FancyTree](https://github.com/mar10/fancytree) - very feature rich tree library without real competition. Trilium Notes would not be the same without it.
* [CodeMirror](https://github.com/codemirror/CodeMirror) - code editor with support for huge amount of languages
* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library without competition. Used in [relation maps](https://github.com/zadam/trilium/wiki/Relation-map) and [link maps](https://github.com/zadam/trilium/wiki/Link-map)
## Donating
## 🤝 Support
You can donate using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2).
You can support Trilium using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2).
## License
## 🔑 License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

View File

@ -1,6 +1,6 @@
# Trilium Notes
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md)
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) | [Italian](https://github.com/zadam/trilium/blob/master/README.it.md)
[![Join the chat at https://gitter.im/trilium-notes/Lobby](https://badges.gitter.im/trilium-notes/Lobby.svg)](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Trilium Notes это приложение для заметок с иерархической структурой, ориентированное на создание больших персональных баз знаний. Для быстрого ознакомления посмотрите [скриншот-тур](https://github.com/zadam/trilium/wiki/Screenshot-tour):
@ -10,6 +10,7 @@ Trilium Notes это приложение для заметок с иера
Ukraine is currently suffering from Russian aggression, please consider donating to [one of these charities](https://old.reddit.com/r/ukraine/comments/s6g5un/want_to_support_ukraine_heres_a_list_of_charities/).
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="600"/>
<img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="600"/>
## Возможности

Binary file not shown.

Binary file not shown.

View File

@ -5,18 +5,3 @@ echo "Packaging debian x64 distribution..."
VERSION=`jq -r ".version" package.json`
./node_modules/.bin/electron-installer-debian --config bin/deb-options.json --options.version=${VERSION} --arch amd64
# hacky stop-gag measure to produce debian compatible XZ compressed debs until this is fixed: https://github.com/electron-userland/electron-installer-debian/issues/272
cd dist
ar x trilium_${VERSION}_amd64.deb
rm trilium_${VERSION}_amd64.deb
# recompress
< control.tar.zst zstd -d | xz > control.tar.xz
< data.tar.zst zstd -d | xz > data.tar.xz
# create deb archive (I really do not know, what argument "sdsd" is for but something is required for ar to create the archive as desired)
ar -m -c -a sdsd trilium_${VERSION}_amd64.deb debian-binary control.tar.xz data.tar.xz
rm control* data* debian-binary
echo "Converted to XZ deb"

View File

@ -2,51 +2,37 @@
SRC_DIR=./dist/trilium-linux-x64-src
if [ "$1" != "DONTCOPY" ]
then
./bin/copy-trilium.sh $SRC_DIR
fi
[ "$1" != "DONTCOPY" ] && ./bin/copy-trilium.sh "$SRC_DIR"
rm -r $SRC_DIR/src/public/app-dist/*.mobile.*
rm -r "$SRC_DIR"/src/public/app-dist/*.mobile.*
echo "Copying required linux-x64 binaries"
cp -r bin/better-sqlite3/linux-desktop-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
cp -r bin/better-sqlite3/linux-desktop-better_sqlite3.node "$SRC_DIR"/node_modules/better-sqlite3/build/Release/better_sqlite3.node
echo "Packaging linux x64 electron build"
./node_modules/.bin/electron-packager $SRC_DIR --asar --out=dist --executable-name=trilium --platform=linux --arch=x64 --overwrite
./node_modules/.bin/electron-packager "$SRC_DIR" --asar --out=dist --executable-name=trilium --platform=linux --arch=x64 --overwrite
BUILD_DIR=./dist/trilium-linux-x64
rm -rf $BUILD_DIR
rm -rf "$BUILD_DIR"
mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR
mv "./dist/Trilium Notes-linux-x64" "$BUILD_DIR"
cp images/app-icons/png/128x128.png $BUILD_DIR/icon.png
cp images/app-icons/png/128x128.png "$BUILD_DIR"/icon.png
cp bin/tpl/anonymize-database.sql "$BUILD_DIR"/
# removing software WebGL binaries because they are pretty huge and not necessary
rm -r $BUILD_DIR/swiftshader
cp -r dump-db "$BUILD_DIR"/
rm -rf "$BUILD_DIR"/dump-db/node_modules
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
cp -r dump-db $BUILD_DIR/
cp bin/tpl/trilium-portable.sh $BUILD_DIR/
chmod 755 $BUILD_DIR/trilium-portable.sh
cp bin/tpl/trilium-safe-mode.sh $BUILD_DIR/
chmod 755 $BUILD_DIR/trilium-safe-mode.sh
cp bin/tpl/trilium-no-cert-check.sh $BUILD_DIR/
chmod 755 $BUILD_DIR/trilium-no-cert-check.sh
for f in 'trilium-portable' 'trilium-safe-mode' 'trilium-no-cert-check'; do
cp bin/tpl/"$f".sh "$BUILD_DIR"/
chmod 755 "$BUILD_DIR"/"$f".sh
done
echo "Packaging linux x64 electron distribution..."
VERSION=`jq -r ".version" package.json`
cd dist
tar cJf trilium-linux-x64-${VERSION}.tar.xz trilium-linux-x64
cd ..
pushd dist
tar cJf "trilium-linux-x64-${VERSION}.tar.xz" trilium-linux-x64
popd
bin/build-debian.sh

38
bin/build-mac-arm64.sh Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env bash
SRC_DIR=./dist/trilium-mac-arm64-src
if [ "$1" != "DONTCOPY" ]
then
./bin/copy-trilium.sh $SRC_DIR
fi
echo "Copying required mac arm64 binaries"
cp -r bin/better-sqlite3/mac-arm64-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
rm -r $SRC_DIR/src/public/app-dist/*.mobile.*
echo "Packaging mac arm64 electron build"
./node_modules/.bin/electron-packager $SRC_DIR --asar --out=dist --executable-name=trilium --platform=darwin --arch=arm64 --overwrite --icon=images/app-icons/mac/icon.icns
BUILD_DIR=./dist/trilium-mac-arm64
rm -rf $BUILD_DIR
# Mac build has by default useless directory level
mv "./dist/Trilium Notes-darwin-arm64" $BUILD_DIR
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
cp -r dump-db $BUILD_DIR/
rm -rf $BUILD_DIR/dump-db/node_modules
echo "Zipping mac arm64 electron distribution..."
VERSION=`jq -r ".version" package.json`
cd dist
rm trilium-mac-arm64-${VERSION}.zip
zip -r9 --symlinks trilium-mac-arm64-${VERSION}.zip trilium-mac-arm64

View File

@ -7,9 +7,9 @@ then
./bin/copy-trilium.sh $SRC_DIR
fi
echo "Copying required mac binaries"
echo "Copying required mac x64 binaries"
cp -r bin/better-sqlite3/mac-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
cp -r bin/better-sqlite3/mac-x64-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
rm -r $SRC_DIR/src/public/app-dist/*.mobile.*
@ -26,6 +26,7 @@ mv "./dist/Trilium Notes-darwin-x64" $BUILD_DIR
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
cp -r dump-db $BUILD_DIR/
rm -rf $BUILD_DIR/dump-db/node_modules
echo "Zipping mac x64 electron distribution..."

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
PKG_DIR=dist/trilium-linux-x64-server
NODE_VERSION=16.15.0
NODE_VERSION=18.18.2
if [ "$1" != "DONTCOPY" ]
then
@ -31,6 +31,7 @@ chmod 755 $PKG_DIR/trilium.sh
cp bin/tpl/anonymize-database.sql $PKG_DIR/
cp -r dump-db $PKG_DIR/
rm -rf $PKG_DIR/dump-db/node_modules
VERSION=`jq -r ".version" package.json`

View File

@ -22,14 +22,12 @@ rm -rf $BUILD_DIR
mv "./dist/Trilium Notes-win32-x64" $BUILD_DIR
# removing software WebGL binaries because they are pretty huge and not necessary
rm -r $BUILD_DIR/swiftshader
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
cp -r dump-db $BUILD_DIR/
rm -rf $BUILD_DIR/dump-db/node_modules
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.{bat,ps1} $BUILD_DIR/
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.bat $BUILD_DIR/
echo "Zipping windows x64 electron distribution..."
VERSION=`jq -r ".version" package.json`

View File

@ -13,11 +13,14 @@ cp -r $SRC_DIR ./dist/trilium-linux-x64-src
cp -r $SRC_DIR ./dist/trilium-linux-x64-server
cp -r $SRC_DIR ./dist/trilium-windows-x64-src
cp -r $SRC_DIR ./dist/trilium-mac-x64-src
cp -r $SRC_DIR ./dist/trilium-mac-arm64-src
bin/build-win-x64.sh DONTCOPY
bin/build-mac-x64.sh DONTCOPY
bin/build-mac-arm64.sh DONTCOPY
bin/build-linux-x64.sh DONTCOPY
bin/build-server.sh DONTCOPY

View File

@ -4,54 +4,49 @@ if [[ $# -eq 0 ]] ; then
echo "Missing argument of target directory"
exit 1
fi
if ! [[ $(which npm) ]]; then
echo "Missing npm"
exit 1
fi
n exec 16.15.0 npm run webpack
n exec 18.18.2 npm run webpack || npm run webpack
DIR=$1
DIR="$1"
rm -rf $DIR
mkdir $DIR
rm -rf "$DIR"
mkdir -pv "$DIR"
echo "Copying Trilium to build directory $DIR"
cp -r dump-db $DIR/
rm -rf $DIR/dump-db/node_modules
cp -r images $DIR/
cp -r libraries $DIR/
cp -r src $DIR/
cp -r db $DIR/
cp -r package.json $DIR/
cp -r package-lock.json $DIR/
cp -r README.md $DIR/
cp -r LICENSE $DIR/
cp -r config-sample.ini $DIR/
cp -r electron.js $DIR/
cp webpack-* $DIR/
for d in 'images' 'libraries' 'src' 'db'; do
cp -r "$d" "$DIR"/
done
for f in 'package.json' 'package-lock.json' 'README.md' 'LICENSE' 'config-sample.ini' 'electron.js'; do
cp "$f" "$DIR"/
done
cp webpack-* "$DIR"/ # here warning because there is no 'webpack-*', but webpack.config.js only
# run in subshell (so we return to original dir)
(cd $DIR && n exec 16.15.0 npm install --only=prod)
(cd $DIR && n exec 18.18.2 npm install --only=prod)
if [[ -d "$DIR"/node_modules ]]; then
# cleanup of useless files in dependencies
rm -r $DIR/node_modules/image-q/demo
rm -r $DIR/node_modules/better-sqlite3/Release
rm -r $DIR/node_modules/better-sqlite3/deps/sqlite3.tar.gz
rm -r $DIR/node_modules/@jimp/plugin-print/fonts
rm -r $DIR/node_modules/jimp/browser
rm -r $DIR/node_modules/jimp/fonts
for d in 'image-q/demo' 'better-sqlite3/Release' 'better-sqlite3/deps/sqlite3.tar.gz' '@jimp/plugin-print/fonts' 'jimp/browser' 'jimp/fonts'; do
[[ -e "$DIR"/node_modules/"$d" ]] && rm -rv "$DIR"/node_modules/"$d"
done
# delete all tests (there are often large images as test file for jimp etc.)
find $DIR/node_modules -name test -exec rm -rf {} \;
find $DIR/node_modules -name docs -exec rm -rf {} \;
find $DIR/node_modules -name demo -exec rm -rf {} \;
for d in 'test' 'docs' 'demo'; do
find "$DIR"/node_modules -name "$d" -exec rm -rf {} \;
done
fi
find $DIR/libraries -name "*.map" -type f -delete
cp $DIR/src/public/app/share.js $DIR/src/public/app-dist/
d="$DIR"/src/public
[[ -d "$d"/app-dist ]] || mkdir -pv "$d"/app-dist
cp "$d"/app/share.js "$d"/app-dist/
cp -r "$d"/app/doc_notes "$d"/app-dist/
rm -rf $DIR/src/public/app
sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' $DIR/src/views/desktop.ejs
sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' $DIR/src/views/mobile.ejs
sed -i -e 's/app\/setup.js/app-dist\/setup.js/g' $DIR/src/views/setup.ejs
sed -i -e 's/app\/share.js/app-dist\/share.js/g' $DIR/src/views/share/*.ejs
rm -rf "$d"/app
unset f d DIR

2
bin/create-anonymization-script.js Normal file → Executable file
View File

@ -1,6 +1,6 @@
#!/usr/bin/env node
const anonymizationService = require('../src/services/anonymization');
const anonymizationService = require('../src/services/anonymization.js');
const fs = require('fs');
const path = require('path');

View File

@ -1,6 +1,7 @@
{
"src": "dist/trilium-linux-x64",
"dest": "dist/",
"compression": "xz",
"name": "trilium",
"productName": "Trilium Notes",
"genericName": "Note taker",
@ -11,4 +12,4 @@
"bin": "trilium",
"icon": "dist/trilium-linux-x64/icon.png",
"categories": [ "Office" ]
}
}

View File

@ -2,6 +2,6 @@
SCHEMA_FILE_PATH=db/schema.sql
sqlite3 ~/trilium-data/document.db .schema | grep -v "sqlite_sequence" > "$SCHEMA_FILE_PATH"
sqlite3 ./data/document.db .schema | grep -v "sqlite_sequence" > "$SCHEMA_FILE_PATH"
echo "DB schema exported to $SCHEMA_FILE_PATH"

57
bin/release-flatpack.sh Executable file
View File

@ -0,0 +1,57 @@
#!/usr/bin/env bash
if [[ $# -eq 0 ]] ; then
echo "Missing argument of new version"
exit 1
fi
VERSION=$1
if ! [[ ${VERSION} =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}(-.+)?$ ]] ;
then
echo "Version ${VERSION} isn't in format X.Y.Z"
exit 1
fi
VERSION_DATE=$(git log -1 --format=%aI "v${VERSION}" | cut -c -10)
VERSION_COMMIT=$(git rev-list -n 1 "v${VERSION}")
# expecting the directory at a specific path
cd ~/trilium-flathub || exit
if ! git diff-index --quiet HEAD --; then
echo "There are uncommitted changes"
exit 1
fi
BASE_BRANCH=master
if [[ "$VERSION" == *"beta"* ]]; then
BASE_BRANCH=beta
fi
git switch "${BASE_BRANCH}"
git pull
BRANCH=b${VERSION}
git branch "${BRANCH}"
git switch "${BRANCH}"
echo "Updating files with version ${VERSION}, date ${VERSION_DATE} and commit ${VERSION_COMMIT}"
flatpak-node-generator npm ../trilium/package-lock.json
xmlstarlet ed --inplace --update "/component/releases/release/@version" --value "${VERSION}" --update "/component/releases/release/@date" --value "${VERSION_DATE}" ./com.github.zadam.trilium.metainfo.xml
yq --inplace "(.modules[0].sources[0].tag = \"v${VERSION}\") | (.modules[0].sources[0].commit = \"${VERSION_COMMIT}\")" ./com.github.zadam.trilium.yml
git add ./generated-sources.json
git add ./com.github.zadam.trilium.metainfo.xml
git add ./com.github.zadam.trilium.yml
git commit -m "release $VERSION"
git push --set-upstream origin "${BRANCH}"
gh pr create --fill -B "${BASE_BRANCH}"
gh pr merge --auto --merge --delete-branch

View File

@ -48,6 +48,7 @@ LINUX_X64_BUILD=trilium-linux-x64-$VERSION.tar.xz
DEBIAN_X64_BUILD=trilium_${VERSION}_amd64.deb
WINDOWS_X64_BUILD=trilium-windows-x64-$VERSION.zip
MAC_X64_BUILD=trilium-mac-x64-$VERSION.zip
MAC_ARM64_BUILD=trilium-mac-arm64-$VERSION.zip
SERVER_BUILD=trilium-linux-x64-server-$VERSION.tar.xz
echo "Creating release in GitHub"
@ -68,4 +69,5 @@ gh release create "$TAG" \
"dist/$LINUX_X64_BUILD" \
"dist/$WINDOWS_X64_BUILD" \
"dist/$MAC_X64_BUILD" \
"dist/$MAC_ARM64_BUILD" \
"dist/$SERVER_BUILD"

View File

@ -1,17 +1,50 @@
UPDATE etapi_tokens SET tokenHash = 'API token hash value';
UPDATE notes SET title = 'title' WHERE title NOT IN ('root', 'hidden', 'share');
UPDATE note_contents SET content = 'text' WHERE content IS NOT NULL;
UPDATE note_revisions SET title = 'title';
UPDATE note_revision_contents SET content = 'text' WHERE content IS NOT NULL;
UPDATE notes SET title = 'title'
WHERE noteId NOT IN ('root', '_hidden', '_share')
AND SUBSTR(noteId, 1, 8) != '_options'
AND SUBSTR(noteId, 1, 3) != '_lb';
UPDATE blobs SET content = 'text' WHERE content IS NOT NULL;
UPDATE revisions SET title = 'title';
UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label' AND name NOT IN('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss', 'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'hoistedCssClass', 'cssClass', 'iconClass', 'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider', 'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'noteRevisionsWidgetDisabled', 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor', 'searchHome', 'hoistedInbox', 'hoistedSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId', 'bookmarked', 'bookmarkFolder', 'sorted', 'top', 'fullContentWidth', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss', 'shareRoot', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation', 'runOnNoteTitleChange', 'runOnNoteChange', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
UPDATE attributes SET name = 'name' WHERE type = 'relation' AND name NOT IN ('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss', 'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'hoistedCssClass', 'cssClass', 'iconClass', 'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider', 'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'noteRevisionsWidgetDisabled', 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor', 'searchHome', 'hoistedInbox', 'hoistedSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId', 'bookmarked', 'bookmarkFolder', 'sorted', 'top', 'fullContentWidth', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss', 'shareRoot', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation', 'runOnNoteTitleChange', 'runOnNoteChange', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label'
AND name NOT IN
('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss',
'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass',
'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider',
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
'template', 'toc', 'color', 'keepCurrentHoisting', 'executeButton', 'executeDescription', 'newNotesOnTop',
'clipperInbox', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation',
'runOnNoteTitleChange', 'runOnNoteChange', 'runOnNoteContentChange', 'runOnNoteDeletion', 'runOnBranchCreation', 'runOnBranchChange',
'runOnBranchDeletion', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template',
'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareTemplate', 'shareFavicon');
UPDATE attributes SET name = 'name' WHERE type = 'relation'
AND name NOT IN
('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss',
'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass',
'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider',
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
'template', 'toc', 'color', 'keepCurrentHoisting', 'executeButton', 'executeDescription', 'newNotesOnTop',
'clipperInbox', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation',
'runOnNoteTitleChange', 'runOnNoteChange', 'runOnNoteContentChange', 'runOnNoteDeletion', 'runOnBranchCreation', 'runOnBranchChange',
'runOnBranchDeletion', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template',
'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareTemplate', 'shareFavicon');
UPDATE branches SET prefix = 'prefix' WHERE prefix IS NOT NULL AND prefix != 'recovered';
UPDATE options SET value = 'anonymized' WHERE name IN
('documentId', 'documentSecret', 'encryptedDataKey',
'passwordVerificationHash', 'passwordVerificationSalt',
'passwordDerivedKeySalt', 'username', 'syncServerHost', 'syncProxy')
AND value != '';
('documentId', 'documentSecret', 'encryptedDataKey',
'passwordVerificationHash', 'passwordVerificationSalt',
'passwordDerivedKeySalt', 'username', 'syncServerHost', 'syncProxy')
AND value != '';
VACUUM;

View File

@ -1,5 +1,23 @@
@echo off
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
:: If there's no powershell available, fallback to unicode enabled command interpreter
WHERE powershell.exe > NUL 2>&1
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
:POWERSHELL
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:NODE_TLS_REJECT_UNAUTHORIZED -Value 0; ./trilium.exe"
GOTO END
:BATCH
:: Make sure we support UTF-8 characters
chcp 65001
:: Get Current Trilium executable directory and compute data directory
SET DIR=%~dp0
set NODE_TLS_REJECT_UNAUTHORIZED=0
cd %DIR%
WHERE powershell.exe
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-no-cert-check.ps1)
start trilium.exe
GOTO END
:END

View File

@ -1,2 +0,0 @@
Set-Item -Path Env:NODE_TLS_REJECT_UNAUTHORIZED -Value 0
./trilium.exe

View File

@ -1,5 +1,23 @@
@echo off
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
:: If there's no powershell available, fallback to unicode enabled command interpreter
WHERE powershell.exe > NUL 2>&1
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
:POWERSHELL
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:TRILIUM_DATA_DIR -Value './trilium-data'; ./trilium.exe"
GOTO END
:BATCH
:: Make sure we support UTF-8 characters
chcp 65001
:: Get Current Trilium executable directory and compute data directory
SET DIR=%~dp0
SET TRILIUM_DATA_DIR=%DIR%\trilium-data
cd %DIR%
WHERE powershell.exe
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-portable.ps1)
start trilium.exe
GOTO END
:END

View File

@ -1,2 +0,0 @@
Set-Item -Path Env:TRILIUM_DATA_DIR -Value './trilium-data'
./trilium.exe

View File

@ -1,5 +1,23 @@
@echo off
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
:: If there's no powershell available, fallback to unicode enabled command interpreter
WHERE powershell.exe > NUL 2>&1
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
:POWERSHELL
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1; ./trilium.exe --disable-gpu"
GOTO END
:BATCH
:: Make sure we support UTF-8 characters
chcp 65001
:: Get Current Trilium executable directory and compute data directory
SET DIR=%~dp0
SET TRILIUM_SAFE_MODE=1
cd %DIR%
WHERE powershell.exe
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-safe-mode.ps1)
start trilium.exe --disable-gpu
GOTO END
:END

View File

@ -1,2 +0,0 @@
Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1
./trilium.exe

View File

@ -3,5 +3,5 @@
DIR=`dirname "$0"`
export TRILIUM_SAFE_MODE=1
"$DIR/trilium"
"$DIR/trilium" --disable-gpu

View File

@ -16,8 +16,14 @@ noBackup=false
# host=0.0.0.0
# port setting is relevant only for web deployments, desktop builds run on a fixed port (changeable with TRILIUM_PORT environment variable)
port=8080
# true for TLS/SSL/HTTPS (secure), false for HTTP (unsecure).
# true for TLS/SSL/HTTPS (secure), false for HTTP (insecure).
https=false
# path to certificate (run "bash bin/generate-cert.sh" to generate self-signed certificate). Relevant only if https=true
certPath=
keyPath=
# setting to give trust to reverse proxies, a comma-separated list of trusted rev. proxy IPs can be specified (CIDR notation is permitted),
# alternatively 'true' will make use of the leftmost IP in X-Forwarded-For, ultimately an integer can be used to tell about the number of hops between
# Trilium (which is hop 0) and the first trusted rev. proxy.
# once set, expressjs will use the X-Forwarded-For header set by the rev. proxy to determinate the real IPs of clients.
# expressjs shortcuts are supported: loopback(127.0.0.1/8, ::1/128), linklocal(169.254.0.0/16, fe80::/10), uniquelocal(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7)
trustedReverseProxy=false

View File

@ -1,11 +1,5 @@
- drop branches.utcDateCreated - not used for anything
- drop options.utcDateCreated - not used for anything
- isDeleted = 0 by default
- rename openTabs to openNoteContexts
- migrate black theme to dark theme
- unify readOnly handling to a single attribute:
* readOnly - like now
* readOnly=auto - like without readOnly (used to override inherited readOnly)
* readOnly=never - like autoReadOnlyDisabled
- remove focusOnAttributesKeyboardShortcut
- rename white theme to "light" theme (it's not completely white and matches well to dark theme)

Binary file not shown.

View File

@ -1 +0,0 @@
module.exports = () => console.log("NOOP, moved to migration 0189");

View File

@ -1,4 +0,0 @@
-- black theme has been removed, dark is closest replacement
UPDATE options SET value = 'dark' WHERE name = 'theme' AND value = 'black';
UPDATE options SET value = 'light' WHERE name = 'theme' AND value = 'white';

View File

@ -1,2 +0,0 @@
ALTER TABLE branches DROP COLUMN utcDateCreated;
ALTER TABLE options DROP COLUMN utcDateCreated;

View File

@ -1,33 +0,0 @@
CREATE TABLE IF NOT EXISTS "mig_entity_changes" (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`entityName` TEXT NOT NULL,
`entityId` TEXT NOT NULL,
`hash` TEXT NOT NULL,
`isErased` INT NOT NULL,
`changeId` TEXT NOT NULL,
`sourceId` TEXT NOT NULL,
`isSynced` INTEGER NOT NULL,
`utcDateChanged` TEXT NOT NULL
);
INSERT INTO mig_entity_changes (id, entityName, entityId, hash, isErased, changeId, sourceId, isSynced, utcDateChanged)
SELECT id, entityName, entityId, hash, isErased, '', sourceId, isSynced, utcDateChanged FROM entity_changes;
-- delete duplicates https://github.com/zadam/trilium/issues/2534
DELETE FROM mig_entity_changes WHERE isErased = 0 AND id IN (
SELECT id FROM mig_entity_changes ec
WHERE (
SELECT COUNT(*) FROM mig_entity_changes
WHERE ec.entityName = mig_entity_changes.entityName
AND ec.entityId = mig_entity_changes.entityId
) > 1
);
DROP TABLE entity_changes;
ALTER TABLE mig_entity_changes RENAME TO entity_changes;
CREATE UNIQUE INDEX `IDX_entityChanges_entityName_entityId` ON "entity_changes" (
`entityName`,
`entityId`
);

View File

@ -1,8 +0,0 @@
UPDATE branches SET branchId = 'hidden' where branchId = (
SELECT branchId FROM branches
WHERE parentNoteId = 'root'
AND noteId = 'hidden'
AND isDeleted = 0
ORDER BY utcDateModified
LIMIT 1
);

View File

@ -1 +0,0 @@
DELETE FROM options WHERE name = 'username';

View File

@ -1,15 +0,0 @@
CREATE TABLE IF NOT EXISTS "etapi_tokens"
(
etapiTokenId TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
tokenHash TEXT NOT NULL,
utcDateCreated TEXT NOT NULL,
utcDateModified TEXT NOT NULL,
isDeleted INT NOT NULL DEFAULT 0);
INSERT INTO etapi_tokens (etapiTokenId, name, tokenHash, utcDateCreated, utcDateModified, isDeleted)
SELECT apiTokenId, 'Trilium Sender', token, utcDateCreated, utcDateCreated, isDeleted FROM api_tokens;
DROP TABLE api_tokens;
UPDATE entity_changes SET entityName = 'etapi_tokens' WHERE entityName = 'api_tokens';

View File

@ -1,10 +0,0 @@
module.exports = () => {
const sql = require('../../src/services/sql');
const crypto = require('crypto');
for (const {etapiTokenId, token} of sql.getRows("SELECT etapiTokenId, tokenHash AS token FROM etapi_tokens")) {
const tokenHash = crypto.createHash('sha256').update(token).digest('base64');
sql.execute(`UPDATE etapi_tokens SET tokenHash = ? WHERE etapiTokenId = ?`, [tokenHash, etapiTokenId]);
}
};

View File

@ -1,24 +0,0 @@
CREATE TABLE IF NOT EXISTS "mig_entity_changes" (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`entityName` TEXT NOT NULL,
`entityId` TEXT NOT NULL,
`hash` TEXT NOT NULL,
`isErased` INT NOT NULL,
`changeId` TEXT NOT NULL,
`componentId` TEXT NOT NULL,
`instanceId` TEXT NOT NULL,
`isSynced` INTEGER NOT NULL,
`utcDateChanged` TEXT NOT NULL
);
INSERT INTO mig_entity_changes (id, entityName, entityId, hash, isErased, changeId, componentId, instanceId, isSynced, utcDateChanged)
SELECT id, entityName, entityId, hash, isErased, changeId, '', '', isSynced, utcDateChanged FROM entity_changes;
DROP TABLE entity_changes;
ALTER TABLE mig_entity_changes RENAME TO entity_changes;
CREATE UNIQUE INDEX `IDX_entityChanges_entityName_entityId` ON "entity_changes" (
`entityName`,
`entityId`
);

View File

@ -1 +0,0 @@
CREATE INDEX `IDX_entity_changes_changeId` ON `entity_changes` (`changeId`);

View File

@ -1,15 +0,0 @@
const becca = require('../../src/becca/becca');
const beccaLoader = require('../../src/becca/becca_loader');
const cls = require('../../src/services/cls');
module.exports = () => {
cls.init(() => {
beccaLoader.load();
for (const note of Object.values(becca.notes)) {
if (note.hasLabel('calendarRoot')) {
note.addLabel('excludeFromNoteMap', "", true);
}
}
});
};

View File

@ -1,2 +0,0 @@
-- removing potential remnants of recent notes in entity changes, see https://github.com/zadam/trilium/issues/2842
DELETE FROM entity_changes WHERE entityName = 'recent_notes';

View File

@ -0,0 +1,13 @@
CREATE TABLE IF NOT EXISTS "blobs" (
`blobId` TEXT NOT NULL,
`content` TEXT NULL DEFAULT NULL,
`dateModified` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`blobId`)
);
ALTER TABLE notes ADD blobId TEXT DEFAULT NULL;
ALTER TABLE note_revisions ADD blobId TEXT DEFAULT NULL;
CREATE INDEX IF NOT EXISTS IDX_notes_blobId on notes (blobId);
CREATE INDEX IF NOT EXISTS IDX_note_revisions_blobId on note_revisions (blobId);

View File

@ -0,0 +1,62 @@
module.exports = () => {
const sql = require('../../src/services/sql.js');
const utils = require('../../src/services/utils.js');
const existingBlobIds = new Set();
for (const noteId of sql.getColumn(`SELECT noteId FROM note_contents`)) {
const row = sql.getRow(`SELECT noteId, content, dateModified, utcDateModified FROM note_contents WHERE noteId = ?`, [noteId]);
const blobId = utils.hashedBlobId(row.content);
if (!existingBlobIds.has(blobId)) {
existingBlobIds.add(blobId);
sql.insert('blobs', {
blobId,
content: row.content,
dateModified: row.dateModified,
utcDateModified: row.utcDateModified
});
sql.execute("UPDATE entity_changes SET entityName = 'blobs', entityId = ? WHERE entityName = 'note_contents' AND entityId = ?", [blobId, row.noteId]);
} else {
// duplicates
sql.execute("DELETE FROM entity_changes WHERE entityName = 'note_contents' AND entityId = ?", [row.noteId]);
}
sql.execute('UPDATE notes SET blobId = ? WHERE noteId = ?', [blobId, row.noteId]);
}
for (const noteRevisionId of sql.getColumn(`SELECT noteRevisionId FROM note_revision_contents`)) {
const row = sql.getRow(`SELECT noteRevisionId, content, utcDateModified FROM note_revision_contents WHERE noteRevisionId = ?`, [noteRevisionId]);
const blobId = utils.hashedBlobId(row.content);
if (!existingBlobIds.has(blobId)) {
existingBlobIds.add(blobId);
sql.insert('blobs', {
blobId,
content: row.content,
dateModified: row.utcDateModified,
utcDateModified: row.utcDateModified
});
sql.execute("UPDATE entity_changes SET entityName = 'blobs', entityId = ? WHERE entityName = 'note_revision_contents' AND entityId = ?", [blobId, row.noteRevisionId]);
} else {
// duplicates
sql.execute("DELETE FROM entity_changes WHERE entityName = 'note_revision_contents' AND entityId = ?", [row.noteId]);
}
sql.execute('UPDATE note_revisions SET blobId = ? WHERE noteRevisionId = ?', [blobId, row.noteRevisionId]);
}
const notesWithoutBlobIds = sql.getColumn("SELECT noteId FROM notes WHERE blobId IS NULL");
if (notesWithoutBlobIds.length > 0) {
throw new Error("BlobIds were not filled correctly in notes: " + JSON.stringify(notesWithoutBlobIds));
}
const noteRevisionsWithoutBlobIds = sql.getColumn("SELECT noteRevisionId FROM note_revisions WHERE blobId IS NULL");
if (noteRevisionsWithoutBlobIds.length > 0) {
throw new Error("BlobIds were not filled correctly in note revisions: " + JSON.stringify(noteRevisionsWithoutBlobIds));
}
};

View File

@ -0,0 +1,4 @@
DROP TABLE note_contents;
DROP TABLE note_revision_contents;
DELETE FROM entity_changes WHERE entityName IN ('note_contents', 'note_revision_contents');

View File

@ -0,0 +1,26 @@
CREATE TABLE IF NOT EXISTS "revisions" (`revisionId` TEXT NOT NULL PRIMARY KEY,
`noteId` TEXT NOT NULL,
type TEXT DEFAULT '' NOT NULL,
mime TEXT DEFAULT '' NOT NULL,
`title` TEXT NOT NULL,
`isProtected` INT NOT NULL DEFAULT 0,
blobId TEXT DEFAULT NULL,
`utcDateLastEdited` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
`dateLastEdited` TEXT NOT NULL,
`dateCreated` TEXT NOT NULL);
INSERT INTO revisions (revisionId, noteId, type, mime, title, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated, blobId)
SELECT noteRevisionId, noteId, type, mime, title, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated, blobId FROM note_revisions;
DROP TABLE note_revisions;
CREATE INDEX `IDX_revisions_noteId` ON `revisions` (`noteId`);
CREATE INDEX `IDX_revisions_utcDateCreated` ON `revisions` (`utcDateCreated`);
CREATE INDEX `IDX_revisions_utcDateLastEdited` ON `revisions` (`utcDateLastEdited`);
CREATE INDEX `IDX_revisions_dateCreated` ON `revisions` (`dateCreated`);
CREATE INDEX `IDX_revisions_dateLastEdited` ON `revisions` (`dateLastEdited`);
CREATE INDEX IF NOT EXISTS IDX_revisions_blobId on revisions (blobId);
UPDATE entity_changes SET entityName = 'revisions' WHERE entityName = 'note_revisions';

View File

@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS "attachments"
(
attachmentId TEXT not null primary key,
ownerId TEXT not null,
role TEXT not null,
mime TEXT not null,
title TEXT not null,
isProtected INT not null DEFAULT 0,
position INT default 0 not null,
blobId TEXT DEFAULT null,
dateModified TEXT NOT NULL,
utcDateModified TEXT not null,
utcDateScheduledForErasureSince TEXT DEFAULT NULL,
isDeleted INT not null,
deleteId TEXT DEFAULT NULL);
CREATE INDEX IDX_attachments_ownerId_role
on attachments (ownerId, role);
CREATE INDEX IDX_attachments_utcDateScheduledForErasureSince
on attachments (utcDateScheduledForErasureSince);
CREATE INDEX IF NOT EXISTS IDX_attachments_blobId on attachments (blobId);

View File

@ -0,0 +1,27 @@
module.exports = () => {
const beccaLoader = require('../../src/becca/becca_loader.js');
const becca = require('../../src/becca/becca.js');
const cls = require('../../src/services/cls.js');
const log = require('../../src/services/log.js');
const sql = require('../../src/services/sql.js');
cls.init(() => {
// emergency disabling of image compression since it appears to make problems in migration to 0.61
sql.execute(`UPDATE options SET value = 'false' WHERE name = 'compressImages'`);
beccaLoader.load();
for (const note of Object.values(becca.notes)) {
try {
const attachment = note.convertToParentAttachment({autoConversion: true});
if (attachment) {
log.info(`Auto-converted note '${note.noteId}' into attachment '${attachment.attachmentId}'.`);
}
}
catch (e) {
log.error(`Cannot convert note '${note.noteId}' to attachment: ${e.message} ${e.stack}`);
}
}
});
};

View File

@ -0,0 +1,2 @@
DELETE FROM options WHERE name = 'hideIncludedImages_main';
DELETE FROM entity_changes WHERE entityName = 'options' AND entityId = 'hideIncludedImages_main';

View File

@ -0,0 +1,2 @@
UPDATE options SET name = 'openNoteContexts' WHERE name = 'openTabs';
UPDATE entity_changes SET entityId = 'openNoteContexts' WHERE entityName = 'options' AND entityId = 'openTabs';

View File

@ -0,0 +1 @@
SELECT 1;

View File

@ -0,0 +1,14 @@
UPDATE blobs SET blobId = REPLACE(blobId, '+', 'X');
UPDATE blobs SET blobId = REPLACE(blobId, '/', 'Y');
UPDATE notes SET blobId = REPLACE(blobId, '+', 'X');
UPDATE notes SET blobId = REPLACE(blobId, '/', 'Y');
UPDATE attachments SET blobId = REPLACE(blobId, '+', 'X');
UPDATE attachments SET blobId = REPLACE(blobId, '/', 'Y');
UPDATE revisions SET blobId = REPLACE(blobId, '+', 'X');
UPDATE revisions SET blobId = REPLACE(blobId, '/', 'Y');
UPDATE entity_changes SET entityId = REPLACE(entityId, '+', 'X') WHERE entityName = 'blobs';
UPDATE entity_changes SET entityId = REPLACE(entityId, '/', 'Y') WHERE entityName = 'blobs';

View File

@ -0,0 +1,3 @@
CREATE INDEX IF NOT EXISTS IDX_notes_blobId on notes (blobId);
CREATE INDEX IF NOT EXISTS IDX_revisions_blobId on revisions (blobId);
CREATE INDEX IF NOT EXISTS IDX_attachments_blobId on attachments (blobId);

View File

@ -0,0 +1 @@
UPDATE attributes SET value = 'contentAndAttachmentsAndRevisionsSize' WHERE name = 'orderBy' AND value = 'noteSize';

View File

@ -0,0 +1,2 @@
-- emergency disabling of image compression since it appears to make problems in migration to 0.61
UPDATE options SET value = 'false' WHERE name = 'compressImages';

View File

@ -0,0 +1,17 @@
-- + is normally replaced by X and / by Y, but this can temporarily cause UNIQUE key exception
-- this might create blob duplicates, but cleanup will eventually take care of it
UPDATE blobs SET blobId = REPLACE(blobId, '+', 'A');
UPDATE blobs SET blobId = REPLACE(blobId, '/', 'B');
UPDATE notes SET blobId = REPLACE(blobId, '+', 'A');
UPDATE notes SET blobId = REPLACE(blobId, '/', 'B');
UPDATE attachments SET blobId = REPLACE(blobId, '+', 'A');
UPDATE attachments SET blobId = REPLACE(blobId, '/', 'B');
UPDATE revisions SET blobId = REPLACE(blobId, '+', 'A');
UPDATE revisions SET blobId = REPLACE(blobId, '/', 'B');
UPDATE entity_changes SET entityId = REPLACE(entityId, '+', 'A') WHERE entityName = 'blobs';
UPDATE entity_changes SET entityId = REPLACE(entityId, '/', 'B') WHERE entityName = 'blobs';

View File

@ -35,6 +35,7 @@ CREATE TABLE IF NOT EXISTS "notes" (
`isProtected` INT NOT NULL DEFAULT 0,
`type` TEXT NOT NULL DEFAULT 'text',
`mime` TEXT NOT NULL DEFAULT 'text/html',
blobId TEXT DEFAULT NULL,
`isDeleted` INT NOT NULL DEFAULT 0,
`deleteId` TEXT DEFAULT NULL,
`dateCreated` TEXT NOT NULL,
@ -42,27 +43,18 @@ CREATE TABLE IF NOT EXISTS "notes" (
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`));
CREATE TABLE IF NOT EXISTS "note_contents" (
`noteId` TEXT NOT NULL,
`content` TEXT NULL DEFAULT NULL,
`dateModified` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`)
);
CREATE TABLE IF NOT EXISTS "note_revisions" (`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
CREATE TABLE IF NOT EXISTS "revisions" (`revisionId` TEXT NOT NULL PRIMARY KEY,
`noteId` TEXT NOT NULL,
type TEXT DEFAULT '' NOT NULL,
mime TEXT DEFAULT '' NOT NULL,
`title` TEXT NOT NULL,
`isProtected` INT NOT NULL DEFAULT 0,
blobId TEXT DEFAULT NULL,
`utcDateLastEdited` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
`dateLastEdited` TEXT NOT NULL,
`dateCreated` TEXT NOT NULL);
CREATE TABLE IF NOT EXISTS "note_revision_contents" (`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
`content` TEXT,
`utcDateModified` TEXT NOT NULL);
CREATE TABLE IF NOT EXISTS "options"
(
name TEXT not null PRIMARY KEY,
@ -94,11 +86,11 @@ CREATE INDEX `IDX_notes_dateCreated` ON `notes` (`dateCreated`);
CREATE INDEX `IDX_notes_dateModified` ON `notes` (`dateModified`);
CREATE INDEX `IDX_notes_utcDateModified` ON `notes` (`utcDateModified`);
CREATE INDEX `IDX_notes_utcDateCreated` ON `notes` (`utcDateCreated`);
CREATE INDEX `IDX_note_revisions_noteId` ON `note_revisions` (`noteId`);
CREATE INDEX `IDX_note_revisions_utcDateCreated` ON `note_revisions` (`utcDateCreated`);
CREATE INDEX `IDX_note_revisions_utcDateLastEdited` ON `note_revisions` (`utcDateLastEdited`);
CREATE INDEX `IDX_note_revisions_dateCreated` ON `note_revisions` (`dateCreated`);
CREATE INDEX `IDX_note_revisions_dateLastEdited` ON `note_revisions` (`dateLastEdited`);
CREATE INDEX `IDX_revisions_noteId` ON `revisions` (`noteId`);
CREATE INDEX `IDX_revisions_utcDateCreated` ON `revisions` (`utcDateCreated`);
CREATE INDEX `IDX_revisions_utcDateLastEdited` ON `revisions` (`utcDateLastEdited`);
CREATE INDEX `IDX_revisions_dateCreated` ON `revisions` (`dateCreated`);
CREATE INDEX `IDX_revisions_dateLastEdited` ON `revisions` (`dateLastEdited`);
CREATE INDEX `IDX_entity_changes_changeId` ON `entity_changes` (`changeId`);
CREATE INDEX IDX_attributes_name_value
on attributes (name, value);
@ -112,3 +104,31 @@ CREATE TABLE IF NOT EXISTS "recent_notes"
notePath TEXT not null,
utcDateCreated TEXT not null
);
CREATE TABLE IF NOT EXISTS "blobs" (
`blobId` TEXT NOT NULL,
`content` TEXT NULL DEFAULT NULL,
`dateModified` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`blobId`)
);
CREATE TABLE IF NOT EXISTS "attachments"
(
attachmentId TEXT not null primary key,
ownerId TEXT not null,
role TEXT not null,
mime TEXT not null,
title TEXT not null,
isProtected INT not null DEFAULT 0,
position INT default 0 not null,
blobId TEXT DEFAULT null,
dateModified TEXT NOT NULL,
utcDateModified TEXT not null,
utcDateScheduledForErasureSince TEXT DEFAULT NULL,
isDeleted INT not null,
deleteId TEXT DEFAULT NULL);
CREATE INDEX IDX_attachments_ownerId_role
on attachments (ownerId, role);
CREATE INDEX IDX_notes_blobId on notes (blobId);
CREATE INDEX IDX_revisions_blobId on revisions (blobId);
CREATE INDEX IDX_attachments_blobId on attachments (blobId);

View File

@ -1,17 +1,16 @@
# Running `docker-compose up` will create/use the "trilium-data" directory in the user home
# Run `TRILIUM_DATA_DIR=/path/of/your/choice docker-compose up` to set a different directory
version: '2.1'
services:
trilium:
build:
context: .
image: zadam/trilium
restart: always
environment:
- TRILIUM_DATA_DIR=/data
- TRILIUM_DATA_DIR=/home/node/trilium-data
ports:
- "8080:8080"
volumes:
- trilium:/data
- ${TRILIUM_DATA_DIR:-~/trilium-data}:/home/node/trilium-data
volumes:
trilium:

42
docker_healthcheck.js Executable file
View File

@ -0,0 +1,42 @@
const http = require("http");
const ini = require("ini");
const fs = require("fs");
const dataDir = require('./src/services/data_dir.js');
const config = ini.parse(fs.readFileSync(dataDir.CONFIG_INI_PATH, 'utf-8'));
if (config.Network.https) {
// built-in TLS (terminated by trilium) is not supported yet, PRs are welcome
// for reverse proxy terminated TLS this will works since config.https will be false
process.exit(0);
}
const port = require('./src/services/port.js');
const host = require('./src/services/host.js');
const options = { timeout: 2000 };
const callback = res => {
console.log(`STATUS: ${res.statusCode}`);
if (res.statusCode === 200) {
process.exit(0);
} else {
process.exit(1);
}
};
let request;
if (port !== 0) { // TCP socket.
const url = `http://${host}:${port}/api/health-check`;
request = http.request(url, options, callback);
} else { // Unix socket.
options.socketPath = host;
options.path = '/api/health-check';
request = http.request(options, callback);
}
request.on("error", err => {
console.log("ERROR");
process.exit(1);
});
request.end();

File diff suppressed because it is too large Load Diff

View File

@ -1,434 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: AbstractEntity</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: AbstractEntity</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>AbstractEntity<span class="signature">()</span><span class="type-signature"></span></h2>
<div class="class-description">Base class for all backend entities.</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="AbstractEntity"><span class="type-signature"></span>new AbstractEntity<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line16">line 16</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="markAsDeleted"><span class="type-signature"></span>markAsDeleted<span class="signature">(deleteId<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>deleteId</code></td>
<td class="type">
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>
</li></ul></dd>
</dl>
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
<div class="description">
Saves entity - executes SQL, but doesn't commit the transaction on its own
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,873 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: EtapiToken</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: EtapiToken</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>EtapiToken<span class="signature">()</span><span class="type-signature"></span></h2>
<div class="class-description">EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
Used by:
- Trilium Sender
- ETAPI clients
The format user is presented with is "<etapiTokenId>_<tokenHash>". This is also called "authToken" to distinguish it
from tokenHash and token.</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="EtapiToken"><span class="type-signature"></span>new EtapiToken<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line17">line 17</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li><a href="AbstractEntity.html">AbstractEntity</a></li>
</ul>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="etapiTokenId"><span class="type-signature"></span>etapiTokenId<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line35">line 35</a>
</li></ul></dd>
</dl>
<h4 class="name" id="isDeleted"><span class="type-signature"></span>isDeleted<span class="type-signature"> :boolean</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line45">line 45</a>
</li></ul></dd>
</dl>
<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line37">line 37</a>
</li></ul></dd>
</dl>
<h4 class="name" id="tokenHash"><span class="type-signature"></span>tokenHash<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line39">line 39</a>
</li></ul></dd>
</dl>
<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line41">line 41</a>
</li></ul></dd>
</dl>
<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line43">line 43</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="markAsDeleted"><span class="type-signature"></span>markAsDeleted<span class="signature">(deleteId<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>deleteId</code></td>
<td class="type">
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="AbstractEntity.html#markAsDeleted">AbstractEntity#markAsDeleted</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>
</li></ul></dd>
</dl>
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
<div class="description">
Saves entity - executes SQL, but doesn't commit the transaction on its own
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="AbstractEntity.html#save">AbstractEntity#save</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>

View File

@ -1,731 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Option</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Option</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>Option<span class="signature">()</span><span class="type-signature"></span></h2>
<div class="class-description">Option represents name-value pair, either directly configurable by the user or some system property.</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="Option"><span class="type-signature"></span>new Option<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line11">line 11</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li><a href="AbstractEntity.html">AbstractEntity</a></li>
</ul>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="isSynced"><span class="type-signature"></span>isSynced<span class="type-signature"> :boolean</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line24">line 24</a>
</li></ul></dd>
</dl>
<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line20">line 20</a>
</li></ul></dd>
</dl>
<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line26">line 26</a>
</li></ul></dd>
</dl>
<h4 class="name" id="value"><span class="type-signature"></span>value<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line22">line 22</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="markAsDeleted"><span class="type-signature"></span>markAsDeleted<span class="signature">(deleteId<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>deleteId</code></td>
<td class="type">
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="AbstractEntity.html#markAsDeleted">AbstractEntity#markAsDeleted</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>
</li></ul></dd>
</dl>
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
<div class="description">
Saves entity - executes SQL, but doesn't commit the transaction on its own
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="AbstractEntity.html#save">AbstractEntity#save</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>

View File

@ -1,663 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: RecentNote</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: RecentNote</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>RecentNote<span class="signature">()</span><span class="type-signature"></span></h2>
<div class="class-description">RecentNote represents recently visited note.</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="RecentNote"><span class="type-signature"></span>new RecentNote<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line11">line 11</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li><a href="AbstractEntity.html">AbstractEntity</a></li>
</ul>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line19">line 19</a>
</li></ul></dd>
</dl>
<h4 class="name" id="notePath"><span class="type-signature"></span>notePath<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line21">line 21</a>
</li></ul></dd>
</dl>
<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line23">line 23</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="markAsDeleted"><span class="type-signature"></span>markAsDeleted<span class="signature">(deleteId<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>deleteId</code></td>
<td class="type">
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="AbstractEntity.html#markAsDeleted">AbstractEntity#markAsDeleted</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>
</li></ul></dd>
</dl>
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
<div class="description">
Saves entity - executes SQL, but doesn't commit the transaction on its own
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="AbstractEntity.html#save">AbstractEntity#save</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>

View File

@ -0,0 +1,360 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: becca/entities/abstract_becca_entity.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: becca/entities/abstract_becca_entity.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>"use strict";
const utils = require('../../services/utils');
const sql = require('../../services/sql');
const entityChangesService = require('../../services/entity_changes');
const eventService = require("../../services/events");
const dateUtils = require("../../services/date_utils");
const cls = require("../../services/cls");
const log = require("../../services/log");
const protectedSessionService = require("../../services/protected_session");
const blobService = require("../../services/blob");
let becca = null;
/**
* Base class for all backend entities.
*/
class AbstractBeccaEntity {
/** @protected */
beforeSaving() {
if (!this[this.constructor.primaryKeyName]) {
this[this.constructor.primaryKeyName] = utils.newEntityId();
}
}
/** @protected */
getUtcDateChanged() {
return this.utcDateModified || this.utcDateCreated;
}
/**
* @protected
* @returns {Becca}
*/
get becca() {
if (!becca) {
becca = require('../becca');
}
return becca;
}
/** @protected */
putEntityChange(isDeleted) {
entityChangesService.putEntityChange({
entityName: this.constructor.entityName,
entityId: this[this.constructor.primaryKeyName],
hash: this.generateHash(isDeleted),
isErased: false,
utcDateChanged: this.getUtcDateChanged(),
isSynced: this.constructor.entityName !== 'options' || !!this.isSynced
});
}
/**
* @protected
* @returns {string}
*/
generateHash(isDeleted) {
let contentToHash = "";
for (const propertyName of this.constructor.hashedProperties) {
contentToHash += `|${this[propertyName]}`;
}
if (isDeleted) {
contentToHash += "|deleted";
}
return utils.hash(contentToHash).substr(0, 10);
}
/** @protected */
getPojoToSave() {
return this.getPojo();
}
/**
* @protected
* @abstract
*/
getPojo() {
throw new Error(`Unimplemented getPojo() for entity '${this.constructor.name}'`)
}
/**
* Saves entity - executes SQL, but doesn't commit the transaction on its own
*
* @returns {this}
*/
save(opts = {}) {
const entityName = this.constructor.entityName;
const primaryKeyName = this.constructor.primaryKeyName;
const isNewEntity = !this[primaryKeyName];
this.beforeSaving(opts);
const pojo = this.getPojoToSave();
sql.transactional(() => {
sql.upsert(entityName, primaryKeyName, pojo);
if (entityName === 'recent_notes') {
return;
}
this.putEntityChange(!!this.isDeleted);
if (!cls.isEntityEventsDisabled()) {
const eventPayload = {
entityName,
entity: this
};
if (isNewEntity) {
eventService.emit(eventService.ENTITY_CREATED, eventPayload);
}
eventService.emit(eventService.ENTITY_CHANGED, eventPayload);
}
});
return this;
}
/** @protected */
_setContent(content, opts = {}) {
// client code asks to save entity even if blobId didn't change (something else was changed)
opts.forceSave = !!opts.forceSave;
opts.forceFrontendReload = !!opts.forceFrontendReload;
if (content === null || content === undefined) {
throw new Error(`Cannot set null content to ${this.constructor.primaryKeyName} '${this[this.constructor.primaryKeyName]}'`);
}
if (this.hasStringContent()) {
content = content.toString();
} else {
content = Buffer.isBuffer(content) ? content : Buffer.from(content);
}
const unencryptedContentForHashCalculation = this.#getUnencryptedContentForHashCalculation(content);
if (this.isProtected) {
if (protectedSessionService.isProtectedSessionAvailable()) {
content = protectedSessionService.encrypt(content);
} else {
throw new Error(`Cannot update content of blob since protected session is not available.`);
}
}
sql.transactional(() => {
const newBlobId = this.#saveBlob(content, unencryptedContentForHashCalculation, opts);
const oldBlobId = this.blobId;
if (newBlobId !== oldBlobId || opts.forceSave) {
this.blobId = newBlobId;
this.save();
if (newBlobId !== oldBlobId) {
this.#deleteBlobIfNotUsed(oldBlobId);
}
}
});
}
#deleteBlobIfNotUsed(oldBlobId) {
if (sql.getValue("SELECT 1 FROM notes WHERE blobId = ? LIMIT 1", [oldBlobId])) {
return;
}
if (sql.getValue("SELECT 1 FROM attachments WHERE blobId = ? LIMIT 1", [oldBlobId])) {
return;
}
if (sql.getValue("SELECT 1 FROM revisions WHERE blobId = ? LIMIT 1", [oldBlobId])) {
return;
}
sql.execute("DELETE FROM blobs WHERE blobId = ?", [oldBlobId]);
// blobs are not marked as erased in entity_changes, they are just purged completely
// this is because technically every keystroke can create a new blob, and there would be just too many
sql.execute("DELETE FROM entity_changes WHERE entityName = 'blobs' AND entityId = ?", [oldBlobId]);
}
#getUnencryptedContentForHashCalculation(unencryptedContent) {
if (this.isProtected) {
// a "random" prefix makes sure that the calculated hash/blobId is different for a decrypted/encrypted content
const encryptedPrefixSuffix = "t$[nvQg7q)&amp;_ENCRYPTED_?M:Bf&amp;j3jr_";
return Buffer.isBuffer(unencryptedContent)
? Buffer.concat([Buffer.from(encryptedPrefixSuffix), unencryptedContent])
: `${encryptedPrefixSuffix}${unencryptedContent}`;
} else {
return unencryptedContent;
}
}
#saveBlob(content, unencryptedContentForHashCalculation, opts = {}) {
/*
* We're using the unencrypted blob for the hash calculation, because otherwise the random IV would
* cause every content blob to be unique which would balloon the database size (esp. with revisioning).
* This has minor security implications (it's easy to infer that given content is shared between different
* notes/attachments), but the trade-off comes out clearly positive.
*/
const newBlobId = utils.hashedBlobId(unencryptedContentForHashCalculation);
const blobNeedsInsert = !sql.getValue('SELECT 1 FROM blobs WHERE blobId = ?', [newBlobId]);
if (!blobNeedsInsert) {
return newBlobId;
}
const pojo = {
blobId: newBlobId,
content: content,
dateModified: dateUtils.localNowDateTime(),
utcDateModified: dateUtils.utcNowDateTime()
};
sql.upsert("blobs", "blobId", pojo);
// we can't reuse blobId as an entity_changes hash, because this one has to be calculatable without having
// access to the decrypted content
const hash = blobService.calculateContentHash(pojo);
entityChangesService.putEntityChange({
entityName: 'blobs',
entityId: newBlobId,
hash: hash,
isErased: false,
utcDateChanged: pojo.utcDateModified,
isSynced: true,
// overriding componentId will cause the frontend to think the change is coming from a different component
// and thus reload
componentId: opts.forceFrontendReload ? utils.randomString(10) : null
});
eventService.emit(eventService.ENTITY_CHANGED, {
entityName: 'blobs',
entity: this
});
return newBlobId;
}
/**
* @protected
* @returns {string|Buffer}
*/
_getContent() {
const row = sql.getRow(`SELECT content FROM blobs WHERE blobId = ?`, [this.blobId]);
if (!row) {
throw new Error(`Cannot find content for ${this.constructor.primaryKeyName} '${this[this.constructor.primaryKeyName]}', blobId '${this.blobId}'`);
}
return blobService.processContent(row.content, this.isProtected, this.hasStringContent());
}
/**
* Mark the entity as (soft) deleted. It will be completely erased later.
*
* This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
*
* @param [deleteId=null]
*/
markAsDeleted(deleteId = null) {
const entityId = this[this.constructor.primaryKeyName];
const entityName = this.constructor.entityName;
this.utcDateModified = dateUtils.utcNowDateTime();
sql.execute(`UPDATE ${entityName} SET isDeleted = 1, deleteId = ?, utcDateModified = ?
WHERE ${this.constructor.primaryKeyName} = ?`,
[deleteId, this.utcDateModified, entityId]);
if (this.dateModified) {
this.dateModified = dateUtils.localNowDateTime();
sql.execute(`UPDATE ${entityName} SET dateModified = ? WHERE ${this.constructor.primaryKeyName} = ?`,
[this.dateModified, entityId]);
}
log.info(`Marking ${entityName} ${entityId} as deleted`);
this.putEntityChange(true);
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
}
markAsDeletedSimple() {
const entityId = this[this.constructor.primaryKeyName];
const entityName = this.constructor.entityName;
this.utcDateModified = dateUtils.utcNowDateTime();
sql.execute(`UPDATE ${entityName} SET isDeleted = 1, utcDateModified = ?
WHERE ${this.constructor.primaryKeyName} = ?`,
[this.utcDateModified, entityId]);
log.info(`Marking ${entityName} ${entityId} as deleted`);
this.putEntityChange(true);
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
}
}
module.exports = AbstractBeccaEntity;
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>

View File

@ -1,211 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: becca/entities/abstract_entity.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: becca/entities/abstract_entity.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>"use strict";
const utils = require('../../services/utils');
const sql = require('../../services/sql');
const entityChangesService = require('../../services/entity_changes');
const eventService = require("../../services/events");
const dateUtils = require("../../services/date_utils");
const cls = require("../../services/cls");
const log = require("../../services/log");
let becca = null;
/**
* Base class for all backend entities.
*/
class AbstractEntity {
beforeSaving() {
this.generateIdIfNecessary();
}
generateIdIfNecessary() {
if (!this[this.constructor.primaryKeyName]) {
this[this.constructor.primaryKeyName] = utils.newEntityId();
}
}
generateHash(isDeleted = false) {
let contentToHash = "";
for (const propertyName of this.constructor.hashedProperties) {
contentToHash += "|" + this[propertyName];
}
if (isDeleted) {
contentToHash += "|deleted";
}
return utils.hash(contentToHash).substr(0, 10);
}
getUtcDateChanged() {
return this.utcDateModified || this.utcDateCreated;
}
get becca() {
if (!becca) {
becca = require('../becca');
}
return becca;
}
addEntityChange(isDeleted = false) {
entityChangesService.addEntityChange({
entityName: this.constructor.entityName,
entityId: this[this.constructor.primaryKeyName],
hash: this.generateHash(isDeleted),
isErased: false,
utcDateChanged: this.getUtcDateChanged(),
isSynced: this.constructor.entityName !== 'options' || !!this.isSynced
});
}
getPojoToSave() {
return this.getPojo();
}
/**
* Saves entity - executes SQL, but doesn't commit the transaction on its own
*
* @returns {AbstractEntity}
*/
save() {
const entityName = this.constructor.entityName;
const primaryKeyName = this.constructor.primaryKeyName;
const isNewEntity = !this[primaryKeyName];
if (this.beforeSaving) {
this.beforeSaving();
}
const pojo = this.getPojoToSave();
sql.transactional(() => {
sql.upsert(entityName, primaryKeyName, pojo);
if (entityName === 'recent_notes') {
return;
}
this.addEntityChange(false);
if (!cls.isEntityEventsDisabled()) {
const eventPayload = {
entityName,
entity: this
};
if (isNewEntity) {
eventService.emit(eventService.ENTITY_CREATED, eventPayload);
}
eventService.emit(eventService.ENTITY_CHANGED, eventPayload);
}
});
return this;
}
/**
* Mark the entity as (soft) deleted. It will be completely erased later.
*
* This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
*
* @param [deleteId=null]
*/
markAsDeleted(deleteId = null) {
const entityId = this[this.constructor.primaryKeyName];
const entityName = this.constructor.entityName;
this.utcDateModified = dateUtils.utcNowDateTime();
sql.execute(`UPDATE ${entityName} SET isDeleted = 1, deleteId = ?, utcDateModified = ?
WHERE ${this.constructor.primaryKeyName} = ?`,
[deleteId, this.utcDateModified, entityId]);
if (this.dateModified) {
this.dateModified = dateUtils.localNowDateTime();
sql.execute(`UPDATE ${entityName} SET dateModified = ? WHERE ${this.constructor.primaryKeyName} = ?`,
[this.dateModified, entityId]);
}
log.info(`Marking ${entityName} ${entityId} as deleted`);
this.addEntityChange(true);
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
}
markAsDeletedSimple() {
const entityId = this[this.constructor.primaryKeyName];
const entityName = this.constructor.entityName;
this.utcDateModified = dateUtils.utcNowDateTime();
sql.execute(`UPDATE ${entityName} SET isDeleted = 1, utcDateModified = ?
WHERE ${this.constructor.primaryKeyName} = ?`,
[this.utcDateModified, entityId]);
log.info(`Marking ${entityName} ${entityId} as deleted`);
this.addEntityChange(true);
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
}
}
module.exports = AbstractEntity;
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>

View File

@ -0,0 +1,294 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: becca/entities/battachment.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: becca/entities/battachment.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>"use strict";
const utils = require('../../services/utils');
const dateUtils = require('../../services/date_utils');
const AbstractBeccaEntity = require("./abstract_becca_entity");
const sql = require("../../services/sql");
const protectedSessionService = require("../../services/protected_session");
const log = require("../../services/log");
const attachmentRoleToNoteTypeMapping = {
'image': 'image'
};
/**
* Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for
* larger amounts of data and generally not accessible to the user.
*
* @extends AbstractBeccaEntity
*/
class BAttachment extends AbstractBeccaEntity {
static get entityName() { return "attachments"; }
static get primaryKeyName() { return "attachmentId"; }
static get hashedProperties() { return ["attachmentId", "ownerId", "role", "mime", "title", "blobId", "utcDateScheduledForErasureSince"]; }
constructor(row) {
super();
if (!row.ownerId?.trim()) {
throw new Error("'ownerId' must be given to initialize a Attachment entity");
} else if (!row.role?.trim()) {
throw new Error("'role' must be given to initialize a Attachment entity");
} else if (!row.mime?.trim()) {
throw new Error("'mime' must be given to initialize a Attachment entity");
} else if (!row.title?.trim()) {
throw new Error("'title' must be given to initialize a Attachment entity");
}
/** @type {string} */
this.attachmentId = row.attachmentId;
/**
* either noteId or revisionId to which this attachment belongs
* @type {string}
*/
this.ownerId = row.ownerId;
/** @type {string} */
this.role = row.role;
/** @type {string} */
this.mime = row.mime;
/** @type {string} */
this.title = row.title;
/** @type {int} */
this.position = row.position;
/** @type {string} */
this.blobId = row.blobId;
/** @type {boolean} */
this.isProtected = !!row.isProtected;
/** @type {string} */
this.dateModified = row.dateModified;
/** @type {string} */
this.utcDateModified = row.utcDateModified;
/** @type {string} */
this.utcDateScheduledForErasureSince = row.utcDateScheduledForErasureSince;
/**
* optionally added to the entity
* @type {int}
*/
this.contentLength = row.contentLength;
this.decrypt();
}
/** @returns {BAttachment} */
copy() {
return new BAttachment({
ownerId: this.ownerId,
role: this.role,
mime: this.mime,
title: this.title,
blobId: this.blobId,
isProtected: this.isProtected
});
}
/** @returns {BNote} */
getNote() {
return this.becca.notes[this.ownerId];
}
/** @returns {boolean} true if the note has string content (not binary) */
hasStringContent() {
return utils.isStringNote(this.type, this.mime);
}
isContentAvailable() {
return !this.attachmentId // new attachment which was not encrypted yet
|| !this.isProtected
|| protectedSessionService.isProtectedSessionAvailable()
}
getTitleOrProtected() {
return this.isContentAvailable() ? this.title : '[protected]';
}
decrypt() {
if (!this.isProtected || !this.attachmentId) {
this.isDecrypted = true;
return;
}
if (!this.isDecrypted &amp;&amp; protectedSessionService.isProtectedSessionAvailable()) {
try {
this.title = protectedSessionService.decryptString(this.title);
this.isDecrypted = true;
}
catch (e) {
log.error(`Could not decrypt attachment ${this.attachmentId}: ${e.message} ${e.stack}`);
}
}
}
/** @returns {string|Buffer} */
getContent() {
return this._getContent();
}
/**
* @param content
* @param {object} [opts]
* @param {object} [opts.forceSave=false] - will also save this BAttachment entity
* @param {object} [opts.forceFrontendReload=false] - override frontend heuristics on when to reload, instruct to reload
*/
setContent(content, opts) {
this._setContent(content, opts);
}
/** @returns {{note: BNote, branch: BBranch}} */
convertToNote() {
if (this.type === 'search') {
throw new Error(`Note of type search cannot have child notes`);
}
if (!this.getNote()) {
throw new Error("Cannot find note of this attachment. It is possible that this is note revision's attachment. " +
"Converting note revision's attachments to note is not (yet) supported.");
}
if (!(this.role in attachmentRoleToNoteTypeMapping)) {
throw new Error(`Mapping from attachment role '${this.role}' to note's type is not defined`);
}
if (!this.isContentAvailable()) { // isProtected is the same for attachment
throw new Error(`Cannot convert protected attachment outside of protected session`);
}
const noteService = require('../../services/notes');
const { note, branch } = noteService.createNewNote({
parentNoteId: this.ownerId,
title: this.title,
type: attachmentRoleToNoteTypeMapping[this.role],
mime: this.mime,
content: this.getContent(),
isProtected: this.isProtected
});
this.markAsDeleted();
const parentNote = this.getNote();
if (this.role === 'image' &amp;&amp; parentNote.type === 'text') {
const origContent = parentNote.getContent();
const oldAttachmentUrl = `api/attachments/${this.attachmentId}/image/`;
const newNoteUrl = `api/images/${note.noteId}/`;
const fixedContent = utils.replaceAll(origContent, oldAttachmentUrl, newNoteUrl);
if (fixedContent !== origContent) {
parentNote.setContent(fixedContent);
}
noteService.asyncPostProcessContent(note, fixedContent);
}
return { note, branch };
}
getFileName() {
const type = this.role === 'image' ? 'image' : 'file';
return utils.formatDownloadTitle(this.title, type, this.mime);
}
beforeSaving() {
super.beforeSaving();
if (this.position === undefined || this.position === null) {
this.position = 10 + sql.getValue(`SELECT COALESCE(MAX(position), 0)
FROM attachments
WHERE ownerId = ?`, [this.noteId]);
}
this.dateModified = dateUtils.localNowDateTime();
this.utcDateModified = dateUtils.utcNowDateTime();
}
getPojo() {
return {
attachmentId: this.attachmentId,
ownerId: this.ownerId,
role: this.role,
mime: this.mime,
title: this.title,
position: this.position,
blobId: this.blobId,
isProtected: !!this.isProtected,
isDeleted: false,
dateModified: this.dateModified,
utcDateModified: this.utcDateModified,
utcDateScheduledForErasureSince: this.utcDateScheduledForErasureSince,
contentLength: this.contentLength
};
}
getPojoToSave() {
const pojo = this.getPojo();
delete pojo.contentLength;
if (pojo.isProtected) {
if (this.isDecrypted) {
pojo.title = protectedSessionService.encrypt(pojo.title);
}
else {
// updating protected note outside of protected session means we will keep original ciphertexts
delete pojo.title;
}
}
return pojo;
}
}
module.exports = BAttachment;
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: becca/entities/attribute.js</title>
<title>JSDoc: Source: becca/entities/battribute.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
@ -17,7 +17,7 @@
<div id="main">
<h1 class="page-title">Source: becca/entities/attribute.js</h1>
<h1 class="page-title">Source: becca/entities/battribute.js</h1>
@ -28,19 +28,26 @@
<article>
<pre class="prettyprint source linenums"><code>"use strict";
const Note = require('./note');
const AbstractEntity = require("./abstract_entity");
const BNote = require('./bnote');
const AbstractBeccaEntity = require("./abstract_becca_entity");
const sql = require("../../services/sql");
const dateUtils = require("../../services/date_utils");
const promotedAttributeDefinitionParser = require("../../services/promoted_attribute_definition_parser");
const {sanitizeAttributeName} = require("../../services/sanitize_attribute_name");
/**
* There are currently only two types of attributes, labels or relations.
* @typedef {"label" | "relation"} AttributeType
*/
/**
* Attribute is an abstract concept which has two real uses - label (key - value pair)
* and relation (representing named relationship between source and target note)
*
* @extends AbstractEntity
* @extends AbstractBeccaEntity
*/
class Attribute extends AbstractEntity {
class BAttribute extends AbstractBeccaEntity {
static get entityName() { return "attributes"; }
static get primaryKeyName() { return "attributeId"; }
static get hashedProperties() { return ["attributeId", "noteId", "type", "name", "value", "isInheritable"]; }
@ -74,7 +81,7 @@ class Attribute extends AbstractEntity {
this.attributeId = attributeId;
/** @type {string} */
this.noteId = noteId;
/** @type {string} */
/** @type {AttributeType} */
this.type = type;
/** @type {string} */
this.name = name;
@ -97,7 +104,7 @@ class Attribute extends AbstractEntity {
if (!(this.noteId in this.becca.notes)) {
// entities can come out of order in sync, create skeleton which will be filled later
this.becca.addNote(this.noteId, new Note({noteId: this.noteId}));
this.becca.addNote(this.noteId, new BNote({noteId: this.noteId}));
}
this.becca.notes[this.noteId].ownedAttributes.push(this);
@ -113,9 +120,23 @@ class Attribute extends AbstractEntity {
}
}
validate() {
if (!["label", "relation"].includes(this.type)) {
throw new Error(`Invalid attribute type '${this.type}' in attribute '${this.attributeId}' of note '${this.noteId}'`);
}
if (!this.name?.trim()) {
throw new Error(`Invalid empty name in attribute '${this.attributeId}' of note '${this.noteId}'`);
}
if (this.type === 'relation' &amp;&amp; !(this.value in this.becca.notes)) {
throw new Error(`Cannot save relation '${this.name}' of note '${this.noteId}' since it targets not existing note '${this.value}'.`);
}
}
get isAffectingSubtree() {
return this.isInheritable
|| (this.type === 'relation' &amp;&amp; this.name === 'template');
|| (this.type === 'relation' &amp;&amp; ['template', 'inherit'].includes(this.name));
}
get targetNoteId() { // alias
@ -137,18 +158,24 @@ class Attribute extends AbstractEntity {
}
/**
* @returns {Note|null}
* @returns {BNote|null}
*/
getNote() {
return this.becca.getNote(this.noteId);
const note = this.becca.getNote(this.noteId);
if (!note) {
throw new Error(`Note '${this.noteId}' of attribute '${this.attributeId}', type '${this.type}', name '${this.name}' does not exist.`);
}
return note;
}
/**
* @returns {Note|null}
* @returns {BNote|null}
*/
getTargetNote() {
if (this.type !== 'relation') {
throw new Error(`Attribute ${this.attributeId} is not relation`);
throw new Error(`Attribute '${this.attributeId}' is not a relation.`);
}
if (!this.value) {
@ -159,7 +186,7 @@ class Attribute extends AbstractEntity {
}
/**
* @return {boolean}
* @returns {boolean}
*/
isDefinition() {
return this.type === 'label' &amp;&amp; (this.name.startsWith('label:') || this.name.startsWith('relation:'));
@ -183,19 +210,23 @@ class Attribute extends AbstractEntity {
return !(this.attributeId in this.becca.attributes);
}
beforeSaving() {
if (!this.value) {
if (this.type === 'relation') {
throw new Error(`Cannot save relation ${this.name} since it does not target any note.`);
}
beforeSaving(opts = {}) {
if (!opts.skipValidation) {
this.validate();
}
this.name = sanitizeAttributeName(this.name);
if (!this.value) {
// null value isn't allowed
this.value = "";
}
if (this.position === undefined) {
// TODO: can be calculated from becca
this.position = 1 + sql.getValue(`SELECT COALESCE(MAX(position), 0) FROM attributes WHERE noteId = ?`, [this.noteId]);
if (this.position === undefined || this.position === null) {
const maxExistingPosition = this.getNote().getAttributes()
.reduce((maxPosition, attr) => Math.max(maxPosition, attr.position || 0), 0);
this.position = maxExistingPosition + 10;
}
if (!this.isInheritable) {
@ -224,7 +255,7 @@ class Attribute extends AbstractEntity {
}
createClone(type, name, value, isInheritable) {
return new Attribute({
return new BAttribute({
noteId: this.noteId,
type: type,
name: name,
@ -236,7 +267,7 @@ class Attribute extends AbstractEntity {
}
}
module.exports = Attribute;
module.exports = BAttribute;
</code></pre>
</article>
</section>
@ -247,13 +278,13 @@ module.exports = Attribute;
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
</footer>
<script> prettyPrint(); </script>

View File

@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: becca/entities/bblob.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: becca/entities/bblob.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>class BBlob {
static get entityName() { return "blobs"; }
static get primaryKeyName() { return "blobId"; }
static get hashedProperties() { return ["blobId", "content"]; }
constructor(row) {
/** @type {string} */
this.blobId = row.blobId;
/** @type {string|Buffer} */
this.content = row.content;
/** @type {int} */
this.contentLength = row.contentLength;
/** @type {string} */
this.dateModified = row.dateModified;
/** @type {string} */
this.utcDateModified = row.utcDateModified;
}
getPojo() {
return {
blobId: this.blobId,
content: this.content,
contentLength: this.contentLength,
dateModified: this.dateModified,
utcDateModified: this.utcDateModified
};
}
}
module.exports = BBlob;
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: becca/entities/branch.js</title>
<title>JSDoc: Source: becca/entities/bbranch.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
@ -17,7 +17,7 @@
<div id="main">
<h1 class="page-title">Source: becca/entities/branch.js</h1>
<h1 class="page-title">Source: becca/entities/bbranch.js</h1>
@ -28,22 +28,24 @@
<article>
<pre class="prettyprint source linenums"><code>"use strict";
const Note = require('./note');
const AbstractEntity = require("./abstract_entity");
const sql = require("../../services/sql");
const BNote = require('./bnote');
const AbstractBeccaEntity = require("./abstract_becca_entity");
const dateUtils = require("../../services/date_utils");
const utils = require("../../services/utils.js");
const TaskContext = require("../../services/task_context.js");
const cls = require("../../services/cls.js");
const log = require("../../services/log.js");
const utils = require("../../services/utils");
const TaskContext = require("../../services/task_context");
const cls = require("../../services/cls");
const log = require("../../services/log");
/**
* Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
* parents.
*
* @extends AbstractEntity
* Note that you should not rely on the branch's identity, since it can change easily with a note's move.
* Always check noteId instead.
*
* @extends AbstractBeccaEntity
*/
class Branch extends AbstractEntity {
class BBranch extends AbstractBeccaEntity {
static get entityName() { return "branches"; }
static get primaryKeyName() { return "branchId"; }
// notePosition is not part of hash because it would produce a lot of updates in case of reordering
@ -79,7 +81,7 @@ class Branch extends AbstractEntity {
this.noteId = noteId;
/** @type {string} */
this.parentNoteId = parentNoteId;
/** @type {string} */
/** @type {string|null} */
this.prefix = prefix;
/** @type {int} */
this.notePosition = notePosition;
@ -98,45 +100,47 @@ class Branch extends AbstractEntity {
this.becca.childParentToBranch[`${this.noteId}-${this.parentNoteId}`] = this;
if (this.branchId === 'root') {
const childNote = this.childNote;
if (!childNote.parentBranches.includes(this)) {
childNote.parentBranches.push(this);
}
if (this.noteId === 'root') {
return;
}
const childNote = this.childNote;
const parentNote = this.parentNote;
if (!childNote.parents.includes(parentNote)) {
childNote.parents.push(parentNote);
}
if (!childNote.parentBranches.includes(this)) {
childNote.parentBranches.push(this);
}
if (!parentNote.children.includes(childNote)) {
parentNote.children.push(childNote);
}
}
/** @returns {Note} */
/** @returns {BNote} */
get childNote() {
if (!(this.noteId in this.becca.notes)) {
// entities can come out of order in sync/import, create skeleton which will be filled later
this.becca.addNote(this.noteId, new Note({noteId: this.noteId}));
this.becca.addNote(this.noteId, new BNote({noteId: this.noteId}));
}
return this.becca.notes[this.noteId];
}
/** @returns {BNote} */
getNote() {
return this.childNote;
}
/** @returns {Note} */
/** @returns {BNote|undefined} - root branch will have undefined parent, all other branches have to have a parent note */
get parentNote() {
if (!(this.parentNoteId in this.becca.notes)) {
if (!(this.parentNoteId in this.becca.notes) &amp;&amp; this.parentNoteId !== 'none') {
// entities can come out of order in sync/import, create skeleton which will be filled later
this.becca.addNote(this.parentNoteId, new Note({noteId: this.parentNoteId}));
this.becca.addNote(this.parentNoteId, new BNote({noteId: this.parentNoteId}));
}
return this.becca.notes[this.parentNoteId];
@ -146,13 +150,26 @@ class Branch extends AbstractEntity {
return !(this.branchId in this.becca.branches);
}
/**
* Branch is weak when its existence should not hinder deletion of its note.
* As a result, note with only weak branches should be immediately deleted.
* An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
* not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
* of deletion should not act as a clone.
*
* @returns {boolean}
*/
get isWeak() {
return ['_share', '_lbBookmarks'].includes(this.parentNoteId);
}
/**
* Delete a branch. If this is a last note's branch, delete the note as well.
*
* @param {string} [deleteId] - optional delete identified
* @param {TaskContext} [taskContext]
*
* @return {boolean} - true if note has been deleted, false otherwise
* @returns {boolean} - true if note has been deleted, false otherwise
*/
deleteBranch(deleteId, taskContext) {
if (!deleteId) {
@ -165,8 +182,19 @@ class Branch extends AbstractEntity {
taskContext.increaseProgressCount();
if (this.branchId === 'root'
|| this.noteId === 'root'
const note = this.getNote();
if (!taskContext.noteDeletionHandlerTriggered) {
const parentBranches = note.getParentBranches();
if (parentBranches.length === 1 &amp;&amp; parentBranches[0] === this) {
// needs to be run before branches and attributes are deleted and thus attached relations disappear
const handlers = require("../../services/handlers");
handlers.runAttachedRelations(note, 'runOnNoteDeletion', note);
}
}
if (this.noteId === 'root'
|| this.noteId === cls.getHoistedNoteId()) {
throw new Error("Can't delete root or hoisted branch/note");
@ -174,19 +202,24 @@ class Branch extends AbstractEntity {
this.markAsDeleted(deleteId);
const note = this.getNote();
const notDeletedBranches = note.getParentBranches();
const notDeletedBranches = note.getStrongParentBranches();
if (notDeletedBranches.length === 0) {
for (const weakBranch of note.getParentBranches()) {
weakBranch.markAsDeleted(deleteId);
}
for (const childBranch of note.getChildBranches()) {
childBranch.deleteBranch(deleteId, taskContext);
}
// first delete children and then parent - this will show up better in recent changes
log.info("Deleting note " + note.noteId);
log.info(`Deleting note '${note.noteId}'`);
for (const attribute of note.getOwnedAttributes()) {
this.becca.notes[note.noteId].isBeingDeleted = true;
for (const attribute of note.getOwnedAttributes().slice()) {
attribute.markAsDeleted(deleteId);
}
@ -194,6 +227,10 @@ class Branch extends AbstractEntity {
relation.markAsDeleted(deleteId);
}
for (const attachment of note.getAttachments()) {
attachment.markAsDeleted(deleteId);
}
note.markAsDeleted(deleteId);
return true;
@ -204,16 +241,34 @@ class Branch extends AbstractEntity {
}
beforeSaving() {
if (!this.noteId || !this.parentNoteId) {
throw new Error(`noteId and parentNoteId are mandatory properties for Branch`);
}
this.branchId = `${this.parentNoteId}_${this.noteId}`;
if (this.notePosition === undefined || this.notePosition === null) {
// TODO finding new position can be refactored into becca
const maxNotePos = sql.getValue('SELECT MAX(notePosition) FROM branches WHERE parentNoteId = ? AND isDeleted = 0', [this.parentNoteId]);
this.notePosition = maxNotePos === null ? 0 : maxNotePos + 10;
let maxNotePos = 0;
for (const childBranch of this.parentNote.getChildBranches()) {
if (maxNotePos &lt; childBranch.notePosition
&amp;&amp; childBranch.noteId !== '_hidden' // hidden has a very large notePosition to always stay last
) {
maxNotePos = childBranch.notePosition;
}
}
this.notePosition = maxNotePos + 10;
}
if (!this.isExpanded) {
this.isExpanded = false;
}
if (!this.prefix?.trim()) {
this.prefix = null;
}
this.utcDateModified = dateUtils.utcNowDateTime();
super.beforeSaving();
@ -235,17 +290,24 @@ class Branch extends AbstractEntity {
}
createClone(parentNoteId, notePosition) {
return new Branch({
noteId: this.noteId,
parentNoteId: parentNoteId,
notePosition: notePosition,
prefix: this.prefix,
isExpanded: this.isExpanded
});
const existingBranch = this.becca.getBranchFromChildAndParent(this.noteId, parentNoteId);
if (existingBranch) {
existingBranch.notePosition = notePosition;
return existingBranch;
} else {
return new BBranch({
noteId: this.noteId,
parentNoteId: parentNoteId,
notePosition: notePosition,
prefix: this.prefix,
isExpanded: this.isExpanded
});
}
}
}
module.exports = Branch;
module.exports = BBranch;
</code></pre>
</article>
</section>
@ -256,13 +318,13 @@ module.exports = Branch;
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
</footer>
<script> prettyPrint(); </script>

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: becca/entities/etapi_token.js</title>
<title>JSDoc: Source: becca/entities/betapi_token.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
@ -17,7 +17,7 @@
<div id="main">
<h1 class="page-title">Source: becca/entities/etapi_token.js</h1>
<h1 class="page-title">Source: becca/entities/betapi_token.js</h1>
@ -29,7 +29,7 @@
<pre class="prettyprint source linenums"><code>"use strict";
const dateUtils = require('../../services/date_utils');
const AbstractEntity = require("./abstract_entity");
const AbstractBeccaEntity = require("./abstract_becca_entity");
/**
* EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
@ -40,9 +40,9 @@ const AbstractEntity = require("./abstract_entity");
* The format user is presented with is "&lt;etapiTokenId>_&lt;tokenHash>". This is also called "authToken" to distinguish it
* from tokenHash and token.
*
* @extends AbstractEntity
* @extends AbstractBeccaEntity
*/
class EtapiToken extends AbstractEntity {
class BEtapiToken extends AbstractBeccaEntity {
static get entityName() { return "etapi_tokens"; }
static get primaryKeyName() { return "etapiTokenId"; }
static get hashedProperties() { return ["etapiTokenId", "name", "tokenHash", "utcDateCreated", "utcDateModified", "isDeleted"]; }
@ -103,7 +103,7 @@ class EtapiToken extends AbstractEntity {
}
}
module.exports = EtapiToken;
module.exports = BEtapiToken;
</code></pre>
</article>
</section>
@ -114,13 +114,13 @@ module.exports = EtapiToken;
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
</footer>
<script> prettyPrint(); </script>

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: becca/entities/option.js</title>
<title>JSDoc: Source: becca/entities/boption.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
@ -17,7 +17,7 @@
<div id="main">
<h1 class="page-title">Source: becca/entities/option.js</h1>
<h1 class="page-title">Source: becca/entities/boption.js</h1>
@ -29,14 +29,14 @@
<pre class="prettyprint source linenums"><code>"use strict";
const dateUtils = require('../../services/date_utils');
const AbstractEntity = require("./abstract_entity");
const AbstractBeccaEntity = require("./abstract_becca_entity");
/**
* Option represents name-value pair, either directly configurable by the user or some system property.
* Option represents a name-value pair, either directly configurable by the user or some system property.
*
* @extends AbstractEntity
* @extends AbstractBeccaEntity
*/
class Option extends AbstractEntity {
class BOption extends AbstractBeccaEntity {
static get entityName() { return "options"; }
static get primaryKeyName() { return "name"; }
static get hashedProperties() { return ["name", "value"]; }
@ -44,6 +44,11 @@ class Option extends AbstractEntity {
constructor(row) {
super();
this.updateFromRow(row);
this.becca.options[this.name] = this;
}
updateFromRow(row) {
/** @type {string} */
this.name = row.name;
/** @type {string} */
@ -52,8 +57,6 @@ class Option extends AbstractEntity {
this.isSynced = !!row.isSynced;
/** @type {string} */
this.utcDateModified = row.utcDateModified;
this.becca.options[this.name] = this;
}
beforeSaving() {
@ -72,7 +75,7 @@ class Option extends AbstractEntity {
}
}
module.exports = Option;
module.exports = BOption;
</code></pre>
</article>
</section>
@ -83,13 +86,13 @@ module.exports = Option;
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
</footer>
<script> prettyPrint(); </script>

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: becca/entities/recent_note.js</title>
<title>JSDoc: Source: becca/entities/brecent_note.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
@ -17,7 +17,7 @@
<div id="main">
<h1 class="page-title">Source: becca/entities/recent_note.js</h1>
<h1 class="page-title">Source: becca/entities/brecent_note.js</h1>
@ -29,14 +29,14 @@
<pre class="prettyprint source linenums"><code>"use strict";
const dateUtils = require('../../services/date_utils');
const AbstractEntity = require("./abstract_entity");
const AbstractBeccaEntity = require("./abstract_becca_entity");
/**
* RecentNote represents recently visited note.
*
* @extends AbstractEntity
* @extends AbstractBeccaEntity
*/
class RecentNote extends AbstractEntity {
class BRecentNote extends AbstractBeccaEntity {
static get entityName() { return "recent_notes"; }
static get primaryKeyName() { return "noteId"; }
@ -60,7 +60,7 @@ class RecentNote extends AbstractEntity {
}
}
module.exports = RecentNote;
module.exports = BRecentNote;
</code></pre>
</article>
</section>
@ -71,13 +71,13 @@ module.exports = RecentNote;
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
</footer>
<script> prettyPrint(); </script>

Some files were not shown because too many files have changed in this diff Show More