Compare commits

..

973 Commits

Author SHA1 Message Date
zadam 67e69f1940 release 0.53.0-beta
Publish Docker image / Push Docker image to multiple registries (push) Failing after 40s
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
Publish Docker image / Push Docker image to multiple registries (push) Failing after 43s
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
Publish Docker image / Push Docker image to multiple registries (push) Failing after 39s
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
Publish Docker image / Push Docker image to multiple registries (push) Failing after 33s
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
zadam 388dcadef3 release 0.52.0-beta
Publish Docker image / Push Docker image to multiple registries (push) Failing after 40s
2022-05-27 22:06:07 +02:00
zadam 8905148dbc fix NPE in note map, closes #2877 2022-05-27 21:55:58 +02:00
zadam daa36192cc fix jumping of find dialog in read only code 2022-05-27 21:50:59 +02:00
zadam ade77e5fb8 find widget readonly notes 2022-05-26 16:29:54 +02:00
zadam f250b72563 findwidget in read only notes WIP 2022-05-25 23:38:06 +02:00
zadam 37cb5f5e9a added previous/next buttons to the find widget 2022-05-25 20:43:52 +02:00
zadam 82fcc97ed2 Merge branch 'custom-search-dialog' 2022-05-25 20:32:22 +02:00
zadam 53e9c8cdac upgrades 2022-05-24 21:34:32 +02:00
zadam 541d451168 tree css changes to make selection and active note more distinct 2022-05-24 21:33:07 +02:00
zadam 7c64dc9440 fix coloring of backlinks popup in dark theme 2022-05-22 23:29:07 +02:00
zadam 27570a7756 fix for canvas theme after opening help 2022-05-22 15:27:40 +02:00
zadam d6931f7441 fix setting theme on new canvas note 2022-05-22 14:27:16 +02:00
zadam 7d39d080f5 switching note type will reevalute max content width setting 2022-05-22 14:24:47 +02:00
zadam 13ccd2ba67 remove the canvas dependency (transitive dep of jsdom) in postinstall 2022-05-22 13:45:49 +02:00
zadam 81fd7397e4 added underline to more distinguish selected items in the tree, #2865 2022-05-22 13:45:15 +02:00
zadam 6f75f944a3 Merge pull request #2864 from dousha/master
Fix docker data permissions
2022-05-21 22:55:59 +02:00
Jiahao Lee 308b0f7464 Remove unneeded packages 2022-05-22 03:35:26 +08:00
zadam 678e883044 switch excalidraw theme (light/dark) based on trilium setting 2022-05-21 21:08:24 +02:00
zadam 819cf0907d add option to disable auto-download of images for offline storage, #2859 2022-05-21 14:00:53 +02:00
dousha 942f17b2f4 fix docker file permissions so 777 is no longer needed 2022-05-21 13:25:59 +08:00
zadam 2085dc5ed4 minor canvas note cleanup 2022-05-19 23:00:07 +02:00
zadam a1d1b4580a Merge remote-tracking branch 'origin/stable' 2022-05-18 23:00:49 +02:00
zadam 9e089cc7cd disable COEP, fixes #2858 2022-05-18 22:56:29 +02:00
zadam cd622cbdd7 find widget refactoring to use note context 2022-05-17 23:53:35 +02:00
zadam 4978a3ff1a find widget improvements 2022-05-17 23:22:28 +02:00
zadam fca0b82610 find widget fixes 2022-05-17 22:11:45 +02:00
zadam 6cef1082b2 Merge remote-tracking branch 'origin/stable' into custom-search-dialog 2022-05-17 22:07:11 +02:00
zadam 37eb16b2f3 moved protected session expiration scheduling #2855 2022-05-17 20:39:37 +02:00
zadam c24c807921 delay protected session expiration check after DB init, fixes #2855 2022-05-17 20:39:37 +02:00
zadam 5bc629d1c7 moved protected session expiration scheduling #2855 2022-05-17 20:39:21 +02:00
zadam 04379b4e1f delay protected session expiration check after DB init, fixes #2855 2022-05-17 20:22:33 +02:00
zadam c51e6107a1 findwidget cleanup 2022-05-16 23:56:43 +02:00
zadam bb7ad496bf findwidget cleanup 2022-05-15 22:51:26 +02:00
zadam c50d8e85dc findwidget cleanup 2022-05-15 21:03:51 +02:00
zadam 1d8664927d Merge branch 'master' into custom-search-dialog 2022-05-15 20:35:26 +02:00
zadam dbb5d02ecf log the time spent during optimization process 2022-05-15 20:34:47 +02:00
zadam 593a275795 added #titleTemplate, closes #2852 2022-05-15 15:21:35 +02:00
zadam 6778e1e60e findwidget cleanup 2022-05-15 12:09:30 +02:00
zadam 36308c307b findwidget cleanup 2022-05-14 22:33:45 +02:00
zadam 078fc420b0 findwidget merge from upstream 2022-05-14 21:06:14 +02:00
zadam 8ec814c29f Merge branch 'master' into custom-search-dialog
# Conflicts:
#	docs/frontend_api/FrontendScriptApi.html
#	package-lock.json
#	package.json
2022-05-14 20:50:43 +02:00
zadam e87e065100 protected session expiration timer moved to backend, closes #2847 2022-05-13 23:20:56 +02:00
zadam 8318ab7ac0 added triggerCommand and triggerEvent into frontend API 2022-05-13 22:33:57 +02:00
zadam 87b75a9a22 Merge pull request #2798 from thfrei/excalidraw
New note type `canvas-note` using excalidraw (hand drawn notes, sketching, pen)
2022-05-12 23:48:16 +02:00
zadam 8df3b0a5bd Merge branch 'master' into excalidraw 2022-05-12 23:46:52 +02:00
zadam 6906c82408 changed regex operator to %= 2022-05-11 23:19:32 +02:00
zadam 45edef2d71 new ~ operator in search for regex 2022-05-11 23:06:14 +02:00
zadam bf49648896 allow operators =, *= and =* on note content 2022-05-11 22:43:21 +02:00
zadam 91d23c540a refactored note_content_protected_fulltext.js and note_content_unprotected_fulltext.js into one class 2022-05-11 21:33:41 +02:00
Tom 1cbf918024 update comment and discussion about canvas note 2022-05-11 09:29:54 +02:00
Tom 26f3c1d453 rename canvas_note_share to canvas_share to align witih refactor 2022-05-11 09:06:30 +02:00
zadam c421ee79b0 increase DB version 2022-05-10 23:47:25 +02:00
zadam 77f8474d83 don't fill recent notes into entity_changes
(cherry picked from commit 963c18b8e4)
2022-05-10 23:45:28 +02:00
zadam 9a04a76672 remove recent notes from entity changes migration, #2842
(cherry picked from commit bbbad67764)
2022-05-10 23:45:28 +02:00
zadam 963c18b8e4 don't fill recent notes into entity_changes 2022-05-10 23:45:06 +02:00
zadam bbbad67764 remove recent notes from entity changes migration, #2842 2022-05-10 23:42:28 +02:00
Tom 3491e71084 handle note.type changing 2022-05-10 13:53:50 +02:00
Tom c85f70e197 remove obsolete errorSvg 2022-05-10 13:47:43 +02:00
Tom 3df712b64f refactor canvas-note to canvas 2022-05-10 13:43:05 +02:00
Tom 160bd0a790 remove commented logs to clean up code 2022-05-10 13:32:25 +02:00
Tom 81e0c6dcc2 simplify code 2022-05-10 13:29:24 +02:00
Tom 11bd48a1b5 rename ExcalidrawReactApp() to createExcalidrawReactApp() 2022-05-10 13:28:14 +02:00
Tom 61657087f5 move debounce to library, remove unnecessary binds, replaceassets only for canvas 2022-05-10 13:26:29 +02:00
zadam 87f436c6ea search dialog WIP from custom widget from antoniotejada 2022-05-09 23:13:34 +02:00
Tom 065e4f55c3 remove logs, add explanation to collab 2022-05-09 17:25:20 +02:00
Tom 92adcf82e4 remove debug helper with uniqueId 2022-05-09 17:05:49 +02:00
Tom 06e0f2418c remove magic constants for scene_version and give them a name 2022-05-09 17:00:24 +02:00
Tom 35c4c61d15 sync canvas icon of tree_context_menu 2022-05-09 16:57:23 +02:00
Tom a168edb168 move sleep to general utisl function 2022-05-09 16:54:43 +02:00
Tom d2975bbd21 remove obsolete comments 2022-05-09 16:47:40 +02:00
Tom 358e8c548c remove branch bugfix 2022-05-09 16:47:28 +02:00
Tom f85ed672cc moving canvas_note_share to src/share and add routes 2022-05-09 16:38:23 +02:00
Tom 83f1a68bfd fix errorSvg.js path 2022-05-09 16:26:30 +02:00
Tom 552e5d7d06 typo in note.type 2022-05-09 16:18:06 +02:00
Tom 9c7f8cf5d8 extract errorSvg 2022-05-09 16:17:37 +02:00
Tom f0f9274a3c remove route without filename 2022-05-09 16:17:14 +02:00
Tom 65c725c21e add jsdoc to indicate possibility to use getContent async 2022-05-09 16:14:03 +02:00
Tom dfa30358c5 ensure external assets in excalidraw are avoided 2022-05-09 16:08:56 +02:00
Tom 2394fe6ed9 reduce redundant package version to simplify upgrade 2022-05-09 15:16:12 +02:00
Tom 6cae68288d adhere to convention, prefixing jquery objects with $ and dom not 2022-05-09 15:15:07 +02:00
zadam 83afb89a16 lib upgrades 2022-05-03 23:53:46 +02:00
zadam 93cc6b12ec added new APIs to access note detail, #2806 2022-05-03 23:25:28 +02:00
Tom dc35df9f63 optimize canvas_note share to make it more clear about view mode and excalidraw 2022-05-03 22:44:52 +02:00
Tom 1a4bc0b989 clean up code 2022-05-03 22:06:24 +02:00
Tom a37d75a08f upd package-lock version 2022-05-03 22:01:53 +02:00
Tom 8d510a3fdd Merge remote-tracking branch 'upstream/master' into excalidraw
conflict in
- package-lock (accept incoming),
- routes (remove the option to have image without filename, since it is not really necessary for canvas_note)
- note_detail
2022-05-03 21:56:52 +02:00
Matt 7bcd1c3009 Add download button to shared canvases (#7)
thx @sigaloid 

* Add download button to shared canvases
* Update canvas_note_share.js
* Update canvas_note_share.js
* Update canvas_note_share.js
* Change to more accurate language
2022-05-03 21:43:26 +02:00
zadam 5dab189815 recovery for tree cycle errors, #2831 2022-05-03 00:30:09 +02:00
zadam a9dc62505d fix height of textarea of SQL console 2022-05-02 21:23:40 +02:00
zadam 26e1ff4e16 release 0.51.2
Publish Docker image / Push Docker image to multiple registries (push) Failing after 38s
2022-05-01 23:18:35 +02:00
zadam b3763eed61 make sure shaca is loaded before any request 2022-05-01 23:16:47 +02:00
zadam f9c01851ef fix missing closing div tag in word count demo widget, closes #2829 2022-05-01 22:47:26 +02:00
zadam 6b61b0604a improve hiding of edit button #2787 2022-05-01 22:44:23 +02:00
zadam f705c432fd allow combining tokens in text and title/attributes, fixes #2820 2022-04-29 22:59:00 +02:00
zadam 70edd9a210 allow searching within mermaid diagrams, closes #2821 2022-04-29 22:36:05 +02:00
zadam 0a45b58784 fix doubling of icon tooltips, closes #2811 2022-04-24 13:23:01 +02:00
zadam dbd312c88d addTextToEditor appends text to the end instead of the beginning 2022-04-23 23:07:08 +02:00
zadam 11578b1bc3 fix "isActive()" detection to work well with splits, #2806 2022-04-23 23:06:42 +02:00
zadam 569c80f551 release 0.51.1-beta
Publish Docker image / Push Docker image to multiple registries (push) Failing after 38s
2022-04-22 00:07:59 +02:00
zadam 3b58b83f8b improved logging 2022-04-19 23:36:21 +02:00
zadam 643a5e5b16 moving deleteNote and deleteBranch into entities to make them accessible to scripts, #2792 2022-04-19 23:06:46 +02:00
Tom 4e4010e15e update styles, fix share view 2022-04-19 21:46:25 +02:00
Tom 6bdaf050c5 replace excalidraw.com asset in svg with EXCALIDRAW_ASSET_PATH, clean up code 2022-04-19 14:39:53 +02:00
Tom 05c8c6cfaa set express same as master 4.17.3 2022-04-19 00:24:41 +02:00
Tom 2441515666 set EXCALIDRAW_ASSET_PATH to avoid loading from unpkg.com 2022-04-19 00:21:29 +02:00
Tom c42bcd6c59 remove icon-set so long as not clear how to use (preferably use special trilium note!) 2022-04-19 00:21:29 +02:00
Tom fc95bb8f18 add onLinkHandler experimental 2022-04-19 00:21:29 +02:00
Tom cb88f316db basic share view render (css wrong) 2022-04-19 00:21:29 +02:00
Tom e19ddc10d3 make revision and renderer svg to shrink to box but not enlarge 2022-04-19 00:21:29 +02:00
Tom d3e86acfaa explain checkFullHeight() due to missleading name 2022-04-19 00:21:29 +02:00
Tom 536643ed3b add undefined check for branch
unclear why this happens
2022-04-19 00:21:29 +02:00
Tom 9771b441ad missing path2d support for freedawings, remove node-side rendering, allow async getContent()
* ## Excalidraw and SVG
 * 2022-04-16 - @thfrei
 *
 * Known issues:
 *  - excalidraw-to-svg (node.js) does not render any hand drawn (freedraw) paths. There is an issue with
 *    Path2D object not present in node-canvas library used by jsdom. (See Trilium PR for samples and other issues
 *    in respective library. Link will be added later). Related links:
 *     - https://github.com/Automattic/node-canvas/pull/2013
 *     - https://github.com/google/canvas-5-polyfill
 *     - https://github.com/Automattic/node-canvas/issues/1116
 *     - https://www.npmjs.com/package/path2d-polyfill
 *  - excalidraw-to-svg (node.js) takes quite some time to load an image (1-2s)
 *  - excalidraw-utils (browser) does render freedraw, however NOT freedraw with background
 *
 * Due to this issues, we opt to use **only excalidraw in the frontend**. Upon saving, we will also get the SVG
 * output from the live excalidraw instance. We will save this **SVG side by side the native excalidraw format
 * in the trilium note**.
 *
 * Pro: we will combat bit-rot. Showing the SVG will be very fast, since it is already rendered.
 * Con: The note will get bigger (maybe +30%?), we will generate more bandwith.
 *      (However, using trilium desktop instance, does not care too much about bandwidth. Size increase is probably
 *       acceptable, as a trade off.)
2022-04-19 00:21:20 +02:00
Tom c295fdb142 rename excalidraw icon libraries 2022-04-19 00:20:21 +02:00
Tom Free ee7aa3d3da remove manually added, static libraries for excalidraw, react, etc. 2022-04-19 00:20:21 +02:00
Tom Free e437a9d70f note about buggy excalidraw-utils for browser svg rendering 2022-04-19 00:20:21 +02:00
Tom Free a8655fcd27 add canvas-note-type at some missing places after rebase 2022-04-19 00:20:21 +02:00
Tom aefc9f1593 add excalidraw excalidraw/utils, react and react-dom as npm-dependencies 2022-04-19 00:20:13 +02:00
Tom Free 73671671d7 remove obsolete fabric/hammer/jquery from canvas-note early trials 2022-04-19 00:17:39 +02:00
Tom f53a93e828 make :filename for GETing an image optional 2022-04-19 00:17:39 +02:00
Tom e156c6292b improve status 500 for canvas-note api/image.js 2022-04-19 00:17:39 +02:00
Tom e365521d5e add support for sharing canvas-note 2022-04-19 00:17:39 +02:00
Tom f354821f25 basic support for using api/images with canvas-note
http://localhost:8080/api/images/<noteId>/some-rando-text
2022-04-19 00:17:16 +02:00
Tom 82e278a2a2 add comment about excalidraw-error message on insert 2022-04-19 00:13:27 +02:00
Thomas Frei b4d4606c73 add a selection of excalidraw-drawing-libraries 2022-04-19 00:13:27 +02:00
Thomas Frei b14b7b6ad1 add _meta to note, in case it got changed to type json 2022-04-19 00:13:27 +02:00
Thomas Frei 32aa7bb540 ensure that fresh note has empty scene, no bleeding 2022-04-19 00:13:27 +02:00
Thomas Frei 300f4ad357 remove obsolete comments / code 2022-04-19 00:13:27 +02:00
Tom cf6b5c3b6e ensure only active/referenced files are saved 2022-04-19 00:13:27 +02:00
Tom f1c9dda366 make sure nothing breaks on fresh empty note or note that has already content 2022-04-19 00:13:27 +02:00
Tom 7f01032b6d add support for render excalidraw in book view (copy of note_revision)
maybe one should think about extract a function there and make it reusable
2022-04-19 00:13:27 +02:00
Tom f08afd4723 remove empty line break 2022-04-19 00:13:27 +02:00
Tom afe2a03aef fix initial load and safe issue by storing noteId 2022-04-19 00:13:27 +02:00
Tom 272bb136d8 make canvas_note height 100% 2022-04-19 00:13:27 +02:00
Tom 27d0388d79 add some comments 2022-04-19 00:13:26 +02:00
Tom 025032de42 make note revisions work 2022-04-19 00:13:26 +02:00
Tom 15a3b42124 remove some debug/testing code 2022-04-19 00:13:26 +02:00
Tom 4266156cee fix curser mismatch by manually setting offset 2022-04-19 00:13:26 +02:00
Tom 45a66ab694 some notes about loading and container width 2022-04-19 00:13:26 +02:00
Tom 49f4ce7149 example for trilium image-link usage and svg export 2022-04-19 00:13:26 +02:00
Tom 220df662ad make pasted images in excalidraw work (save and load "files") 2022-04-19 00:13:26 +02:00
Tom 6e535bac05 ensure isNewSceneVersion() does not increment currentVersion 2022-04-19 00:13:26 +02:00
Tom 3b1dcc7199 compare sceneVersion to omit unnecessary save/reloads of content 2022-04-19 00:13:26 +02:00
Tom ae75ac424f add noteid to console to differentiate logs 2022-04-19 00:13:26 +02:00
Tom 5c46fe792d use widget element to render for multiple excalidraw instances 2022-04-19 00:13:26 +02:00
Tom a33b0f1e1c updated react unmounting 2022-04-19 00:13:26 +02:00
Tom bd28ed07d7 working canvas_note PoC save and load for one note 2022-04-19 00:13:26 +02:00
Tom 12185fbd32 optimized canvas placement in trilium 2022-04-19 00:13:26 +02:00
Tom 24911da8db use react production build 2022-04-19 00:13:26 +02:00
Tom da84d16421 excalidraw include works, removed infinitedrawingcanvas 2022-04-19 00:13:26 +02:00
thfrei 53666cbfe8 lint 2022-04-19 00:13:26 +02:00
thfrei 8897d98bd9 add note-detail height to make canvas visible
due to some upstream changes, this was necessary.
otherwise complete inside container was not visible.
2022-04-19 00:13:26 +02:00
thfrei 93e485cea9 remove console.image 2022-04-19 00:13:26 +02:00
thfrei 22363f5b74 working trilium canvas note 2022-04-19 00:13:26 +02:00
thfrei 2a2c82cd29 minor update for canvas 2022-04-19 00:13:26 +02:00
thfrei 5ebe717da8 basic infinite-drawing-canvas integration 2022-04-19 00:13:26 +02:00
thfrei 2f2d8327e4 update libraries 2022-04-19 00:13:26 +02:00
Tom Free a894c19c2b add missing canvas-note entries in helper functions
Conflicts:
	src/public/app/entities/note_short.js
	src/public/app/services/tree_context_menu.js
2022-04-19 00:13:26 +02:00
Tom Free 0469962c5e wip: canvas-note patch
Conflicts:
	src/public/app/services/library_loader.js
	src/public/app/services/tree_context_menu.js
	src/public/app/widgets/note_actions.js
	src/services/consistency_checks.js
	src/services/utils.js
2022-04-19 00:13:26 +02:00
zadam f6ebc76917 Merge remote-tracking branch 'origin/stable' 2022-04-18 18:59:30 +02:00
zadam 73425ec29d workaround for wrongly placed tooltip, closes #2794 2022-04-16 15:51:30 +02:00
zadam 51e5f591b2 null check 2022-04-16 15:10:16 +02:00
zadam d1b3d8a58a add missing doc pages 2022-04-16 00:18:01 +02:00
zadam 534c71491b fix docs 2022-04-16 00:17:32 +02:00
zadam 987f8e9961 fix share responsivity on mobile devices, closes #2790 2022-04-16 00:02:24 +02:00
zadam a45cf033aa fix hiding of linked images in shared notes, closes #2791 2022-04-15 23:09:07 +02:00
zadam 06b6097f29 Merge remote-tracking branch 'origin/stable' 2022-04-15 14:53:47 +02:00
zadam 75c8e700d4 dev data directory should be relative 2022-04-15 14:51:14 +02:00
zadam c1092c97b5 release 0.51.0-beta
Publish Docker image / Push Docker image to multiple registries (push) Failing after 49s
2022-04-10 14:13:51 +02:00
zadam a04becc4ec dep upgrades 2022-04-10 14:13:45 +02:00
zadam f7d6bda49d added zooming/panning to mermaid diagrams, closes #2635 2022-04-03 23:14:47 +02:00
zadam b250f0a3bf Merge remote-tracking branch 'origin/stable' 2022-04-03 14:21:28 +02:00
zadam df1d94ec61 ckeditor 33 content styles 2022-03-26 14:10:29 +01:00
zadam e00fcd93a1 added #shareDisallowRobotIndexing label and reworked how the child-image exclusion works 2022-03-22 23:17:47 +01:00
zadam 0a95d0f6f5 ckeditor 33 2022-03-22 22:20:44 +01:00
zadam 569b8898ef release 0.50.3
Publish Docker image / Push Docker image to multiple registries (push) Failing after 41s
2022-03-22 21:30:21 +01:00
zadam 091d6a1cf1 added #shareRaw label 2022-03-22 21:20:47 +01:00
zadam 228564f843 Merge remote-tracking branch 'origin/master' 2022-03-22 21:04:52 +01:00
zadam 17dd6141fb Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	Dockerfile
#	package-lock.json
#	package.json
#	src/services/cloning.js
2022-03-22 21:04:30 +01:00
zadam 2f57d55bea add allow robots.txt tag for /share 2022-03-22 21:02:32 +01:00
zadam 0cd690d980 fix inclusion of share.js in builds, fixes #2738 2022-03-21 23:28:19 +01:00
zadam 316a2aee1a invalidate flat text cache after login to protected session, fixes #2712 2022-03-20 22:23:48 +01:00
Matt 77ce56ba84 Don't show protected notes in shared tree (#2704) 2022-03-07 23:00:07 +01:00
zadam eba824a5b1 added app-info method to etapi #2697 2022-03-07 22:57:48 +01:00
zadam c9e72f8fb9 Merge remote-tracking branch 'origin/master' 2022-02-24 23:22:33 +01:00
zadam 4dd3fd9674 better error when password is not set, #2685 2022-02-24 23:22:20 +01:00
zadam 1690a55f7d Update README.ru.md 2022-02-24 20:38:29 +01:00
zadam dd29fc26e3 Update README-ZH_CN.md 2022-02-24 20:38:01 +01:00
zadam 67b5921d6c Update README.md 2022-02-24 20:37:12 +01:00
zadam 1b7bcc5cc1 Update README.md 2022-02-22 23:18:10 +01:00
zadam ea56bb772a logging improvements 2022-02-20 12:33:50 +01:00
zadam 9f33791922 fix uploading binary data through ETAPI, closes #2667 2022-02-18 22:34:46 +01:00
zadam d940590add raise line-height in share CSS to 1.5, fixes #2671 2022-02-18 22:00:58 +01:00
zadam a009b4cb6d remove debug logging 2022-02-16 22:31:02 +01:00
zadam 781be527ce Merge remote-tracking branch 'origin/master' 2022-02-16 22:16:25 +01:00
zadam f7e5d8f62d fix displaying hidden notes in the note's children list #2664 2022-02-16 22:16:15 +01:00
Nriver d6c0fc734f Fix data validation type for prefix (#2660)
* fix param validation

* fix data validation type for `prefix`
2022-02-15 22:49:49 +01:00
zadam db79b5ff53 fixed blurred selection background color, closes #2652 2022-02-14 22:59:03 +01:00
zadam 18d439dd44 clipper endpoint should also scan and download images as a fallback, #2621 2022-02-14 20:50:50 +01:00
zadam d2d2a6c086 ckeditor 32 2022-02-12 22:53:55 +01:00
zadam 5260689b8e include "dump-db" into released artifacts 2022-02-12 22:51:28 +01:00
zadam 78a2863b78 Merge remote-tracking branch 'origin/master' 2022-02-12 22:20:22 +01:00
zadam 5481375347 DB dump tool feature complete 2022-02-12 22:20:15 +01:00
zadam 4da2d2f516 Create CODE_OF_CONDUCT 2022-02-12 13:17:49 +01:00
zadam 23de8e881d make it clear that Dockerfile needs to be run through a script 2022-02-11 22:05:08 +01:00
zadam 59e8720866 fix importing unknown image types such as .DWG, closes #2628 2022-02-11 22:01:45 +01:00
zadam 67cce5f817 Merge remote-tracking branch 'origin/stable' 2022-02-10 23:40:18 +01:00
zadam 9924727729 Merge remote-tracking branch 'origin/master' 2022-02-10 23:40:10 +01:00
zadam 6c9fc364a3 added "DB dump" tool, WIP 2022-02-10 23:37:25 +01:00
Nriver 40598d2663 fix param validation (#2624)
(cherry picked from commit 1aeb674733)
2022-02-10 19:33:11 +01:00
Nriver 1aeb674733 fix param validation (#2624) 2022-02-10 19:28:42 +01:00
zadam 832cac106e release 0.50.2
Publish Docker image / Push Docker image to multiple registries (push) Failing after 34s
2022-02-09 22:52:36 +01:00
zadam 23daaa2387 fix exporting huge text notes (export would get stuck on HTML pretty printing) 2022-02-09 22:39:37 +01:00
zadam d6016f9b81 introduced mutex to avoid conflicts during tab closing 2022-02-09 21:21:17 +01:00
zadam 1dfde76b95 fix updating becca after undeleting notes 2022-02-08 23:38:54 +01:00
zadam 83f8fac088 fixed background color of input label in CKEditor search & replace, #2254 2022-02-07 23:01:14 +01:00
zadam 0ca9bff61b fix multiple UI bugs, closes #2616 2022-02-07 22:50:28 +01:00
zadam df91192b97 Merge remote-tracking branch 'origin/master' 2022-02-06 14:18:18 +01:00
zadam 97fd550402 add light anonymization option to the existing full anonymization 2022-02-06 13:49:33 +01:00
zadam eb579de199 Update README.md 2022-02-05 17:21:41 +01:00
zadam 5f2984aa57 Update README.md 2022-02-05 17:20:41 +01:00
zadam 98a79f6475 Update FUNDING.yml 2022-02-05 17:17:07 +01:00
zadam c09da2b7eb Update FUNDING.yml 2022-02-05 17:12:37 +01:00
zadam 600f74576d added #sentFromSender label, closes #445 2022-02-05 16:23:30 +01:00
zadam a21c49cba7 added "hideRelations" label to relation map 2022-02-05 13:02:19 +01:00
zadam 91e3dd022a added "move note" search action 2022-02-05 12:06:23 +01:00
zadam 478eca47f4 search string is now a textarea instead of input 2022-02-05 11:27:48 +01:00
zadam 1c4358086d release 0.50.1
Publish Docker image / Push Docker image to multiple registries (push) Failing after 39s
2022-02-02 21:38:21 +01:00
zadam 0917fc8be1 log messages now contain script context if available 2022-02-01 22:25:38 +01:00
zadam 6833959f3b added regular DB optimization 2022-02-01 21:36:52 +01:00
zadam 398376108d added integrity check button into advanced options. 2022-02-01 21:22:43 +01:00
zadam 61aa029582 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package-lock.json
2022-02-01 21:04:17 +01:00
zadam 46eaa63625 focus promoted/owned attributes input after activating the ribbon tab, closes #2606 2022-02-01 20:24:58 +01:00
zadam 1b54596c5e tweaks to handling of branch removal 2022-01-31 22:09:39 +01:00
zadam 2feb778d8d Merge remote-tracking branch 'origin/stable' 2022-01-31 21:25:37 +01:00
zadam 2075e89239 improved logging 2022-01-31 21:25:18 +01:00
zadam be44431fde fix setting becca's dateModified after marking as deleted 2022-01-30 13:18:22 +01:00
zadam 99cc4078c6 fix setting becca's utcDateModified after marking as deleted 2022-01-30 13:17:40 +01:00
zadam b8b6b38a20 added links to sharing/ETAPI to README 2022-01-22 12:54:14 +01:00
zadam efd8556129 release 0.50.0-beta 2022-01-19 20:24:54 +01:00
zadam b10a76f150 release 0.50.0-beta
Publish Docker image / Push Docker image to multiple registries (push) Failing after 36s
2022-01-19 20:14:40 +01:00
U-Bren 780b520506 Add powershell equivalents to existing batch scripts (#2561)
* Add powershell equivalents to existing windows scripts

Each .bat will try to invoke its .ps1 version if powershell is available, or else will fallback on the behavior
previous to this commit.
Should help fix bugs with accents and non-ASCII characters (issue #2327).

* Add powershell equivalents to existing windows scripts

Each .bat will try to invoke its .ps1 version if powershell is available, or else will fallback on the behavior
previous to this commit.
Should help fix bugs with accents and non-ASCII characters (issue #2327).

Co-authored-by: zadam <zadam.apps@gmail.com>
2022-01-17 23:51:25 +01:00
zadam 3055ed86ec Merge remote-tracking branch 'origin/stable' 2022-01-17 23:48:44 +01:00
zadam 4fc3305080 Merge branch 'generateanonymize-script'
# Conflicts:
#	package-lock.json
#	src/services/builtin_attributes.js
2022-01-17 23:48:30 +01:00
zadam d1b39ee8fa generate anonymization script into a file 2022-01-17 23:47:26 +01:00
zadam 52b118df7f add #shareRoot label to define an "index" note, closes #2567 2022-01-17 23:13:56 +01:00
zadam a97a7cdcdd fix note title refreshing with old state when user quickly skips to content and starts editing, closes #2566 2022-01-17 20:54:57 +01:00
zadam 1aff3db81f Merge remote-tracking branch 'origin/master' 2022-01-16 22:17:10 +01:00
zadam fc89e098b1 Merge remote-tracking branch 'origin/stable' 2022-01-16 22:16:49 +01:00
Mirwaisse Djanbaz 64172a7f6b Get file extension before clipping file name (#2562)
I think this fixes https://github.com/zadam/trilium/issues/2131
2022-01-15 22:35:54 +01:00
zadam 66a6c76552 generate anonymization script WIP 2022-01-15 22:09:51 +01:00
zadam c8884f1917 don't export hidden subtree to ZIP, fixes #2555 2022-01-15 09:04:44 +01:00
zadam 4933b901f6 Merge remote-tracking branch 'origin/stable' 2022-01-14 21:53:00 +01:00
zadam b679f4218d release 0.49.5
Publish Docker image / Push Docker image to multiple registries (push) Failing after 36s
2022-01-14 21:40:37 +01:00
zadam 77c6c4617b changed shared_info class names to avoid conflict with adblocker, closes #2546 2022-01-14 21:23:10 +01:00
zadam 8240a208dd fixed wrong cherry pick 2022-01-14 21:05:39 +01:00
zadam 1c34f73f61 print should include promoted attributes, #2550
(cherry picked from commit a5444fd6ad)
2022-01-14 21:03:21 +01:00
zadam a5444fd6ad print should include promoted attributes, #2550 2022-01-14 21:02:11 +01:00
zadam 6fbd5a77e4 forgotten note_types 2022-01-14 19:53:59 +01:00
zadam c102089731 migration workaround for corrupted index in entity_changes table, closes #2534 2022-01-14 19:44:23 +01:00
zadam 742ec44f55 Merge remote-tracking branch 'origin/stable' 2022-01-13 21:53:57 +01:00
zadam 7495777d97 make getAncestors safe in respect to saved search 2022-01-13 21:28:51 +01:00
zadam da4f26d7ce Merge remote-tracking branch 'origin/stable' 2022-01-13 20:32:37 +01:00
zadam fa2ffd7574 ignore "Sync not configured" message when toggling shared state 2022-01-13 20:22:50 +01:00
zadam d4325db207 revised demo document 2022-01-13 20:02:07 +01:00
zadam 48d93cb3da added custom resource handler to the demo document 2022-01-12 21:24:59 +01:00
zadam 2248d98cc7 using 201 for created entities in etapi 2022-01-12 21:14:12 +01:00
zadam ce046b2e20 small dark theme tweaks 2022-01-12 20:13:11 +01:00
zadam 4f4cbccf08 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package-lock.json
2022-01-12 19:54:11 +01:00
zadam 412c745e53 prevent infinite recursion when checking shared status 2022-01-12 19:46:40 +01:00
zadam 28df5d4aa2 etapi improvements and more tests 2022-01-12 19:32:23 +01:00
zadam 42e85aefdc sync fixes 2022-01-10 21:24:07 +01:00
zadam 91e78998d1 unified Jump-To and quick search behavior with regards to hoisting and opening in a new tab 2022-01-10 20:44:59 +01:00
zadam 6f406f9aa2 search immediately when user chooses "full search" from Jump To dialog, #2483 2022-01-10 20:37:33 +01:00
zadam 86fa80f3eb updated API docs 2022-01-10 19:55:09 +01:00
zadam 7119d08022 updated API docs 2022-01-10 19:54:38 +01:00
zadam 916ff5f2ee Merge remote-tracking branch 'origin/next50' 2022-01-10 19:53:36 +01:00
zadam 913d2c06f3 start sync immediately after sharing/unsharing, fixes #2539 2022-01-10 17:15:21 +01:00
zadam cbb5b31f72 Merge remote-tracking branch 'origin/master' into next50 2022-01-10 17:09:40 +01:00
zadam 91dec23d5e ETAPI auth, spec improvements etc. 2022-01-10 17:09:20 +01:00
zadam d04d356429 release 0.49.4
Publish Docker image / Push Docker image to multiple registries (push) Failing after 44s
2022-01-09 22:32:13 +01:00
zadam be59f248e8 fix sync skipping some changes and then forcing sector queuing 2022-01-09 22:22:13 +01:00
zadam 2d2641dbd7 sync fixes 2022-01-09 21:25:15 +01:00
zadam 96f4230bc1 Merge branch 'master' into next50
# Conflicts:
#	src/public/app/widgets/containers/root_container.js
#	src/services/app_info.js
2022-01-09 20:18:30 +01:00
zadam 1995b54770 fix migration to preserve IDs in entity_changes 2022-01-09 20:17:27 +01:00
zadam 7159b13c9d add memberId to entity_changes to avoid having to resend all changes second time 2022-01-09 20:16:39 +01:00
zadam f2732bcab7 fix display of children notes in an empty note, closes #2536 2022-01-09 09:12:21 +01:00
zadam 0e9d76890b use #shareAlias in parent link, closes #2535 2022-01-09 09:04:21 +01:00
zadam 9df521109b fix migration to handle duplicates in entity_changes, #2534 2022-01-08 22:43:34 +01:00
zadam 75b65c396e fix migration to handle duplicates in entity_changes, #2534 2022-01-08 22:31:52 +01:00
zadam d4d48f3834 use [protected] for protected notes in the export 2022-01-08 21:50:16 +01:00
zadam b90ba3d1a9 create note from API/import etc. should allow empty title, fixes #2530 2022-01-08 19:33:56 +01:00
zadam c448d34a38 ETAPI WIP 2022-01-08 19:30:46 +01:00
zadam c33bc7e12c ETAPI search endpoint 2022-01-08 13:18:12 +01:00
zadam c5366abf75 ETAPI put content 2022-01-08 12:01:54 +01:00
zadam 2532ea525d ETAPI openapi spec WIP 2022-01-07 23:06:04 +01:00
zadam d74371c9f5 added missing placeholder.js 2022-01-07 20:30:14 +01:00
zadam 9ee1c9f3da ETAPI delete/patch, refactoring 2022-01-07 19:33:59 +01:00
zadam 82ba0d5b1d release 0.49.3
Publish Docker image / Push Docker image to multiple registries (push) Failing after 36s
2022-01-06 23:09:17 +01:00
zadam 590eea1183 API docs update 2022-01-05 20:31:21 +01:00
zadam e6f3cc7988 fix migration from 0.47, closes #2514 2022-01-05 20:21:24 +01:00
zadam 7a650c605c fix typo in the log, closes #2513 2022-01-05 19:48:18 +01:00
zadam dfa7c64b1f fix setting note/mime on root container during note change 2022-01-05 19:28:36 +01:00
zadam 82b2871a08 added date services to ETAPI 2022-01-05 19:25:17 +01:00
zadam e3114e0602 etapi fixes + basic test 2022-01-04 23:00:59 +01:00
zadam e8acf3f9f3 Merge branch 'master' into next50
# Conflicts:
#	package-lock.json
2022-01-04 22:11:00 +01:00
zadam 2b10023055 electron update 2022-01-04 22:10:35 +01:00
zadam e25a904a84 ETAPI - post services WIP 2022-01-03 23:13:51 +01:00
zadam dcba6ad70d ETAPI (external API) initial read only access 2022-01-03 22:40:01 +01:00
zadam ffdd917717 Merge branch 'master' into next50 2022-01-03 20:10:48 +01:00
Matt 168645cce9 Style shared note children (#2505) 2022-01-03 19:53:42 +01:00
zadam f4c81ecefb fix setting window title when renaming notes 2022-01-03 19:52:24 +01:00
zadam 5a85fe92aa release 0.49.2-beta
Publish Docker image / Push Docker image to multiple registries (push) Failing after 34s
2022-01-02 22:43:30 +01:00
zadam feffd57f24 added support for #pageUrl into shared notes 2022-01-02 22:43:00 +01:00
zadam faf81ae056 fix closing new window, closes #2502 2022-01-02 21:35:02 +01:00
zadam 003fec4b11 fix interrupted initial sync 2022-01-02 21:20:56 +01:00
zadam 5ecb603e86 sharing fixes 2022-01-01 22:32:38 +01:00
zadam 1fed71a92e shaca now loads attributes, added favicon and shareJs 2022-01-01 13:23:09 +01:00
zadam dad82ea4e8 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package.json
#	src/services/build.js
2021-12-31 20:16:31 +01:00
zadam a38ccde8bc protect tree will check if password is set and send user to options if not 2021-12-30 23:55:36 +01:00
zadam 8120f1bf25 resetting/setting password from options 2021-12-30 22:54:08 +01:00
zadam 067251861d Merge remote-tracking branch 'origin/stable' into stable 2021-12-30 21:06:52 +01:00
zadam 6bc8773d5f handle OPML with empty content, fixes #2495 2021-12-30 21:06:45 +01:00
zadam f92016f9ec set password from web trilium 2021-12-29 23:37:12 +01:00
zadam 4e31af8c84 set password WIP 2021-12-29 23:19:05 +01:00
zadam 7e48d214ca removed username/password from setup 2021-12-28 22:59:38 +01:00
Matt a910034c96 Fix math rendering (#2487) 2021-12-28 20:12:02 +01:00
zadam 257cc66f62 ignore missing image notes when downloading/replacing images, #2486 2021-12-28 20:08:17 +01:00
zadam 00f24bdb63 share improvements 2021-12-28 13:57:37 +01:00
zadam fada3fe623 share improvements 2021-12-28 13:40:51 +01:00
zadam d97e454463 allow cloning into notes, not just branches, fixes #2484 2021-12-27 23:39:46 +01:00
zadam 3128a7d62f various tweaks to shared notes 2021-12-27 20:48:14 +01:00
zadam b8fe9a41db fix consistency checks 2021-12-27 13:37:51 +01:00
Matt 8366a94bde Various share page improvements (#2471)
* Add clientside mermaid chart rendering

Merry Christmas :)

* Add katex math rendering client-side

* Update page.ejs

* Revert (wrong branch)

* Add children nodes to all notes under hr

* Add parent note button

* Add note type in child note info

* Fix parent, relative paths

* Add code rendering, fix space in HTML class
2021-12-27 13:27:00 +01:00
zadam f56123b864 fix missing branch in case of out-of-order clones, closes #2464 2021-12-26 23:31:54 +01:00
DHMike57 ae951bfe23 Add option for vim keymap in codemirror (#2475) 2021-12-26 13:24:18 +01:00
zadam ad8d35efe9 release 0.49.1-beta
Publish Docker image / Push Docker image to multiple registries (push) Failing after 41s
2021-12-24 23:05:10 +01:00
zadam 0217b1c85d share pdf view is responsive 2021-12-24 22:46:55 +01:00
zadam c0aa14f586 Merge remote-tracking branch 'origin/master' 2021-12-24 22:43:25 +01:00
zadam b54cfab4ff share root itself is not shared, fixes #2468 2021-12-24 22:43:12 +01:00
Matt a08985e7a6 Display PDF in shared notes (#2466)
* Add PDF rendering

* Cleanup
2021-12-24 22:36:31 +01:00
zadam a789025025 don't show share switch for root and share root notes, #2465 2021-12-24 22:34:15 +01:00
zadam 3f307b117e fix webpack build 2021-12-24 22:18:05 +01:00
zadam a232035d47 fix backlink count 2021-12-24 21:01:36 +01:00
zadam 9d38e9342d moved API docs button to the bottom of a code note 2021-12-24 20:40:27 +01:00
zadam 4bc4b9ade7 release 0.49.0-beta
Publish Docker image / Push Docker image to multiple registries (push) Failing after 45s
2021-12-23 23:03:21 +01:00
zadam f0217cae5e fix webpack build 2021-12-23 23:01:25 +01:00
zadam da050c6369 release 0.49.0-beta 2021-12-23 22:33:49 +01:00
zadam 842c317568 cleanup 2021-12-23 21:08:43 +01:00
zadam 47845930f4 sharing improvements 2021-12-23 20:54:48 +01:00
zadam 972f2f40bf share improvements/cleanup 2021-12-23 12:54:21 +01:00
zadam 265401775b release 0.48.9
Publish Docker image / Push Docker image to multiple registries (push) Failing after 44s
2021-12-22 22:39:24 +01:00
zadam 94111c464b changed symbol for shared notes 2021-12-22 16:02:36 +01:00
zadam 94e18dfb7c add symbol to shared notes in the tree 2021-12-22 15:01:54 +01:00
zadam bc9903191e fix migration script 2021-12-22 13:14:50 +01:00
zadam cd8c24ceae windows better-sqlite3 binary 2021-12-22 12:58:33 +01:00
zadam f9709c9c39 added shareOmitDefaultCss label 2021-12-22 11:43:21 +01:00
zadam c0964a4f12 added shareAlias label 2021-12-22 10:57:02 +01:00
zadam bcef8579ce added shareCss relation and shareHiddenFromTree label 2021-12-22 09:36:38 +01:00
zadam 1180be75d1 added 404 error page 2021-12-22 09:10:38 +01:00
zadam cfa49c7b1b feature request desc 2021-12-21 22:47:31 +01:00
zadam 8e4926ed7f cleanup of issue templates, closes #2461 2021-12-21 22:46:29 +01:00
zadam 2430dcba65 mac better_sqlite3.node 2021-12-21 22:02:25 +01:00
zadam 7c885a8b76 sharing WIP 2021-12-21 22:01:06 +01:00
zadam 402e29d6dc Merge remote-tracking branch 'origin/stable' 2021-12-21 16:13:09 +01:00
zadam e7faebfac3 sharing WIP 2021-12-21 16:12:59 +01:00
zadam 10a5773c66 added consistency check to reconcile erased status between entity_changes and data 2021-12-21 14:25:26 +01:00
zadam 1e8472266f small fixes 2021-12-21 13:22:13 +01:00
zadam b30792a3da make sure that the info about periodically erased entities is sent to the frontend 2021-12-21 11:04:41 +01:00
zadam 8b56fb10fd Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package-lock.json
2021-12-20 22:24:50 +01:00
zadam 26602e8226 focus "jump to note" in new tab when there are no workspaces, #2455 2021-12-20 22:10:21 +01:00
zadam b8eeb0371c fixed bug in search where note with inherited attribute is not matched when the owning note is not matched, #2457 2021-12-20 21:35:12 +01:00
zadam b1c4737e78 fixed search tests 2021-12-20 21:31:44 +01:00
zadam 3860028a9e sharing WIP 2021-12-20 17:30:47 +01:00
zadam 16d97b95af optimized custom script/widget loading 2021-12-19 22:08:52 +01:00
zadam 20465a4f71 allow setting image labels in sender API 2021-12-19 21:56:19 +01:00
zadam 2ff6e50af4 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	src/public/app/dialogs/options/other.js
2021-12-19 10:54:30 +01:00
zadam e0378c5064 optimized #keyboardShortcuts retrieval 2021-12-19 10:50:38 +01:00
zadam e29aee1aae use lazy title loading in bookmarks buttons to have decrypted title upon protected session start, #2393 2021-12-19 10:36:48 +01:00
zadam 1aff42f453 fix setting exported file extension when truncated 2021-12-17 22:03:00 +01:00
zadam a098630e09 add default JPG quality if value not in range 2021-12-16 22:10:51 +01:00
zadam 074eb1c02f importing of cloned notes should not depend on ZIP listing order, fixes #2440 2021-12-15 22:36:45 +01:00
zadam 657496ea37 Merge remote-tracking branch 'origin/master' 2021-12-14 21:55:00 +01:00
zadam 034aaa7209 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	src/public/app/dialogs/options/other.js
2021-12-14 21:54:38 +01:00
zadam a81ea3771f release 0.48.8
Publish Docker image / Push Docker image to multiple registries (push) Failing after 37s
2021-12-13 11:12:31 +01:00
Lake 4ceba8cc6e Correct "Options change have been saved." (#2436) 2021-12-12 21:08:54 +01:00
zadam d9550dd59b fix "getNoteStartingWith" relic 2021-12-11 14:15:38 +01:00
zadam 97f7fe7b18 set note type/mime in PUT body to avoid http proxy slash reencoding, fixes #2419 2021-12-08 22:36:09 +01:00
zadam a810c08c02 trigger note revisioning saving also on title changes #2426 2021-12-08 21:04:22 +01:00
zadam ab550a1e8d share functionality WIP 2021-12-07 23:03:49 +01:00
zadam 08e8047d8a share functionality WIP 2021-12-06 22:53:17 +01:00
zadam 67da877135 Merge remote-tracking branch 'origin/stable' 2021-12-06 20:57:32 +01:00
zadam 263b7a84bb full text search should look into link URLs as well, closes #2412 2021-12-06 20:54:37 +01:00
zadam 9d18bebb13 "show in full search" closes the quick search dropdown 2021-12-06 20:43:50 +01:00
zadam 2d339dec6b share functionality WIP 2021-12-05 23:10:35 +01:00
zadam b78ab1ee02 boxicons 2.1.1 2021-12-05 21:50:02 +01:00
Myzel394 2f5f116345 Improve tabs background coloring (#2395)
* improved tabs background coloring

* improvements

* reverted changes

* color improvements

* added light theme
2021-12-05 13:07:53 +01:00
zadam 64f1671566 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package.json
2021-12-04 13:48:35 +01:00
zadam 26bcfe5160 fix hidden notes appearing in note map, closes #2403 2021-12-04 13:45:15 +01:00
zadam 89c04e6b6b fix "note paths" ribbon widget for root note 2021-12-04 13:33:31 +01:00
zadam e079359c15 copied links from tree should be reference links 2021-12-04 12:50:02 +01:00
zadam c4ab6b4866 copy action in the tree (or ctrl+c) will also save note links to the clipboard, fixes #2401 2021-12-04 12:45:27 +01:00
zadam 630d9f2e45 backlinks improvements, #2349 2021-12-02 22:00:42 +01:00
zadam bbceb6251a backlinks WIP, #2349 2021-12-01 23:12:54 +01:00
zadam 89f117da5b Merge remote-tracking branch 'origin/stable' 2021-11-30 21:40:55 +01:00
zadam 40fb4ff56b fix for "Today page does not work for 2021-11-20", closes #2359 2021-11-30 21:21:16 +01:00
zadam d64c14482b after removing last promoted attribute, create a blank one, fixes #2388 2021-11-26 23:39:08 +01:00
zadam 61f197dd81 Merge remote-tracking branch 'origin/stable' 2021-11-25 21:36:19 +01:00
zadam 564366861e prevent browser from caching images/files, fixes #2378 2021-11-25 20:24:42 +01:00
zadam 1ee2abcc42 keep some types (e.g. mermaid diagrams) of notes full width 2021-11-24 21:27:55 +01:00
zadam f4242b4096 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	src/services/app_info.js
2021-11-24 20:08:34 +01:00
zadam d59542dd6f Merge remote-tracking branch 'origin/master' 2021-11-23 23:09:37 +01:00
zadam 211ff90ee8 add "top" label to keep notes on top, allow sorting by label, #2343 2021-11-23 23:09:29 +01:00
zadam 8c11d022fb release 0.48.7
Publish Docker image / Push Docker image to multiple registries (push) Failing after 34s
2021-11-23 21:53:32 +01:00
Myzel394 24210ef80c fixed settings menu (#2374)
(cherry picked from commit 3f40a52f65)
2021-11-23 21:38:13 +01:00
Myzel394 3f40a52f65 fixed settings menu (#2374) 2021-11-23 21:37:32 +01:00
zadam df4cf80be4 fix version detection without running npm 2021-11-21 17:20:28 +01:00
zadam bc854ee149 cleanup 2021-11-21 17:15:10 +01:00
Myzel394 b23ead8097 Fix: Highlighting searched term should ignore accents (#2364)
* fixed accent highlighting not working

* fixed

* fixes

* improvements
2021-11-21 16:27:50 +01:00
Myzel394 886fdf7cd6 Improve image compression (#2369)
* added options

* added checkbox handling to import into note

* added image compression option respecting
2021-11-21 16:27:13 +01:00
zadam 2135aa058e increase sync version to 22 2021-11-21 16:16:28 +01:00
zadam de20183a22 Merge remote-tracking branch 'origin/stable' 2021-11-21 13:45:57 +01:00
zadam 42b5437c87 fix setup new document, closes #2368 2021-11-21 13:44:52 +01:00
zadam 67542f448d fix total height / scrolling on mobile chrome/safari, closes #2367 2021-11-21 13:39:47 +01:00
zadam ae29c6bac4 global note map should respect hoisting, #2365 2021-11-21 10:40:48 +01:00
zadam 1dce96b4c1 Merge remote-tracking branch 'origin/stable' 2021-11-20 21:34:34 +01:00
zadam 08e9b59696 hide hidden subtree notes from search results, closes #2361 2021-11-20 21:01:37 +01:00
jasongwq db9e35a7e1 add quick search in mobile layout (#2360)
Co-authored-by: jasongwq <jasongwq@126.com>
2021-11-20 20:55:52 +01:00
zadam fe605c012a fix setting monospace font from theme 2021-11-20 13:20:06 +01:00
zadam 7a383a1314 create tray only for main window, not setup window 2021-11-20 12:52:23 +01:00
zadam 5290aab781 Merge remote-tracking branch 'origin/master' 2021-11-20 12:51:13 +01:00
zadam 86c3bbe5a2 Merge remote-tracking branch 'origin/stable' 2021-11-20 12:50:58 +01:00
zadam 4c7c53d8c8 retry for OpenNoteButtonWidget 2021-11-20 12:49:12 +01:00
Myzel394 21854b4a04 fixed title (#2356) 2021-11-19 13:03:12 +01:00
zadam 83f125a79f cleanup setting of utcDateCreated in branches and options code 2021-11-18 22:39:12 +01:00
zadam e36bc42519 added changeId into entity_changes to have cross-sync change ID 2021-11-18 22:33:08 +01:00
zadam 15ac81627c DB cleanup migration 2021-11-18 21:52:56 +01:00
zadam 57fae2c8c6 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package-lock.json
#	package.json
2021-11-18 21:36:03 +01:00
zadam 87b76abef9 better-sqlite3 binaries 2021-11-18 21:35:23 +01:00
zadam d345b7ed56 added entity changes check after sync check failure, fixed sync 2021-11-17 22:57:09 +01:00
zadam 298af217e9 fix bug overwriting entity changes 2021-11-17 21:47:41 +01:00
zadam 89322c4b03 upgrade to electron v16 and node v16 2021-11-16 22:43:08 +01:00
zadam 7d64f6a7dd increment lastProcessedEntityChangeId correctly 2021-11-16 22:12:53 +01:00
zadam b7efc92099 frontend library updates 2021-11-15 22:28:56 +01:00
zadam bc8b6284a6 fix exporting root note, closes #2346
(cherry picked from commit 20a187fab9)
2021-11-15 21:28:12 +01:00
zadam 20a187fab9 fix exporting root note, closes #2346 2021-11-15 21:23:19 +01:00
zadam 0b001f41c0 improvements/simplification to the update check 2021-11-14 21:52:18 +01:00
zadam 242977c7a5 cleanup after update check merge 2021-11-14 13:45:37 +01:00
Myzel394 364ac331da Add update available box (#2329)
* current stand

* added update available button

* improved update available icon

* improved update available box

* adding server side version

* added backend

* fixed text

* added option handling

* added field disabling

* removed options

* fixed terminology

* removed unnecessary imports
2021-11-14 13:42:50 +01:00
Myzel394 fcc0a80f4e Add tray (#2325)
* copied tray from old thread

* added visibility changer to tray
2021-11-14 13:36:39 +01:00
zadam 8996f35cc0 Merge remote-tracking branch 'origin/next49' 2021-11-14 13:18:13 +01:00
zadam ed5eb5c6db fix dockerfile APK python dependency
Publish Docker image / Push Docker image to multiple registries (push) Failing after 42s
2021-11-14 11:35:10 +01:00
zadam acb50f44a1 release 0.48.6
Publish Docker image / Push Docker image to multiple registries (push) Failing after 38s
2021-11-13 22:49:58 +01:00
zadam c946030106 slowndown note map for small note counts to mitigate drift 2021-11-13 22:48:30 +01:00
zadam df0411197b fixed syncing of erased notes, closes #2316 2021-11-12 21:19:23 +01:00
zadam 600c16551a fixed jsdoc script API generation, closes #2313 2021-11-10 21:30:54 +01:00
zadam 5710c9e997 extra init check to provide better error response 2021-11-10 21:12:53 +01:00
Myzel394 550a9fa711 fixed button background (#2310)
* fixed button background

* fixed width
2021-11-09 21:26:38 +01:00
zadam 51348cfbad don't show hidden subtree in autocomplete, fixes #2301 2021-11-04 22:27:39 +01:00
zadam 7400a6723e fix ribbon tab not appearing 2021-11-04 22:21:49 +01:00
zadam e57dee2f14 pasted images should have trimmed names if too long (too often it's just garbage), closes #2307 2021-11-04 21:48:46 +01:00
zadam b02a5b872a default font family after checking font overriding should be "theme" 2021-11-04 21:23:16 +01:00
zadam 4733de23ba fix {isoDate} template variable in journal date naming, closes #2306 2021-11-04 19:56:45 +01:00
zadam 57b7f6199e utcDateStr => utcDateTimeStr 2021-11-04 19:52:00 +01:00
zadam a9df0c485f link map contains also backward references and tree map contains parents as well, closes #2270 2021-11-01 21:11:16 +01:00
zadam 21dedff9bf release 0.48.5 2021-11-01 10:25:43 +01:00
zadam 6f60cf1a86 release 0.48.5
Publish Docker image / Push Docker image to multiple registries (push) Failing after 46s
2021-11-01 09:19:28 +01:00
zadam 930d29d64a add hack to produce debian compatible XZ compressed deb packages, fixes #2272 2021-11-01 09:11:04 +01:00
zadam c345e7031b fix hoisting note from empty detail screen 2021-11-01 08:50:01 +01:00
zadam fc46398a3c close last tab should behave similarly to 0.47, fixes #2298 2021-11-01 08:37:59 +01:00
zadam 7e41226549 fix "XSS" in the new empty tab, closes #2145 2021-10-31 23:12:24 +01:00
zadam b0c0ed8512 add configurable max content width with default value of 1200px. 2021-10-31 21:55:11 +01:00
zadam 5978447185 add back .isDeleted property to becca's note, branch and attribute entities for BC, fixes #2268 2021-10-31 21:03:26 +01:00
zadam ec4d445f97 make sure we're not using electron before enabling mobile version 2021-10-31 20:25:54 +01:00
zadam e378435fbe added "switch to mobile version" button to web edition, closes #1889 2021-10-31 16:56:23 +01:00
zadam e4dca4750f fix overriding monospace font size, closes #2296 2021-10-31 16:48:21 +01:00
zadam 311b98ffcb fix immediately closed attribute detail after clicking e.g. "add label" 2021-10-30 15:36:50 +02:00
zadam 126f41ae5e fix broken autocomplete in attribute editor, closes #2295 2021-10-30 15:22:20 +02:00
zadam 4b1678c416 fix sizing of the attribute detail in inherited attribute list 2021-10-29 21:47:04 +02:00
zadam da74272f13 jsdoc @param => @type 2021-10-29 21:37:12 +02:00
zadam 9ce224d4c5 fix correct number of related attributes 2021-10-29 21:36:57 +02:00
zadam ce57a13002 fix infinite recursion, closes #2292 2021-10-29 21:36:23 +02:00
zadam e42357f1f8 release 0.48.4
Publish Docker image / Push Docker image to multiple registries (push) Failing after 36s
2021-10-28 22:28:52 +02:00
zadam ab7d121290 disallow removing last tab because of frequent race conditions when done too quickly 2021-10-28 22:27:21 +02:00
zadam 5209583a73 new note is in decrypted state even if protected, fixes #2291 2021-10-28 22:02:18 +02:00
zadam 35fc4ba9a4 fix wrapping of code blocks in note revisions, #2216 2021-10-28 20:38:35 +02:00
zadam 7f9019322b after creation of inverse relation we need to clear the cache, otherwise inverse relations will be created infinitely, fixes #2269 2021-10-27 22:36:33 +02:00
zadam 8a455e83f0 fix creating inverse relations 2021-10-27 22:28:33 +02:00
zadam 79b8d91025 validate/clean inverse relation name in promoted attr definition 2021-10-27 22:13:54 +02:00
zadam bcabe5786f fix ordering of note contexts, fixes #2283 2021-10-27 21:32:03 +02:00
Abitofevrything a7d3dafcf1 Remove logging line (#2284) 2021-10-27 19:45:59 +02:00
zadam e6af84df39 fix updating "lastAcceptedEntityId" - can't take last entityChange since they might be reordered based on update order, closes #2277 2021-10-26 22:07:35 +02:00
zadam 674172f0b8 fix not updating attribute if not needed 2021-10-26 20:57:45 +02:00
zadam 7ec20f9384 fix refreshing ribbon titles upon entity change, closes #2274 2021-10-26 20:14:56 +02:00
zadam 6135de8507 Merge remote-tracking branch 'origin/master' 2021-10-25 21:59:34 +02:00
zadam 63b0d30e74 fix note status update, closes #2276 2021-10-25 21:59:21 +02:00
MeIchthys 9e29fba8da Update "Sync from Desktop" setup instructions. (#2271) 2021-10-25 21:15:17 +02:00
zadam 8910ae92c7 increasing amount of text rendered in note previous to 2000 (previously 1000) bytes, #2266 2021-10-25 20:01:41 +02:00
zadam 3413074235 when saving Saved Search or SQL console, move it to their home (i.e. remove from hidden subtree) 2021-10-24 14:53:45 +02:00
zadam 33aa72eb97 fix finding note paths of hidden notes, fixes #2262 2021-10-24 14:37:41 +02:00
zadam 6e0a65b59c release 0.48.3
Publish Docker image / Push Docker image to multiple registries (push) Failing after 37s
2021-10-22 21:31:44 +02:00
zadam 56e49cfc19 set iconClass also on whole page clipping #2250 2021-10-21 23:02:22 +02:00
zadam af40d73cee fix saving images from web clipper, closes #2249 2021-10-21 22:58:52 +02:00
zadam 50b7063811 display properly relations in note map even if they are not in the subtree, closes #2251 2021-10-21 22:52:52 +02:00
zadam ee1b377bc2 deactivate some buttons based on note type 2021-10-21 21:28:44 +02:00
zadam 51dfe8bb14 avoid double rendering of note paths 2021-10-21 21:10:55 +02:00
zadam e426ee3e4f disallow changing note type of note-map 2021-10-21 21:02:37 +02:00
zadam a434aa113d fix repeated invocation of actions in note actions dropdown, closes #2255 2021-10-21 20:53:35 +02:00
Sathyam M Vellal 3b551e3e4d Add week notes to frontend_script_api (#2253)
Note: getWeekNote can take `startOfTheWeek` as options but is not passed to the api route.
2021-10-21 12:16:51 +02:00
zadam 3d98644bf6 release 0.48.2
Publish Docker image / Push Docker image to multiple registries (push) Failing after 2m26s
2021-10-20 22:12:20 +02:00
zadam a22e4d60b6 Merge remote-tracking branch 'origin/master' 2021-10-20 21:30:39 +02:00
zadam 069fbee3a6 allow async scripts in runOnBackend(), fixes #2243 2021-10-20 21:27:47 +02:00
Matt 8b21867c5c Set default icon for clipped notes (#2246)
* Set default icon for clipped notes

I like being able to differentiate between clipped notes and regular notes

* Globe
2021-10-20 08:57:05 +02:00
zadam 980309ae2a sharing WIP 2021-10-19 22:48:38 +02:00
zadam 6a6bd4541a sharing WIP 2021-10-17 14:44:59 +02:00
zadam a14aa461ca sharing WIP 2021-10-16 22:13:34 +02:00
zadam 2cc4367b37 fix restoring note revision, closes #2232 2021-10-15 21:37:16 +02:00
zadam 241d1b1035 node 14.18.1 2021-10-14 22:22:27 +02:00
zadam 449081807e fix backend API's getNote, getBranch, getAttribute, closes #2230 2021-10-14 21:19:03 +02:00
zadam dc0d6d24bd Merge remote-tracking branch 'origin/master' 2021-10-14 21:09:32 +02:00
zadam 4111a2f0e8 docker image build/push is now handled by github actions 2021-10-14 20:49:48 +02:00
TrAnn3l 8ef4b2bf50 Add tag based multi arch docker build. (#2229) 2021-10-14 20:42:27 +02:00
zadam 53875d26bc don't try to activate the pane being currently removed 2021-10-13 23:27:58 +02:00
zadam f505f9d65a hide tooltip after clicking on a button, fixes #2228 2021-10-13 23:05:47 +02:00
zadam 6434889cd6 added SVG icon 2021-10-13 19:54:26 +02:00
zadam 21d2ca3c54 release 0.48.1-beta 2021-10-12 22:42:48 +02:00
zadam 64a3a8b561 tweaks 2021-10-12 22:36:22 +02:00
zadam 6738f2cd24 fix preserving original sourceId after running script notes, fixes #2224 2021-10-12 21:41:25 +02:00
zadam 1cdd644b8f fix reloading frontend after erasing notes in firefox, fixes #2221 2021-10-12 19:47:44 +02:00
zadam f5dc05e79a Merge remote-tracking branch 'origin/master' 2021-10-12 19:30:42 +02:00
zadam e2c37a6f8c add toggleLeftPane command/shortcut, closes #2225 2021-10-12 19:29:42 +02:00
sigaloid cfea2440fb fix mobile frontend, closes #2217 (#2223)
does this

rename

Update bug_report.yml

Update bug_report.yml

Update bug_report.yml

Update bug_report.yml

Update and rename feature_request.md to feature_request.yml

Co-authored-by: zadam <zadam.apps@gmail.com>
2021-10-12 18:57:07 +02:00
zadam 23e34e8c02 fix mobile frontend, closes #2217 2021-10-11 23:00:52 +02:00
zadam 8bd7b657f8 added option to disable backup, #2210 2021-10-11 22:30:23 +02:00
zadam 899d9e65fd Merge remote-tracking branch 'origin/master' 2021-10-11 21:08:48 +02:00
zadam ec732c0a98 filter out duplicated note paths, fixes #2218 2021-10-11 21:08:25 +02:00
Tom Free 66797f34c4 upgrade node v14.17.6 for gitpod since optional chaining is required (#2219) 2021-10-11 20:54:01 +02:00
zadam 1ad25b063d change order of ribbon tabs so that type specific ones are in front 2021-10-10 21:47:56 +02:00
zadam e09b2902fa fix large image deforming the note revisions dialog, closing #2216 2021-10-10 21:47:22 +02:00
zadam f6776df645 link overflowing with ellipsis 2021-10-10 14:34:54 +02:00
zadam f0c672445d show note icons also in bookmark folder 2021-10-10 14:10:51 +02:00
zadam a033ddfcb7 Merge remote-tracking branch 'origin/master' 2021-10-10 14:09:42 +02:00
zadam d02d846024 empty notes in note overview will display the list of children 2021-10-10 14:09:22 +02:00
sigaloid a8b6538c4e Add issue templates (#2213)
* Create feature_request.md

* Create bug_report.md

* Update feature_request.md

* Update bug_report.md

* Update feature_request.md

* Update feature_request.md

* Update bug_report.md

* Update bug_report.md

* Update bug_report.md

* Update feature_request.md

* Update bug_report.md
2021-10-10 11:22:32 +02:00
zadam 4eb4a44331 fix reopening last tab for splits 2021-10-09 22:03:24 +02:00
Abitofevrything c1e1f3df24 Add shortcut to reopen last closed tab, closes #2211 (#2214) 2021-10-09 21:20:12 +02:00
zadam 11e9f8403e release 0.48.0-beta 2021-10-08 22:32:59 +02:00
zadam ba676587df fix importing notePosition of directories 2021-10-08 22:31:35 +02:00
zadam 20696aa0ab fix finding single note by label with mixed case 2021-10-08 22:13:39 +02:00
zadam a08690b123 CKEditor 30 content styles 2021-10-08 18:17:17 +02:00
zadam 79f54b4e97 inactive tab background tweaks 2021-10-08 18:09:24 +02:00
zadam 973fe52275 lighter node style of note map in dark theme 2021-10-08 16:45:21 +02:00
zadam 5938e033d4 lighter node style of note map in dark theme 2021-10-08 16:38:37 +02:00
zadam eecba725b0 bookmarking should be available for all note types 2021-10-08 16:18:00 +02:00
zadam fa40a5f496 fixed demo document + added bookmarks 2021-10-08 15:48:15 +02:00
zadam abbba6501d script execution results are also pojo-ized 2021-10-08 15:14:23 +02:00
zadam 824f5dbaac fix handling of string/empty responses 2021-10-07 22:14:23 +02:00
zadam 24a45b03f5 bookmark folder 2021-10-07 21:57:20 +02:00
zadam e10e18e63a added optimized version for single label searching + noteset cache fix 2021-10-07 07:46:13 +02:00
zadam 7152c5e51d refactored separate RightDropdownButton from calendar widgets 2021-10-06 22:25:33 +02:00
zadam 711af02928 fixed leaking entities into the responses and thus increased performance of e.g. create/duplicate note 2021-10-06 20:52:23 +02:00
zadam df8706026e caching initial noteset to improve search times 2021-10-06 19:59:29 +02:00
zadam 17fe9a6a1b added help button to JS code notes to navigate to API docs 2021-10-06 18:31:19 +02:00
zadam 2d08eb7366 fix "connected with changes" sync status icon 2021-10-06 18:13:58 +02:00
zadam 8d42ffca6d basic bookmark support 2021-10-05 22:08:02 +02:00
zadam 0654dc855f Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package-lock.json
#	package.json
2021-10-05 19:45:32 +02:00
zadam 0571f02830 updated windows better-sqlite3 binary 2021-10-05 17:32:32 +02:00
zadam e2c4f32b5e added ckeditor with Find & Replace, for now without keyboard shortcut (ckeditor/ckeditor5#10645) 2021-10-04 21:53:57 +02:00
zadam 18ffcf7880 small fixes 2021-10-03 23:01:22 +02:00
Ben Jackson 6ae8508413 html_sanitizer: Demote H1 tags (#2190)
Generalize clipper.js support for removing H1 tags so it also applies to
imports. This will move all heading levels down to make room if
needed, only leaving duplicates at H6.
2021-10-03 20:56:08 +02:00
Abitofevrything ec3b844026 Fix "Theme defined" option not working in font overrride (#2197) 2021-10-03 20:54:20 +02:00
zadam a1ca538106 excludeFromTreeMap generalized to excludeFromNoteMap 2021-10-03 11:04:56 +02:00
zadam 75fc9e2048 small fixes 2021-10-03 10:42:46 +02:00
zadam a1c1c7c830 added "reloadNeeded" to consistency checks so that entity changes fix won't force reload 2021-10-03 10:00:38 +02:00
zadam e4a483aefe fix duplicate subtree 2021-10-02 23:26:18 +02:00
zadam 8c2a5d19f2 remove extra logging 2021-09-30 22:26:56 +02:00
Abitofevrything 2c450fc72d Allow HTML nodes in mermaid diagrams (#2192) 2021-09-30 20:12:23 +02:00
zadam 831de3ffed fix mermaid diagram size 2021-09-30 13:48:01 +02:00
zadam 291b434d70 added mermaid samples to demo document 2021-09-30 13:17:37 +02:00
zadam a68fd5ab83 fixes 2021-09-30 13:02:07 +02:00
zadam 8a8bdaf80e updated API docs 2021-09-30 12:26:13 +02:00
zadam 26b89fc801 fix note revisions not displaying content length 2021-09-30 12:23:22 +02:00
zadam af3fd61974 mermaid layout improvements 2021-09-30 10:18:03 +02:00
zadam f4dde84f06 mermaid layout improvements 2021-09-30 09:48:03 +02:00
zadam bc920dc5dc refactoring of mermaid support WIP 2021-09-29 22:14:45 +02:00
zadam 896c9cec04 refactoring of mermaid support WIP 2021-09-29 22:10:15 +02:00
Abitofevrything b37bcd294c Implement mermaid diagrams (#2187)
* Start implementing mermaid diagrams

* Implement theming for mermaid diagrams

* Add edit tab to mermaid diagrams

* Remove comment

* Render mermaid diagrams in included notes

* Prevent mermaid notes from being removed to consistency checks
2021-09-29 21:54:56 +02:00
Ben Jackson 14f24c646a enex: Convert OneNote (via Evernote) todo images to Unicode checkboxes (#2189)
When a OneNote todo bullet is imported by Evernote it is converted to an
image showing the checkbox the way it looked in OneNote. This change
takes advantage of the consistency of that image hashing to convert
those images into unicode checkboxes (matching the existing ENEX
<en-todo> behavior) . It also removes the image attachments.
2021-09-29 18:11:04 +02:00
zadam fea46bb150 ckeditor v30.0.0 2021-09-29 17:47:15 +02:00
zadam 37c30bf88a fix initializing new attribute in becca 2021-09-29 13:33:05 +02:00
zadam d975acc99a fix collapsing/expanding the book note 2021-09-29 13:19:21 +02:00
zadam c2d35dac4d small fixes and tweaks 2021-09-29 12:39:28 +02:00
zadam 5358b58191 fix double refresh of note map 2021-09-28 13:27:21 +02:00
zadam 0264e847ef fixes 2021-09-28 10:58:34 +02:00
zadam c5917bfc78 fix "steel blue" demo theme 2021-09-28 10:02:25 +02:00
zadam 533fcd06e4 search should ignore diacritics, closes #2182 2021-09-27 22:09:55 +02:00
zadam 192a2fe9f9 Merge remote-tracking branch 'origin/master' 2021-09-27 21:02:04 +02:00
zadam e6bc8ed3b5 allow overriding theme fonts 2021-09-27 21:01:56 +02:00
hyfree 8ff563ba40 Fix translation errors (#2180)
Fix translation errors
2021-09-27 14:37:29 +02:00
zadam d5bd9875f9 fix websocket ping 2021-09-26 15:37:18 +02:00
zadam 113bebed3b switching themes via loading only specific CSS 2021-09-26 15:24:37 +02:00
zadam 2fcb0c05c0 added grey icon for the dark mode 2021-09-25 21:58:15 +02:00
zadam fdb7b7721d right context menu on note map 2021-09-24 21:40:02 +02:00
Abitofevrything 3d9260c974 Add shortcut to delete newly created note quickly (#2177)
* Add shortcut to delete newly created note quickly

* Add space
2021-09-23 23:34:51 +02:00
zadam 8769fd71cb fix hidden notes appearing after creation in a new document 2021-09-23 23:30:30 +02:00
zadam a2baa9bdb3 excludeFromTreeMap in demo document 2021-09-23 22:54:37 +02:00
zadam 88714cce94 simplify migration 2021-09-23 22:49:16 +02:00
zadam bc1d438075 updated better sqlite 3 binaries 2021-09-23 22:36:12 +02:00
zadam fd00f6bd97 removed older migrations since they don't work anyway (after becca refactoring) 2021-09-23 22:09:11 +02:00
zadam b041d081db added migration to add excludeFromTreeMap for journal subtrees 2021-09-23 22:08:23 +02:00
zadam fabf24a065 sizing of the link map 2021-09-22 23:02:38 +02:00
zadam e3fc0968ba note map refactoring 2021-09-22 22:41:31 +02:00
zadam a766374bf4 unified note map with ribbon map 2021-09-22 22:25:39 +02:00
zadam 0f693dae5e split of note map widget from type widget 2021-09-22 21:11:36 +02:00
zadam 208492bee1 tweaks to note map 2021-09-21 22:45:06 +02:00
zadam b0d767df69 refresh note detail icon after type change 2021-09-21 20:28:52 +02:00
zadam 476b8250c9 note map refactoring 2021-09-20 23:04:41 +02:00
zadam e4ba7d65e8 note map refactoring 2021-09-20 22:19:47 +02:00
zadam 9c9a3fc030 small refactorings of auto readonly size 2021-09-20 21:12:35 +02:00
Abitofevrything b85cf07a28 Add config option to change automatic readonly size (#2174) 2021-09-20 21:08:41 +02:00
zadam bdde52f004 global link map WIP 2021-09-20 20:02:23 +02:00
zadam dd37f09309 global link map WIP 2021-09-18 14:29:41 +02:00
zadam a0caa21458 global link map WIP 2021-09-17 22:34:23 +02:00
zadam 43e829ca99 global link map setup 2021-09-17 10:09:42 +02:00
zadam ed26e32ccb skeleton for global link map 2021-09-16 23:09:48 +02:00
zadam 5866004e23 auto init of special notes after startup 2021-09-16 22:20:59 +02:00
zadam 06bcfe1aee refactoring of special notes route to a service 2021-09-16 22:09:39 +02:00
zadam 2d82da32d4 refactoring of "date-notes" to "special-notes" 2021-09-16 21:59:34 +02:00
zadam 2b017a956e store in CLS only entity change IDs instead of whole records 2021-09-16 15:02:20 +02:00
zadam 0448883782 option to erase notes immediately 2021-09-16 14:38:09 +02:00
zadam 9b9be5d155 reload frontend when consistency is fixed 2021-09-12 11:18:06 +02:00
zadam 3f2ee4aefd ckeditor fix to use correct modified mention plugin 2021-09-12 00:08:25 +02:00
zadam b90ae8eb79 ckeditor fix 2021-09-11 22:01:04 +02:00
zadam 266807179c ckeditor upgrade to 29.2.0 2021-09-11 21:44:52 +02:00
zadam 4023c28f5e consistency_checks fix 2021-09-11 14:34:37 +02:00
zadam 010f075ac5 fix toggling protected flag and display of the title 2021-09-08 22:35:32 +02:00
zadam 151687cd9b fixing consistency checks 2021-09-08 21:54:26 +02:00
zadam f24ea8137b revert of better sqlite3 dep for server build 2021-09-08 20:56:26 +02:00
zadam b8d8e01908 updated icon 2021-09-07 23:14:17 +02:00
zadam 79d492d0f0 bug fixes 2021-09-07 22:56:54 +02:00
zadam f0af26a57b Merge remote-tracking branch 'origin/master' 2021-09-07 22:37:12 +02:00
zadam 2b8c6e3dd0 bug fixes 2021-09-07 22:37:03 +02:00
Egor Dubenetskiy 061f8acf11 Add shortcut to follow link under text cursor (#1842) (#2148) 2021-09-05 12:24:38 +02:00
zadam 5cfd1c030d allow specifiyng sorted attribute (including off for overriding), #2142 2021-09-03 22:33:40 +02:00
zadam 6e300c7cf5 make sure the sorted branches are still sorted after drag & drop, #2142 2021-09-02 23:21:02 +02:00
zadam 167d4816fd display "multiple-parents" asterisk only for multiple non-search parents 2021-09-02 22:27:35 +02:00
zadam 3e5db71652 Merge remote-tracking branch 'origin/master' 2021-09-02 22:14:29 +02:00
zadam 1bc50ed976 strip # or ~ when getting attribute 2021-09-02 22:14:22 +02:00
zadam 08c638c2fa Create codeql-analysis.yml 2021-09-01 09:32:58 +02:00
zadam 5f22864a93 support image/jpg as well, closes #2103 2021-08-31 22:02:38 +02:00
zadam cfcc34fa8e package upgrades (including #2134) 2021-08-31 21:54:42 +02:00
zadam 635f5fdc5b small refactoring 2021-08-26 22:10:59 +02:00
zadam d0747b125c improvements in frontend sync (WIP) 2021-08-25 22:49:24 +02:00
zadam 66374bf95f improvements in frontend sync (WIP) 2021-08-24 22:59:51 +02:00
zadam d27fcaf317 improvements in frontend sync (WIP) 2021-08-24 22:37:00 +02:00
zadam 0ee093f038 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	Dockerfile
#	bin/build-server.sh
#	package-lock.json
#	src/public/app/layouts/mobile_layout.js
2021-08-23 22:27:19 +02:00
zadam 8cb07525cf Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package-lock.json
2021-08-21 21:32:11 +02:00
zadam ad8f374276 Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	package.json
2021-08-21 20:20:09 +02:00
zadam b99d83af50 improvements in frontend sync (WIP) 2021-08-20 21:42:06 +02:00
zadam e050e380b9 fix importing image captions, closes #2113 2021-08-20 21:40:28 +02:00
zadam 68d599ed19 fix dynamic positioning 2021-08-20 21:39:56 +02:00
zadam 9d9bc31d91 fixes in frontend sync 2021-08-14 10:13:59 +02:00
zadam b619a6515b fix first "0-24:00:00.000" log time 2021-08-12 20:57:43 +02:00
zadam 13a16e8251 force attribute value to be a string, closes #2104 2021-08-12 20:42:35 +02:00
zadam 86a53ceebb updating becca after sync 2021-08-07 21:21:30 +02:00
zadam 669eaa7509 fix SQL console 2021-07-27 22:08:41 +02:00
zadam f50084dc1b removed annoying "sync update in progress" toast message 2021-07-26 21:28:45 +02:00
zadam 3a78a75afc fixed frontend update after note deletion 2021-07-26 21:11:51 +02:00
zadam 6e7b722bf2 fixed image being too high 2021-07-26 20:18:57 +02:00
zadam 4ca0f4b06b tree item styling based on flex, fixed root element jumping on hover 2021-07-25 22:46:45 +02:00
zadam a33661d050 websocket events fill additional data from becca instead of database 2021-07-25 21:25:06 +02:00
zadam f1338bb643 fix moving notes up and down using keyboard 2021-07-25 20:55:41 +02:00
zadam b6b6d11ef7 keep sorting for content hash computation backwards compatible 2021-07-25 10:58:50 +02:00
zadam 17a6c94f66 fix errors popping up when closing tabs with multiple panes 2021-07-24 22:51:12 +02:00
zadam e74979ccc1 fix edited notes ribbon widget 2021-07-24 22:13:32 +02:00
zadam e003341dff optimized becca loader with raw queries 2021-07-24 21:10:16 +02:00
zadam 5c4369206a optimized content hash computation using raw queries 2021-07-24 12:04:48 +02:00
zadam 507a0e2e1d "pojoing" backend entity responses to significantly speed up 2021-07-24 11:38:57 +02:00
zadam b381331029 refactoring of date notes route 2021-07-24 11:28:47 +02:00
zadam af703445e1 hover for tree item buttons 2021-07-24 09:36:52 +02:00
zadam c508217604 added underline heading style and make it a default 2021-07-23 16:04:56 +02:00
zadam 6a1287a3de fixes in the demo document 2021-07-23 14:53:31 +02:00
zadam 7261ab69bc add ignoreMissing flag to becca's getNotes() 2021-07-22 21:23:01 +02:00
zadam f9cfd134b7 fixed corner cases in becca updates from sync 2021-07-22 20:19:44 +02:00
Abitofevrything 89d28ef27c Various window border related fixes (#2077)
* Remove gap between window control buttons and top of screen, add square hitbox to window control buttons

* Add better overflow detection for context menu

* Remove gap between tabs and top of screen
2021-07-22 19:37:53 +02:00
zadam 9da8d466b8 fix note hoisting 2021-07-21 22:47:52 +02:00
zadam 74d0626dc9 Merge remote-tracking branch 'origin/master' 2021-07-21 22:07:13 +02:00
zadam 830a357b9a better styling for drop marker #2073 2021-07-21 21:12:21 +02:00
Abitofevrything 7b129c7c34 Check for active node before create note in createNoteAfter (#2074) 2021-07-21 20:19:17 +02:00
zadam adc98d4515 fix corner case when deleting a note with not yet downloaded images, closes #2073 2021-07-21 20:18:03 +02:00
zadam f3959cf2aa styles for dropping items in the tree, WIP 2021-07-20 22:07:14 +02:00
zadam 6fdabbc73b fixed styling for loading notes 2021-07-20 21:25:26 +02:00
zadam de6ff09bb9 fix moving notes 2021-07-20 21:12:23 +02:00
zadam c82308489b fix import 2021-07-20 13:29:11 +02:00
zadam 98ee3b029a Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	src/becca/becca_service.js
2021-07-08 13:11:25 +02:00
zadam 05d077ce28 removed green theme 2021-07-05 17:10:10 +02:00
zadam 9adf4d7e8e fixed calendar widget when open in a non-date note 2021-07-05 15:50:21 +02:00
zadam e2819109e9 added edited notes ribbon widget 2021-07-05 14:56:40 +02:00
zadam 3c8e267aad added calendar to the sidebar 2021-07-05 14:46:20 +02:00
zadam da0670188b Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	src/services/ws.js
2021-07-05 10:14:37 +02:00
zadam 7ea72632b8 display keyboard shortcuts in button widget title 2021-07-05 09:59:03 +02:00
zadam 9ca225b40f ribbon widgets titles show associated keyboard shortcuts 2021-07-05 09:44:41 +02:00
zadam b68bdc5005 hide global menu tooltip upon click 2021-07-05 08:59:36 +02:00
zadam 9e77a424a4 fix sync status button 2021-07-04 21:24:47 +02:00
zadam e25b965cb3 fix searching by label 2021-07-04 21:05:47 +02:00
zadam 8d3a3d4873 fix content length in note revisions 2021-07-04 16:49:23 +02:00
zadam c115628f1f full search should be already triggered when going from quick search 2021-07-04 16:46:57 +02:00
zadam 703fbd30df css fixes 2021-07-04 15:49:52 +02:00
zadam 4cc02ffb31 fix search 2021-07-02 23:22:10 +02:00
zadam 1e767482b4 removed black theme from setup 2021-06-30 21:30:54 +02:00
zadam 2035304b63 cleanup of entity changes processing 2021-06-30 20:54:15 +02:00
zadam 5be7f003ca sync fixes 2021-06-29 23:45:45 +02:00
zadam b660238a40 backend import unification 2021-06-29 22:15:57 +02:00
zadam b9ff481eb7 Merge remote-tracking branch 'origin/stable' into redesign
# Conflicts:
#	package.json
2021-06-29 20:55:58 +02:00
zadam eebbf74517 Merge remote-tracking branch 'origin/master' into redesign 2021-06-29 20:55:15 +02:00
zadam 0351d7eff1 keyboard shortcuts for ribbon tabs 2021-06-27 12:53:05 +02:00
zadam 9e1c9782ff use MontserratLight also for setup 2021-06-26 23:20:12 +02:00
zadam b2148f4a18 updated demo document with adjusted steel blue theme 2021-06-26 23:10:03 +02:00
zadam 16cc84be99 add back utcDateModified to Attribute and Branch becca entities 2021-06-26 17:32:40 +02:00
zadam 0265c190db adding check to the selected editability 2021-06-26 17:21:54 +02:00
zadam 32c88219c3 switcher for editability 2021-06-26 17:08:50 +02:00
zadam 962d5a5674 fixes 2021-06-26 13:35:36 +02:00
zadam 1b9c3b0759 keep focus when clicking on edit read only note 2021-06-24 23:50:56 +02:00
zadam f1a36f6cea add keyboard shortcut for the edit button, #2036 2021-06-24 20:27:04 +02:00
zadam d9ec8bba80 fix layouting 2021-06-15 23:04:13 +02:00
zadam 02da5b598c added "edit" button into ribbon button container 2021-06-15 22:59:13 +02:00
zadam 2220c4491b layout fixes 2021-06-15 21:53:22 +02:00
zadam fb31acc8e0 layout changes 2021-06-13 22:55:31 +02:00
dependabot[bot] 92cf2c18fa Bump normalize-url from 4.5.0 to 4.5.1 (#2006)
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
- [Commits](https://github.com/sindresorhus/normalize-url/commits)

---
updated-dependencies:
- dependency-name: normalize-url
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-12 12:01:16 +02:00
alex c5182b8757 add Chinese wiki support (#2013) 2021-06-12 12:00:55 +02:00
zadam e054a1694e using rate limiter 2021-06-11 21:00:06 +02:00
zadam 3a7da1d561 icon and theme experiments 2021-06-06 22:15:51 +02:00
zadam 3893f663d0 sql console also doesn't create a normal note by default 2021-06-06 13:38:01 +02:00
zadam a0de3c97a5 note paths widget does not show hidden path 2021-06-06 11:13:17 +02:00
zadam c886583396 added "save search to note" button 2021-06-06 11:01:10 +02:00
zadam e48609aa68 introducing hidden notes, WIP 2021-06-05 23:35:47 +02:00
zadam 882912826f fix ribbon shrinking/wrap 2021-06-05 22:40:17 +02:00
zadam 6d51593b7d removed CSS contain from widgets 2021-06-05 22:07:15 +02:00
zadam faab6be48d removed zen mode 2021-06-05 21:56:39 +02:00
zadam 8debf18984 added plugin buttons to the launcher pane 2021-06-05 14:12:17 +02:00
zadam 4bf1c25721 fixed resizer for both left and right pane 2021-06-05 14:01:21 +02:00
zadam a1d7737551 right pane restoration for custom widgets 2021-06-03 23:34:40 +02:00
zadam 2bfd7b844c refactoring of pane => split, "pane" keeps its old meaning (left-pane, center-pane, right-pane) 2021-06-03 22:23:11 +02:00
zadam ac04be4433 mobile frontend fixes 2021-06-03 21:47:25 +02:00
zadam 5e5df72020 theme refactoring 2021-06-03 12:57:39 +02:00
zadam f1344e3b95 refactoring of "collapsible section container" into "ribbon container" 2021-06-03 12:47:13 +02:00
zadam 9216e430db fix relation map 2021-06-03 12:32:48 +02:00
zadam 855b876d50 Merge remote-tracking branch 'origin/stable' into redesign 2021-06-03 12:29:58 +02:00
zadam c04bbd4973 context menu now offer option to open notes in a new pane 2021-06-03 12:25:33 +02:00
zadam 7ed816f1b2 dark theme tweaks 2021-06-02 21:39:18 +02:00
zadam f8dd8ebf1a dark theme tweaks 2021-06-02 21:23:40 +02:00
zadam 4c64bd852e Merge remote-tracking branch 'origin/stable' into redesign 2021-06-01 23:33:07 +02:00
zadam af62b07d5b Merge remote-tracking branch 'origin/master' into redesign 2021-06-01 23:32:53 +02:00
zadam 4338f65e01 dark mode fixes + refactoring 2021-06-01 23:19:49 +02:00
zadam 9a147365f5 link map lazy loading 2021-06-01 22:03:38 +02:00
zadam e48bbe5b19 link map WIP 2021-05-31 23:38:47 +02:00
zadam bdff1c1246 removal of link map service 2021-05-31 21:31:07 +02:00
zadam d4a955a3f5 cleaned up link map 2021-05-31 21:23:01 +02:00
zadam 07e214c564 link map zooming 2021-05-31 21:20:30 +02:00
zadam b351157a6a link map WIP 2021-05-30 23:21:34 +02:00
zadam f5573fcad4 starting work on link map reimplementation using force-graph library 2021-05-29 22:52:32 +02:00
zadam 60f88574b0 put show source button back to note actions since it's pretty rare 2021-05-29 20:54:11 +02:00
zadam 65c3bcb565 don't override section activation if section if open 2021-05-29 14:25:05 +02:00
zadam ef4bc13dd1 section widgets are updated lazily 2021-05-29 14:13:22 +02:00
zadam aa901b67ed remove unused static getType() from section widgets 2021-05-29 13:51:21 +02:00
zadam 7a389baf08 moved to section widgets 2021-05-29 13:24:47 +02:00
zadam 57b6271c0b similar notes section widget 2021-05-29 13:24:14 +02:00
zadam 9532a5662f added note paths section container 2021-05-29 13:06:09 +02:00
zadam 520db931ae maximize button 2021-05-28 23:52:42 +02:00
zadam 5e19a37df7 fix rendering 2021-05-28 23:21:55 +02:00
zadam 4b6b8b1678 link map section widget 2021-05-28 23:19:11 +02:00
zadam a3d44fbdef button tweaks 2021-05-28 22:47:59 +02:00
zadam 7fcf90437a button changes and book properties 2021-05-27 23:17:13 +02:00
zadam 614b1bdbaf added safe mode scripts 2021-05-27 21:29:23 +02:00
zadam 4d213300ac added buttons to section container 2021-05-26 23:08:00 +02:00
zadam b7ca3dec54 added note info into section container 2021-05-26 23:00:40 +02:00
zadam c4987c4fd1 added basic properties 2021-05-26 22:41:55 +02:00
zadam f176191efb Merge remote-tracking branch 'origin/stable' into redesign
# Conflicts:
#	package-lock.json
#	package.json
2021-05-26 21:44:08 +02:00
zadam 205f9953f9 Merge remote-tracking branch 'origin/stable' into redesign
# Conflicts:
#	package-lock.json
#	package.json
2021-05-26 21:27:06 +02:00
zadam 58d61800f3 tweaks 2021-05-26 21:26:12 +02:00
zadam 5707b7e29a closing panes 2021-05-24 22:29:49 +02:00
zadam 2f5d3729de fixes 2021-05-24 21:43:24 +02:00
zadam bae8551652 open the pane on the correct position 2021-05-24 21:05:44 +02:00
zadam 1f5e4530c3 moved note actions button into section container 2021-05-24 14:39:44 +02:00
zadam 7d94202460 reworked section container to be icon based 2021-05-23 23:41:01 +02:00
zadam 30cc566518 tweaks 2021-05-23 22:24:04 +02:00
zadam 85933771f8 tab styling changes 2021-05-23 21:24:22 +02:00
zadam e924662a29 tree visual changes, fonts etc. 2021-05-23 20:26:54 +02:00
zadam 2985100801 visual tweaks 2021-05-22 23:25:44 +02:00
zadam d68ea201a3 fixes 2021-05-22 22:55:24 +02:00
zadam 7528181ca2 nice tooltips for side buttons 2021-05-22 21:51:40 +02:00
zadam 1302765478 added sidebar toggle button 2021-05-22 21:35:25 +02:00
zadam 5b220adc31 refactored TabContext => NoteContext 2021-05-22 17:58:46 +02:00
zadam 98dfc77195 refactored TabContext => NoteContext 2021-05-22 13:04:08 +02:00
zadam 1a0aaf4a30 refactored TabContext => NoteContext 2021-05-22 12:42:34 +02:00
zadam 79a85a0aa7 refactored TabContext => NoteContext 2021-05-22 12:35:41 +02:00
zadam 274cf7312c refactored TabContext => NoteContext 2021-05-22 12:26:45 +02:00
zadam 29e4e2afbb split window WIP 2021-05-21 22:44:08 +02:00
zadam 39f0f26f28 split window WIP 2021-05-21 22:34:40 +02:00
zadam 1a13132a69 split window WIP 2021-05-20 23:13:34 +02:00
zadam a3847842cb split window WIP 2021-05-19 23:00:03 +02:00
zadam b7bd5396d1 split window WIP 2021-05-19 22:45:34 +02:00
zadam 8c1c9b00e2 buttons on the left improvements 2021-05-18 22:49:47 +02:00
zadam 845f5d15c4 buttons on the left 2021-05-18 22:14:35 +02:00
zadam d18b95d87c Merge branch 'next' into redesign 2021-05-18 21:08:02 +02:00
zadam 731051154b Merge branch 'stable' into next
# Conflicts:
#	package.json
2021-05-18 21:07:29 +02:00
zadam a093508fbe converting note properties to methods 2021-05-18 20:56:49 +02:00
zadam 2451596e8c converting note properties to methods 2021-05-17 22:35:36 +02:00
zadam a5d702b143 moved becca to top level source dir 2021-05-17 22:10:00 +02:00
zadam 439ef4a8cb moved becca to top level source dir 2021-05-17 22:09:49 +02:00
zadam 8bd3e17a3b removed legacy entities and repository 2021-05-17 22:05:35 +02:00
zadam 7a7c890946 redesign experiments 2021-05-17 21:46:18 +02:00
zadam 04f249e800 backend scripts should not be async because of transaction management 2021-05-15 22:57:23 +02:00
zadam a65eda5e4a Merge remote-tracking branch 'origin/master' into next 2021-05-15 22:45:28 +02:00
zadam 9645a07f2f Merge remote-tracking branch 'origin/stable' into next
# Conflicts:
#	package-lock.json
#	package.json
2021-05-15 22:45:11 +02:00
zadam 8a9bd4deb4 zooming with ctrl + mousewheel 2021-05-12 22:38:17 +02:00
zadam 8417d4a4ea various becca migration fixes 2021-05-11 22:00:16 +02:00
zadam 5d58520949 froca should not keep any deleted notes 2021-05-09 22:00:21 +02:00
zadam d8d15b528e fix .runOnBackend() API call 2021-05-09 21:29:59 +02:00
zadam 1d008cad13 fixes 2021-05-09 20:46:32 +02:00
zadam ef0941479c fix undelete 2021-05-09 11:12:53 +02:00
zadam 9afea492db delete note fixes 2021-05-08 23:31:20 +02:00
zadam 84246fd197 adding missing .getPojo() to becca entities 2021-05-08 22:13:08 +02:00
zadam 9441cb177f undelete becca conversion 2021-05-08 22:01:14 +02:00
zadam bcfe097dd6 refactoring of becca entity saving 2021-05-08 21:10:58 +02:00
zadam 2edc7dbf58 merge fixes 2021-05-08 11:20:20 +02:00
zadam 051b9dff21 Merge remote-tracking branch 'origin/stable' into next
# Conflicts:
#	package-lock.json
#	package.json
#	src/public/app/entities/note_short.js
#	src/public/app/services/protected_session.js
#	src/routes/api/login.js
2021-05-08 10:58:38 +02:00
zadam e257634ccf becca conversion WIP 2021-05-02 22:47:57 +02:00
zadam 3091119893 becca conversion WIP 2021-05-02 21:34:57 +02:00
zadam c035627f0a use .markAsDeleted() instead of setting .isDeleted manually 2021-05-02 20:32:50 +02:00
zadam 273d4e0052 becca conversion WIP 2021-05-02 19:59:16 +02:00
zadam 77eac8f764 becca conversion WIP 2021-05-02 12:02:32 +02:00
zadam 1af10d48a2 becca conversion WIP 2021-05-02 11:23:58 +02:00
zadam d13c8771ca becca conversion WIP 2021-05-01 21:52:22 +02:00
zadam 6626f100ad becca conversion WIP 2021-05-01 11:38:20 +02:00
zadam ccadff5015 becca conversion WIP 2021-04-30 23:10:25 +02:00
zadam e41be520a8 becca conversion WIP 2021-04-30 22:13:13 +02:00
zadam 43eb248450 Merge branch 'master' into next 2021-04-29 22:09:48 +02:00
zadam 219098ab53 more becca changes 2021-04-26 22:24:55 +02:00
zadam e466c393eb converted NoteRevision entity to the becca 2021-04-26 22:18:14 +02:00
zadam d8f1c39282 converted NoteRevision entity to the becca 2021-04-26 22:00:55 +02:00
zadam cb3a5bba61 Merge branch 'master' into next
# Conflicts:
#	package-lock.json
2021-04-26 21:45:37 +02:00
zadam 93cae44ba0 subtree duplication with becca 2021-04-25 22:02:32 +02:00
zadam a5ee590544 after note creation with becca 2021-04-25 21:24:32 +02:00
zadam 6c5b1420d2 basic note creation with becca 2021-04-25 21:19:18 +02:00
zadam 8d8d654fe8 becca entities enriched with functionality from repository entities 2021-04-25 20:00:42 +02:00
zadam 7494491560 Merge remote-tracking branch 'origin/master' into next
# Conflicts:
#	package-lock.json
#	src/public/app/services/note_content_renderer.js
#	src/public/stylesheets/style.css
#	src/routes/api/files.js
#	src/routes/routes.js
2021-04-25 11:14:45 +02:00
zadam 79bb249f3b implemented audio/video in note content renderer + streaming API #886 2021-04-17 22:35:47 +02:00
zadam 1fdf889ccf refactoring 2021-04-17 20:52:46 +02:00
zadam 42510fda5c renamed also cache files/modules 2021-04-16 23:01:56 +02:00
zadam f7e86c5be0 renamed noteCache into becca 2021-04-16 23:00:08 +02:00
zadam af5b1021c7 renamed treeCache into froca 2021-04-16 22:57:37 +02:00
zadam 4311834d75 reload note cache if transaction rollback is detected 2021-04-14 22:57:45 +02:00
725 changed files with 69658 additions and 33526 deletions
+46
View File
@@ -0,0 +1,46 @@
name: Bug Report
description: Report a bug
title: "(Bug report) "
labels: "Type: Bug"
body:
- type: input
attributes:
label: Trilium Version
description: What version of Trilium are you using?
placeholder: 0.48.0-beta
validations:
required: true
- type: dropdown
attributes:
label: What operating system are you using?
options:
- Windows
- macOS
- Ubuntu
- Other Linux
- Other (specify below)
validations:
required: true
- type: dropdown
attributes:
label: What is your setup?
description: https://github.com/zadam/trilium/wiki#choose-the-setup
options:
- Local (no sync)
- Local + server sync
- Server access only
validations:
required: true
- type: input
attributes:
label: Operating System Version
description: What operating system version are you using? On Windows, click Start button > Settings > System > About. On macOS, click the Apple Menu > About This Mac. On Linux, use lsb_release or uname -a.
placeholder: "e.g. Windows 10 version 1909, macOS Catalina 10.15.7, or Ubuntu 20.04"
validations:
required: true
- type: textarea
attributes:
label: Description
description: A clear and concise description of the bug and any additional information.
validations:
required: true
@@ -0,0 +1,15 @@
name: Feature Request
description: Ask for a new feature to be added
title: "(Feature request) "
labels: "Type: Enhancement"
body:
- type: textarea
attributes:
label: Describe feature
description: A clear and concise description of what you want to be added..
validations:
required: true
- type: textarea
attributes:
label: Additional Information
description: If your problem needs further explanation, or if the issue you're seeing cannot be reproduced in a gist, please add more information here.
+71
View File
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '37 4 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
+53
View File
@@ -0,0 +1,53 @@
name: Publish Docker image
on:
push:
tags: [v*]
jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
zadam/trilium
ghcr.io/zadam/trilium
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}-latest
type=match,pattern=(\d+.\d+).\d+\-beta,enable=${{ endsWith(github.ref, 'beta') }},group=1,suffix=-latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
install: true
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create server-package.json
run: cat package.json | grep -v electron > server-package.json
- name: Build and Push
uses: docker/build-push-action@v2.7.0
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
cache-from: type=registry,ref=zadam/trilium:buildcache
cache-to: type=registry,ref=zadam/trilium:buildcache,mode=max
tags: ${{ steps.meta.outputs.tags }}
+3 -1
View File
@@ -8,4 +8,6 @@ yarn-error.log
config.ini
cert.key
cert.crt
server-package.json
server-package.json
.idea/httpRequests/
data/
+2 -2
View File
@@ -2,10 +2,10 @@ image:
file: .gitpod.dockerfile
tasks:
- before: nvm install 10 && nvm use 10
- before: nvm install 16.15.0 && nvm use 16.15.0
init: npm install
command: npm run start-server
ports:
- port: 8080
onOpen: open-preview
onOpen: open-preview
+3 -2
View File
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="document.db" uuid="4e69c96a-8a2b-43f5-9b40-d1608f75f7a4">
<data-source source="LOCAL" name="SQLite - document.db" uuid="30cef30d-e704-484d-a4ca-5d3bfc2ece63">
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:$USER_HOME$/trilium-data/document.db</jdbc-url>
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/../trilium-data/document.db</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>
+1 -1
View File
@@ -3,7 +3,7 @@
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="openjdk-18" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
+1
View File
@@ -0,0 +1 @@
Please treat each other with respect and understanding.
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
if wget --spider -S "127.0.0.1:8080/api/health-check" 2>&1 | awk 'NR==2' | grep -w "HTTP/1.1 200 OK" ; then
exit 0
else
exit 1
fi
+12 -4
View File
@@ -1,4 +1,5 @@
FROM node:14.17.5-alpine
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
FROM node:16.15.0-alpine
# Create app directory
WORKDIR /usr/src/app
@@ -16,14 +17,21 @@ RUN set -x \
make \
nasm \
libpng-dev \
python \
python3 \
&& npm install --production \
&& apk del .build-dependencies
# Some setup tools need to be kept
RUN apk add --no-cache su-exec shadow
# Bundle app source
COPY . .
USER node
# Add application user and setup proper volume permissions
RUN adduser -s /bin/false node; exit 0
# Start the application
EXPOSE 8080
CMD [ "node", "./src/www" ]
CMD [ "./start-docker.sh" ]
HEALTHCHECK CMD sh DockerHealthcheck.sh
+8 -2
View File
@@ -1,4 +1,4 @@
# Trilium注意事项
# Trilium笔记
[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)
@@ -7,6 +7,10 @@ Trilium Notes是一个分层的笔记应用程序,专注于建立大型个人
![](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"/>
## 特性
* 笔记可以排列成任意深的树。单个笔记可以放在树中的多个位置(请参阅[克隆](https://github.com/zadam/trilium/wiki/Cloning-notes)
@@ -37,6 +41,8 @@ Trilium是作为桌面应用程序(Linux和Windows)或服务器上托管的W
[有关文档页面的完整列表,请参见Wiki。](https://github.com/zadam/trilium/wiki/)
[中文Wiki在这里](https://github.com/baddate/trilium/wiki/)
您还可以阅读[个人知识库模式](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base),以获取有关如何使用Trilium的灵感。
## 贡献
@@ -57,4 +63,4 @@ npm run start-server
* [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)
+11
View File
@@ -7,6 +7,10 @@ Trilium Notes is a hierarchical note taking application with focus on building l
![](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"/>
## 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))
@@ -16,9 +20,12 @@ Trilium Notes is a hierarchical note taking application with focus on building l
* Seamless [note versioning](https://github.com/zadam/trilium/wiki/Note-revisions)
* Note [attributes](https://github.com/zadam/trilium/wiki/Attributes) can be used for note organization, querying and advanced [scripting](https://github.com/zadam/trilium/wiki/Scripts)
* [Synchronization](https://github.com/zadam/trilium/wiki/Synchronization) with self-hosted sync server
* 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
* [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
* Scales well in both usability and performance upwards of 100 000 notes
* Touch optimized [mobile frontend](https://github.com/zadam/trilium/wiki/Mobile-frontend) for smartphones and tablets
* [Night theme](https://github.com/zadam/trilium/wiki/Themes)
@@ -58,6 +65,10 @@ npm run start-server
* [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
You can donate using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2).
## 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.
+4
View File
@@ -7,6 +7,10 @@ Trilium Notes – это приложение для заметок с иера
![](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"/>
## Возможности
* Заметки можно расположить в виде дерева произвольной глубины. Отдельную заметку можно разместить в нескольких местах дерева (см. [клонирование](https://github.com/zadam/trilium/wiki/Cloning-notes))
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+16 -1
View File
@@ -4,4 +4,19 @@ 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
./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"
+7
View File
@@ -27,9 +27,16 @@ cp images/app-icons/png/128x128.png $BUILD_DIR/icon.png
# 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/
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
+4
View File
@@ -23,6 +23,10 @@ rm -rf $BUILD_DIR
# Mac build has by default useless directory level
mv "./dist/Trilium Notes-darwin-x64" $BUILD_DIR
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
cp -r dump-db $BUILD_DIR/
echo "Zipping mac x64 electron distribution..."
VERSION=`jq -r ".version" package.json`
+7 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
PKG_DIR=dist/trilium-linux-x64-server
NODE_VERSION=14.17.5
NODE_VERSION=16.15.0
if [ "$1" != "DONTCOPY" ]
then
@@ -20,12 +20,18 @@ rm -r $PKG_DIR/node/lib/node_modules/npm
rm -r $PKG_DIR/node/include/node
rm -r $PKG_DIR/node_modules/electron*
rm -r $PKG_DIR/webpack*
rm -r $PKG_DIR/electron.js
cp -r bin/better-sqlite3/linux-server-better_sqlite3.node $PKG_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
printf "#!/bin/sh\n./node/bin/node src/www" > $PKG_DIR/trilium.sh
chmod 755 $PKG_DIR/trilium.sh
cp bin/tpl/anonymize-database.sql $PKG_DIR/
cp -r dump-db $PKG_DIR/
VERSION=`jq -r ".version" package.json`
cd dist
+5 -2
View File
@@ -25,8 +25,11 @@ 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/trilium-portable.bat $BUILD_DIR/
cp bin/tpl/trilium-no-cert-check.bat $BUILD_DIR/
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
cp -r dump-db $BUILD_DIR/
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.{bat,ps1} $BUILD_DIR/
echo "Zipping windows x64 electron distribution..."
VERSION=`jq -r ".version" package.json`
+9 -3
View File
@@ -5,7 +5,7 @@ if [[ $# -eq 0 ]] ; then
exit 1
fi
n exec 12 npm run webpack
n exec 16.15.0 npm run webpack
DIR=$1
@@ -14,6 +14,9 @@ mkdir $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/
@@ -27,7 +30,7 @@ cp -r electron.js $DIR/
cp webpack-* $DIR/
# run in subshell (so we return to original dir)
(cd $DIR && n exec 12 npm install --only=prod)
(cd $DIR && n exec 16.15.0 npm install --only=prod)
# cleanup of useless files in dependencies
rm -r $DIR/node_modules/image-q/demo
@@ -44,8 +47,11 @@ find $DIR/node_modules -name demo -exec rm -rf {} \;
find $DIR/libraries -name "*.map" -type f -delete
rm -r $DIR/src/public/app
cp $DIR/src/public/app/share.js $DIR/src/public/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
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env node
const anonymizationService = require('../src/services/anonymization');
const fs = require('fs');
const path = require('path');
fs.writeFileSync(path.resolve(__dirname, 'tpl', 'anonymize-database.sql'), anonymizationService.getFullAnonymizationScript());
-10
View File
@@ -69,13 +69,3 @@ gh release create "$TAG" \
"dist/$WINDOWS_X64_BUILD" \
"dist/$MAC_X64_BUILD" \
"dist/$SERVER_BUILD"
echo "Building docker image"
bin/build-docker.sh $VERSION
echo "Pushing docker image to dockerhub"
bin/push-docker-image.sh $VERSION
echo "Release finished!"
+17
View File
@@ -0,0 +1,17 @@
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 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 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 != '';
VACUUM;
+2 -1
View File
@@ -1,4 +1,5 @@
SET DIR=%~dp0
set NODE_TLS_REJECT_UNAUTHORIZED=0
cd %DIR%
start trilium.exe
WHERE powershell.exe
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-no-cert-check.ps1)
+2
View File
@@ -0,0 +1,2 @@
Set-Item -Path Env:NODE_TLS_REJECT_UNAUTHORIZED -Value 0
./trilium.exe
+2 -1
View File
@@ -1,4 +1,5 @@
SET DIR=%~dp0
SET TRILIUM_DATA_DIR=%DIR%\trilium-data
cd %DIR%
start trilium.exe
WHERE powershell.exe
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-portable.ps1)
+2
View File
@@ -0,0 +1,2 @@
Set-Item -Path Env:TRILIUM_DATA_DIR -Value './trilium-data'
./trilium.exe
+5
View File
@@ -0,0 +1,5 @@
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)
+2
View File
@@ -0,0 +1,2 @@
Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1
./trilium.exe
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env sh
DIR=`dirname "$0"`
export TRILIUM_SAFE_MODE=1
"$DIR/trilium"
+11
View File
@@ -0,0 +1,11 @@
- 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)
BIN
View File
Binary file not shown.
@@ -1,5 +0,0 @@
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
VALUES ('leftPaneMinWidth', '350', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
VALUES ('leftPaneWidthPercent', '20', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
@@ -1 +0,0 @@
update branches set parentNoteId = 'none' where branchId = 'root'
-75
View File
@@ -1,75 +0,0 @@
-- first fix deleted status of existing images
UPDATE note_images SET isDeleted = 1 WHERE noteId IN (SELECT noteId FROM notes WHERE isDeleted = 1);
-- we don't need set data to null because table is going to be dropped anyway and we want image size into attribute
UPDATE images SET isDeleted = 1 WHERE imageId NOT IN (SELECT imageId FROM note_images WHERE isDeleted = 0);
-- allow null for note content (for deleted notes)
CREATE TABLE IF NOT EXISTS "notes_mig" (
`noteId` TEXT NOT NULL,
`title` TEXT NOT NULL DEFAULT "note",
`content` TEXT NULL DEFAULT NULL,
`isProtected` INT NOT NULL DEFAULT 0,
`type` TEXT NOT NULL DEFAULT 'text',
`mime` TEXT NOT NULL DEFAULT 'text/html',
`hash` TEXT DEFAULT "" NOT NULL,
`isDeleted` INT NOT NULL DEFAULT 0,
`dateCreated` TEXT NOT NULL,
`dateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`)
);
INSERT INTO notes_mig (noteId, title, content, isProtected, isDeleted, dateCreated, dateModified, type, mime, hash)
SELECT noteId, title, content, isProtected, isDeleted, dateCreated, dateModified, type, mime, hash FROM notes;
DROP TABLE notes;
ALTER TABLE notes_mig RENAME TO notes;
CREATE TABLE "links" (
`linkId` TEXT NOT NULL,
`noteId` TEXT NOT NULL,
`targetNoteId` TEXT NOT NULL,
`type` TEXT NOT NULL,
`hash` TEXT DEFAULT "" NOT NULL,
`isDeleted` INTEGER NOT NULL DEFAULT 0,
`dateCreated` TEXT NOT NULL,
`dateModified` TEXT NOT NULL,
PRIMARY KEY(`linkId`)
);
INSERT INTO links (linkId, noteId, targetNoteId, type, isDeleted, dateCreated, dateModified)
SELECT 'L' || SUBSTR(noteImageId, 2), noteId, imageId, 'image', isDeleted, dateCreated, dateModified FROM note_images;
INSERT INTO branches (branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, dateModified, hash, dateCreated)
SELECT 'B' || SUBSTR(noteImageId, 2), imageId, noteId, 100, '', 0, isDeleted, dateModified, hash, dateCreated FROM note_images;
DROP TABLE note_images;
INSERT INTO notes (noteId, title, content, isProtected, isDeleted, dateCreated, dateModified, type, mime, hash)
SELECT imageId, name, data, 0, isDeleted, dateCreated, dateModified, 'image', 'image/' || format, hash FROM images;
INSERT INTO attributes (attributeId, noteId, type, name, value, position, dateCreated, dateModified, isDeleted, hash, isInheritable)
SELECT 'O' || SUBSTR(imageId, 2), imageId, 'label', 'originalFileName', name, 0, dateCreated, dateModified, isDeleted, '', 0 FROM images;
INSERT INTO attributes (attributeId, noteId, type, name, value, position, dateCreated, dateModified, isDeleted, hash, isInheritable)
SELECT 'F' || SUBSTR(imageId, 2), imageId, 'label', 'fileSize', LENGTH(data), 0, dateCreated, dateModified, isDeleted, '', 0 FROM images;
DROP TABLE images;
INSERT INTO sync (entityName, entityId, sourceId, syncDate)
SELECT 'attributes', 'O' || SUBSTR(entityId, 2), sourceId, syncDate FROM sync WHERE entityName = 'images';
INSERT INTO sync (entityName, entityId, sourceId, syncDate)
SELECT 'attributes', 'F' || SUBSTR(entityId, 2), sourceId, syncDate FROM sync WHERE entityName = 'images';
UPDATE sync SET entityName = 'notes' WHERE entityName = 'images';
INSERT INTO sync (entityName, entityId, sourceId, syncDate)
SELECT 'links', 'L' || SUBSTR(entityId, 2), sourceId, syncDate FROM sync WHERE entityName = 'note_images';
INSERT INTO sync (entityName, entityId, sourceId, syncDate)
SELECT 'branches', 'B' || SUBSTR(entityId, 2), sourceId, syncDate FROM sync WHERE entityName = 'note_images';
DELETE FROM sync WHERE entityName = 'note_images';
DELETE FROM sync WHERE entityName = 'images';
-14
View File
@@ -1,14 +0,0 @@
create index IDX_links_noteId_index
on links (noteId);
create index IDX_links_targetNoteId_index
on links (targetNoteId);
create index IDX_attributes_name_index
on attributes (name);
create index IDX_attributes_noteId_index
on attributes (noteId);
create index IDX_attributes_value_index
on attributes (value);
@@ -1 +0,0 @@
UPDATE attributes SET isDeleted = 1 WHERE noteId IN (SELECT noteId FROM notes WHERE isDeleted = 1);
@@ -1 +0,0 @@
UPDATE attributes SET isDeleted = 1 WHERE type = 'relation' AND value NOT IN (SELECT noteId FROM notes WHERE notes.isDeleted = 0);
@@ -1 +0,0 @@
UPDATE attributes SET value = replace(value, 'mirrorRelation', 'inverseRelation') WHERE type = 'relation-definition';
@@ -1 +0,0 @@
UPDATE attributes SET name = 'archived' where name = 'hideInAutocomplete';
@@ -1,2 +0,0 @@
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
VALUES ('hoistedNoteId', 'root', '2018-12-11T18:31:00.874Z', '2018-12-11T18:31:00.874Z', 0);
-62
View File
@@ -1,62 +0,0 @@
const sql = require('../../src/services/sql');
function prependIv(cipherText, ivText) {
const arr = ivText.split("").map(c => parseInt(c) || 0);
const iv = Buffer.from(arr);
const payload = Buffer.from(cipherText, 'base64');
const complete = Buffer.concat([iv, payload]);
return complete.toString('base64');
}
async function updateEncryptedDataKey() {
const encryptedDataKey = await sql.getValue("SELECT value FROM options WHERE name = 'encryptedDataKey'");
const encryptedDataKeyIv = await sql.getValue("SELECT value FROM options WHERE name = 'encryptedDataKeyIv'");
const newEncryptedDataKey = prependIv(encryptedDataKey, encryptedDataKeyIv);
await sql.execute("UPDATE options SET value = ? WHERE name = 'encryptedDataKey'", [newEncryptedDataKey]);
await sql.execute("DELETE FROM options WHERE name = 'encryptedDataKeyIv'");
await sql.execute("DELETE FROM sync WHERE entityName = 'options' AND entityId = 'encryptedDataKeyIv'");
}
async function updateNotes() {
const protectedNotes = await sql.getRows("SELECT noteId, title, content FROM notes WHERE isProtected = 1");
for (const note of protectedNotes) {
if (note.title !== null) {
note.title = prependIv(note.title, "0" + note.noteId);
}
if (note.content !== null) {
note.content = prependIv(note.content, "1" + note.noteId);
}
await sql.execute("UPDATE notes SET title = ?, content = ? WHERE noteId = ?", [note.title, note.content, note.noteId]);
}
}
async function updateNoteRevisions() {
const protectedNoteRevisions = await sql.getRows("SELECT noteRevisionId, title, content FROM note_revisions WHERE isProtected = 1");
for (const noteRevision of protectedNoteRevisions) {
if (noteRevision.title !== null) {
noteRevision.title = prependIv(noteRevision.title, "0" + noteRevision.noteRevisionId);
}
if (noteRevision.content !== null) {
noteRevision.content = prependIv(noteRevision.content, "1" + noteRevision.noteRevisionId);
}
await sql.execute("UPDATE note_revisions SET title = ?, content = ? WHERE noteRevisionId = ?", [noteRevision.title, noteRevision.content, noteRevision.noteRevisionId]);
}
}
module.exports = async () => {
await updateEncryptedDataKey();
await updateNotes();
await updateNoteRevisions();
};
@@ -1,8 +0,0 @@
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
VALUES ('mainFontSize', '100', '2019-01-13T18:31:00.874Z', '2019-01-13T18:31:00.874Z', 0);
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
VALUES ('treeFontSize', '100', '2019-01-13T18:31:00.874Z', '2019-01-13T18:31:00.874Z', 0);
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
VALUES ('detailFontSize', '110', '2019-01-13T18:31:00.874Z', '2019-01-13T18:31:00.874Z', 0);
-11
View File
@@ -1,11 +0,0 @@
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
SELECT 'mainFontSize', '100', '2019-01-13T18:31:00.874Z', '2019-01-13T18:31:00.874Z', 0
WHERE NOT EXISTS (SELECT 1 FROM options WHERE name = 'mainFontSize');
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
SELECT 'treeFontSize', '100', '2019-01-13T18:31:00.874Z', '2019-01-13T18:31:00.874Z', 0
WHERE NOT EXISTS (SELECT 1 FROM options WHERE name = 'treeFontSize');
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
SELECT 'detailFontSize', '110', '2019-01-13T18:31:00.874Z', '2019-01-13T18:31:00.874Z', 0
WHERE NOT EXISTS (SELECT 1 FROM options WHERE name = 'detailFontSize');
@@ -1,35 +0,0 @@
CREATE TABLE IF NOT EXISTS "note_contents" (
`noteContentId` TEXT NOT NULL,
`noteId` TEXT NOT NULL,
`isProtected` INT NOT NULL DEFAULT 0,
`content` TEXT NULL DEFAULT NULL,
`hash` TEXT DEFAULT "" NOT NULL,
`dateCreated` TEXT NOT NULL,
`dateModified` TEXT NOT NULL,
PRIMARY KEY(`noteContentId`)
);
CREATE UNIQUE INDEX `IDX_note_contents_noteId` ON `note_contents` (`noteId`);
INSERT INTO note_contents (noteContentId, noteId, isProtected, content, dateCreated, dateModified)
SELECT 'C' || SUBSTR(noteId, 2), noteId, isProtected, content, dateCreated, dateModified FROM notes;
CREATE TABLE IF NOT EXISTS "notes_mig" (
`noteId` TEXT NOT NULL,
`title` TEXT NOT NULL DEFAULT "note",
`isProtected` INT NOT NULL DEFAULT 0,
`type` TEXT NOT NULL DEFAULT 'text',
`mime` TEXT NOT NULL DEFAULT 'text/html',
`hash` TEXT DEFAULT "" NOT NULL,
`isDeleted` INT NOT NULL DEFAULT 0,
`dateCreated` TEXT NOT NULL,
`dateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`)
);
INSERT INTO notes_mig (noteId, title, isProtected, isDeleted, dateCreated, dateModified, type, mime, hash)
SELECT noteId, title, isProtected, isDeleted, dateCreated, dateModified, type, mime, hash FROM notes;
DROP TABLE notes;
ALTER TABLE notes_mig RENAME TO notes;
@@ -1,2 +0,0 @@
INSERT OR REPLACE INTO sync (entityName, entityId, sourceId, syncDate)
SELECT 'note_contents', noteContentId, '', '2019-03-02T18:07:29.182Z' FROM note_contents;
@@ -1,6 +0,0 @@
UPDATE notes SET title = 'Recovered protected note', isProtected = 0 WHERE noteId IN (
SELECT noteId FROM notes JOIN note_contents USING(noteId)
WHERE notes.isProtected = 1
AND note_contents.isProtected = 0
AND notes.isDeleted = 0
)
@@ -1 +0,0 @@
module.exports = async () => {};
-236
View File
@@ -1,236 +0,0 @@
CREATE TABLE IF NOT EXISTS "sync_mig" (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`entityName` TEXT NOT NULL,
`entityId` TEXT NOT NULL,
`sourceId` TEXT NOT NULL,
`utcSyncDate` TEXT NOT NULL);
INSERT INTO sync_mig (id, entityName, entityId, sourceId, utcSyncDate)
SELECT id, entityName, entityId, sourceId, REPLACE(syncDate, 'T', ' ') FROM sync;
DROP TABLE sync;
ALTER TABLE sync_mig RENAME TO sync;
CREATE TABLE IF NOT EXISTS "source_ids_mig" (
`sourceId` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
PRIMARY KEY(`sourceId`)
);
INSERT INTO source_ids_mig (sourceId, utcDateCreated)
SELECT sourceId, REPLACE(dateCreated, 'T', ' ') FROM source_ids;
DROP TABLE source_ids;
ALTER TABLE source_ids_mig RENAME TO source_ids;
CREATE TABLE IF NOT EXISTS "note_revisions_mig" (
`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
`noteId` TEXT NOT NULL,
`title` TEXT,
`content` TEXT,
`isProtected` INT NOT NULL DEFAULT 0,
`utcDateModifiedFrom` TEXT NOT NULL,
`utcDateModifiedTo` TEXT NOT NULL,
`dateModifiedFrom` TEXT NOT NULL,
`dateModifiedTo` TEXT NOT NULL,
type TEXT DEFAULT '' NOT NULL,
mime TEXT DEFAULT '' NOT NULL,
hash TEXT DEFAULT "" NOT NULL);
INSERT INTO note_revisions_mig (noteRevisionId, noteId, title, content, isProtected, utcDateModifiedFrom, utcDateModifiedTo, dateModifiedFrom, dateModifiedTo, type, mime, hash)
SELECT noteRevisionId, noteId, title, content, isProtected, REPLACE(dateModifiedFrom, 'T', ' '), REPLACE(dateModifiedTo, 'T', ' '), REPLACE(REPLACE(dateModifiedFrom, 'T', ' '), 'Z', '+0000'), REPLACE(REPLACE(dateModifiedTo, 'T', ' '), 'Z', '+0000'), type, mime, hash FROM note_revisions;
DROP TABLE note_revisions;
ALTER TABLE note_revisions_mig RENAME TO note_revisions;
CREATE TABLE IF NOT EXISTS "api_tokens_mig"
(
apiTokenId TEXT PRIMARY KEY NOT NULL,
token TEXT NOT NULL,
utcDateCreated TEXT NOT NULL,
isDeleted INT NOT NULL DEFAULT 0,
hash TEXT DEFAULT "" NOT NULL);
INSERT INTO api_tokens_mig (apiTokenId, token, utcDateCreated, isDeleted, hash)
SELECT apiTokenId, token, REPLACE(dateCreated, 'T', ' '), isDeleted, hash FROM api_tokens;
DROP TABLE api_tokens;
ALTER TABLE api_tokens_mig RENAME TO api_tokens;
CREATE TABLE IF NOT EXISTS "branches_mig" (
`branchId` TEXT NOT NULL,
`noteId` TEXT NOT NULL,
`parentNoteId` TEXT NOT NULL,
`notePosition` INTEGER NOT NULL,
`prefix` TEXT,
`isExpanded` BOOLEAN,
`isDeleted` INTEGER NOT NULL DEFAULT 0,
`utcDateModified` TEXT NOT NULL,
utcDateCreated TEXT NOT NULL,
hash TEXT DEFAULT "" NOT NULL,
PRIMARY KEY(`branchId`)
);
INSERT INTO branches_mig (branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, utcDateModified, utcDateCreated, hash)
SELECT branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, REPLACE(dateModified, 'T', ' '), REPLACE(dateCreated, 'T', ' '), hash FROM branches;
DROP TABLE branches;
ALTER TABLE branches_mig RENAME TO branches;
CREATE TABLE IF NOT EXISTS "recent_notes_mig" (
`branchId` TEXT NOT NULL PRIMARY KEY,
`notePath` TEXT NOT NULL,
hash TEXT DEFAULT "" NOT NULL,
`utcDateCreated` TEXT NOT NULL,
isDeleted INT
);
INSERT INTO recent_notes_mig (branchId, notePath, hash, utcDateCreated, isDeleted)
SELECT branchId, notePath, hash, REPLACE(dateCreated, 'T', ' '), isDeleted FROM recent_notes;
DROP TABLE recent_notes;
ALTER TABLE recent_notes_mig RENAME TO recent_notes;
CREATE TABLE IF NOT EXISTS "event_log_mig" (
`eventId` TEXT NOT NULL PRIMARY KEY,
`noteId` TEXT,
`comment` TEXT,
`utcDateCreated` TEXT NOT NULL
);
INSERT INTO event_log_mig (eventId, noteId, comment, utcDateCreated)
SELECT eventId, noteId, comment, REPLACE(dateCreated, 'T', ' ') FROM event_log;
DROP TABLE event_log;
ALTER TABLE event_log_mig RENAME TO event_log;
CREATE TABLE IF NOT EXISTS "options_mig"
(
name TEXT not null PRIMARY KEY,
value TEXT,
isSynced INTEGER default 0 not null,
hash TEXT default "" not null,
utcDateCreated TEXT not null,
utcDateModified TEXT NOT NULL
);
INSERT INTO options_mig (name, value, isSynced, hash, utcDateCreated, utcDateModified)
SELECT name, value, isSynced, hash, REPLACE(dateCreated, 'T', ' '), REPLACE(dateModified, 'T', ' ') FROM options;
DROP TABLE options;
ALTER TABLE options_mig RENAME TO options;
CREATE TABLE attributes_mig
(
attributeId TEXT not null primary key,
noteId TEXT not null,
type TEXT not null,
name TEXT not null,
value TEXT default '' not null,
position INT default 0 not null,
utcDateCreated TEXT not null,
utcDateModified TEXT not null,
isDeleted INT not null,
hash TEXT default "" not null,
isInheritable int DEFAULT 0 NULL);
INSERT INTO attributes_mig (attributeId, noteId, type, name, value, position, utcDateCreated, utcDateModified, isDeleted, hash, isInheritable)
SELECT attributeId, noteId, type, name, value, position, REPLACE(dateCreated, 'T', ' '), REPLACE(dateModified, 'T', ' '), isDeleted, hash, isInheritable FROM attributes;
DROP TABLE attributes;
ALTER TABLE attributes_mig RENAME TO attributes;
CREATE TABLE IF NOT EXISTS "links_mig" (
`linkId` TEXT NOT NULL,
`noteId` TEXT NOT NULL,
`targetNoteId` TEXT NOT NULL,
`type` TEXT NOT NULL,
`hash` TEXT DEFAULT "" NOT NULL,
`isDeleted` INTEGER NOT NULL DEFAULT 0,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`linkId`)
);
INSERT INTO links_mig (linkId, noteId, targetNoteId, type, hash, isDeleted, utcDateCreated, utcDateModified)
SELECT linkId, noteId, targetNoteId, type, hash, isDeleted, REPLACE(dateCreated, 'T', ' '), REPLACE(dateModified, 'T', ' ') FROM links;
DROP TABLE links;
ALTER TABLE links_mig RENAME TO links;
CREATE TABLE IF NOT EXISTS "note_contents_mig" (
`noteContentId` TEXT NOT NULL,
`noteId` TEXT NOT NULL,
`isProtected` INT NOT NULL DEFAULT 0,
`content` TEXT NULL DEFAULT NULL,
`hash` TEXT DEFAULT "" NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteContentId`)
);
INSERT INTO note_contents_mig (noteContentId, noteId, isProtected, content, hash, utcDateCreated, utcDateModified)
SELECT noteContentId, noteId, isProtected, content, hash, REPLACE(dateCreated, 'T', ' '), REPLACE(dateModified, 'T', ' ') FROM note_contents;
DROP TABLE note_contents;
ALTER TABLE note_contents_mig RENAME TO note_contents;
CREATE TABLE IF NOT EXISTS "notes_mig" (
`noteId` TEXT NOT NULL,
`title` TEXT NOT NULL DEFAULT "note",
`isProtected` INT NOT NULL DEFAULT 0,
`type` TEXT NOT NULL DEFAULT 'text',
`mime` TEXT NOT NULL DEFAULT 'text/html',
`hash` TEXT DEFAULT "" NOT NULL,
`isDeleted` INT NOT NULL DEFAULT 0,
`dateCreated` TEXT NOT NULL,
`dateModified` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`)
);
INSERT INTO notes_mig (noteId, title, isProtected, type, mime, hash, isDeleted, dateCreated, dateModified, utcDateCreated, utcDateModified)
SELECT noteId, title, isProtected, type, mime, hash, isDeleted, REPLACE(REPLACE(dateCreated, 'T', ' '), 'Z', '+0000'), REPLACE(REPLACE(dateModified, 'T', ' '), 'Z', '+0000'), REPLACE(dateCreated, 'T', ' '), REPLACE(dateModified, 'T', ' ') FROM notes;
DROP TABLE notes;
ALTER TABLE notes_mig RENAME TO notes;
CREATE UNIQUE INDEX `IDX_sync_entityName_entityId` ON `sync` (
`entityName`,
`entityId`
);
CREATE INDEX `IDX_sync_utcSyncDate` ON `sync` (
`utcSyncDate`
);
CREATE INDEX `IDX_note_revisions_noteId` ON `note_revisions` (
`noteId`
);
CREATE INDEX `IDX_note_revisions_dateModifiedFrom` ON `note_revisions` (
`utcDateModifiedFrom`
);
CREATE INDEX `IDX_note_revisions_dateModifiedTo` ON `note_revisions` (
`utcDateModifiedTo`
);
CREATE INDEX `IDX_branches_noteId` ON `branches` (
`noteId`
);
CREATE INDEX `IDX_branches_noteId_parentNoteId` ON `branches` (
`noteId`,
`parentNoteId`
);
CREATE INDEX IDX_branches_parentNoteId ON branches (parentNoteId);
CREATE INDEX IDX_attributes_name_value
on attributes (name, value);
CREATE INDEX IDX_links_noteId_index
on links (noteId);
CREATE INDEX IDX_links_targetNoteId_index
on links (targetNoteId);
CREATE INDEX IDX_attributes_name_index
on attributes (name);
CREATE INDEX IDX_attributes_noteId_index
on attributes (noteId);
CREATE INDEX IDX_attributes_value_index
on attributes (value);
CREATE UNIQUE INDEX `IDX_note_contents_noteId` ON `note_contents` (`noteId`);
@@ -1,13 +0,0 @@
CREATE TABLE IF NOT EXISTS "note_contents_mig" (
`noteId` TEXT NOT NULL,
`content` TEXT NULL DEFAULT NULL,
`hash` TEXT DEFAULT "" NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`)
);
INSERT INTO note_contents_mig (noteId, content, hash, utcDateModified)
SELECT noteId, content, hash, utcDateModified FROM note_contents;
DROP TABLE note_contents;
ALTER TABLE note_contents_mig RENAME TO note_contents;
-5
View File
@@ -1,5 +0,0 @@
const syncTableService = require('../../src/services/entity_changes.js');
module.exports = async () => {
await syncTableService.fillAllSyncRows();
};
@@ -1 +0,0 @@
DROP TABLE IF EXISTS note_fulltext;
@@ -1,4 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
SELECT 'openTabs', '[{"notePath":"' || value || '","active": true,"tabId":"1111"}]', '2019-05-01T18:31:00.874Z', '2019-05-01T18:31:00.874Z', 0 FROM options WHERE name = 'startNotePath';
DELETE FROM options WHERE name = 'startNotePath';
@@ -1,2 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('hideTabRowForOneTab', 'false', '2019-05-01T18:31:00.874Z', '2019-05-01T18:31:00.874Z', 0);
@@ -1,12 +0,0 @@
drop table recent_notes;
create table recent_notes
(
noteId TEXT not null primary key,
notePath TEXT not null,
hash TEXT default "" not null,
utcDateCreated TEXT not null,
isDeleted INT
);
delete from sync where entityName = 'recent_notes';
@@ -1,10 +0,0 @@
UPDATE links SET type = 'internal-link' WHERE type = 'hyper';
UPDATE links SET type = 'image-link' WHERE type = 'image';
UPDATE links SET type = 'relation-map-link' WHERE type = 'relation-map';
INSERT INTO attributes (attributeId, noteId, type, name, value, position, utcDateCreated, utcDateModified, isDeleted, hash, isInheritable)
SELECT linkId, noteId, 'relation', type, targetNoteId, 0, utcDateCreated, utcDateModified, isDeleted, hash, 0 FROM links;
UPDATE sync SET entityName = 'attributes' WHERE entityName = 'links';
DROP TABLE links;
-5
View File
@@ -1,5 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('sidebarMinWidth', '350', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('sidebarWidthPercent', '25', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
@@ -1,2 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('showSidebarInNewTab', 'true', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
-14
View File
@@ -1,14 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('noteInfoWidget', '{"enabled":true,"expanded":true,"position":100}', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('attributesWidget', '{"enabled":true,"expanded":true,"position":200}', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('linkMapWidget', '{"enabled":true,"expanded":true,"position":300}', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('noteRevisionsWidget', '{"enabled":true,"expanded":true,"position":400}', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('whatLinksHereWidget', '{"enabled":false,"expanded":true,"position":500}', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
@@ -1,5 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('codeNotesMimeTypes', '["text/x-csrc","text/x-c++src","text/x-csharp","text/css","text/x-go","text/x-groovy","text/x-haskell","text/html","message/http","text/x-java","application/javascript;env=frontend","application/javascript;env=backend","application/json","text/x-kotlin","text/x-markdown","text/x-perl","text/x-php","text/x-python","text/x-ruby",null,"text/x-sql","text/x-swift","text/xml","text/x-yaml"]', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 1);
INSERT INTO sync (entityName, entityId, sourceId, utcSyncDate)
VALUES ('options' ,'codeNotesMimeTypes', 'SYNC_FILL', '2018-01-01T00:00:00.000Z');
@@ -1,2 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('similarNotesWidget', '{"enabled":true,"expanded":true,"position":600}', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
-1
View File
@@ -1 +0,0 @@
DROP TABLE event_log;
@@ -1,2 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('editedNotesWidget', '{"enabled":true,"expanded":true,"position":50}', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
-2
View File
@@ -1,2 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('calendarWidget', '{"enabled":true,"expanded":true,"position":20}', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
@@ -1,5 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('spellCheckEnabled', 'true', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
VALUES ('spellCheckLanguageCode', 'en-US', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0);
@@ -1,3 +0,0 @@
INSERT INTO options (name, value, utcDateCreated, utcDateModified, isSynced)
SELECT 'hideTabRowForOneTab', 'false', '2019-05-01T18:31:00.874Z', '2019-05-01T18:31:00.874Z', 0
WHERE NOT EXISTS(SELECT 1 FROM options WHERE name = 'hideTabRowForOneTab');
@@ -1,22 +0,0 @@
CREATE TABLE IF NOT EXISTS "mig_branches" (
`branchId` TEXT NOT NULL,
`noteId` TEXT NOT NULL,
`parentNoteId` TEXT NOT NULL,
`notePosition` INTEGER NOT NULL,
`prefix` TEXT,
`isExpanded` INTEGER NOT NULL DEFAULT 0,
`isDeleted` INTEGER NOT NULL DEFAULT 0,
`utcDateModified` TEXT NOT NULL,
utcDateCreated TEXT NOT NULL,
hash TEXT DEFAULT "" NOT NULL,
PRIMARY KEY(`branchId`));
INSERT INTO mig_branches (branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, utcDateModified, utcDateCreated, hash)
SELECT branchId, noteId, parentNoteId, notePosition, prefix, COALESCE(isExpanded, 0), isDeleted, utcDateModified, utcDateCreated, hash FROM branches;
DROP TABLE branches;
ALTER TABLE mig_branches RENAME TO branches;
CREATE INDEX `IDX_branches_noteId` ON `branches` (`noteId`);
CREATE INDEX `IDX_branches_noteId_parentNoteId` ON `branches` (`noteId`,`parentNoteId`);
CREATE INDEX IDX_branches_parentNoteId ON branches (parentNoteId);
@@ -1,2 +0,0 @@
UPDATE branches SET notePosition = notePosition * 10;
UPDATE attributes SET position = position * 10;
@@ -1,36 +0,0 @@
CREATE TABLE IF NOT EXISTS "note_revisions_mig" (`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
`noteId` TEXT NOT NULL,
`title` TEXT,
`contentLength` INT NOT NULL,
`isProtected` INT NOT NULL DEFAULT 0,
`utcDateLastEdited` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
`dateLastEdited` TEXT NOT NULL,
`dateCreated` TEXT NOT NULL,
type TEXT DEFAULT '' NOT NULL,
mime TEXT DEFAULT '' NOT NULL,
hash TEXT DEFAULT '' NOT NULL);
CREATE TABLE IF NOT EXISTS "note_revision_contents" (`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
`content` TEXT,
hash TEXT DEFAULT '' NOT NULL,
`utcDateModified` TEXT NOT NULL);
INSERT INTO note_revision_contents (noteRevisionId, content, hash, utcDateModified)
SELECT noteRevisionId, content, hash, utcDateModifiedTo FROM note_revisions;
INSERT INTO note_revisions_mig (noteRevisionId, noteId, title, contentLength, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated, type, mime, hash)
SELECT noteRevisionId, noteId, title, COALESCE(LENGTH(content), 0), isProtected, utcDateModifiedFrom, utcDateModifiedTo, utcDateModifiedTo, dateModifiedFrom, dateModifiedTo, type, mime, hash FROM note_revisions;
DROP TABLE note_revisions;
ALTER TABLE note_revisions_mig RENAME TO note_revisions;
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`);
INSERT INTO sync (entityName, entityId, sourceId, utcSyncDate)
SELECT 'note_revision_contents', entityId, sourceId, utcSyncDate FROM sync WHERE entityName = 'note_revisions';
@@ -1,31 +0,0 @@
CREATE TABLE IF NOT EXISTS "notes_mig" (
`noteId` TEXT NOT NULL,
`title` TEXT NOT NULL DEFAULT "note",
`isProtected` INT NOT NULL DEFAULT 0,
`type` TEXT NOT NULL DEFAULT 'text',
`mime` TEXT NOT NULL DEFAULT 'text/html',
`hash` TEXT DEFAULT "" NOT NULL,
`isDeleted` INT NOT NULL DEFAULT 0,
`isErased` INT NOT NULL DEFAULT 0,
`dateCreated` TEXT NOT NULL,
`dateModified` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`));
INSERT INTO notes_mig (noteId, title, isProtected, type, mime, hash, isDeleted, isErased, dateCreated, dateModified, utcDateCreated, utcDateModified)
SELECT noteId, title, isProtected, type, mime, hash, isDeleted, 0, dateCreated, dateModified, utcDateCreated, utcDateModified FROM notes;
DROP TABLE notes;
ALTER TABLE notes_mig RENAME TO notes;
UPDATE notes SET isErased = 1 WHERE isDeleted = 1
AND 1=(SELECT CASE WHEN content IS NULL THEN 1 ELSE 0 END FROM note_contents WHERE note_contents.noteId = notes.noteId);
CREATE INDEX `IDX_notes_isDeleted` ON `notes` (`isDeleted`);
CREATE INDEX `IDX_notes_title` ON `notes` (`title`);
CREATE INDEX `IDX_notes_type` ON `notes` (`type`);
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`);
@@ -1,34 +0,0 @@
CREATE TABLE IF NOT EXISTS "notes_mig" (
`noteId` TEXT NOT NULL,
`title` TEXT NOT NULL DEFAULT "note",
`contentLength` INT NOT NULL,
`isProtected` INT NOT NULL DEFAULT 0,
`type` TEXT NOT NULL DEFAULT 'text',
`mime` TEXT NOT NULL DEFAULT 'text/html',
`hash` TEXT DEFAULT "" NOT NULL,
`isDeleted` INT NOT NULL DEFAULT 0,
`isErased` INT NOT NULL DEFAULT 0,
`dateCreated` TEXT NOT NULL,
`dateModified` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`));
INSERT INTO notes_mig (noteId, title, contentLength, isProtected, type, mime, hash, isDeleted, isErased, dateCreated, dateModified, utcDateCreated, utcDateModified)
SELECT noteId, title, -1, isProtected, type, mime, hash, isDeleted, isErased, dateCreated, dateModified, utcDateCreated, utcDateModified FROM notes;
DROP TABLE notes;
ALTER TABLE notes_mig RENAME TO notes;
UPDATE notes SET contentLength = COALESCE((SELECT COALESCE(LENGTH(content), 0) FROM note_contents WHERE note_contents.noteId = notes.noteId), -1);
CREATE INDEX `IDX_notes_isDeleted` ON `notes` (`isDeleted`);
CREATE INDEX `IDX_notes_title` ON `notes` (`title`);
CREATE INDEX `IDX_notes_type` ON `notes` (`type`);
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`);
-- should be OK since sync protocol changes so all instances must upgrade
UPDATE attributes SET isDeleted = 1 WHERE name = 'fileSize';
@@ -1,28 +0,0 @@
CREATE TABLE IF NOT EXISTS "note_revisions_mig" (`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
`noteId` TEXT NOT NULL,
`title` TEXT,
`contentLength` INT NOT NULL,
`isErased` INT NOT NULL DEFAULT 0,
`isProtected` INT NOT NULL DEFAULT 0,
`utcDateLastEdited` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
`dateLastEdited` TEXT NOT NULL,
`dateCreated` TEXT NOT NULL,
type TEXT DEFAULT '' NOT NULL,
mime TEXT DEFAULT '' NOT NULL,
hash TEXT DEFAULT '' NOT NULL);
INSERT INTO note_revisions_mig (noteRevisionId, noteId, title, contentLength, isErased, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated, type, mime, hash)
SELECT noteRevisionId, noteId, title, contentLength, 0, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated, type, mime, hash FROM note_revisions;
DROP TABLE note_revisions;
ALTER TABLE note_revisions_mig RENAME TO note_revisions;
UPDATE note_revisions SET isErased = (SELECT isErased FROM notes WHERE notes.noteId = note_revisions.noteId);
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`);
@@ -1,3 +0,0 @@
UPDATE attributes SET name = 'internalLink' WHERE name = 'internal-link';
UPDATE attributes SET name = 'imageLink' WHERE name = 'image-link';
UPDATE attributes SET name = 'relationMapLink' WHERE name = 'relation-map-link';
-5
View File
@@ -1,5 +0,0 @@
DROP INDEX IF EXISTS IDX_attributes_name_index;
DROP INDEX IF EXISTS IDX_branches_noteId;
CREATE INDEX IDX_source_ids_utcDateCreated
on source_ids (utcDateCreated);
-81
View File
@@ -1,81 +0,0 @@
CREATE TABLE IF NOT EXISTS "notes_mig" (
`noteId` TEXT NOT NULL,
`title` TEXT NOT NULL DEFAULT "note",
`contentLength` INT NOT NULL,
`isProtected` INT NOT NULL DEFAULT 0,
`type` TEXT NOT NULL DEFAULT 'text',
`mime` TEXT NOT NULL DEFAULT 'text/html',
`hash` TEXT DEFAULT "" NOT NULL,
`isDeleted` INT NOT NULL DEFAULT 0,
`deleteId` TEXT DEFAULT NULL,
`isErased` INT NOT NULL DEFAULT 0,
`dateCreated` TEXT NOT NULL,
`dateModified` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`));
INSERT INTO notes_mig (noteId, title, contentLength, isProtected, type, mime, hash, isDeleted, isErased, dateCreated, dateModified, utcDateCreated, utcDateModified)
SELECT noteId, title, -1, isProtected, type, mime, hash, isDeleted, isErased, dateCreated, dateModified, utcDateCreated, utcDateModified FROM notes;
DROP TABLE notes;
ALTER TABLE notes_mig RENAME TO notes;
CREATE INDEX `IDX_notes_isDeleted` ON `notes` (`isDeleted`);
CREATE INDEX `IDX_notes_title` ON `notes` (`title`);
CREATE INDEX `IDX_notes_type` ON `notes` (`type`);
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 TABLE IF NOT EXISTS "branches_mig" (
`branchId` TEXT NOT NULL,
`noteId` TEXT NOT NULL,
`parentNoteId` TEXT NOT NULL,
`notePosition` INTEGER NOT NULL,
`prefix` TEXT,
`isExpanded` INTEGER NOT NULL DEFAULT 0,
`isDeleted` INTEGER NOT NULL DEFAULT 0,
`deleteId` TEXT DEFAULT NULL,
`utcDateModified` TEXT NOT NULL,
utcDateCreated TEXT NOT NULL,
hash TEXT DEFAULT "" NOT NULL,
PRIMARY KEY(`branchId`));
INSERT INTO branches_mig (branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, utcDateModified, utcDateCreated, hash)
SELECT branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, utcDateModified, utcDateCreated, hash FROM branches;
DROP TABLE branches;
ALTER TABLE branches_mig RENAME TO branches;
CREATE INDEX `IDX_branches_noteId_parentNoteId` ON `branches` (`noteId`,`parentNoteId`);
CREATE INDEX IDX_branches_parentNoteId ON branches (parentNoteId);
CREATE TABLE IF NOT EXISTS "attributes_mig"
(
attributeId TEXT not null primary key,
noteId TEXT not null,
type TEXT not null,
name TEXT not null,
value TEXT default '' not null,
position INT default 0 not null,
utcDateCreated TEXT not null,
utcDateModified TEXT not null,
isDeleted INT not null,
`deleteId` TEXT DEFAULT NULL,
hash TEXT default "" not null,
isInheritable int DEFAULT 0 NULL);
INSERT INTO attributes_mig (attributeId, noteId, type, name, value, position, utcDateCreated, utcDateModified, isDeleted, hash, isInheritable)
SELECT attributeId, noteId, type, name, value, position, utcDateCreated, utcDateModified, isDeleted, hash, isInheritable FROM attributes;
DROP TABLE attributes;
ALTER TABLE attributes_mig RENAME TO attributes;
CREATE INDEX IDX_attributes_name_value
on attributes (name, value);
CREATE INDEX IDX_attributes_noteId_index
on attributes (noteId);
CREATE INDEX IDX_attributes_value_index
on attributes (value);
@@ -1 +0,0 @@
UPDATE notes SET contentLength = COALESCE((SELECT COALESCE(LENGTH(content), 0) FROM note_contents WHERE note_contents.noteId = notes.noteId), -1);
@@ -1,22 +0,0 @@
CREATE TABLE IF NOT EXISTS "sync_mig" (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`entityName` TEXT NOT NULL,
`entityId` TEXT NOT NULL,
`sourceId` TEXT NOT NULL,
`isSynced` INTEGER default 0 not null,
`utcSyncDate` TEXT NOT NULL);
INSERT INTO sync_mig (id, entityName, entityId, sourceId, isSynced, utcSyncDate)
SELECT id, entityName, entityId, sourceId, 1, utcSyncDate FROM sync;
DROP TABLE sync;
ALTER TABLE sync_mig RENAME TO sync;
CREATE UNIQUE INDEX `IDX_sync_entityName_entityId` ON `sync` (
`entityName`,
`entityId`
);
CREATE INDEX `IDX_sync_utcSyncDate` ON `sync` (
`utcSyncDate`
);
@@ -1,4 +0,0 @@
UPDATE sync SET isSynced = 1 WHERE entityName != 'options' OR (
entityName = 'options'
AND 1 = (SELECT isSynced FROM options WHERE name = sync.entityId)
)
@@ -1,2 +0,0 @@
UPDATE attributes SET type = 'label', name = 'label:' || name WHERE type = 'label-definition';
UPDATE attributes SET type = 'label', name = 'relation:' || name WHERE type = 'relation-definition';
-79
View File
@@ -1,79 +0,0 @@
const sql = require('../../src/services/sql');
module.exports = () => {
for (const attr of sql.getRows("SELECT * FROM attributes WHERE name LIKE 'label:%'")) {
let obj;
try {
obj = JSON.parse(attr.value);
}
catch (e) {
console.log(`Parsing attribute definition "${attr.value}" of ${attr.attributeId} failed with error "${e.message}", setting to default value.`);
sql.execute('UPDATE attributes SET value = ? WHERE attributeId = ?',
["multi,text", attr.attributeId]);
continue;
}
const tokens = [];
if (obj.isPromoted) {
tokens.push('promoted');
}
if (obj.multiplicityType === 'singlevalue') {
tokens.push('single');
} else if (obj.multiplicityType === 'multivalue') {
tokens.push('multi');
}
if (obj.labelType) {
tokens.push(obj.labelType);
}
if (obj.numberPrecision) {
tokens.push('precision='+obj.numberPrecision);
}
const newValue = tokens.join(',');
sql.execute('UPDATE attributes SET value = ? WHERE attributeId = ?', [newValue, attr.attributeId]);
}
for (const attr of sql.getRows("SELECT * FROM attributes WHERE name LIKE 'relation:%'")) {
let obj;
try {
obj = JSON.parse(attr.value);
}
catch (e) {
console.log(`Parsing attribute definition "${attr.value}" of ${attr.attributeId} failed with error "${e.message}", setting to default value.`);
sql.execute('UPDATE attributes SET value = ? WHERE attributeId = ?',
["multi", attr.attributeId]);
continue;
}
const tokens = [];
if (obj.isPromoted) {
tokens.push('promoted');
}
if (obj.multiplicityType === 'singlevalue') {
tokens.push('single');
} else if (obj.multiplicityType === 'multivalue') {
tokens.push('multi');
}
if (obj.inverseRelation) {
tokens.push('inverse=' + obj.inverseRelation);
}
const newValue = tokens.join(',');
sql.execute('UPDATE attributes SET value = ? WHERE attributeId = ?', [newValue, attr.attributeId]);
}
};
-1
View File
@@ -1 +0,0 @@
DROP TABLE source_ids;
@@ -1 +0,0 @@
ALTER TABLE sync RENAME TO entity_changes;
@@ -1,22 +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,
`sourceId` TEXT NOT NULL,
`isSynced` INTEGER default 0 not null,
`utcChangedDate` TEXT NOT NULL);
INSERT INTO mig_entity_changes (id, entityName, entityId, sourceId, isSynced, utcChangedDate)
SELECT id, entityName, entityId, sourceId, isSynced, utcSyncDate 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`
);
CREATE INDEX `IDX_entityChanges_utcChangedDate` ON "entity_changes" (
`utcChangedDate`
);
@@ -1,55 +0,0 @@
CREATE TABLE IF NOT EXISTS "notes_mig" (
`noteId` TEXT NOT NULL,
`title` TEXT NOT NULL DEFAULT "note",
`isProtected` INT NOT NULL DEFAULT 0,
`type` TEXT NOT NULL DEFAULT 'text',
`mime` TEXT NOT NULL DEFAULT 'text/html',
`hash` TEXT DEFAULT "" NOT NULL,
`isDeleted` INT NOT NULL DEFAULT 0,
`deleteId` TEXT DEFAULT NULL,
`isErased` INT NOT NULL DEFAULT 0,
`dateCreated` TEXT NOT NULL,
`dateModified` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`));
INSERT INTO notes_mig (noteId, title, isProtected, type, mime, hash, isDeleted, deleteId, isErased, dateCreated, dateModified, utcDateCreated, utcDateModified)
SELECT noteId, title, isProtected, type, mime, hash, isDeleted, deleteId, isErased, dateCreated, dateModified, utcDateCreated, utcDateModified FROM notes;
DROP TABLE notes;
ALTER TABLE notes_mig RENAME TO notes;
CREATE INDEX `IDX_notes_isDeleted` ON `notes` (`isDeleted`);
CREATE INDEX `IDX_notes_title` ON `notes` (`title`);
CREATE INDEX `IDX_notes_type` ON `notes` (`type`);
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 TABLE IF NOT EXISTS "note_revisions_mig" (`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
`noteId` TEXT NOT NULL,
`title` TEXT,
`isErased` INT NOT NULL DEFAULT 0,
`isProtected` INT NOT NULL DEFAULT 0,
`utcDateLastEdited` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
`dateLastEdited` TEXT NOT NULL,
`dateCreated` TEXT NOT NULL,
type TEXT DEFAULT '' NOT NULL,
mime TEXT DEFAULT '' NOT NULL,
hash TEXT DEFAULT '' NOT NULL);
INSERT INTO note_revisions_mig (noteRevisionId, noteId, title, isErased, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated, type, mime, hash)
SELECT noteRevisionId, noteId, title, isErased, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated, type, mime, hash FROM note_revisions;
DROP TABLE note_revisions;
ALTER TABLE note_revisions_mig RENAME TO note_revisions;
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`);
@@ -1,20 +0,0 @@
CREATE TABLE IF NOT EXISTS "note_contents_mig" (
`noteId` TEXT NOT NULL,
`content` TEXT NULL DEFAULT NULL,
`hash` TEXT DEFAULT "" NOT NULL,
`dateModified` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`)
);
INSERT INTO note_contents_mig (noteId, content, hash, dateModified, utcDateModified)
SELECT noteId,
content,
hash,
COALESCE((SELECT dateModified FROM notes WHERE noteId = note_contents.noteId), utcDateModified),
utcDateModified
FROM note_contents;
DROP TABLE note_contents;
ALTER TABLE note_contents_mig RENAME TO note_contents;
@@ -1 +0,0 @@
DELETE FROM options WHERE name = 'keyboardShortcutsActivateParentNote';
@@ -1 +0,0 @@
UPDATE attributes SET name = 'archived' WHERE name = 'hideInAutocomplete';
-20
View File
@@ -1,20 +0,0 @@
const repository = require('../../src/services/repository');
module.exports = () => {
for (const note of repository.getEntities("SELECT * FROM notes WHERE type = 'text' AND isProtected = 0")) {
try {
let origContent = note.getContent();
const newContent = origContent
.replace(/<h1/ig, "<h2")
.replace(/<\/h1/ig, "</h2");
if (newContent !== origContent) {
note.setContent(newContent);
}
}
catch (e) {
console.log(`Changing note content for note ${note.noteId} failed with: ${e.message} ${e.stack}`);
}
}
};
@@ -1,14 +0,0 @@
const repository = require('../../src/services/repository');
const sql = require('../../src/services/sql');
module.exports = () => {
for (const note of repository.getEntities("SELECT * FROM notes")) {
let position = 0;
for (const branch of note.getChildBranches()) {
sql.execute(`UPDATE branches SET notePosition = ? WHERE branchId = ?`, [position, branch.branchId]);
position += 10;
}
}
};
-15
View File
@@ -1,15 +0,0 @@
DELETE FROM options WHERE name IN (
'noteInfoWidget',
'attributesWidget',
'linkMapWidget',
'noteRevisionsWidget',
'whatLinksHereWidget',
'codeNotesMimeTypes',
'similarNotesWidget',
'editedNotesWidget',
'calendarWidget',
'sidebarMinWidth',
'sidebarWidthPercent',
'showSidebarInNewTab',
'hoistedNoteId'
);
@@ -1,69 +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,
`sourceId` TEXT NOT NULL,
`isErased` INT NOT NULL,
`utcDateChanged` TEXT NOT NULL,
`isSynced` INTEGER NOT NULL);
INSERT INTO mig_entity_changes (id, entityName, entityId, hash, sourceId, isSynced, utcDateChanged, isErased)
SELECT id, entityName, entityId, '', sourceId, isSynced, utcChangedDate, 0 FROM entity_changes;
UPDATE mig_entity_changes SET isErased = COALESCE((SELECT isErased FROM notes WHERE noteId = entityId), 0) WHERE entityName = 'notes';
UPDATE mig_entity_changes SET utcDateChanged = COALESCE((SELECT utcDateModified FROM notes WHERE noteId = entityId), '2020-12-14 14:07:05.165Z') WHERE entityName = 'notes';
UPDATE mig_entity_changes SET isErased = COALESCE((SELECT isErased FROM notes WHERE noteId = entityId), 0) WHERE entityName = 'note_contents';
UPDATE mig_entity_changes SET isErased = COALESCE((
SELECT isErased
FROM attributes
JOIN notes USING(noteId)
WHERE attributeId = entityId
), 0) WHERE entityName = 'attributes';
UPDATE mig_entity_changes SET utcDateChanged = COALESCE((SELECT utcDateModified FROM attributes WHERE attributeId = entityId), '2020-12-14 14:07:05.165Z') WHERE entityName = 'attributes';
UPDATE mig_entity_changes SET isErased = COALESCE((
SELECT isErased
FROM branches
JOIN notes USING(noteId)
WHERE branchId = entityId
), 0) WHERE entityName = 'branches';
UPDATE mig_entity_changes SET utcDateChanged = COALESCE((SELECT utcDateModified FROM branches WHERE branchId = entityId), '2020-12-14 14:07:05.165Z') WHERE entityName = 'branches';
UPDATE mig_entity_changes SET isErased = COALESCE((
SELECT isErased
FROM note_revisions
WHERE noteRevisionId = entityId
), 0) WHERE entityName = 'note_revisions';
UPDATE mig_entity_changes SET utcDateChanged = COALESCE((SELECT utcDateModified FROM note_revisions WHERE noteRevisionId = entityId), '2020-12-14 14:07:05.165Z') WHERE entityName = 'note_revisions';
UPDATE mig_entity_changes SET utcDateChanged = COALESCE((SELECT utcDateCreated FROM api_tokens WHERE apiTokenId = entityId), '2020-12-14 14:07:05.165Z') WHERE entityName = 'api_tokens';
UPDATE mig_entity_changes SET utcDateChanged = COALESCE((SELECT utcDateModified FROM note_contents WHERE noteId = entityId), '2020-12-14 14:07:05.165Z') WHERE entityName = 'note_contents';
UPDATE mig_entity_changes SET utcDateChanged = COALESCE((SELECT utcDateModified FROM note_revision_contents WHERE noteRevisionId = entityId), '2020-12-14 14:07:05.165Z') WHERE entityName = 'note_revision_contents';
UPDATE mig_entity_changes SET utcDateChanged = COALESCE((SELECT utcDateModified FROM options WHERE name = entityId), '2020-12-14 14:07:05.165Z') WHERE entityName = 'options';
UPDATE mig_entity_changes SET utcDateChanged = COALESCE((SELECT utcDateCreated FROM recent_notes WHERE noteId = entityId), '2020-12-14 14:07:05.165Z') WHERE entityName = 'options';
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`
);
DELETE FROM attributes WHERE noteId IN (SELECT noteId FROM notes WHERE isErased = 1);
DELETE FROM branches WHERE noteId IN (SELECT noteId FROM notes WHERE isErased = 1);
DELETE FROM note_contents WHERE noteId IN (SELECT noteId FROM notes WHERE isErased = 1);
DELETE FROM note_revision_contents WHERE noteRevisionId IN (
SELECT noteRevisionId FROM note_revisions WHERE isErased = 1
);
DELETE FROM note_revisions WHERE isErased = 1;
DELETE FROM notes WHERE isErased = 1;
UPDATE entity_changes SET isErased = COALESCE((SELECT isErased FROM entity_changes AS sub WHERE sub.entityId = entity_changes.entityId AND sub.entityName = 'note_revisions'), 0) WHERE entityName = 'note_revision_contents';
@@ -1,198 +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,
`sourceId` TEXT NOT NULL,
`isSynced` INTEGER NOT NULL,
`utcDateChanged` TEXT NOT NULL
);
INSERT INTO mig_entity_changes (id, entityName, entityId, hash, sourceId, isSynced, isErased, utcDateChanged)
SELECT id, entityName, entityId, '', sourceId, isSynced, isErased, utcDateChanged FROM entity_changes;
UPDATE mig_entity_changes SET hash = COALESCE((SELECT hash FROM api_tokens WHERE apiTokenId = entityId), '') WHERE entityName = 'api_tokens';
UPDATE mig_entity_changes SET hash = COALESCE((SELECT hash FROM attributes WHERE attributeId = entityId), '') WHERE entityName = 'attributes';
UPDATE mig_entity_changes SET hash = COALESCE((SELECT hash FROM branches WHERE branchId = entityId), '') WHERE entityName = 'branches';
UPDATE mig_entity_changes SET hash = COALESCE((SELECT hash FROM notes WHERE noteId = entityId), '') WHERE entityName = 'notes';
UPDATE mig_entity_changes SET hash = COALESCE((SELECT hash FROM note_contents WHERE noteId = entityId), '') WHERE entityName = 'note_contents';
UPDATE mig_entity_changes SET hash = COALESCE((SELECT hash FROM note_revisions WHERE noteRevisionId = entityId), '') WHERE entityName = 'note_revisions';
UPDATE mig_entity_changes SET hash = COALESCE((SELECT hash FROM note_revision_contents WHERE noteRevisionId = entityId), '') WHERE entityName = 'note_revision_contents';
UPDATE mig_entity_changes SET hash = COALESCE((SELECT hash FROM options WHERE name = entityId), '') WHERE entityName = 'options';
UPDATE mig_entity_changes SET hash = COALESCE((SELECT hash FROM recent_notes WHERE noteId = entityId), '') WHERE entityName = 'recent_notes';
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`
);
CREATE TABLE IF NOT EXISTS "mig_api_tokens"
(
apiTokenId TEXT PRIMARY KEY NOT NULL,
token TEXT NOT NULL,
utcDateCreated TEXT NOT NULL,
isDeleted INT NOT NULL DEFAULT 0);
INSERT INTO mig_api_tokens (apiTokenId, token, utcDateCreated, isDeleted)
SELECT apiTokenId, token, utcDateCreated, isDeleted FROM api_tokens;
DROP TABLE api_tokens;
ALTER TABLE mig_api_tokens RENAME TO api_tokens;
CREATE TABLE IF NOT EXISTS "mig_attributes"
(
attributeId TEXT not null primary key,
noteId TEXT not null,
type TEXT not null,
name TEXT not null,
value TEXT default '' not null,
position INT default 0 not null,
utcDateCreated TEXT not null,
utcDateModified TEXT not null,
isDeleted INT not null,
`deleteId` TEXT DEFAULT NULL,
isInheritable int DEFAULT 0 NULL);
INSERT INTO mig_attributes (attributeId, noteId, type, name, value, position, utcDateCreated, utcDateModified, isDeleted, deleteId, isInheritable)
SELECT attributeId, noteId, type, name, value, position, utcDateCreated, utcDateModified, isDeleted, deleteId, isInheritable FROM attributes;
DROP TABLE attributes;
ALTER TABLE mig_attributes RENAME TO attributes;
CREATE INDEX IDX_attributes_name_value
on attributes (name, value);
CREATE INDEX IDX_attributes_noteId_index
on attributes (noteId);
CREATE INDEX IDX_attributes_value_index
on attributes (value);
CREATE TABLE IF NOT EXISTS "mig_branches" (
`branchId` TEXT NOT NULL,
`noteId` TEXT NOT NULL,
`parentNoteId` TEXT NOT NULL,
`notePosition` INTEGER NOT NULL,
`prefix` TEXT,
`isExpanded` INTEGER NOT NULL DEFAULT 0,
`isDeleted` INTEGER NOT NULL DEFAULT 0,
`deleteId` TEXT DEFAULT NULL,
`utcDateModified` TEXT NOT NULL,
utcDateCreated TEXT NOT NULL,
PRIMARY KEY(`branchId`));
INSERT INTO mig_branches (branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, deleteId, utcDateModified, utcDateCreated)
SELECT branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, deleteId, utcDateModified, utcDateCreated FROM branches;
DROP TABLE branches;
ALTER TABLE mig_branches RENAME TO branches;
CREATE INDEX `IDX_branches_noteId_parentNoteId` ON `branches` (`noteId`,`parentNoteId`);
CREATE INDEX IDX_branches_parentNoteId ON branches (parentNoteId);
CREATE TABLE IF NOT EXISTS "mig_notes" (
`noteId` TEXT NOT NULL,
`title` TEXT NOT NULL DEFAULT "note",
`isProtected` INT NOT NULL DEFAULT 0,
`type` TEXT NOT NULL DEFAULT 'text',
`mime` TEXT NOT NULL DEFAULT 'text/html',
`isDeleted` INT NOT NULL DEFAULT 0,
`deleteId` TEXT DEFAULT NULL,
`dateCreated` TEXT NOT NULL,
`dateModified` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`));
INSERT INTO mig_notes (noteId, title, isProtected, type, mime, isDeleted, deleteId, dateCreated, dateModified, utcDateCreated, utcDateModified)
SELECT noteId, title, isProtected, type, mime, isDeleted, deleteId, dateCreated, dateModified, utcDateCreated, utcDateModified FROM notes;
DROP TABLE notes;
ALTER TABLE mig_notes RENAME TO notes;
CREATE INDEX `IDX_notes_isDeleted` ON `notes` (`isDeleted`);
CREATE INDEX `IDX_notes_title` ON `notes` (`title`);
CREATE INDEX `IDX_notes_type` ON `notes` (`type`);
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 TABLE IF NOT EXISTS "mig_note_contents" (
`noteId` TEXT NOT NULL,
`content` TEXT NULL DEFAULT NULL,
`dateModified` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
PRIMARY KEY(`noteId`)
);
INSERT INTO mig_note_contents (noteId, content, dateModified, utcDateModified)
SELECT noteId, content, dateModified, utcDateModified FROM note_contents;
DROP TABLE note_contents;
ALTER TABLE mig_note_contents RENAME TO note_contents;
CREATE TABLE IF NOT EXISTS "mig_note_revisions" (`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
`noteId` TEXT NOT NULL,
type TEXT DEFAULT '' NOT NULL,
mime TEXT DEFAULT '' NOT NULL,
`title` TEXT,
`isProtected` INT NOT NULL DEFAULT 0,
`utcDateLastEdited` TEXT NOT NULL,
`utcDateCreated` TEXT NOT NULL,
`utcDateModified` TEXT NOT NULL,
`dateLastEdited` TEXT NOT NULL,
`dateCreated` TEXT NOT NULL);
INSERT INTO mig_note_revisions (noteRevisionId, noteId, type, mime, title, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated)
SELECT noteRevisionId, noteId, type, mime, title, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated FROM note_revisions;
DROP TABLE note_revisions;
ALTER TABLE mig_note_revisions RENAME TO note_revisions;
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 TABLE IF NOT EXISTS "mig_note_revision_contents" (`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
`content` TEXT,
`utcDateModified` TEXT NOT NULL);
INSERT INTO mig_note_revision_contents (noteRevisionId, content, utcDateModified)
SELECT noteRevisionId, content, utcDateModified FROM note_revision_contents;
DROP TABLE note_revision_contents;
ALTER TABLE mig_note_revision_contents RENAME TO note_revision_contents;
CREATE TABLE IF NOT EXISTS "mig_options"
(
name TEXT not null PRIMARY KEY,
value TEXT,
isSynced INTEGER default 0 not null,
utcDateCreated TEXT not null,
utcDateModified TEXT NOT NULL
);
INSERT INTO mig_options (name, value, isSynced, utcDateCreated, utcDateModified)
SELECT name, value, isSynced, utcDateCreated, utcDateModified FROM options;
DROP TABLE options;
ALTER TABLE mig_options RENAME TO options;
CREATE TABLE mig_recent_notes
(
noteId TEXT not null primary key,
notePath TEXT not null,
utcDateCreated TEXT not null,
isDeleted INT NOT NULL DEFAULT 0
);
INSERT INTO mig_recent_notes (noteId, notePath, utcDateCreated, isDeleted)
SELECT noteId, notePath, utcDateCreated, isDeleted FROM recent_notes;
DROP TABLE recent_notes;
ALTER TABLE mig_recent_notes RENAME TO recent_notes;
@@ -1,2 +0,0 @@
UPDATE options SET name = 'eraseEntitiesAfterTimeInSeconds' WHERE name = 'eraseNotesAfterTimeInSeconds';
UPDATE entity_changes SET entityId = 'eraseEntitiesAfterTimeInSeconds' WHERE entityName = 'options' AND entityId = 'eraseNotesAfterTimeInSeconds';
@@ -1,25 +0,0 @@
CREATE TABLE IF NOT EXISTS "mig_attributes"
(
attributeId TEXT not null primary key,
noteId TEXT not null,
type TEXT not null,
name TEXT not null,
value TEXT default '' not null,
position INT default 0 not null,
utcDateModified TEXT not null,
isDeleted INT not null,
`deleteId` TEXT DEFAULT NULL,
isInheritable int DEFAULT 0 NULL);
INSERT INTO mig_attributes (attributeId, noteId, type, name, value, position, utcDateModified, isDeleted, deleteId, isInheritable)
SELECT attributeId, noteId, type, name, value, position, utcDateModified, isDeleted, deleteId, isInheritable FROM attributes;
DROP TABLE attributes;
ALTER TABLE mig_attributes RENAME TO attributes;
CREATE INDEX IDX_attributes_name_value
on attributes (name, value);
CREATE INDEX IDX_attributes_noteId_index
on attributes (noteId);
CREATE INDEX IDX_attributes_value_index
on attributes (value);
@@ -1,5 +0,0 @@
DELETE FROM options WHERE name = 'keyboardShortcutsCreateNoteIntoInbox'; -- in case there is already one which shouldn't (except for in-dev documents)
UPDATE options SET name = 'keyboardShortcutsCreateNoteIntoInbox' WHERE name = 'keyboardShortcutsCreateNoteIntoDayNote';
DELETE FROM options WHERE name = 'keyboardShortcutsShowAttributes';
DELETE FROM entity_changes WHERE entityName = 'options' AND entityId = 'keyboardShortcutsShowAttributes';

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