Compare commits

...

319 Commits

Author SHA1 Message Date
Elian Doran
8211fd36af fix(release): unable to access change log 2025-04-17 22:17:30 +03:00
Elian Doran
f6b5fb43f4 chore(release): amend reverted patch 2025-04-17 21:30:02 +03:00
Elian Doran
78ad4f3da7 chore(release): prepare for 0.93.0 2025-04-17 21:27:00 +03:00
Elian Doran
3ec7da67d0 docs(release): clean up changelog 2025-04-17 21:20:31 +03:00
Elian Doran
b700bb65d8 fix(search): note path contains icon (closes #1721) 2025-04-17 21:08:04 +03:00
Elian Doran
069e307ec4 refactor(note_autocomplete): icon as separate field 2025-04-17 20:49:45 +03:00
Elian Doran
482243b419 fix(tree): note order sometimes incorrect (closes #1727) 2025-04-17 20:36:51 +03:00
Elian Doran
722abb14de docs(release): clean up unneeded sections in v0.93.0 2025-04-17 20:04:58 +03:00
Elian Doran
8e7f0f6478 faet(docs): document the new CORS options 2025-04-17 20:00:46 +03:00
Elian Doran
2babc2c5d9 Merge branch 'develop' of github.com:TriliumNext/Notes into develop 2025-04-17 19:52:58 +03:00
Elian Doran
0b53de7912 chore(release): update changelog 2025-04-17 19:52:55 +03:00
Elian Doran
6ca49e977d Merge pull request #1724 from yiranlus/develop
Allow setting CORS headers
2025-04-17 19:52:34 +03:00
Elian Doran
26ed302d3b chore(release): update changelog 2025-04-17 19:51:52 +03:00
Elian Doran
4f075927f3 Merge pull request #1732 from TriliumNext/notepath
Make each part of the note path clickable.
2025-04-17 19:48:53 +03:00
Elian Doran
c2b5f0a5a3 feat(import/markdown): support todo lists in the CKEditor style 2025-04-17 18:34:59 +03:00
Elian Doran
2edaa2c4d4 feat(export/markdown): add support for todos 2025-04-17 18:34:59 +03:00
SiriusXT
b7e7196f48 Shortcut to open link 2025-04-17 18:37:58 +08:00
SiriusXT
49bc6e8c91 Add Shift + Click to open the note in a new tab and activate it. 2025-04-17 17:12:48 +08:00
SiriusXT
b86407b7f5 Make each part of the note path clickable. 2025-04-17 16:30:46 +08:00
JYC333
ea8b5131e1 Merge pull request #1730 from TriliumNext/renovate/sanitize-html-2.x
fix(deps): update dependency sanitize-html to v2.16.0
2025-04-17 16:10:01 +08:00
renovate[bot]
4b3f12426f fix(deps): update dependency sanitize-html to v2.16.0 2025-04-17 02:00:26 +00:00
Elian Doran
b875717117 chore(vscode): recommend Markdown all in one 2025-04-16 21:27:30 +03:00
Elian Doran
5322dcb46e Merge pull request #1725 from TriliumNext/renovate/i18next-25.x
fix(deps): update dependency i18next to v25
2025-04-16 21:19:09 +03:00
Elian Doran
2ad834fe5b fix(client): unable to trigger move to dialog via keyboard shortcut 2025-04-16 14:55:00 +03:00
Elian Doran
b4c74af662 fix(anonymization): full anonymization not redacting attachment titles 2025-04-16 14:29:04 +03:00
renovate[bot]
8fec0cb871 fix(deps): update dependency i18next to v25 2025-04-16 00:19:35 +00:00
Yiran Lu
e6ccd88abb add CORS settings in config-sample.ini 2025-04-16 01:08:17 +02:00
Yiran Lu
402d84e9ee change to more logical environment variable name 2025-04-16 01:01:29 +02:00
Yiran Lu
e2bf203404 Merge branch 'develop' into develop 2025-04-15 23:36:17 +02:00
Yiran Lu
07955daa1c Allow setting CORS headers 2025-04-15 23:14:01 +02:00
Elian Doran
afac983687 Merge pull request #1700 from TriliumNext/tab-scroll
Allow the Tab row scroll
2025-04-15 21:36:28 +03:00
Elian Doran
80f895a2d5 chore(release): mention feature in changelog 2025-04-15 21:26:04 +03:00
Elian Doran
8f3af176a0 Merge remote-tracking branch 'origin/develop' into tab-scroll 2025-04-15 21:23:14 +03:00
Elian Doran
b2b52956ad chore(release): mention bugfix 2025-04-15 19:57:26 +03:00
Elian Doran
2b4d9f8536 fix(sql): prepared statements leak raw state (fixes #1705) 2025-04-15 19:54:48 +03:00
SiriusXT
d1c2672f99 Fix trackpad not switching tabs. 2025-04-15 23:38:08 +08:00
Elian Doran
bbc8536068 chore(docs): mention in the documentation about Bearer tokens 2025-04-15 17:56:18 +03:00
Elian Doran
46cbbec53a docs(release): update changelog 2025-04-15 17:55:39 +03:00
Elian Doran
2d46e8c543 Merge pull request #1714 from yiranlus/develop
Support Bearer Authentication
2025-04-15 17:47:15 +03:00
Yiran Lu
0fa084711e Merge branch 'TriliumNext:develop' into develop 2025-04-15 16:11:16 +02:00
SiriusXT
897fde7332 Fix lag when scrolling the tab row. 2025-04-15 22:09:55 +08:00
Yiran Lu
22f1feece3 add support for Bearer auth 2025-04-15 16:09:55 +02:00
SiriusXT
1c199938b6 Merge branch 'develop' into tab-scroll 2025-04-15 19:44:03 +08:00
SiriusXT
83327b2903 Fix horizontal line issue in horizontal view and drag animation in vertical view. 2025-04-15 19:43:28 +08:00
Elian Doran
627e90ef89 chore(release): update change log 2025-04-15 13:13:23 +03:00
Elian Doran
0f06bf43f0 Merge pull request #1708 from TriliumNext/fix_http-code-failed-login_#1707
fix(login): send back 401 Unauthorized on failed login attempt
2025-04-15 13:12:28 +03:00
Elian Doran
171a023a8c Merge pull request #1710 from TriliumNext/fix_cookieMaxAge-regression
fix(login): fix regression that removed support for setting custom cookieMaxAge
2025-04-15 13:11:20 +03:00
Panagiotis Papadopoulos
ce83c918fb fix(login): fix regression that removed support for setting custom cookieMaxAge
regression introduced with #401
custom cookieMaxAge feature added with #1156

fixes #1709
2025-04-15 09:09:28 +02:00
Panagiotis Papadopoulos
fa350e13f6 fix(login): send back 401 Unauthorized on failed login attempt 2025-04-15 08:48:57 +02:00
Elian Doran
3a3f5be7be Merge pull request #1704 from TriliumNext/renovate/typescript-eslint-monorepo
chore(deps): update dependency typescript-eslint to v8.30.1
2025-04-15 08:49:07 +03:00
renovate[bot]
a5d587abe4 chore(deps): update dependency typescript-eslint to v8.30.1 2025-04-15 02:50:48 +00:00
Elian Doran
37e66dc640 chore(docs): update some small sections in README 2025-04-14 23:47:24 +03:00
Elian Doran
2758fa5846 fix(client): grey background in classic theme (closes #1689) 2025-04-14 23:37:40 +03:00
Panagiotis Papadopoulos
e61532566a refactor(cookiePath): remove non-working cookiePath option from config-sample.ini
not sure how I managed to forget to commit this as well, this should've been part of (the now already approved & merged) PR #1686 as well
2025-04-14 20:02:56 +02:00
Elian Doran
ed6ba97a69 chore(release): typo 2025-04-14 21:00:11 +03:00
Panagiotis Papadopoulos
c76439a35f docs: fix tiny typo 2025-04-14 19:43:58 +02:00
Panagiotis Papadopoulos
77ec3e2170 fix(deps): update vite from 6.2.5 to 6.2.6
fixes vulnerability

vite  6.2.0 - 6.2.5
Severity: moderate
Vite has an `server.fs.deny` bypass with an invalid `request-target` - https://github.com/advisories/GHSA-356w-63v5-8wf4
2025-04-14 19:33:37 +02:00
Elian Doran
5675e6366b chore(api): document getWeekNote 2025-04-14 18:36:54 +03:00
SiriusXT
1c8eb26d77 Merge branch 'develop' into tab-scroll 2025-04-14 19:21:18 +08:00
SiriusXT
91231874e3 Avoid triggering tab switch on long press. 2025-04-14 18:43:54 +08:00
SiriusXT
7ec73698ab Allow the tab row scroll 2025-04-14 17:20:35 +08:00
Elian Doran
34a0470d72 Merge pull request #1698 from TriliumNext/renovate/jsdom-26.x
fix(deps): update dependency jsdom to v26.1.0
2025-04-14 09:01:33 +03:00
Elian Doran
6eb277f502 chore(renovate): remove global repositories setting
Fixes warning ""The \"repositories\" option is a global option reserved only for Renovate's global configuration and cannot be configured within a repository's config file.""
2025-04-14 08:47:54 +03:00
renovate[bot]
234cc9eed8 fix(deps): update dependency jsdom to v26.1.0 2025-04-14 05:44:48 +00:00
Panagiotis Papadopoulos
2d71108723 chore(deps): update transitive dep electron-installer-common to 0.10.4
via `npm update electron-installer-common` → gets rid of one 'npm warn'

npm warn deprecated asar@3.2.0: Please use @electron/asar moving forward.  There is no API change, just a package name change
2025-04-14 06:57:06 +02:00
Elian Doran
1972961c64 docs(release): touch bar support 2025-04-13 23:49:29 +03:00
Elian Doran
e79730a707 Merge pull request #1549 from TriliumNext/feature/touchbar
Basic touchbar integration
2025-04-13 23:42:51 +03:00
Elian Doran
58a33efeab fix(touchbar): crashing on server 2025-04-13 23:26:35 +03:00
Elian Doran
c5ca3decb1 refactor(touchbar): turn into a component 2025-04-13 23:20:22 +03:00
Elian Doran
14516d53c3 chore(touchbar): disable widget on non-mac 2025-04-13 23:09:14 +03:00
Elian Doran
83e7e82252 chore(touchbar): address self-review 2025-04-13 23:04:06 +03:00
Elian Doran
de99759d08 Merge remote-tracking branch 'origin/develop' into feature/touchbar 2025-04-13 22:55:44 +03:00
Elian Doran
342aff8209 chore(touchbar): reduce centering 2025-04-13 22:16:05 +03:00
Elian Doran
ef423f1a1f chore(touchbar): reduce spacer width 2025-04-13 22:12:38 +03:00
Elian Doran
3fb2378de9 fix(touchbar): errors if there is no modal 2025-04-13 22:10:41 +03:00
Elian Doran
d6478c2fed fix(touchbar): errors refreshing touchbar if parent is missing 2025-04-13 22:08:26 +03:00
Elian Doran
d734ac9e45 fix(touchbar): hide read-only button after editing 2025-04-13 21:52:56 +03:00
Elian Doran
cbc6e74d64 feat(touchbar): create child note in note tree 2025-04-13 21:47:16 +03:00
Elian Doran
f98ac84829 feat(touchbar): delete note in note tree 2025-04-13 21:42:28 +03:00
Elian Doran
9d9ed2edcb feat(touchbar): refresh properly for calendar view 2025-04-13 21:31:20 +03:00
Elian Doran
d1df365e09 feat(touchbar): calendar view 2025-04-13 21:18:43 +03:00
Elian Doran
a0447c41b4 feat(touchbar): display modal title 2025-04-13 20:29:56 +03:00
Elian Doran
e6e2bde274 feat(touchbar): basic implementation for modal buttons 2025-04-13 20:27:19 +03:00
Elian Doran
ce86a2b077 feat(touchbar): add spacer 2025-04-13 20:10:16 +03:00
Elian Doran
904e8f724d refactor(touchbar): unnecessary typecast 2025-04-13 20:06:58 +03:00
Elian Doran
31fb7c1404 docs(user): use webviews for frontend & backend APIs 2025-04-13 19:09:14 +03:00
Elian Doran
002140c998 docs(api): document FNote execute behaviour 2025-04-13 18:59:52 +03:00
Elian Doran
84c2ebd7f3 docs(api): pin common classes 2025-04-13 18:48:04 +03:00
Elian Doran
c8860ea25a chore(docs): add author of PR 2025-04-13 17:13:24 +03:00
Elian Doran
9d1e99f2e8 Merge pull request #1686 from TriliumNext/refactor_remove-cookiePath
refactor(cookiePath): remove non-working cookiePath option
2025-04-13 17:12:25 +03:00
Elian Doran
b4a5f95eb3 chore(docs): update Nginx documentation 2025-04-13 17:11:06 +03:00
Elian Doran
e39c65692e chore(docs): update changelog 2025-04-13 17:11:06 +03:00
Arne Keller
4256792433 Update README.md for new docs 2025-04-13 17:11:06 +03:00
renovate[bot]
99a10a4115 chore(deps): update dependency mind-elixir to v4.5.1 2025-04-13 17:11:06 +03:00
renovate[bot]
97a51ac39a chore(deps): update dependency rollup to v4.40.0 2025-04-13 17:11:05 +03:00
Elian Doran
f5fbd71b74 chore(api_docs): disable including of the version 2025-04-13 17:11:05 +03:00
Elian Doran
122095c86e chore(api_docs): use single script for building 2025-04-13 17:11:05 +03:00
Elian Doran
77fc6a8458 feat(docs): document writing documentation 2025-04-13 17:11:05 +03:00
Elian Doran
9770d3ec08 chore(docs): update changelog 2025-04-13 17:09:03 +03:00
Elian Doran
a5c0191c8d Merge pull request #1693 from FliegendeWurst/patch-2
Update README.md for new docs
2025-04-13 17:05:17 +03:00
Elian Doran
eba41c03be Merge pull request #1691 from TriliumNext/renovate/mind-elixir-4.x
chore(deps): update dependency mind-elixir to v4.5.1
2025-04-13 17:04:35 +03:00
Elian Doran
1b4ca2e0b2 Merge pull request #1692 from TriliumNext/renovate/rollup-4.x-lockfile
chore(deps): update dependency rollup to v4.40.0
2025-04-13 17:04:15 +03:00
Arne Keller
59f5a67d23 Update README.md for new docs 2025-04-13 13:42:47 +02:00
Elian Doran
9e2e45fb75 chore(api_docs): disable including of the version 2025-04-13 13:07:20 +03:00
Elian Doran
dbe5182a69 chore(api_docs): use single script for building 2025-04-13 13:07:12 +03:00
Elian Doran
c719db03ab feat(docs): document writing documentation 2025-04-13 13:06:47 +03:00
Panagiotis Papadopoulos
324223f5f6 docs(reverse_proxy): add info about proxy_cookie_path 2025-04-13 10:53:34 +02:00
Panagiotis Papadopoulos
a979e87a7f refactor(cookiePath): remove non-working cookiePath option
this option will currently not work => the cookie will never
be set by the server, if you use a different path other than "/"

in order for this to work we would need to introduce some kind of
"custom route prefix", that would make express serve the routes with
the custom prefix — but that kinda falls more into a reverse proxy
job territory.

So let's remove this feature for now and amend the docs on how to
correctly handle the cookies per instance via the reverse proxy.
2025-04-13 10:53:34 +02:00
renovate[bot]
be8ed8a325 chore(deps): update dependency rollup to v4.40.0 2025-04-13 01:37:27 +00:00
renovate[bot]
7dda5e7a52 chore(deps): update dependency mind-elixir to v4.5.1 2025-04-13 01:37:17 +00:00
Elian Doran
78778305ff fix(forge): arch not working on win arm64 2025-04-12 21:26:27 +03:00
Elian Doran
74b3ab313e docs(script): include version 2025-04-12 14:07:18 +03:00
Elian Doran
fbc0b5f84a docs: merge backend and frontend APIs into script API 2025-04-12 13:36:29 +03:00
Elian Doran
84883a6e26 docs(backend_api): generate frontend script API as well 2025-04-12 13:30:24 +03:00
Elian Doran
e8f6e2d433 docs(backend_api): set proper module name 2025-04-12 13:19:03 +03:00
Elian Doran
dd42c067f9 docs(backend_api): set proper entry point and include all internal modules 2025-04-12 13:13:39 +03:00
Elian Doran
b17df71494 chore(docs): update backend api documentation 2025-04-12 12:53:45 +03:00
Elian Doran
d74504d822 chore(docs): sync 2025-04-12 12:46:21 +03:00
Elian Doran
88d0e64f2c chore(edit-docs): simplify entity changed log 2025-04-12 12:46:13 +03:00
Elian Doran
27ccc56b6d feat(import/markdown): handle markup in note title 2025-04-12 12:46:00 +03:00
Elian Doran
08a56300b0 feat(docs): improve internal links documentation 2025-04-12 11:50:26 +03:00
Elian Doran
bede12f3f6 feat(docs): improve external links documentation 2025-04-12 11:41:37 +03:00
Elian Doran
60217d4e4f feat(quick_search): align popup to bottom-center (closes #1679) 2025-04-12 11:27:51 +03:00
Elian Doran
7fba2dfb8b fix(launcher): clarify quick search (closes #1680) 2025-04-12 11:14:38 +03:00
Elian Doran
7b297a5ed7 feat(link): support target=_blank for URLs 2025-04-12 11:08:02 +03:00
Elian Doran
e2f327c180 chore(docs): update changelog 2025-04-12 10:57:31 +03:00
Elian Doran
44b9b3d7b8 feat(mobile): add info dialog 2025-04-12 10:55:42 +03:00
Elian Doran
4e7a7e334e feat(mobile): request confirmation for deleting notes 2025-04-12 10:55:42 +03:00
Elian Doran
8163d2d904 style(mobile): modal bottom margin when no safe margin is set 2025-04-12 10:55:42 +03:00
Elian Doran
3d5868d6b9 style(mobile): height of confirm dialogs 2025-04-12 10:55:42 +03:00
Elian Doran
dfab892879 feat(mobile): improve fit of note revisions 2025-04-12 10:55:42 +03:00
Elian Doran
626191ad2f feat(mobile): add note revisions dialog 2025-04-12 10:55:42 +03:00
Elian Doran
69a5c90ada refactor(mobile): share protected session & confirm dialogs 2025-04-12 10:55:42 +03:00
Elian Doran
a89b868509 feat(mobile): support markdown import dialog 2025-04-12 10:55:42 +03:00
Elian Doran
15a683bce1 feat(mobile): support import/export dialog 2025-04-12 10:55:42 +03:00
Elian Doran
aac195c332 feat(mobile): support move/clone to dialog 2025-04-12 10:55:42 +03:00
Elian Doran
9aaf48426a feat(mobile): support note type selector 2025-04-12 10:55:42 +03:00
Elian Doran
cd00c89dfe feat(mobile): support sort child notes dialog 2025-04-12 10:55:42 +03:00
Elian Doran
f348f5d7ed feat(mobile): support branch prefix dialog 2025-04-12 10:55:42 +03:00
Elian Doran
bbd76069c1 refactor(mobile): use shared modal configuration with desktop 2025-04-12 10:55:41 +03:00
Elian Doran
a8f1abb77f fix(mobile): tree not closing after pressing menu item 2025-04-12 10:55:41 +03:00
Elian Doran
e5f7b978e0 style(mobile): add a safe bottom region in modals 2025-04-12 10:55:41 +03:00
Elian Doran
d2229d6179 fix(mobile): make modal windows scrollable 2025-04-12 10:55:41 +03:00
Elian Doran
167bd39e5b fix(mobile): add bulk actions dialog 2025-04-12 10:55:41 +03:00
JYC333
f392dfbb49 Merge pull request #1683 from TriliumNext/renovate/node-22.x
chore(deps): update dependency @types/node to v22.14.1
2025-04-12 15:43:04 +08:00
Elian Doran
abc9f49ae6 fix(mobile): include note & add link dialogs (closes #1677) 2025-04-12 09:24:07 +03:00
Elian Doran
2b3fee88bd Merge branch 'develop' into renovate/node-22.x 2025-04-12 09:16:41 +03:00
Elian Doran
3c88e3c12c fix(test): help buttons ID check after change in structure 2025-04-12 09:16:20 +03:00
renovate[bot]
d6d67a88b6 chore(deps): update dependency @types/node to v22.14.1 2025-04-12 02:14:23 +00:00
Elian Doran
2cd69cc57a chore(docs): remove old documentation 2025-04-12 01:38:51 +03:00
Elian Doran
cd35884446 chore(docs): sync developer guide 2025-04-12 01:36:45 +03:00
Elian Doran
d3e18a68a8 chore(docs): align images with source 2025-04-12 01:36:17 +03:00
Elian Doran
d2a1655de5 feat(docs): add developer guide 2025-04-12 01:36:03 +03:00
Elian Doran
21e84dd95e chore(docs): optimize JPEG images 2025-04-12 01:30:35 +03:00
Elian Doran
72237df6a2 chore(docs): optimize JPEG images 2025-04-12 01:17:00 +03:00
Elian Doran
38d33abfd4 chore(docs): remove unnecessary index and style files 2025-04-12 01:13:45 +03:00
Elian Doran
8cd10595ff chore(docs): release note position 2025-04-12 01:07:43 +03:00
Elian Doran
07e2162e94 chore(docs): remove unnecessary release group 2025-04-12 01:00:41 +03:00
Elian Doran
4e5b007c40 feat(docs): optimize PNG images (-2.8 MB) 2025-04-12 00:59:53 +03:00
Elian Doran
aaaadcb705 chore(docs): remove image meta 2025-04-12 00:55:49 +03:00
Elian Doran
d05bc03074 feat(in-app-help): use preprocessed subtree data 2025-04-12 00:48:51 +03:00
Elian Doran
fe7650f6ce feat(docs-edit): minify meta JSON (429 KB gain) 2025-04-12 00:37:36 +03:00
Elian Doran
c9dba8c0e7 chore(docs): remove HTML wrapper 2025-04-12 00:32:54 +03:00
Elian Doran
8ecefa4eec feat(in-app-help): adapt to no HTML wrapper 2025-04-12 00:32:43 +03:00
Elian Doran
460014e54f feat(docs-edit): don't include HTML wrappers 2025-04-12 00:27:15 +03:00
Elian Doran
9c0c1bad2d chore(docs): sync 2025-04-12 00:14:00 +03:00
Elian Doran
2b53a1c534 chore(docs): mention admonitions in CKEditor 2025-04-12 00:02:01 +03:00
Elian Doran
b26e430c3e Merge pull request #1673 from TriliumNext/fix_cal
Fix calendar widget doesn't close when click on a note
2025-04-11 23:50:25 +03:00
Elian Doran
0acdab29af feat(docs): document multiple server instances & reorganize 2025-04-11 23:32:53 +03:00
Elian Doran
7c88681e70 feat(docs): document most features of text notes 2025-04-11 23:21:44 +03:00
Jin
73b043fe8d refactor: 💡 add command data back for tracing aspect 2025-04-11 20:41:04 +02:00
Elian Doran
15f415efeb chore(docs): mention markdown export improvements 2025-04-11 20:17:05 +03:00
Elian Doran
91daef863d chore(docs): merge syntax highlight docs 2025-04-11 20:15:33 +03:00
Elian Doran
d1b308eced chore(docs): sync 2025-04-11 20:05:22 +03:00
Elian Doran
2e4524361b feat(export/markdown): preserve include section 2025-04-11 20:00:32 +03:00
Elian Doran
539e3f1b6a feat(export/markdown: trim confusing whitespace in lists 2025-04-11 19:25:22 +03:00
Elian Doran
eba4c1a545 fix(docs-edit): concurrency issue between import & export 2025-04-11 18:39:12 +03:00
Elian Doran
09cb1eb5de chore(docs): remove fake release note 2025-04-11 18:38:20 +03:00
Jin
b4dbf4d7a5 Revert sort imports refector to avoid conflits 2025-04-11 17:31:12 +02:00
Elian Doran
ce5060c25b chore(release): remove latest config 2025-04-11 18:28:35 +03:00
Elian Doran
73d98648c8 fix(release): wrong ref name for release 2025-04-11 18:28:14 +03:00
Elian Doran
1d5b8dbbbe refactor(release): trigger via release 2025-04-11 18:27:46 +03:00
Elian Doran
d020ca7d24 fix(build): missing argument 2025-04-11 17:18:00 +03:00
Elian Doran
560780e2fc feat(ci): release all at once and deploy to winget 2025-04-11 17:15:20 +03:00
Elian Doran
0ddc1265d2 Merge pull request #1681 from TriliumNext/revert-1626-deps_express5
Revert "deps: manual upgrade to express 5.1.0"
2025-04-11 17:03:28 +03:00
Elian Doran
d8964aee28 Revert "deps: manual upgrade to express 5.1.0" 2025-04-11 16:51:42 +03:00
Elian Doran
6a2d58ea60 fix(electron): stack traces not correct 2025-04-11 16:37:21 +03:00
Elian Doran
89f4ac718c feat(edit-docs): integrate release notes into repo 2025-04-11 14:23:47 +03:00
Elian Doran
6231ac59d6 chore(edit-docs): change import mechanism 2025-04-11 14:02:55 +03:00
Elian Doran
3c5f5d2f76 feat(release): add reusable workflow to deploy to winget 2025-04-11 12:56:09 +03:00
Elian Doran
4161bc17e1 Merge remote-tracking branch 'origin/develop' into feature/touchbar 2025-04-11 09:54:45 +03:00
Elian Doran
6688151c2b Merge pull request #1674 from TriliumNext/renovate/electron-rebuild-3.x
chore(deps): update dependency @electron/rebuild to v3.7.2
2025-04-11 08:34:47 +03:00
renovate[bot]
e61c59b1a8 chore(deps): update dependency @electron/rebuild to v3.7.2 2025-04-11 02:04:46 +00:00
Panagiotis Papadopoulos
22ac83f443 chore(build-server): add unix EOL to trilium.sh 2025-04-10 23:22:52 +02:00
Jin
1e7f15b3c2 refactor: 💡 sort calendar.ts imports 2025-04-10 22:22:07 +02:00
Jin
522b96f978 refactor: 💡 sort app_context.ts import 2025-04-10 22:21:07 +02:00
Jin
54a0bdeb14 refactor: 💡 remove unused command data (editNoteTitle) 2025-04-10 22:19:04 +02:00
Jin
e555a3354f refactor: 💡 fix note_tree.ts lint 2025-04-10 22:18:12 +02:00
Jin
14a3b2811d fix: 🐛 fix calendar widget doesn't close when click on a note 2025-04-10 22:09:04 +02:00
Jin
3e6cc1b449 refactor: 💡 tree.ts refactor 2025-04-10 22:08:34 +02:00
Elian Doran
a92b040958 Merge pull request #1579 from TriliumNext/calendar
Add week note and quarter note support
2025-04-10 22:31:01 +03:00
Jin
998abb35be fix: 🐛 fix calendar unit test error 2025-04-10 21:12:56 +02:00
Jin
a554085681 fix: 🐛 fix tray.ts build error 2025-04-10 21:01:00 +02:00
Jin
7f381cb733 fix: 🐛 fix sender.ts build error 2025-04-10 20:59:18 +02:00
Jin
6322f8473c fix: 🐛 fix clipper build error 2025-04-10 20:58:04 +02:00
Panagiotis Papadopoulos
1822240ee0 ci: setup CodeQL workflow with default settings 2025-04-10 20:45:24 +02:00
Elian Doran
32a6aed93b Merge remote-tracking branch 'origin/develop' into calendar 2025-04-10 21:25:58 +03:00
Elian Doran
9cfc08389c Merge pull request #1626 from TriliumNext/deps_express5
deps: manual upgrade to express 5.1.0
2025-04-10 21:14:10 +03:00
Elian Doran
2cb7002fe4 Merge pull request #1664 from TriliumNext/renovate/katex-0.x
fix(deps): update dependency katex to v0.16.22
2025-04-10 21:13:42 +03:00
Elian Doran
fae027a036 Merge pull request #1661 from TriliumNext/renovate/electron-35.x
chore(deps): update dependency electron to v35.1.5
2025-04-10 21:13:12 +03:00
renovate[bot]
64cc32c4fa fix(deps): update dependency katex to v0.16.22 2025-04-10 18:12:56 +00:00
Elian Doran
613efc3c78 Merge pull request #1662 from TriliumNext/renovate/typedoc-0.x
chore(deps): update dependency typedoc to v0.28.2
2025-04-10 21:12:51 +03:00
Elian Doran
5ed7695426 Merge pull request #1663 from TriliumNext/renovate/typescript-eslint-monorepo
chore(deps): update dependency typescript-eslint to v8.29.1
2025-04-10 21:12:31 +03:00
Elian Doran
6d45e656cb Merge pull request #1665 from TriliumNext/renovate/marked-15.x
fix(deps): update dependency marked to v15.0.8
2025-04-10 21:11:49 +03:00
Elian Doran
ff195a930b Merge pull request #1666 from TriliumNext/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.99.5
2025-04-10 21:11:11 +03:00
renovate[bot]
30e9f01a6c chore(deps): update dependency webpack to v5.99.5 2025-04-10 01:51:33 +00:00
renovate[bot]
aee169dd4c fix(deps): update dependency marked to v15.0.8 2025-04-10 01:51:23 +00:00
renovate[bot]
b676086972 chore(deps): update dependency typescript-eslint to v8.29.1 2025-04-10 01:51:02 +00:00
renovate[bot]
572de20bd3 chore(deps): update dependency typedoc to v0.28.2 2025-04-10 01:50:46 +00:00
renovate[bot]
6e48db2d0c chore(deps): update dependency electron to v35.1.5 2025-04-10 01:50:34 +00:00
Panagiotis Papadopoulos
4ea82bb50b Merge branch 'develop' into deps_express5 2025-04-09 00:21:17 +02:00
Panagiotis Papadopoulos
26d5462af4 refactor(routes/custom): update path "/custom/*path" for express v5 2025-04-09 00:17:30 +02:00
Panagiotis Papadopoulos
8d09ff4299 fix(routes): remove unused wildcard in apiRoute "/api/options/:name/:value*"
the updateOption function that handles the req.param is just destructuring `const { name, value } = req.params;` and does nothing else with the path or any params.
The remaining parts of the wildcard (which can be accessed via req.param[0]) are just ignored here.

even with express v4, this would *always* just take and process the very first part of the path, in the exact wildcard's place, e.g.

`/api/options/locale/de` and
`/api/options/locale/de/test/whatever`
would *both* end up destructuring "value" from req.param as "de" (because it is in the exact place of the 'value' wildcard)

in express v5 the wildcard behaviour changes -> here req.param.value would return an array with the paths split into separate string.

but since the code previously regarded only the first part of the path -> we can just get rid of the wildcard and use a named route param

the only thing to keep in mind: if a request with more than one "value" is received, (e.g. `/api/options/locale/de/test/whatever`) -> since we don't have the wildcard anymore  -> this will turn to a 404.
IMHO that is actually desirable here though
2025-04-08 23:50:53 +02:00
Jin
f346c40b7c fix: 🐛 fix crash when no calendarRoot 2025-04-08 14:00:42 +02:00
Elian Doran
a4f59030e3 chore(docs): revert changes to meta 2025-04-06 21:59:06 +03:00
Elian Doran
aca27d1070 Merge remote-tracking branch 'origin/develop' into calendar 2025-04-06 21:55:56 +03:00
Panagiotis Papadopoulos
ba02070b7c deps: upgrade @triliumnext/express-partial-content to 1.1.0
now we have full express 5 compatibility
2025-04-06 16:59:34 +02:00
Panagiotis Papadopoulos
ac270aecb6 deps: upgrade to express 5.1.0
our code is already compliant with v5, and is not affected by the breaking changes described here:
https://expressjs.com/en/guide/migrating-5.html

I ran their codemod command, and it did not find anything – so I also double-checked by manually checking for all of the described changed topics in the migration guide.

with this change npm will still print a warning, due to
`@triliumnext/express-partial-content@"1.0.1"`, which needs to be updated to v5 as well
2025-04-06 16:57:46 +02:00
Elian Doran
15f62ba1c3 feat(docs): update day notes documentation 2025-04-06 16:47:36 +03:00
Elian Doran
cc391eb025 chore(docs): sync 2025-04-06 16:47:36 +03:00
Elian Doran
4126a8c9a2 feat(docs): reorganize & merge attachments 2025-04-06 16:47:36 +03:00
Elian Doran
6a94889646 feat(docs): reorganize script notes & document render note 2025-04-06 16:47:36 +03:00
Elian Doran
b593559915 chore(docs): sync 2025-04-06 16:47:36 +03:00
Elian Doran
b41025ec15 chore(deps): update package-lock 2025-04-06 16:47:36 +03:00
Elian Doran
36bf34215c Merge branch 'develop' into calendar 2025-04-06 16:39:56 +03:00
Jin
7bb1e60726 refactor: 💡 fix date_notes format 2025-04-04 13:59:01 +02:00
Jin
f9c0b88539 refactor: 💡 fix lint 2025-04-04 13:55:13 +02:00
Jin
6a0207dc45 fix: 🐛 fix async errors 2025-04-04 13:46:39 +02:00
Jin
eb514ad4e3 chore: 🤖 improve code 2025-04-03 22:07:11 +02:00
Jin
79a7513325 fix: 🐛 fix ordinal locale 2025-04-03 19:51:01 +02:00
Jin
dc16b2cb26 Merge branch 'develop' into calendar 2025-04-03 17:32:57 +02:00
Jin
0e3e8233e3 test: 💍 add journal unit test 2025-04-03 01:02:05 +02:00
Jin
ad3e7d611e docs: ✏️ update journal docs 2025-04-03 00:29:18 +02:00
Jin
7cbdacc9b0 feat: 🎸 improve journal name pattern 2025-04-03 00:21:14 +02:00
Jin
6ea3d5fb17 feat: 🎸 add yearPattern 2025-04-03 00:20:41 +02:00
Jin
d7df050027 feat: 🎸 add localization for week and quarter note name 2025-04-02 23:58:12 +02:00
Jin
ddba049455 chore: 🤖 Use dayjs to handle ordinal 2025-04-02 23:46:35 +02:00
Jin
bf70b949a6 Merge branch 'develop' into calendar 2025-04-02 23:28:15 +02:00
Jin
c6a4e4c6a9 chore: 🤖 use dayjs to get quarter number 2025-04-02 19:30:06 +02:00
Jin
dfd863161c feat: 🎸 add more date pattern 2025-04-02 12:36:39 +02:00
Jin
396c32bb7d Merge branch 'develop' into calendar 2025-04-02 12:23:19 +02:00
Jin
1630517f61 feat: 🎸 improve title parttern 2025-04-01 19:25:58 +02:00
Jin
8bbe6ee1b3 refactor: 💡 refact quarter func 2025-04-01 19:20:08 +02:00
Jin
50009bfb6e feat: 🎸 add frontend api support 2025-04-01 19:13:09 +02:00
Jin
486696220f feat: 🎸 add backend script api 2025-04-01 19:05:12 +02:00
Jin
bbf7bc9324 Merge branch 'develop' into calendar 2025-04-01 18:57:09 +02:00
Jin
97dd624671 refactor: 💡 improve code quality 2025-04-01 18:56:43 +02:00
Jin
34aac54ecd feat: 🎸 allow more patterns for different journal level 2025-04-01 18:54:42 +02:00
Jin
68d41f1de5 feat: 🎸 add quarter note support 2025-04-01 18:45:09 +02:00
Jin
028ee3852f chore: 🤖 move data_notes to using dayjs 2025-04-01 18:24:10 +02:00
Jin
fc84729229 feat: 🎸 clone week note when it cross month 2025-04-01 18:09:08 +02:00
Jin
198842de31 feat: 🎸 create day note under week note 2025-04-01 17:57:16 +02:00
Jin
3fe83e0ab4 fix: 🐛 use first day of week option 2025-04-01 17:25:03 +02:00
Jin
1164126885 feat: 🎸 add and update etapi 2025-04-01 17:10:35 +02:00
Jin
1313003bdb feat: 🎸 add create week note func 2025-04-01 16:57:52 +02:00
Jin
84def1aa30 feat: 🎸 show exist week note when enable week note 2025-04-01 16:51:48 +02:00
Jin
22f1441c4e feat: 🎸 add enableWeekNote func 2025-04-01 16:40:18 +02:00
Jin
c43cca6c22 feat: 🎸 add and fix week note api services 2025-04-01 16:25:03 +02:00
Jin
b13abf3098 fix: 🐛 fix substring error 2025-04-01 15:33:10 +02:00
Jin
bead99a85d fix: 🐛 add missing builtin monthPattern label 2025-04-01 14:52:04 +02:00
Jin
674e5976ef refactor: 💡 rename getWeekNote to getWeekFirstDayNote 2025-04-01 14:46:35 +02:00
Jin
ef8ecc452c chore: 🤖 fix minor 2025-04-01 00:08:48 +02:00
Jin
6f3092567d chore: 🤖 remove unused import 2025-04-01 00:05:14 +02:00
Jin
d7e809b059 fix: 🐛 fix week number cross years 2025-04-01 00:04:09 +02:00
Jin
be0b66c104 chore: 🤖 use dayjs fully 2025-03-31 23:56:12 +02:00
Jin
1a49c4a1e2 chore: 🤖 use dayjs part 2 2025-03-31 23:27:14 +02:00
Jin
c1feedb4db fix: 🐛 fix week number between years 2025-03-31 23:24:11 +02:00
Jin
f446fa38f5 fix: 🐛 fix calendar option error 2025-03-31 22:54:07 +02:00
Jin
2dba6cb326 chore: 🤖 using dayjs part 1 2025-03-31 22:26:28 +02:00
Jin
ae7aaaf263 fix: 🐛 fix calendar option error 2025-03-31 21:40:33 +02:00
Jin
a80932d3f9 chore: 🤖 add week number explanation 2025-03-31 21:33:15 +02:00
Jin
e701adac9f chore: 🤖 improve calendar option page 2025-03-31 21:13:19 +02:00
Jin
9c5a016a93 Merge branch 'develop' into calendar 2025-03-31 19:42:58 +02:00
Jin
1581db5138 refactor: 💡 remove unused code 2025-03-31 19:40:50 +02:00
Jin
3b67364916 fix: 🐛 fix prev/next month date not link to right note 2025-03-31 19:40:10 +02:00
Jin
45633ad418 fix: 🐛 fix error caused by first day of week change 2025-03-31 19:37:01 +02:00
Jin
d79604d06a feat: 🎸 add next month dates 2025-03-31 19:30:10 +02:00
Jin
71dc975aa9 feat: 🎸 add prev month dates 2025-03-31 19:19:59 +02:00
Jin
dece88eef7 feat: 🎸 adjust calendar style 2025-03-31 18:53:17 +02:00
Jin
f8da7494c8 feat: 🎸 create week number func 2025-03-31 02:47:16 +02:00
Jin
6084352834 feat: 🎸 reformat week number ui 2025-03-31 02:44:30 +02:00
Jin
0ed957dd77 feat: 🎸 add week numbers 2025-03-31 01:09:57 +02:00
Jin
ec06503104 feat: 🎸 add first week of year option 2025-03-29 13:34:47 +01:00
Elian Doran
8a1b565aee feat(touch_bar): add unlock button for read-only text 2025-03-09 20:41:31 +02:00
Elian Doran
975e641286 feat(touch_bar): run button for scripts 2025-03-09 15:31:03 +02:00
Elian Doran
615a5f7222 feat(touch_bar): change selected color 2025-03-09 14:58:43 +02:00
Elian Doran
07c9565e0c feat(touch_bar): reflect state for paragraph and headings 2025-03-09 14:42:23 +02:00
Elian Doran
e71a18f4e4 feat(touch_bar): reflect state for underline, italic 2025-03-09 14:37:00 +02:00
Elian Doran
fff140d141 feat(touch_bar): reflect state for bold 2025-03-09 14:28:18 +02:00
Elian Doran
ff78ab650a feat(touch_bar): use disabled button for geomap 2025-03-08 23:25:06 +02:00
Elian Doran
a3c58834d1 feat(touch_bar): reflect new note state 2025-03-08 23:21:13 +02:00
Elian Doran
cbbe10ba67 fix(touch_bar): jerkiness when zooming 2025-03-08 23:13:58 +02:00
Elian Doran
323f42873f refactor(touch_bar): move geomap to parent typewidget 2025-03-08 23:00:05 +02:00
Elian Doran
5961e983c7 feat(touch_bar): new geonote button 2025-03-08 22:56:32 +02:00
Elian Doran
ece26960c3 feat(touch_bar): update zoom slider value 2025-03-08 22:46:14 +02:00
Elian Doran
36eac98b4d feat(touch_bar): zoom slider 2025-03-08 22:35:36 +02:00
Elian Doran
0fe5f79f09 fix(touch_bar): fix text editor commands 2025-03-08 22:18:03 +02:00
Elian Doran
c2e4af1cfa chore(touch_bar): bring back local config 2025-03-08 22:14:20 +02:00
Elian Doran
db8d47183d refactor(touch_bar): command-driven approach 2025-03-08 22:00:29 +02:00
Elian Doran
214674cf73 feat(touch_bar): use segmented control for heading 2025-03-08 13:26:08 +02:00
Elian Doran
60859954b9 feat(touch_bar): paragraph and heading buttons 2025-03-08 13:22:24 +02:00
Elian Doran
2676596384 feat(touch_bar): reduce items moving around 2025-03-08 13:16:38 +02:00
Elian Doran
9c24b89180 feat(touch_bar): jump to note 2025-03-08 13:13:21 +02:00
Elian Doran
d9a689bd9a feat(touch_bar): functional bold, italic, underline 2025-03-08 12:34:06 +02:00
Elian Doran
dd575787fe feat(touch_bar): functional new note button 2025-03-08 12:06:35 +02:00
Elian Doran
f2f0f6178b fix(touch_bar): blurry native images 2025-03-08 12:01:43 +02:00
Elian Doran
0430a9c3f5 feat(touch_bar): resize icon even if blurry 2025-03-08 11:55:09 +02:00
Elian Doran
3358b405e9 feat(touch_bar): use icon for new note 2025-03-08 11:51:55 +02:00
Elian Doran
a170bec3db feat(touch_bar): basic integration 2025-03-08 11:39:04 +02:00
1345 changed files with 30236 additions and 110848 deletions

View File

@@ -18,146 +18,143 @@ inputs:
runs:
using: composite
steps:
# Certificate setup
- name: Import Apple certificates
if: inputs.os == 'macos'
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ env.APPLE_APP_CERTIFICATE_BASE64 }}
p12-password: ${{ env.APPLE_APP_CERTIFICATE_PASSWORD }}
keychain: build
keychain-password: ${{ github.run_id }}
# Certificate setup
- name: Import Apple certificates
if: inputs.os == 'macos'
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ env.APPLE_APP_CERTIFICATE_BASE64 }}
p12-password: ${{ env.APPLE_APP_CERTIFICATE_PASSWORD }}
keychain: build
keychain-password: ${{ github.run_id }}
- name: Install Installer certificate
if: inputs.os == 'macos'
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ env.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
p12-password: ${{ env.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
keychain: build
keychain-password: ${{ github.run_id }}
# We don't need to create a keychain here because we're using the build keychain that was created in the previous step
create-keychain: false
- name: Install Installer certificate
if: inputs.os == 'macos'
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ env.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
p12-password: ${{ env.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
keychain: build
keychain-password: ${{ github.run_id }}
# We don't need to create a keychain here because we're using the build keychain that was created in the previous step
create-keychain: false
- name: Verify certificates
if: inputs.os == 'macos'
shell: ${{ inputs.shell }}
run: |
echo "Available signing identities:"
security find-identity -v -p codesigning build.keychain
- name: Verify certificates
if: inputs.os == 'macos'
shell: ${{ inputs.shell }}
run: |
echo "Available signing identities:"
security find-identity -v -p codesigning build.keychain
- name: Set up Python and other macOS dependencies
if: ${{ inputs.os == 'macos' }}
shell: ${{ inputs.shell }}
run: |
brew install python-setuptools
brew install create-dmg
- name: Set up Python and other macOS dependencies
if: ${{ inputs.os == 'macos' }}
shell: ${{ inputs.shell }}
run: |
brew install python-setuptools
brew install create-dmg
- name: Install dependencies for RPM and Flatpak package building
if: ${{ inputs.os == 'linux' }}
shell: ${{ inputs.shell }}
run: |
sudo apt-get update && sudo apt-get install rpm flatpak-builder elfutils
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
FLATPAK_ARCH=$(if [[ ${{ inputs.arch }} = 'arm64' ]]; then echo 'aarch64'; else echo 'x86_64'; fi)
FLATPAK_VERSION='24.08'
flatpak install --user --no-deps --arch $FLATPAK_ARCH --assumeyes runtime/org.freedesktop.Platform/$FLATPAK_ARCH/$FLATPAK_VERSION runtime/org.freedesktop.Sdk/$FLATPAK_ARCH/$FLATPAK_VERSION org.electronjs.Electron2.BaseApp/$FLATPAK_ARCH/$FLATPAK_VERSION
- name: Install dependencies for RPM and Flatpak package building
if: ${{ inputs.os == 'linux' }}
shell: ${{ inputs.shell }}
run: |
sudo apt-get update && sudo apt-get install rpm flatpak-builder elfutils
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
FLATPAK_ARCH=$(if [[ ${{ inputs.arch }} = 'arm64' ]]; then echo 'aarch64'; else echo 'x86_64'; fi)
FLATPAK_VERSION='24.08'
flatpak install --user --no-deps --arch $FLATPAK_ARCH --assumeyes runtime/org.freedesktop.Platform/$FLATPAK_ARCH/$FLATPAK_VERSION runtime/org.freedesktop.Sdk/$FLATPAK_ARCH/$FLATPAK_VERSION org.electronjs.Electron2.BaseApp/$FLATPAK_ARCH/$FLATPAK_VERSION
# Build setup
- name: Install dependencies
shell: ${{ inputs.shell }}
run: npm ci
# Build setup
- name: Install dependencies
shell: ${{ inputs.shell }}
run: npm ci
- name: Update build info
shell: ${{ inputs.shell }}
run: npm run chore:update-build-info
- name: Update build info
shell: ${{ inputs.shell }}
run: npm run chore:update-build-info
# Critical debugging configuration
- name: Run electron-forge build with enhanced logging
shell: ${{ inputs.shell }}
env:
# Pass through required environment variables for signing and notarization
APPLE_TEAM_ID: ${{ env.APPLE_TEAM_ID }}
APPLE_ID: ${{ env.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }}
TRILIUM_ARTIFACT_NAME_HINT: TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}
run: |
npm run electron-forge:make -- \
--arch=${{ inputs.arch }} \
--platform=${{ inputs.forge_platform }}
# Critical debugging configuration
- name: Run electron-forge build with enhanced logging
shell: ${{ inputs.shell }}
env:
# Pass through required environment variables for signing and notarization
APPLE_TEAM_ID: ${{ env.APPLE_TEAM_ID }}
APPLE_ID: ${{ env.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }}
TRILIUM_ARTIFACT_NAME_HINT: TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}
run: npm run electron-forge:make -- --arch=${{ inputs.arch }} --platform=${{ inputs.forge_platform }}
# Add DMG signing step
- name: Sign DMG
if: inputs.os == 'macos'
shell: ${{ inputs.shell }}
run: |
echo "Signing DMG file..."
dmg_file=$(find ./dist -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file"
# Get the first valid signing identity from the keychain
SIGNING_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application" | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
if [ -z "$SIGNING_IDENTITY" ]; then
echo "Error: No valid Developer ID Application certificate found in keychain"
exit 1
fi
echo "Using signing identity: $SIGNING_IDENTITY"
# Sign the DMG
codesign --force --sign "$SIGNING_IDENTITY" --options runtime --timestamp "$dmg_file"
# Notarize the DMG
xcrun notarytool submit "$dmg_file" --apple-id "$APPLE_ID" --password "$APPLE_ID_PASSWORD" --team-id "$APPLE_TEAM_ID" --wait
# Staple the notarization ticket
xcrun stapler staple "$dmg_file"
else
echo "No DMG found to sign"
# Add DMG signing step
- name: Sign DMG
if: inputs.os == 'macos'
shell: ${{ inputs.shell }}
run: |
echo "Signing DMG file..."
dmg_file=$(find ./dist -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file"
# Get the first valid signing identity from the keychain
SIGNING_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application" | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
if [ -z "$SIGNING_IDENTITY" ]; then
echo "Error: No valid Developer ID Application certificate found in keychain"
exit 1
fi
echo "Using signing identity: $SIGNING_IDENTITY"
# Sign the DMG
codesign --force --sign "$SIGNING_IDENTITY" --options runtime --timestamp "$dmg_file"
# Notarize the DMG
xcrun notarytool submit "$dmg_file" --apple-id "$APPLE_ID" --password "$APPLE_ID_PASSWORD" --team-id "$APPLE_TEAM_ID" --wait
# Staple the notarization ticket
xcrun stapler staple "$dmg_file"
else
echo "No DMG found to sign"
fi
- name: Verify code signing
if: inputs.os == 'macos'
shell: ${{ inputs.shell }}
run: |
echo "Verifying code signing for all artifacts..."
- name: Verify code signing
if: inputs.os == 'macos'
shell: ${{ inputs.shell }}
run: |
echo "Verifying code signing for all artifacts..."
# First check the .app bundle
echo "Looking for .app bundle..."
app_bundle=$(find ./dist -name "*.app" -print -quit)
if [ -n "$app_bundle" ]; then
echo "Found app bundle: $app_bundle"
echo "Verifying app bundle signing..."
codesign --verify --deep --strict --verbose=2 "$app_bundle"
echo "Displaying app bundle signing info..."
codesign --display --verbose=2 "$app_bundle"
# First check the .app bundle
echo "Looking for .app bundle..."
app_bundle=$(find ./dist -name "*.app" -print -quit)
if [ -n "$app_bundle" ]; then
echo "Found app bundle: $app_bundle"
echo "Verifying app bundle signing..."
codesign --verify --deep --strict --verbose=2 "$app_bundle"
echo "Displaying app bundle signing info..."
codesign --display --verbose=2 "$app_bundle"
echo "Checking entitlements..."
codesign --display --entitlements :- "$app_bundle"
echo "Checking entitlements..."
codesign --display --entitlements :- "$app_bundle"
echo "Checking notarization status..."
xcrun stapler validate "$app_bundle" || echo "Warning: App bundle not notarized yet"
else
echo "No .app bundle found to verify"
fi
echo "Checking notarization status..."
xcrun stapler validate "$app_bundle" || echo "Warning: App bundle not notarized yet"
else
echo "No .app bundle found to verify"
fi
# Then check DMG if it exists
echo "Looking for DMG..."
dmg_file=$(find ./dist -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file"
echo "Verifying DMG signing..."
codesign --verify --deep --strict --verbose=2 "$dmg_file"
echo "Displaying DMG signing info..."
codesign --display --verbose=2 "$dmg_file"
# Then check DMG if it exists
echo "Looking for DMG..."
dmg_file=$(find ./dist -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file"
echo "Verifying DMG signing..."
codesign --verify --deep --strict --verbose=2 "$dmg_file"
echo "Displaying DMG signing info..."
codesign --display --verbose=2 "$dmg_file"
echo "Checking DMG notarization..."
xcrun stapler validate "$dmg_file" || echo "Warning: DMG not notarized yet"
else
echo "No DMG found to verify"
fi
echo "Checking DMG notarization..."
xcrun stapler validate "$dmg_file" || echo "Warning: DMG not notarized yet"
else
echo "No DMG found to verify"
fi
# Finally check ZIP if it exists
echo "Looking for ZIP..."
zip_file=$(find ./dist -name "*.zip" -print -quit)
if [ -n "$zip_file" ]; then
echo "Found ZIP: $zip_file"
echo "Note: ZIP files are not code signed, but their contents should be"
fi
# Finally check ZIP if it exists
echo "Looking for ZIP..."
zip_file=$(find ./dist -name "*.zip" -print -quit)
if [ -n "$zip_file" ]; then
echo "Found ZIP: $zip_file"
echo "Note: ZIP files are not code signed, but their contents should be"
fi

100
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,100 @@
# 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 Advanced"
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
schedule:
- cron: '20 7 * * 0'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# 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.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

20
.github/workflows/release-winget.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Release to winget
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
release_tag:
description: 'Git tag to release from'
type: string
required: true
jobs:
release-winget:
runs-on: ubuntu-latest
steps:
- name: Publish to WinGet
uses: vedantmgoyal9/winget-releaser@main
with:
identifier: TriliumNext.Notes
token: ${{ secrets.token }}
release-tag: ${{ github.event.inputs.release_tag || github.event.release.tag_name }}

View File

@@ -53,14 +53,13 @@ jobs:
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
WINDOWS_SIGN_EXECUTABLE: ${{ vars.WINDOWS_SIGN_EXECUTABLE }}
- name: Publish release
uses: softprops/action-gh-release@v2
- name: Upload the artifact
uses: actions/upload-artifact@v4
with:
draft: true
fail_on_unmatched_files: true
files: upload/*.*
name: release-desktop-${{ matrix.os.name }}-${{ matrix.arch }}
path: upload/*.*
build_linux_server-x64:
build_server:
name: Build Linux Server
strategy:
fail-fast: false
@@ -81,9 +80,37 @@ jobs:
os: linux
arch: ${{ matrix.arch }}
- name: Upload the artifact
uses: actions/upload-artifact@v4
with:
name: release-server-linux-${{ matrix.arch }}
path: upload/*.*
publish_release:
name: Publish release
runs-on: ubuntu-latest
needs:
- make-electron
- build_server
steps:
- run: mkdir upload
- uses: actions/checkout@v4
with:
sparse-checkout: |
docs/Release Notes
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
pattern: release-*
path: upload
- name: Publish release
uses: softprops/action-gh-release@v2
with:
draft: true
draft: false
body_path: docs/Release Notes/Release Notes/${{ github.ref_name }}.md
fail_on_unmatched_files: true
files: upload/*.*

View File

@@ -5,6 +5,7 @@
"vitest.explorer",
"ms-playwright.playwright",
"tobermory.es6-string-html",
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"yzhang.markdown-all-in-one"
]
}

View File

@@ -16,7 +16,7 @@ See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for q
### Migrating from Trilium?
There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Just upgrade your Trilium instance to the latest version and [install TriliumNext/Notes as usual](#-installation)
There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Simply [install TriliumNext/Notes](#-installation) as usual and it will use your existing database.
Versions up to and including [v0.90.4](https://github.com/TriliumNext/Notes/releases/tag/v0.90.4) are compatible with the latest zadam/trilium version of [v0.63.7](https://github.com/zadam/trilium/releases/tag/v0.63.7). Any later versions of TriliumNext have their sync versions incremented.
@@ -66,17 +66,7 @@ To use TriliumNext on your desktop machine (Linux, MacOS, and Windows) you have
* Download the binary release for your platform from the [latest release page](https://github.com/TriliumNext/Notes/releases/latest), unzip the package and run the ```trilium``` executable.
* Access TriliumNext via the web interface of a server installation (see below)
* Currently only the latest versions of Chrome & Firefox are supported (and tested).
* (Coming Soon) TriliumNext will also be provided as a Flatpak
#### MacOS
Currently when running TriliumNext/Notes on MacOS, you may get the following error:
> Apple could not verify "TriliumNext Notes" is free of malware and may harm your Mac or compromise your privacy.
You will need to run the command on your shell to resolve the error (documented [here](https://github.com/TriliumNext/Notes/issues/329#issuecomment-2287164137)):
```bash
xattr -c "/path/to/Trilium Next.app"
```
* TriliumNext is also provided as a Flatpak, but not yet published on FlatHub.
### Mobile
@@ -107,10 +97,11 @@ npm install
npm run server:start
```
For more details, see the [development docs](https://github.com/TriliumNext/Notes/blob/develop/docs/Developer%20Guide/Developer%20Guide/Building%20and%20deployment/Running%20a%20development%20build.md).
### Documentation
We are currently transitioning to a new documentation mechanism.
Meanwhile you can still view the [archived Docs repository](https://github.com/TriliumNext/Docs).
See the [documentation guide](https://github.com/TriliumNext/Notes/blob/develop/docs/Developer%20Guide/Developer%20Guide/Documentation.md) for details.
## 👏 Shoutouts

View File

@@ -52,7 +52,7 @@ rm -r $BUILD_DIR/node/lib/node_modules/{npm,corepack} \
$BUILD_DIR/node_modules/electron* \
$BUILD_DIR/electron*.{js,map}
printf "#!/bin/sh\n./node/bin/node src/main" > $BUILD_DIR/trilium.sh
printf "#!/bin/sh\n./node/bin/node src/main\n" > $BUILD_DIR/trilium.sh
chmod 755 $BUILD_DIR/trilium.sh
# TriliumNextTODO: is this still required? If yes → move to copy-dist/copy-trilium

View File

@@ -1,3 +0,0 @@
SHARE_PROTOCOL=http
SHARE_HOST=notes.johnsmith.me
ROOT_NOTE_ID=4yYHqKbLovVX

2
bin/docs/.gitignore vendored
View File

@@ -1,2 +0,0 @@
output
.env

View File

@@ -1,27 +0,0 @@
/**
* Fetch note with given ID from backend
*
* @param noteId of the given note to be fetched. If false, fetches current note.
*/
async function fetchNote(noteId = null) {
if (!noteId) {
noteId = document.body.getAttribute("data-note-id");
}
const resp = await fetch(`api/notes/${noteId}`);
return await resp.json();
}
document.addEventListener(
"DOMContentLoaded",
() => {
const toggleMenuButton = document.getElementById("toggleMenuButton");
const layout = document.getElementById("layout");
if (toggleMenuButton && layout) {
toggleMenuButton.addEventListener("click", () => layout.classList.toggle("showMenu"));
}
},
false
);

View File

@@ -1,554 +0,0 @@
/* !!!!!! TRILIUM CUSTOM CHANGES !!!!!! */
.printed-content .ck-widget__selection-handle,
.printed-content .ck-widget__type-around {
/* gets rid of triangles: https://github.com/zadam/trilium/issues/1129 */
display: none;
}
/*
* CKEditor 5 (v41.0.0) content styles.
* Generated on Fri, 26 Jan 2024 10:23:49 GMT.
* For more information, check out https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/content-styles.html
*/
:root {
--ck-color-image-caption-background: hsl(0, 0%, 97%);
--ck-color-image-caption-text: hsl(0, 0%, 20%);
--ck-color-mention-background: hsla(341, 100%, 30%, 0.1);
--ck-color-mention-text: hsl(341, 100%, 30%);
--ck-color-selector-caption-background: hsl(0, 0%, 97%);
--ck-color-selector-caption-text: hsl(0, 0%, 20%);
--ck-highlight-marker-blue: hsl(201, 97%, 72%);
--ck-highlight-marker-green: hsl(120, 93%, 68%);
--ck-highlight-marker-pink: hsl(345, 96%, 73%);
--ck-highlight-marker-yellow: hsl(60, 97%, 73%);
--ck-highlight-pen-green: hsl(112, 100%, 27%);
--ck-highlight-pen-red: hsl(0, 85%, 49%);
--ck-image-style-spacing: 1.5em;
--ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);
--ck-todo-list-checkmark-size: 16px;
}
/* @ckeditor/ckeditor5-table/theme/tablecolumnresize.css */
.ck-content .table .ck-table-resized {
table-layout: fixed;
}
/* @ckeditor/ckeditor5-table/theme/tablecolumnresize.css */
.ck-content .table table {
overflow: hidden;
}
/* @ckeditor/ckeditor5-table/theme/tablecolumnresize.css */
.ck-content .table td,
.ck-content .table th {
overflow-wrap: break-word;
position: relative;
}
/* @ckeditor/ckeditor5-table/theme/table.css */
.ck-content .table {
margin: 0.9em auto;
display: table;
}
/* @ckeditor/ckeditor5-table/theme/table.css */
.ck-content .table table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
height: 100%;
border: 1px double hsl(0, 0%, 70%);
}
/* @ckeditor/ckeditor5-table/theme/table.css */
.ck-content .table table td,
.ck-content .table table th {
min-width: 2em;
padding: 0.4em;
border: 1px solid hsl(0, 0%, 75%);
}
/* @ckeditor/ckeditor5-table/theme/table.css */
.ck-content .table table th {
font-weight: bold;
background: hsla(0, 0%, 0%, 5%);
}
/* @ckeditor/ckeditor5-table/theme/table.css */
.ck-content[dir="rtl"] .table th {
text-align: right;
}
/* @ckeditor/ckeditor5-table/theme/table.css */
.ck-content[dir="ltr"] .table th {
text-align: left;
}
/* @ckeditor/ckeditor5-table/theme/tablecaption.css */
.ck-content .table > figcaption {
display: table-caption;
caption-side: top;
word-break: break-word;
text-align: center;
color: var(--ck-color-selector-caption-text);
background-color: var(--ck-color-selector-caption-background);
padding: 0.6em;
font-size: 0.75em;
outline-offset: -1px;
}
/* @ckeditor/ckeditor5-page-break/theme/pagebreak.css */
.ck-content .page-break {
position: relative;
clear: both;
padding: 5px 0;
display: flex;
align-items: center;
justify-content: center;
}
/* @ckeditor/ckeditor5-page-break/theme/pagebreak.css */
.ck-content .page-break::after {
content: "";
position: absolute;
border-bottom: 2px dashed hsl(0, 0%, 77%);
width: 100%;
}
/* @ckeditor/ckeditor5-page-break/theme/pagebreak.css */
.ck-content .page-break__label {
position: relative;
z-index: 1;
padding: 0.3em 0.6em;
display: block;
text-transform: uppercase;
border: 1px solid hsl(0, 0%, 77%);
border-radius: 2px;
font-family: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;
font-size: 0.75em;
font-weight: bold;
color: hsl(0, 0%, 20%);
background: hsl(0, 0%, 100%);
box-shadow: 2px 2px 1px hsla(0, 0%, 0%, 0.15);
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* @ckeditor/ckeditor5-media-embed/theme/mediaembed.css */
.ck-content .media {
clear: both;
margin: 0.9em 0;
display: block;
min-width: 15em;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content .todo-list {
list-style: none;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content .todo-list li {
position: relative;
margin-bottom: 5px;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content .todo-list li .todo-list {
margin-top: 5px;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label > input {
-webkit-appearance: none;
display: inline-block;
position: relative;
width: var(--ck-todo-list-checkmark-size);
height: var(--ck-todo-list-checkmark-size);
vertical-align: middle;
border: 0;
left: -25px;
margin-right: -15px;
right: 0;
margin-left: 0;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content[dir="rtl"] .todo-list .todo-list__label > input {
left: 0;
margin-right: 0;
right: -25px;
margin-left: -15px;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label > input::before {
display: block;
position: absolute;
box-sizing: border-box;
content: "";
width: 100%;
height: 100%;
border: 1px solid hsl(0, 0%, 20%);
border-radius: 2px;
transition: 250ms ease-in-out box-shadow;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label > input::after {
display: block;
position: absolute;
box-sizing: content-box;
pointer-events: none;
content: "";
left: calc(var(--ck-todo-list-checkmark-size) / 3);
top: calc(var(--ck-todo-list-checkmark-size) / 5.3);
width: calc(var(--ck-todo-list-checkmark-size) / 5.3);
height: calc(var(--ck-todo-list-checkmark-size) / 2.6);
border-style: solid;
border-color: transparent;
border-width: 0 calc(var(--ck-todo-list-checkmark-size) / 8) calc(var(--ck-todo-list-checkmark-size) / 8) 0;
transform: rotate(45deg);
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label > input[checked]::before {
background: hsl(126, 64%, 41%);
border-color: hsl(126, 64%, 41%);
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label > input[checked]::after {
border-color: hsl(0, 0%, 100%);
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label .todo-list__label__description {
vertical-align: middle;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type="checkbox"] {
position: absolute;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-editor__editable.ck-content .todo-list .todo-list__label > input,
.ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable="false"] > input {
cursor: pointer;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-editor__editable.ck-content .todo-list .todo-list__label > input:hover::before,
.ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable="false"] > input:hover::before {
box-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable="false"] > input {
-webkit-appearance: none;
display: inline-block;
position: relative;
width: var(--ck-todo-list-checkmark-size);
height: var(--ck-todo-list-checkmark-size);
vertical-align: middle;
border: 0;
left: -25px;
margin-right: -15px;
right: 0;
margin-left: 0;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-editor__editable.ck-content[dir="rtl"] .todo-list .todo-list__label > span[contenteditable="false"] > input {
left: 0;
margin-right: 0;
right: -25px;
margin-left: -15px;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable="false"] > input::before {
display: block;
position: absolute;
box-sizing: border-box;
content: "";
width: 100%;
height: 100%;
border: 1px solid hsl(0, 0%, 20%);
border-radius: 2px;
transition: 250ms ease-in-out box-shadow;
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable="false"] > input::after {
display: block;
position: absolute;
box-sizing: content-box;
pointer-events: none;
content: "";
left: calc(var(--ck-todo-list-checkmark-size) / 3);
top: calc(var(--ck-todo-list-checkmark-size) / 5.3);
width: calc(var(--ck-todo-list-checkmark-size) / 5.3);
height: calc(var(--ck-todo-list-checkmark-size) / 2.6);
border-style: solid;
border-color: transparent;
border-width: 0 calc(var(--ck-todo-list-checkmark-size) / 8) calc(var(--ck-todo-list-checkmark-size) / 8) 0;
transform: rotate(45deg);
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable="false"] > input[checked]::before {
background: hsl(126, 64%, 41%);
border-color: hsl(126, 64%, 41%);
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable="false"] > input[checked]::after {
border-color: hsl(0, 0%, 100%);
}
/* @ckeditor/ckeditor5-list/theme/todolist.css */
.ck-editor__editable.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type="checkbox"] {
position: absolute;
}
/* @ckeditor/ckeditor5-list/theme/list.css */
.ck-content ol {
list-style-type: decimal;
}
/* @ckeditor/ckeditor5-list/theme/list.css */
.ck-content ol ol {
list-style-type: lower-latin;
}
/* @ckeditor/ckeditor5-list/theme/list.css */
.ck-content ol ol ol {
list-style-type: lower-roman;
}
/* @ckeditor/ckeditor5-list/theme/list.css */
.ck-content ol ol ol ol {
list-style-type: upper-latin;
}
/* @ckeditor/ckeditor5-list/theme/list.css */
.ck-content ol ol ol ol ol {
list-style-type: upper-roman;
}
/* @ckeditor/ckeditor5-list/theme/list.css */
.ck-content ul {
list-style-type: disc;
}
/* @ckeditor/ckeditor5-list/theme/list.css */
.ck-content ul ul {
list-style-type: circle;
}
/* @ckeditor/ckeditor5-list/theme/list.css */
.ck-content ul ul ul {
list-style-type: square;
}
/* @ckeditor/ckeditor5-list/theme/list.css */
.ck-content ul ul ul ul {
list-style-type: square;
}
/* @ckeditor/ckeditor5-image/theme/image.css */
.ck-content .image {
display: table;
clear: both;
text-align: center;
margin: 0.9em auto;
min-width: 50px;
}
/* @ckeditor/ckeditor5-image/theme/image.css */
.ck-content .image img {
display: block;
margin: 0 auto;
max-width: 100%;
min-width: 100%;
height: auto;
}
/* @ckeditor/ckeditor5-image/theme/image.css */
.ck-content .image-inline {
/*
* Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).;
* Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root.
* This strange behavior does not happen with inline-flex.
*/
display: inline-flex;
max-width: 100%;
align-items: flex-start;
}
/* @ckeditor/ckeditor5-image/theme/image.css */
.ck-content .image-inline picture {
display: flex;
}
/* @ckeditor/ckeditor5-image/theme/image.css */
.ck-content .image-inline picture,
.ck-content .image-inline img {
flex-grow: 1;
flex-shrink: 1;
max-width: 100%;
}
/* @ckeditor/ckeditor5-image/theme/imageresize.css */
.ck-content img.image_resized {
height: auto;
}
/* @ckeditor/ckeditor5-image/theme/imageresize.css */
.ck-content .image.image_resized {
max-width: 100%;
display: block;
box-sizing: border-box;
}
/* @ckeditor/ckeditor5-image/theme/imageresize.css */
.ck-content .image.image_resized img {
width: 100%;
}
/* @ckeditor/ckeditor5-image/theme/imageresize.css */
.ck-content .image.image_resized > figcaption {
display: block;
}
/* @ckeditor/ckeditor5-image/theme/imagecaption.css */
.ck-content .image > figcaption {
display: table-caption;
caption-side: bottom;
word-break: break-word;
color: var(--ck-color-image-caption-text);
background-color: var(--ck-color-image-caption-background);
padding: 0.6em;
font-size: 0.75em;
outline-offset: -1px;
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-style-block-align-left,
.ck-content .image-style-block-align-right {
max-width: calc(100% - var(--ck-image-style-spacing));
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-style-align-left,
.ck-content .image-style-align-right {
clear: none;
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-style-side {
float: right;
margin-left: var(--ck-image-style-spacing);
max-width: 50%;
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-style-align-left {
float: left;
margin-right: var(--ck-image-style-spacing);
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-style-align-center {
margin-left: auto;
margin-right: auto;
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-style-align-right {
float: right;
margin-left: var(--ck-image-style-spacing);
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-style-block-align-right {
margin-right: 0;
margin-left: auto;
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-style-block-align-left {
margin-left: 0;
margin-right: auto;
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content p + .image-style-align-left,
.ck-content p + .image-style-align-right,
.ck-content p + .image-style-side {
margin-top: 0;
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-inline.image-style-align-left,
.ck-content .image-inline.image-style-align-right {
margin-top: var(--ck-inline-image-style-spacing);
margin-bottom: var(--ck-inline-image-style-spacing);
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-inline.image-style-align-left {
margin-right: var(--ck-inline-image-style-spacing);
}
/* @ckeditor/ckeditor5-image/theme/imagestyle.css */
.ck-content .image-inline.image-style-align-right {
margin-left: var(--ck-inline-image-style-spacing);
}
/* @ckeditor/ckeditor5-highlight/theme/highlight.css */
.ck-content .marker-yellow {
background-color: var(--ck-highlight-marker-yellow);
}
/* @ckeditor/ckeditor5-highlight/theme/highlight.css */
.ck-content .marker-green {
background-color: var(--ck-highlight-marker-green);
}
/* @ckeditor/ckeditor5-highlight/theme/highlight.css */
.ck-content .marker-pink {
background-color: var(--ck-highlight-marker-pink);
}
/* @ckeditor/ckeditor5-highlight/theme/highlight.css */
.ck-content .marker-blue {
background-color: var(--ck-highlight-marker-blue);
}
/* @ckeditor/ckeditor5-highlight/theme/highlight.css */
.ck-content .pen-red {
color: var(--ck-highlight-pen-red);
background-color: transparent;
}
/* @ckeditor/ckeditor5-highlight/theme/highlight.css */
.ck-content .pen-green {
color: var(--ck-highlight-pen-green);
background-color: transparent;
}
/* @ckeditor/ckeditor5-block-quote/theme/blockquote.css */
.ck-content blockquote {
overflow: hidden;
padding-right: 1.5em;
padding-left: 1.5em;
margin-left: 0;
margin-right: 0;
font-style: italic;
border-left: solid 5px hsl(0, 0%, 80%);
}
/* @ckeditor/ckeditor5-block-quote/theme/blockquote.css */
.ck-content[dir="rtl"] blockquote {
border-left: 0;
border-right: solid 5px hsl(0, 0%, 80%);
}
/* @ckeditor/ckeditor5-basic-styles/theme/code.css */
.ck-content code {
background-color: hsla(0, 0%, 78%, 0.3);
padding: 0.15em;
border-radius: 2px;
}
/* @ckeditor/ckeditor5-font/theme/fontsize.css */
.ck-content .text-tiny {
font-size: 0.7em;
}
/* @ckeditor/ckeditor5-font/theme/fontsize.css */
.ck-content .text-small {
font-size: 0.85em;
}
/* @ckeditor/ckeditor5-font/theme/fontsize.css */
.ck-content .text-big {
font-size: 1.4em;
}
/* @ckeditor/ckeditor5-font/theme/fontsize.css */
.ck-content .text-huge {
font-size: 1.8em;
}
/* @ckeditor/ckeditor5-mention/theme/mention.css */
.ck-content .mention {
background: var(--ck-color-mention-background);
color: var(--ck-color-mention-text);
}
/* @ckeditor/ckeditor5-horizontal-line/theme/horizontalline.css */
.ck-content hr {
margin: 15px 0;
height: 4px;
background: hsl(0, 0%, 87%);
border: 0;
}
/* @ckeditor/ckeditor5-code-block/theme/codeblock.css */
.ck-content pre {
padding: 1em;
color: hsl(0, 0%, 20.8%);
background: hsla(0, 0%, 78%, 0.3);
border: 1px solid hsl(0, 0%, 77%);
border-radius: 2px;
text-align: left;
direction: ltr;
tab-size: 4;
white-space: pre-wrap;
font-style: normal;
min-width: 200px;
}
/* @ckeditor/ckeditor5-code-block/theme/codeblock.css */
.ck-content pre code {
background: unset;
padding: 0;
border-radius: 0;
}
@media print {
/* @ckeditor/ckeditor5-page-break/theme/pagebreak.css */
.ck-content .page-break {
padding: 0;
}
/* @ckeditor/ckeditor5-page-break/theme/pagebreak.css */
.ck-content .page-break::after {
display: none;
}
}

View File

@@ -1,148 +0,0 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
html {
line-height: 1.15;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
main {
display: block;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
pre {
font-family: monospace, monospace;
font-size: 1em;
}
a {
background-color: transparent;
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
text-decoration: underline dotted;
}
b,
strong {
font-weight: bolder;
}
code,
kbd,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
img {
border-style: none;
}
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
[type="button"],
[type="reset"],
[type="submit"],
button {
-webkit-appearance: button;
}
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner,
button::-moz-focus-inner {
border-style: none;
padding: 0;
}
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring,
button:-moz-focusring {
outline: 1px dotted ButtonText;
}
fieldset {
padding: 0.35em 0.75em 0.625em;
}
legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
}
progress {
vertical-align: baseline;
}
textarea {
overflow: auto;
}
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
padding: 0;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
details {
display: block;
}
summary {
display: list-item;
}
template {
display: none;
}
[hidden] {
display: none;
}
/*# sourceMappingURL=normalize.min.css.map */

View File

@@ -1,165 +0,0 @@
body {
font-family: "Lucida Grande", "Lucida Sans Unicode", arial, sans-serif;
line-height: 1.5;
}
#layout {
max-width: 1200px;
margin: 0 auto;
display: flex;
flex-direction: row-reverse;
}
#menu {
padding: 25px;
flex-basis: 0;
flex-grow: 1;
overflow: auto;
}
#menu p {
margin: 0;
}
#menu > p {
font-weight: bold;
font-size: 110%;
}
#menu ul {
padding-left: 20px;
}
#main {
flex-basis: 0;
flex-grow: 3;
overflow: auto;
padding: 10px 20px 20px 20px;
}
#parentLink {
float: right;
margin-top: 20px;
}
#title {
margin: 0;
padding-top: 10px;
}
img {
max-width: 100%;
}
pre {
white-space: pre-wrap;
word-wrap: anywhere;
}
iframe.pdf-view {
width: 100%;
height: 800px;
}
#toggleMenuButton {
display: none;
position: fixed;
top: 8px;
left: 5px;
width: 1.4em;
border-radius: 5px;
border: 1px solid #aaa;
font-size: 2rem;
z-index: 10;
height: auto;
color: black;
cursor: pointer;
}
#childLinks.grid ul {
list-style-type: none;
display: flex;
flex-wrap: wrap;
padding: 0;
}
#childLinks.grid ul li {
width: 180px;
height: 140px;
padding: 10px;
}
#childLinks.grid ul li a {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
border: 1px solid #ddd;
border-radius: 5px;
justify-content: center;
align-content: center;
text-align: center;
font-size: large;
}
#childLinks.grid ul li a:hover {
background: #eee;
}
#childLinks.list ul {
list-style-type: none;
display: inline-flex;
flex-wrap: wrap;
padding: 0;
margin-top: 5px;
}
#childLinks.list ul li {
margin-right: 20px;
}
#noteClippedFrom {
padding: 10px 0 10px 0;
margin: 20px 0 20px 0;
color: #666;
border: 1px solid #ddd;
border-left: 0;
border-right: 0;
}
#toggleMenuButton::after {
position: relative;
top: -2px;
left: 1px;
}
@media (max-width: 48em) {
#layout.showMenu #menu {
display: block;
margin-top: 40px;
}
#toggleMenuButton {
display: block;
}
#layout.showMenu #main {
display: none;
}
#title {
padding-left: 60px;
}
#layout.showMenu #toggleMenuButton::after {
content: "«";
}
#toggleMenuButton::after {
content: "»";
}
#menu {
display: none;
}
}

View File

@@ -1,10 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=./{{ROOT_NOTE_ID}}.html" />
</head>
<body>
</body>
</html>

View File

@@ -1,43 +0,0 @@
#!/usr/bin/env bash
script_dir=$(realpath $(dirname $0))
cd "$script_dir"
env_file="$script_dir/.env"
if [ ! -f "$env_file" ]; then
echo "Missing .env file, cannot proceed."
exit 1
fi
output_dir="$script_dir/../../docs"
mkdir -p "$output_dir"
rm -f "$output_dir"/*
rm -rf "$output_dir"/{assets,share}
source "$env_file"
# Download everything in output/notes.example.com/share/...
share_url="$SHARE_PROTOCOL://$SHARE_HOST/share/$ROOT_NOTE_ID"
wget -rpEk -e robots=off "$share_url" -P "$output_dir"
if [ $? -ne 0 ]; then
echo -e \\nDownloading failed, make sure you are using the real wget package and not the busybox one.
exit 1
fi
# Get rid of the domain in the output folder
mv "$output_dir/$SHARE_HOST"/* "$output_dir/"
rmdir "$output_dir/$SHARE_HOST"
# Create home page with redirect
index_dest_path="$output_dir/index.html"
cp index.template.html "$index_dest_path"
sed -i "s/{{ROOT_NOTE_ID}}/$ROOT_NOTE_ID/g" "$index_dest_path"
# Rewrite links to get rid of the share folder
sed -i "s/<link href=\"\\.\\./<link href=\"\\./g" "$output_dir/share"/*.html
sed -i "s/<script src=\"\\.\\./<script src=\"\\./g" "$output_dir/share"/*.html
sed -i "s/rel=\"shortcut icon\" href=\"\\.\\./rel=\"shortcut icon\" href=\"\\./g" "$output_dir/share"/*.html
cp -r "$output_dir/share"/* "$output_dir"
rm -r "$output_dir/share"

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env bash
LISTEN_ADDRESS=127.0.0.1:8088
script_dir=$(realpath $(dirname $0))
output_dir="$script_dir/../../docs"
echo "Preview the documentation at http://$LISTEN_ADDRESS"
httpd -fv -p "$LISTEN_ADDRESS" -h "$output_dir"

View File

@@ -14,7 +14,8 @@ UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label'
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'weekPattern', 'enableWeekNote', 'monthPattern',
'quarterPattern', 'yearPattern', 'enableQuarterNote', 'pageSize', 'viewType', 'mapRootNoteId',
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
@@ -31,7 +32,8 @@ UPDATE attributes SET name = 'name' WHERE type = 'relation'
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'weekPattern', 'enableWeekNote', 'monthPattern',
'quarterPattern', 'yearPattern', 'enableQuarterNote', 'pageSize', 'viewType', 'mapRootNoteId',
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',

View File

@@ -25,15 +25,13 @@ keyPath=
# expressjs shortcuts are supported: loopback(127.0.0.1/8, ::1/128), linklocal(169.254.0.0/16, fe80::/10), uniquelocal(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7)
trustedReverseProxy=false
# setting the CORS headers for cross-origin requests
# corsAllowOrigin='*'
# corsAllowMethods='GET,POST,PUT,DELETE,PATCH'
# corsAllowHeaders='Content-Type,Authorization'
[Session]
# Use this setting to set a custom value for the "Path" Attribute value of the session cookie.
# This can be useful, when you have several instances running on the same domain, under different paths (e.g. by using a reverse proxy).
# It prevents your instances from overwriting each others' cookies, allowing you to stay logged in multiple instances simultanteously.
# E.g. if you have instances running under https://your-domain.com/triliumNext/instanceA and https://your-domain.com/triliumNext/instanceB
# you would want to set the cookiePath value to "/triliumNext/instanceA" for your first and "/triliumNext/instanceB" for your second instance
cookiePath=/
# Use this setting to set a custom value for the "Max-Age" Attribute of the session cookie.
# This controls how long your session will be valid, before it expires and you need to log in again, when you use the "Remember Me" option.
# Value needs to be entered in Seconds.

View File

@@ -30,13 +30,6 @@ trustedReverseProxy=false
[Session]
# Use this setting to set a custom value for the "Path" Attribute value of the session cookie.
# This can be useful, when you have several instances running on the same domain, under different paths (e.g. by using a reverse proxy).
# It prevents your instances from overwriting each others' cookies, allowing you to stay logged in multiple instances simultanteously.
# E.g. if you have instances running under https://your-domain.com/triliumNext/instanceA and https://your-domain.com/triliumNext/instanceB
# you would want to set the cookiePath value to "/triliumNext/instanceA" for your first and "/triliumNext/instanceB" for your second instance
cookiePath=/
# Use this setting to set a custom value for the "Max-Age" Attribute of the session cookie.
# This controls how long your session will be valid, before it expires and you need to log in again, when you use the "Remember Me" option.
# Value needs to be entered in Seconds.

View File

@@ -1,831 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>Branch prefixes</title>
</head>
<body data-note-id="1l1f6WZbaBEZ" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<nav id="parentLink">
parent: <a href="B8hxg4e66cVL.html"
class="type-text">Development and architecture</a>
</nav>
<h1 id="title">Branch prefixes</h1>
<p>This note has no content.</p>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="C09Dou56ffMe.html">Having a simpler packaging system</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="BhE2WFknKKHG.html">Main</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="B8hxg4e66cVL.html">Development and architecture</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="3jc1nUXyteo0.html">Themes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="6x42mhlfLo0o.html">blobs</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<strong>Branch prefixes</strong>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="3eTu21fjtZkj.html">Scripting</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="1pOWnHdGAuWR.html">Widgets</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="8jWguCtuKsAt.html">Right pane widget</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="4FXLAtcPhZFo.html">CSS</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

View File

@@ -1,866 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>Widgets</title>
</head>
<body data-note-id="1pOWnHdGAuWR" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<nav id="parentLink">
parent: <a href="3eTu21fjtZkj.html"
class="type-text">Scripting</a>
</nav>
<h1 id="title">Widgets</h1>
<div id="content" class="type-text ck-content">
<p>To create a basic widget, simply create a code note with type “JS frontend”. Add the <code>#widget</code> label in order for it to be loaded at startup.</p><pre><code class="language-text-plain">const template = `&lt;div id="my-widget"&gt;&lt;button&gt;Click Me!&lt;/button&gt;&lt;/div&gt;`;
class MyWidget extends api.BasicWidget {
get position() { return 1; }
get parentWidget() { return "left-pane" }
doRender() {
this.$widget = $(template);
return this.$widget;
}
}
module.exports = new MyWidget();</code></pre><p><code>parentWidget()</code> can be given the following values:</p><ul><li><code>left-pane</code> - This renders the widget on the left side of the screen where the note tree lives.</li><li><code>center-pane</code> - This renders the widget in the center of the layout in the same location that notes and splits appear.</li><li><code>note-detail-pane</code> - This renders the widget <i>with</i> the note in the center pane. This means it can appear multiple times with splits.</li><li><code>right-pane</code> - This renders the widget to the right of any opened notes.</li></ul><hr><p>Reference:</p><ul><li><a href="https://trilium.rocks/X7pxYpiu0lgU">https://trilium.rocks/X7pxYpiu0lgU</a>&nbsp;</li><li><a href="https://github.com/zadam/trilium/wiki/Widget-Basics">https://github.com/zadam/trilium/wiki/Widget-Basics</a>&nbsp;</li><li><a href="https://github.com/zadam/trilium/wiki/Frontend-Basics">https://github.com/zadam/trilium/wiki/Frontend-Basics</a>&nbsp;</li></ul>
</div>
<nav id="childLinks" class="list">
<hr>
<span>Child notes: </span>
<ul>
<li>
<a href="8jWguCtuKsAt.html"
class="type-text">Right pane widget</a>
</li>
<li>
<a href="4FXLAtcPhZFo.html"
class="type-text">CSS</a>
</li>
</ul>
</nav>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="C09Dou56ffMe.html">Having a simpler packaging system</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="BhE2WFknKKHG.html">Main</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="B8hxg4e66cVL.html">Development and architecture</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="3jc1nUXyteo0.html">Themes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="6x42mhlfLo0o.html">blobs</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="1l1f6WZbaBEZ.html">Branch prefixes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="3eTu21fjtZkj.html">Scripting</a>
</p>
<ul>
<li>
<p>
<strong>Widgets</strong>
</p>
<ul>
<li>
<p>
<a class="type-text" href="8jWguCtuKsAt.html">Right pane widget</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="4FXLAtcPhZFo.html">CSS</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

View File

@@ -1,842 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>Scripting</title>
</head>
<body data-note-id="3eTu21fjtZkj" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<nav id="parentLink">
parent: <a href="4yYHqKbLovVX.html"
class="type-text">Developer&#39;s Guide</a>
</nav>
<h1 id="title">Scripting</h1>
<nav id="childLinks" class="grid">
<ul>
<li>
<a href="1pOWnHdGAuWR.html"
class="type-text">Widgets</a>
</li>
</ul>
</nav>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="C09Dou56ffMe.html">Having a simpler packaging system</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="BhE2WFknKKHG.html">Main</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="B8hxg4e66cVL.html">Development and architecture</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="3jc1nUXyteo0.html">Themes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="6x42mhlfLo0o.html">blobs</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="1l1f6WZbaBEZ.html">Branch prefixes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<strong>Scripting</strong>
</p>
<ul>
<li>
<p>
<a class="type-text" href="1pOWnHdGAuWR.html">Widgets</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="8jWguCtuKsAt.html">Right pane widget</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="4FXLAtcPhZFo.html">CSS</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

View File

@@ -1,833 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>Themes</title>
</head>
<body data-note-id="3jc1nUXyteo0" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<nav id="parentLink">
parent: <a href="B8hxg4e66cVL.html"
class="type-text">Development and architecture</a>
</nav>
<h1 id="title">Themes</h1>
<div id="content" class="type-text ck-content">
<h2>Server-side</h2><ul><li>There are two themes embedded in the application:<ul><li><code>light</code>, located in <code>src\public\stylesheets\theme-light.css</code></li><li><code>dark</code>, located in <code>src\public\stylesheets\theme-dark.css</code></li></ul></li><li>The default theme is set only once, when the database is created and is managed by <code>options_init#initNotSyncedOptions</code>.<ul><li>On Electron, the choice between <code>light</code> and <code>dark</code> is done based on the OS preference.</li><li>Otherwise, the theme is always <code>dark</code>.</li></ul></li><li>The theme is served via <code>src\routes\index.ts</code>, in the <code>getThemeCssUrl</code> method.</li></ul><h2>Client-side</h2><ul><li>The two predefined themes are hard-coded in the client in <code>src\public\app\widgets\type_widgets\options\appearance\theme.js</code>.</li><li>The user-defined themes are obtained via a call to the server: <code>options/user-themes</code>.</li><li>The theme retrieval is done via a request</li></ul>
</div>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="C09Dou56ffMe.html">Having a simpler packaging system</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="BhE2WFknKKHG.html">Main</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="B8hxg4e66cVL.html">Development and architecture</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<strong>Themes</strong>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="6x42mhlfLo0o.html">blobs</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="1l1f6WZbaBEZ.html">Branch prefixes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="3eTu21fjtZkj.html">Scripting</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="1pOWnHdGAuWR.html">Widgets</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="8jWguCtuKsAt.html">Right pane widget</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="4FXLAtcPhZFo.html">CSS</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

View File

@@ -1,838 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>CSS</title>
</head>
<body data-note-id="4FXLAtcPhZFo" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<nav id="parentLink">
parent: <a href="1pOWnHdGAuWR.html"
class="type-text">Widgets</a>
</nav>
<h1 id="title">CSS</h1>
<div id="content" class="type-text ck-content">
<p>In <code>doRender()</code>:</p><pre><code class="language-text-plain">this.cssBlock(`#my-widget {
position: absolute;
bottom: 40px;
left: 60px;
z-index: 1;
}`)</code></pre><hr><p>Reference: <a href="https://trilium.rocks/X7pxYpiu0lgU">https://trilium.rocks/X7pxYpiu0lgU</a>&nbsp;</p>
</div>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="C09Dou56ffMe.html">Having a simpler packaging system</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="BhE2WFknKKHG.html">Main</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="B8hxg4e66cVL.html">Development and architecture</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="3jc1nUXyteo0.html">Themes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="6x42mhlfLo0o.html">blobs</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="1l1f6WZbaBEZ.html">Branch prefixes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="3eTu21fjtZkj.html">Scripting</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="1pOWnHdGAuWR.html">Widgets</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="8jWguCtuKsAt.html">Right pane widget</a>
</p>
</li>
<li>
<p>
<strong>CSS</strong>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

View File

@@ -1,857 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>Developer&#39;s Guide</title>
</head>
<body data-note-id="4yYHqKbLovVX" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<h1 id="title">Developer&#39;s Guide</h1>
<nav id="childLinks" class="grid">
<ul>
<li>
<a href="VS22Hq5PBFNf.html"
class="type-text">Dependency Management</a>
</li>
<li>
<a href="ZlxZh8NH5frM.html"
class="type-text">Building and deployment</a>
</li>
<li>
<a href="xtBYDVZPb0gr.html"
class="type-text">Project maintenance</a>
</li>
<li>
<a href="B8hxg4e66cVL.html"
class="type-text">Development and architecture</a>
</li>
<li>
<a href="3eTu21fjtZkj.html"
class="type-text">Scripting</a>
</li>
</ul>
</nav>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<strong>Developer&#39;s Guide</strong>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="C09Dou56ffMe.html">Having a simpler packaging system</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="BhE2WFknKKHG.html">Main</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="B8hxg4e66cVL.html">Development and architecture</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="3jc1nUXyteo0.html">Themes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="6x42mhlfLo0o.html">blobs</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="1l1f6WZbaBEZ.html">Branch prefixes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="3eTu21fjtZkj.html">Scripting</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="1pOWnHdGAuWR.html">Widgets</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="8jWguCtuKsAt.html">Right pane widget</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="4FXLAtcPhZFo.html">CSS</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

View File

@@ -1,833 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>blobs</title>
</head>
<body data-note-id="6x42mhlfLo0o" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<nav id="parentLink">
parent: <a href="zCDxk5VFdsqg.html"
class="type-text">Database</a>
</nav>
<h1 id="title">blobs</h1>
<div id="content" class="type-text ck-content">
<figure class="table"><table><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>blobId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The unique ID of the blob (e.g. <code>XXbfAJXqWrYnSXcelLFA</code>).</td></tr><tr><th><code>content</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td><p>The content of the blob, can be either:</p><ul><li>text (for plain text notes or HTML notes).</li><li>binary (for images and other types of attachments)</li></ul></td></tr><tr><th><code>dateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Localized modification date (e.g. <code>2023-11-08 18:43:44.204+0200</code>)</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr></tbody></table></figure>
</div>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="C09Dou56ffMe.html">Having a simpler packaging system</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="BhE2WFknKKHG.html">Main</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="B8hxg4e66cVL.html">Development and architecture</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="3jc1nUXyteo0.html">Themes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<strong>blobs</strong>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="1l1f6WZbaBEZ.html">Branch prefixes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="3eTu21fjtZkj.html">Scripting</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="1pOWnHdGAuWR.html">Widgets</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="8jWguCtuKsAt.html">Right pane widget</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="4FXLAtcPhZFo.html">CSS</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

View File

@@ -1,855 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>Right pane widget</title>
</head>
<body data-note-id="8jWguCtuKsAt" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<nav id="parentLink">
parent: <a href="1pOWnHdGAuWR.html"
class="type-text">Widgets</a>
</nav>
<h1 id="title">Right pane widget</h1>
<div id="content" class="type-text ck-content">
<ul><li><code>doRender</code> must not be overridden, instead <code>doRenderBody()</code> has to be overridden.</li><li><code>parentWidget()</code> must be set to <code>“rightPane”</code>.</li><li><code>widgetTitle()</code> getter can optionally be overriden, otherwise the widget will be displayed as “Untitled widget”.</li></ul><pre><code class="language-text-plain">const template = `&lt;div&gt;Hi&lt;/div&gt;`;
class ToDoListWidget extends api.RightPanelWidget {
get widgetTitle() {
return "Title goes here";
}
get parentWidget() { return "right-pane" }
doRenderBody() {
this.$body.empty().append($(template));
}
async refreshWithNote(note) {
this.toggleInt(false);
this.triggerCommand("reEvaluateRightPaneVisibility");
this.toggleInt(true);
this.triggerCommand("reEvaluateRightPaneVisibility");
}
}
module.exports = new ToDoListWidget();</code></pre><p>The implementation is in <code>src/public/app/widgets/right_panel_widget.js</code>.</p>
</div>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="C09Dou56ffMe.html">Having a simpler packaging system</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="BhE2WFknKKHG.html">Main</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="B8hxg4e66cVL.html">Development and architecture</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="3jc1nUXyteo0.html">Themes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="6x42mhlfLo0o.html">blobs</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="1l1f6WZbaBEZ.html">Branch prefixes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="3eTu21fjtZkj.html">Scripting</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="1pOWnHdGAuWR.html">Widgets</a>
</p>
<ul>
<li>
<p>
<strong>Right pane widget</strong>
</p>
</li>
<li>
<p>
<a class="type-text" href="4FXLAtcPhZFo.html">CSS</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

View File

@@ -1,907 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>Development and architecture</title>
</head>
<body data-note-id="B8hxg4e66cVL" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<nav id="parentLink">
parent: <a href="4yYHqKbLovVX.html"
class="type-text">Developer&#39;s Guide</a>
</nav>
<h1 id="title">Development and architecture</h1>
<nav id="childLinks" class="grid">
<ul>
<li>
<a href="hkrBX8KE1HQl.html"
class="type-text">Internationalisation / Translations</a>
</li>
<li>
<a href="XxqZW6JjkW2g.html"
class="type-text">Live reload</a>
</li>
<li>
<a href="3jc1nUXyteo0.html"
class="type-text">Themes</a>
</li>
<li>
<a href="U5RtMeGPeZ29.html"
class="type-text">Synchronisation</a>
</li>
<li>
<a href="mPGbEmYGitWe.html"
class="type-text">Build information</a>
</li>
<li>
<a href="zCDxk5VFdsqg.html"
class="type-text">Database</a>
</li>
<li>
<a href="KbwD5mDpD4CV.html"
class="type-text">Protected entities</a>
</li>
<li>
<a href="IuxV242YGaN5.html"
class="type-text">Deleted notes</a>
</li>
<li>
<a href="FJ4VR6G2M6VD.html"
class="type-text">Special notes</a>
</li>
<li>
<a href="1l1f6WZbaBEZ.html"
class="type-text">Branch prefixes</a>
</li>
<li>
<a href="QSkfVssHIngA.html"
class="type-text">Revisions</a>
</li>
<li>
<a href="cemIoFLfEGPO.html"
class="type-text">Backlinks</a>
</li>
<li>
<a href="VbDoDdiHEemi.html"
class="type-text">Note types</a>
</li>
<li>
<a href="UDBwK5Fhr2CT.html"
class="type-text">Safe mode</a>
</li>
</ul>
</nav>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="C09Dou56ffMe.html">Having a simpler packaging system</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="BhE2WFknKKHG.html">Main</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<strong>Development and architecture</strong>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="3jc1nUXyteo0.html">Themes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="6x42mhlfLo0o.html">blobs</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="1l1f6WZbaBEZ.html">Branch prefixes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="3eTu21fjtZkj.html">Scripting</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="1pOWnHdGAuWR.html">Widgets</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="8jWguCtuKsAt.html">Right pane widget</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="4FXLAtcPhZFo.html">CSS</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

View File

@@ -1,833 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>Main</title>
</head>
<body data-note-id="BhE2WFknKKHG" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<nav id="parentLink">
parent: <a href="rU1hxvgqlA9x.html"
class="type-text">CI</a>
</nav>
<h1 id="title">Main</h1>
<div id="content" class="type-text ck-content">
<p>The main workflow of the CI:</p><ul><li>Builds the Docker image and publishes in the GitHub Docker registry.</li><li>Builds using a portion of the <a href="UTB518X6X9Uh.html" class="type-text">delivery script</a> artifacts for the following platforms:<ul><li>Windows <code>x86_64</code> as .zip file</li><li>Windows <code>x86_64</code> installer (using Squirrel)</li><li>macOS <code>x86_64</code> and <code>aarch64</code>.</li><li>Linux <code>x86_64</code></li><li>Linux server <code>x86_64</code>.</li></ul></li></ul><p>The main workflow of the CI runs on <code>develop</code> branches as well as any branch that starts with <code>feature/update_</code>.</p><h2>Downloading the artifacts from the main branch</h2><p>Simply go to the <a href="https://github.com/TriliumNext/Notes"><code>develop</code> branch on GitHub</a> and look at the commit bar:</p><figure class="image"><img style="aspect-ratio:896/59;" src="api/attachments/XEUUvzBxh89z/image/image.png" width="896" height="59"></figure><p>Press the green checkmark (or red cross if something went bad). Then look at the list of jobs and their status:</p><figure class="image"><img style="aspect-ratio:616/445;" src="api/attachments/27Z989bSFWAc/image/image.png" width="616" height="445"></figure><p>Then look for any of the entires that starts with “Main” and press the “Details” link next to it. It doesn't really matter which platform you'll choose as the artifacts are available on the same page.</p><p>&nbsp;</p>
</div>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="C09Dou56ffMe.html">Having a simpler packaging system</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<strong>Main</strong>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="B8hxg4e66cVL.html">Development and architecture</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="3jc1nUXyteo0.html">Themes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="6x42mhlfLo0o.html">blobs</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="1l1f6WZbaBEZ.html">Branch prefixes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="3eTu21fjtZkj.html">Scripting</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="1pOWnHdGAuWR.html">Widgets</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="8jWguCtuKsAt.html">Right pane widget</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="4FXLAtcPhZFo.html">CSS</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

View File

@@ -1,833 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="./favicon.ico">
<script src="./assets/v0.63.6/app-dist/share.js"></script>
<link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet">
<link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet">
<link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
<title>Having a simpler packaging system</title>
</head>
<body data-note-id="C09Dou56ffMe" data-ancestor-note-id="4yYHqKbLovVX">
<div id="layout">
<div id="main">
<nav id="parentLink">
parent: <a href="VS22Hq5PBFNf.html"
class="type-text">Dependency Management</a>
</nav>
<h1 id="title">Having a simpler packaging system</h1>
<div id="content" class="type-text ck-content">
<p>The current build scripts are a bit complicated and maintaining them is not easy.</p><p><a href="https://www.electronforge.io/">Electron Forge</a> seems more mature and has a boatload of features, including Flatpak, snaps, Windows installers &amp; more.</p><p>Have a look also at the <a href="https://www.electronforge.io/config/plugins">Plugins</a> section since there are quite a few interesting things there as well.</p><p>Afterwards consider running a new round of&nbsp;<a class="reference-link">Reducing binary size</a>, especially taking into consideration removing of the unnecessary locales.</p>
</div>
</div>
<button id="toggleMenuButton"></button>
<nav id="menu">
<p>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p>
</li>
<li>
<p>
<strong>Having a simpler packaging system</strong>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="ZlxZh8NH5frM.html">Building and deployment</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="PHqgH8FCfcod.html">Documentation</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="btM6L9JtG301.html">Running a development build</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UTB518X6X9Uh.html">Build deliveries locally</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="biDJ9KgbWLgt.html">Releasing a version</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="rU1hxvgqlA9x.html">CI</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="BhE2WFknKKHG.html">Main</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="xtBYDVZPb0gr.html">Project maintenance</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="s5gsYTbPQr6c.html">Updating dependencies</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="X4N03xLYEWnN.html">bettersqlite binaries</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="GMta9hBHsXHQ.html">Node.js, Electron and `better-sqlite3`</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="jvdjFBOCCrOa.html">Testing compatibility</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="WKn3hLGmKmiH.html">CKEditor</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="MUGBo4n67kBI.html">Environment setup</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="icQBu8R1ij57.html">Building &amp; updating</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zpR91YHYs6lL.html">Differences from upstream</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="B8hxg4e66cVL.html">Development and architecture</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation / Translations</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="Z9N9OKBXXLFW.html">Guidelines</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="KRC2O84LekPz.html">i18n-ally</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="XxqZW6JjkW2g.html">Live reload</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="3jc1nUXyteo0.html">Themes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="U5RtMeGPeZ29.html">Synchronisation</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="d3dnvVOhur16.html">Content hashing</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="mPGbEmYGitWe.html">Build information</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="zCDxk5VFdsqg.html">Database</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="wCxCJB3hhojs.html">attachments</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="wxCwZ1P2SGCx.html">attributes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="6x42mhlfLo0o.html">blobs</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="Vy1PbjSkUast.html">branches</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="inGKXCChkVYX.html">entity_changes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="y2ido6E6tZ0V.html">etapi_tokens</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="kAfgZERKtVhU.html">notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FSZoX3cJlJE7.html">options</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="bzQfhyzDo3Xz.html">recent_notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QYMncZf5Bu3D.html">revisions</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="KbwD5mDpD4CV.html">Protected entities</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="IuxV242YGaN5.html">Deleted notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="FJ4VR6G2M6VD.html">Special notes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="1l1f6WZbaBEZ.html">Branch prefixes</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="QSkfVssHIngA.html">Revisions</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="cemIoFLfEGPO.html">Backlinks</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="VbDoDdiHEemi.html">Note types</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="UDBwK5Fhr2CT.html">Safe mode</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a class="type-text" href="3eTu21fjtZkj.html">Scripting</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="1pOWnHdGAuWR.html">Widgets</a>
</p>
<ul>
<li>
<p>
<a class="type-text" href="8jWguCtuKsAt.html">Right pane widget</a>
</p>
</li>
<li>
<p>
<a class="type-text" href="4FXLAtcPhZFo.html">CSS</a>
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
# Build deliveries locally
In the project root:
<figure class="table"><table><thead><tr><th>Platform</th><th>Architecture</th><th>Application</th><th>Build command</th></tr></thead><tbody><tr><th>macOS</th><td>x86_64</td><td>Desktop / Electron app</td><td><code>./bin/build-mac-x64.sh</code></td></tr><tr><td>ARM 64</td><td>Desktop / Electron app</td><td><code>./bin/build-mac-arm64.sh</code></td></tr><tr><th>Linux</th><td>x86_64</td><td>Desktop / Electron app</td><td><code>./bin/build-linux-x64.sh</code></td></tr><tr><td>Server</td><td><code>./bin/build-server.sh</code></td></tr><tr><th>Windows</th><td>x86_64</td><td>Desktop / Electron app</td><td><code>./bin/build-win-x64.sh</code></td></tr></tbody></table></figure>
Under NixOS the following `nix-shell` is needed:
```
nix-shell -p jq
```
For Linux builds:
```
nix-shell -p jq fakeroot dpkg
```
The resulting build will be in the `dist` directory under the project root.
### Testing the Linux builds under NixOS
<figure class="table"><table><thead><tr><th>Desktop client</th><th>Server</th></tr></thead><tbody><tr><td><pre><code class="language-text-plain">$ NIXPKGS_ALLOW_UNFREE=1 nix-shell -p steam-run
[nix-shell] cd dist/trilium-linux-x64
[nix-shell] steam-run ./trilium</code></pre></td><td><pre><code class="language-text-plain">$ NIXPKGS_ALLOW_UNFREE=1 nix-shell -p steam-run
[nix-shell] cd dist/trilium-linux-x64-server
[nix-shell] steam-run ./trilium.sh</code></pre></td></tr></tbody></table></figure>

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@@ -0,0 +1,24 @@
# Main
The main workflow of the CI:
* Builds the Docker image and publishes in the GitHub Docker registry.
* Builds using a portion of the [delivery script](../Build%20deliveries%20locally.md) artifacts for the following platforms:
* Windows `x86_64` as .zip file
* Windows `x86_64` installer (using Squirrel)
* macOS `x86_64` and `aarch64`.
* Linux `x86_64`
* Linux server `x86_64`.
The main workflow of the CI runs on `develop` branches as well as any branch that starts with `feature/update_`.
## Downloading the artifacts from the main branch
Simply go to the [`develop` branch on GitHub](https://github.com/TriliumNext/Notes) and look at the commit bar:
<figure class="image"><img src="Main_image.png"></figure>
Press the green checkmark (or red cross if something went bad). Then look at the list of jobs and their status:
<figure class="image"><img src="1_Main_image.png"></figure>
Then look for any of the entires that starts with “Main” and press the “Details” link next to it. It doesn't really matter which platform you'll choose as the artifacts are available on the same page.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@@ -0,0 +1,34 @@
# Documentation
Development notes are published on [triliumnext.github.io/Notes](https://triliumnext.github.io/Notes) by the CI using GitHub Pages.
The GitHub Pages deployment works by taking the files from the Notes repository, in the `docs` directory.
## How it works
There is a script that uses `wget` to download all the files from a share, that means:
1. You must have a local instance of Trilium Notes server.
2. You must have the documentation imported, up to date and shared.
Note that currently the documentation source file is not distributed (the note export), until a way is found to automate this process. Contact `eliandoran` should you require to obtain a copy of the documentation.
## Setting up `.env` file
Go to `bin/docs` and copy `.env.example` to `.env` and edit it:
1. Change the `SHARE_PROTOCOL` to either `http` or `https` depending on your setup.
2. Change `SHARE_HOST` to match the domain name or the URL to the host (without the protocol or any slashes).
Generally `ROOT_NOTE_ID` should not be changed since the note ID must match if the files were imported correctly.
## Triggering a build
Run:
```
./bin/docs/prepare.sh
```
This will attempt to download all the notes from the share URL and put them in `docs`, rewritten for GitHub Pages.
Commit the results and follow the normal development process to push them.

View File

@@ -0,0 +1,22 @@
# Releasing a version
On NixOS:
```
nix-shell -p dpkg fakeroot jq nodejs_20
```
Then simply run from project root:
```
./bin/release.sh 1.2.3
```
where `1.2.3` is the desired release version.
If a version ends with `-beta`, it will automatically be marked as pre-release in GitHub.
This will automatically generate a release in GitHub if everything goes according to plan.
Note that the Windows installer is not automatically uploaded yet, it has to be taken from the [main workflow of the CI from the `develop` branch](CI/Main.md).
Make sure to check test the artifacts of the release.

View File

@@ -0,0 +1,89 @@
# Running a development build
As always, install the dependencies for the first time (and re-run whenever there are errors about missing dependencies):
```
npm install
```
## Run server
Run with default settings:
```
npm run start-server
```
Run with custom port:
```
TRILIUM_PORT=8082 npm run start-server
```
## Run Electron
Rebuild `better-sqlite3` dependency:
```
npm run switch-electron
```
Then run Electron:
```
npm run start-electron
```
To run Electron using the same data directory as the production version:
```
npm run start-electron-no-dir
```
When done, switch back the `better-sqlite3` dependency:
```
npm run switch-server
```
## Quick switch
To start Electron without running `switch-electron` first:
```
npm run qstart-electron
```
Similarly, to start the server without running `switch-server` first:
```
npm run qstart-server
```
## Safe mode
Safe mode is off by default, to enable it temporarily on a Unix shell, prepend the environment variable setting:
```
TRILIUM_SAFE_MODE=1 npm run start-server
```
To have the same behaviour on Windows, we would need to alter `package.json`:
```diff
-"start-electron": "npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .",
+"start-electron": "npm run prepare-dist && cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .",
```
## Running on NixOS
When doing development, the Electron binary retrieved from NPM is not going to be compatible with NixOS, resulting in errors when trying to run it. To bypass this, there is a special command to run electron using `nix-shell`:
```
npm run start-electron-nix
```
Similarly to the original command, to use the same data directory as the production version:
```
npm run start-electron-no-dir-nix
```

View File

@@ -0,0 +1,116 @@
# Adding a new client library
In the past some libraries have been copy-pasted (and adapted if needed) to the repository. However, new libraries must be obtained exclusively through npm.
The first step is to install the desired library. As an example we are going to install `i18next`:
```
npm i i18next
```
### Step 1. Understanding the structure of the import
After installing the dependency, it's important to know how it's structured. You can do this by looking at the directory structure of the newly imported dependency:
```
$ tree node_modules/i18next
node_modules/i18next
├── dist
│ ├── cjs
│ │ └── i18next.js
│ ├── esm
│ │ ├── i18next.bundled.js
│ │ ├── i18next.js
│ │ └── package.json
│ └── umd
│ ├── i18next.js
│ └── i18next.min.js
├── i18next.js
├── i18next.min.js
├── index.d.mts
├── index.d.ts
├── index.js
├── index.v4.d.ts
├── LICENSE
├── package.json
├── README.md
└── typescript
├── helpers.d.ts
├── options.d.ts
├── t.d.ts
└── t.v4.d.ts
```
Generally you should be looking for a `.min.js` file. Note that the `esm` and `cjs` variants generally don't work, we are looking for the classic, no module dependency.
### Step 2. Exposing the library from the server
The library must be delivered by the server and this is done via `src/routes/assets.ts`. In the `register` function, add a new entry near the bottom of the function:
```javascript
app.use(`/${assetPath}/node_modules/i18next/`, persistentCacheStatic(path.join(srcRoot, "..", 'node_modules/i18next/')));
```
### Step 3. Adding it to the library loader
The library loader is a client module which is in charge of downloading the library from the server and importing it. The loader is located in `src/public/app/services/library_loader.js`.
To add a new library, start by creating a constant for it, with the value pointing to the minified JS identified at the first step:
```javascript
const I18NEXT = {
js: [
"node_modules/i18next/i18next.min.js"
]
};
```
Then add it to the `export default` section:
```diff
export default {
requireCss,
requireLibrary,
CKEDITOR,
CODE_MIRROR,
ESLINT,
RELATION_MAP,
PRINT_THIS,
CALENDAR_WIDGET,
KATEX,
WHEEL_ZOOM,
FORCE_GRAPH,
MERMAID,
EXCALIDRAW,
- MARKJS
+ MARKJS,
+ I18NEXT
}
```
### Step 4. Using the library
To import the library, simply use the following mechanism:
```diff
import library_loader from "./library_loader.js";
await library_loader.requireLibrary(library_loader.I18NEXT);
```
Make sure to replace `I18NEXT` with the library that was created at the previous steps.
Note that because we are not using a module management mechanism such as ES Modules or Common.js modules, the `requireLibrary` method does not actually return anything. 
To benefit from the library, it must export on its own an object in `window`.
In the case of `i18next`, it sets `window.i18next` and that can be used directly:
```diff
i18next.init({});
```
### Step 5. Adding Electron support
For Electron, the `node_modules` are copied as a separate step by `bin/copy-dist.ts`.
Scroll all the way down to the `nodeModulesFolder` and append an entry for the newly added libraries.

View File

@@ -0,0 +1,8 @@
# Having a simpler packaging system
The current build scripts are a bit complicated and maintaining them is not easy.
[Electron Forge](https://www.electronforge.io/) seems more mature and has a boatload of features, including Flatpak, snaps, Windows installers & more.
Have a look also at the [Plugins](https://www.electronforge.io/config/plugins) section since there are quite a few interesting things there as well.
Afterwards consider running a new round of <a class="reference-link" href="#root/GAP7blNiSoX3/ftdNqJtBT1RD">Reducing binary size</a>, especially taking into consideration removing of the unnecessary locales.

View File

@@ -0,0 +1,6 @@
# Copy image reference to the clipboard
This function is handled by `src/public/app/widgets/floating_buttons/copy_image_reference_button.js` and it supports multiple note types out of the box.
To enable the display of the button, simply modify `isEnabled` to add support for the new note type.
No other modifications should be necessary.

View File

@@ -0,0 +1,33 @@
# Export diagram as SVG
This mechanism is handled by `src/public/app/widgets/floating_buttons/svg_export_button.js`.
## Step 1. Enable the button
Modify the  `isEnabled` method in `svg_export_button.js` to add support for the new note type.
## Step 2. Add support for exporting the image
The SVG export needs to be handled inside the note type implementation. 
The first goal is to create a method to handle the <a class="reference-link" href="SVG%20rendering.md">SVG rendering</a>. Make sure to deduplicate the code if the SVG rendering is already handled.
```
async renderSvg() {
return await this.mind.exportSvg().text();
}
```
Then create an event handler to manage the SVG export:
```
async exportSvgEvent({ntxId}) {
if (!this.isNoteContext(ntxId) || this.note.type !== "mindMap") {
return;
}
const svg = await this.renderSvg();
utils.downloadSvg(this.note.title, svg);
}
```
Make sure to modify the note type assertion at the beginning of the method. This is very important, otherwise there can be errors when navigating through multiple note types that support this button.

View File

@@ -0,0 +1,54 @@
# First steps
> **Note**: When adding or updating step titles/order, don't forget to update the corresponding list in <a class="reference-link" href="Note%20type%20checklist.md">Note type checklist</a>.
## Step 1. Register the note type in the server
Go to `src\services\note_types.ts` and add a new entry in `noteTypes` with the type ID and the default MIME type.
## Step 2. Register the note type in the client context menu
The client lists the available note types in `src\public\app\services\note_types.ts`.
## Step 3. Create a type widget
Go to `src\public\app\widgets\type_widgets` directory and create a new file corresponding to the new note type.
A blank implementation looks something like this:
## Step 4. Register the type widget
The type widget needs to go in `src\public\app\widgets\note_detail.ts`where there is a `typeWidgetClasses` map, mapping the type IDs with the corresponding type widget that was created at the previous step.
## Step 5. Add the default icon mapping
To set a default icon for this note type, go to `src\public\app\entities\fnote.ts` and add it to `NOTE_TYPE_ICONS`.
## Step 6. Add to note type selector
Go to `src/public/app/widgets/note_type.ts` and register the new note type in `NOTE_TYPES`.
## Step 7. Add the note to server allowed note types
This is required in order to make imports possible, otherwise they will be imported as plain text.
Go to `src/becca/entities/rows.ts` and add the new note type to `ALLOWED_NOTE_TYPES`.
## Additional changes
* If the widget requires a full height, it must be configured in `src\public\app\widgets\note_detail.ts` (look for `checkFullHeight`) then a `height: 100%` style can be applied to the containers to make them fit.
* To make the note always full width (ignoring the user's content width), go to `note_wrapper` and look for the `refresh` method. There is a `toggleClass` for `full-content-width` based on the note type.
* To allow the note source to be viewed, go to `src/public/app/widgets/buttons/note_actions.ts` and look for `this.toggleDisabled(this.$showSourceButton` in `refreshVisibility`.
## Final steps
* Update the <a class="reference-link" href="../Demo%20document.md">Demo document</a> to showcase the new note type.
## Troubleshooting
### Content does not appear, however it appears as hidden in the DOM
Type widgets do a check whenever a note is selected to determine whether the widget needs to be displayed or not, based on the note type. Make sure `getType()` is well implemented in the newly added type widget (take great care that the value is returned but also that the note type ID matches the ones registered in the previous steps):
```
static getType() { return "foo"; }
```

View File

@@ -0,0 +1,27 @@
import TypeWidget from "./type_widget.js";
const TPL = `
<div class="note-detail-mind-map note-detail-printable">
</div>
`;
export default class MindMapWidget extends TypeWidget {
static getType() { return "mindMap"; }
doRender() {
this.$widget = $(TPL);
super.doRender();
}
async doRefresh(note) {
this.$widget.html("<p>Hello</p>");
this.$widget.show();
}
async entitiesReloadedEvent({loadResults}) {
if (loadResults.isNoteReloaded(this.noteId)) {
this.refresh();
}
}
}

View File

@@ -0,0 +1,9 @@
# Loading data
Data loading can be done in `doRefresh()` since it gets a reference to the note:
```
const blob = await note.getBlob();
const content = blob.getJsonContent();
```
Note that `doRefresh` can sometimes be called by <a class="reference-link" href="Saving%20data%20via%20spaced%20update.md">Saving data via spaced update</a> when the user makes a changes, this has to be accounted for.

View File

@@ -0,0 +1,49 @@
# Note type checklist
The goal of this checklist is to ensure a good implementation or re-test of a note type.
## Implementation checklist
The note type widget must be created according to <a class="reference-link" href="First%20steps.md">First steps</a>:
* Register the note type in the server
* Register the note type in the client context menu
* Create a type widget
* Register the type widget
* Add the default icon mapping
* Add to note type selector
* Add the note to server allowed note types
* Update demo document to include this new note type
* Increase server sync version (see <a class="reference-link" href="#root/XPSyrTI07rbd/DrIXfwu9CVJP">Mindmap gets turned as file</a>).
## Validation checklist
### Ensure that the note renders properly
* When refreshing to a note that is already displayed
* When going to another note and then going back
* When creating a new note of the given type
* Have two tabs of the same note type and switch between them
### Ensure data persistence
* Save data when modifying changes via spaced update
### Ensure data retrieval
* Go on a note of this type and refresh the page
* Create a new note of this type while on another note of this type and ensure that the content is set properly.
### Set up a note preview
For an implementation reference, see <a class="reference-link" href="SVG%20rendering.md">SVG rendering</a>.
* Note preview rendering (go to parent and see note list).
* Include note
* Share
* Note revisions
### Import/export
* Export & Import, making sure no data is lost in the process.
* Remove the data folder entirely to test that the demo document is well imported on first setup.
* Ensure that the preview also works (check the preview in the root note).

View File

@@ -0,0 +1,72 @@
# SVG rendering
For diagrams and similar note types, it makes sense to cache an SVG rendering of the content so that it can be used for:
* Content preview in note lists (when viewing the list of notes from the parent note).
* Note inclusion
* Share
## Step 1. Save the SVG content as an attachment
The first step is to obtain the SVG from the custom widget used. For example, for Mind Elixir there is an `exportSvg` method.
If the returned value is a `Blob`, then the underlying text can be obtained via `await blob.text()`.
To save the SVG as an attachment alongside the content, simply modify `getData()`:
```
async getData() {
const mind = this.mind;
if (!mind) {
return;
}
const svgContent = await this.mind.exportSvg().text();
return {
content: mind.getDataString(),
attachments: [
{
role: "image",
title: "mindmap-export.svg",
mime: "image/svg+xml",
content: svgContent,
position: 0
}
]
};
}
```
You can test this step by making a change to the note and then using the “Note attachments” option from the note menu.
## Step 2. Adapting the server to serve SVG attachment
The `src/routes/api/image.ts` route is in charge for serving the image previews of image notes, but also of custom note types such as canvases.
Alter the `returnImageInt` method as follows:
1. Add the image type to the guard condition which returns 400 for unsupported note types.
2. Add an `if` statement to render the attachment using the correct name:
```
if (image.type === "mindMap") {
renderSvgAttachment(image, res, 'mindmap-export.svg');
}
```
## Step 3. Serve the SVG attachment for note preview
The client also needs tweaking to allow it to render SVG attachments by calling the previously modified server route.
The `src/public/app/services/content_renderer.js` file is in charge of handling the previews. To render using the image route, modify `getRenderedContent` to add the new note type to the `if` which calls `renderImage`.
## Step 4. Serve SVG for share
By default, `Note type cannot be displayed` will be displayed when trying to access the given note via a share.
To serve the SVG, open `src/share/content_renderer.ts` and look for `getContent`. Then add to the `if` containing `renderImage` the new note type.
This is not enough, as attempting to access the shared note will result in a broken image that fails with `Requested note is not a shareable image`. To solve this one, go to `src/share/routes.ts` and add a `renderImageAttachment` statement to `router.get('/share/api/images/[…])`.
## Step 5. Serve SVG for revisions
In the revisions list, to display the SVG, go to `src/public/app/widgets/dialogs/revisions.js` and look for the `renderContent` method. Simply add the note type to one of the already existing `if`s, such as the one for `canvas` and `mindMap` or `mermaid` (if the text content of the diagram should also be displayed).

View File

@@ -0,0 +1,27 @@
# Saving data via spaced update
The data persistence is achieved via the spaced update mechanism which is already present and needs to be integrated within the newly created type widgets.
First, the class must implement `getData`, in order to retrieve the data from the custom widget in a serialized form. As an example from the mind map implementation:
```
async getData() {
const mind = this.mind;
if (!mind) {
return;
}
return {
content: mind.getDataString()
};
}
```
Here the content is a string containing a JSON. It is also possible to provide attachments here as well, such as <a class="reference-link" href="SVG%20rendering.md">SVG rendering</a> to provide a preview of the content.
Then to trigger an update, register a listener within the custom widget that calls the spaced update, for example:
```
mind.bus.addListener("operation", (operation) => {
this.spacedUpdate.scheduleUpdate();
});
```

View File

@@ -0,0 +1,4 @@
# Build information
* Provides context about when the build was made and the corresponding Git revision.
* The information is displayed to the client when going in the about dialog.
* The build information is hard-coded in `src/services/build.ts`. This file is generated automatically via `npm run update-build-info` which itself is run automatically whenever making a build in the CI, or a [local delivery](../Building%20and%20deployment/Build%20deliveries%20locally.md).

View File

@@ -0,0 +1,2 @@
# attachments
<figure class="table" style="width:100%;"><table class="ck-table-resized"><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>attachmentId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Unique ID (e.g. <code>qhC1vzU4nwSE</code>)</td></tr><tr><th><code>ownerId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The unique ID of a row in&nbsp;<a class="reference-link" href="notes.md">notes</a>.</td></tr><tr><th><code>role</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The role of the attachment: <code>image</code> for images that are attached to a note.</td></tr><tr><th><code>mime</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The MIME type of the attachment (e.g. <code>image/png</code>)</td></tr><tr><th><code>title</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The title of the attachment.</td></tr><tr><th><code>isProtected</code></th><td>Integer</td><td>Non-null</td><td>0</td><td><code>1</code> if the entity is <a href="../Protected%20entities.md">protected</a>, <code>0</code> otherwise.</td></tr><tr><th><code>position</code></th><td>Integer</td><td>Non-null</td><td>0</td><td>Not sure where the position is relevant for attachments (saw it with values of 10 and 0).</td></tr><tr><th><code>blobId</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td>The corresponding <code>blobId</code> from the&nbsp;<a class="reference-link" href="blobs.md">blobs</a>&nbsp;table.</td></tr><tr><th><code>dateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Localized modification date (e.g. <code>2023-11-08 18:43:44.204+0200</code>)</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr><tr><th><code>utcDateScheduledForErasure</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td>&nbsp;</td></tr><tr><th><code>isDeleted</code></th><td>Integer</td><td>Non-null</td><td>&nbsp;</td><td><code>1</code> if the entity is <a href="../Deleted%20notes.md">deleted</a>, <code>0</code> otherwise.</td></tr><tr><th><code>deleteId</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td>&nbsp;</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,2 @@
# attributes
<figure class="table"><table><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>attributeId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Unique Id of the attribute (e.g. <code>qhC1vzU4nwSE</code>), can also have a special unique ID for&nbsp;<a class="reference-link" href="../Special%20notes.md">Special notes</a>&nbsp;(e.g. <code>_lbToday_liconClass</code>).</td></tr><tr><th><code>noteId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The ID of the <a href="notes.md">note</a> this atttribute belongs to</td></tr><tr><th><code>type</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The type of attribute (<code>label</code> or <code>relation</code>).</td></tr><tr><th><code>name</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The name/key of the attribute.</td></tr><tr><th><code>value</code></th><td>Text</td><td>Non-null</td><td><code>""</code></td><td><ul><li>For <code>label</code> attributes, a free-form value of the attribute.</li><li>For <code>relation</code> attributes, the ID of the <a href="notes.md">note</a> the relation is pointing to.</li></ul></td></tr><tr><th><code>position</code></th><td>Integer</td><td>Non-null</td><td>0</td><td>The position of the attribute compared to the other attributes. Some predefined attributes such as <code>originalFileName</code> have a value of 1000.</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr><tr><th><code>isDeleted</code></th><td>Integer</td><td>Non-null</td><td>&nbsp;</td><td><code>1</code> if the entity is <a href="../Deleted%20notes.md">deleted</a>, <code>0</code> otherwise.</td></tr><tr><th><code>deleteId</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td>&nbsp;</td></tr><tr><th><code>isInheritable</code></th><td>Integer</td><td>Nullable</td><td>0</td><td>&nbsp;</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,2 @@
# blobs
<figure class="table"><table><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>blobId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The unique ID of the blob (e.g. <code>XXbfAJXqWrYnSXcelLFA</code>).</td></tr><tr><th><code>content</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td><p>The content of the blob, can be either:</p><ul><li>text (for plain text notes or HTML notes).</li><li>binary (for images and other types of attachments)</li></ul></td></tr><tr><th><code>dateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Localized modification date (e.g. <code>2023-11-08 18:43:44.204+0200</code>)</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,2 @@
# branches
<figure class="table"><table><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>branchId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The ID of the branch, in the form of <code>a_b</code> where <code>a</code> is the <code>parentNoteId</code> and <code>b</code> is the <code>noteId</code>.</td></tr><tr><th><code>noteId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The ID of the <a href="notes.md">note</a>.</td></tr><tr><th><code>parentNoteId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The ID of the parent <a href="notes.md">note</a> the note belongs to.</td></tr><tr><th><code>notePosition</code></th><td>Integer</td><td>Non-null</td><td>&nbsp;</td><td>The position of the branch within the same level of hierarchy, the value is usually a multiple of 10.</td></tr><tr><th><code>prefix</code></th><td>Text</td><td>Nullable</td><td>&nbsp;</td><td>The <a href="../Branch%20prefixes.md">branch prefix</a> if any, or <code>NULL</code> otherwise.</td></tr><tr><th><code>isExpanded</code></th><td>Integer</td><td>Non-null</td><td>0</td><td>Whether the branch should appear expanded (its children shown) to the user.</td></tr><tr><th><code>isDeleted</code></th><td>Integer</td><td>Non-null</td><td>0</td><td><code>1</code> if the entity is <a href="../Deleted%20notes.md">deleted</a>, <code>0</code> otherwise.</td></tr><tr><th><code>deleteId</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td>&nbsp;</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,2 @@
# entity_changes
<figure class="table"><table><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>id</code></th><td>Integer</td><td>Nullable</td><td>&nbsp;</td><td>A sequential numeric index of the entity change.</td></tr><tr><th><code>entityName</code></th><td>Text</td><td>Nullable</td><td>&nbsp;</td><td>The type of entity being changed (<code>attributes</code>, <code>branches</code>, <code>note_reordering</code>, etc.)</td></tr><tr><th><code>entityId</code></th><td>Text</td><td>Nullable</td><td>&nbsp;</td><td>The ID of the entity being changed.</td></tr><tr><th><code>hash</code></th><td>Text</td><td>Nullable</td><td>&nbsp;</td><td>TODO: Describe how the hash is calculated</td></tr><tr><th><code>isErased</code></th><td>Integer</td><td>Nullable</td><td>&nbsp;</td><td>TODO: What does this do?</td></tr><tr><th><code>changeId</code></th><td>Text</td><td>Nullable</td><td>&nbsp;</td><td>TODO: What does this do?</td></tr><tr><th><code>componentId</code></th><td>Text</td><td>Nullable</td><td>&nbsp;</td><td>TODO: What does this do?</td></tr><tr><th><code>instanceId</code></th><td>Text</td><td>Nullable</td><td>&nbsp;</td><td>TODO: What does this do?</td></tr><tr><th><code>isSynced</code></th><td>Integer</td><td>Nullable</td><td>&nbsp;</td><td>TODO: What does this do?</td></tr><tr><th><code>utcDateChanged</code></th><td>Text</td><td>Nullable</td><td>&nbsp;</td><td>Date of the entity change in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,2 @@
# etapi_tokens
<figure class="table"><table><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>etapiTokenId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>A unique ID of the token (e.g. <code>aHmLr5BywvfJ</code>).</td></tr><tr><th><code>name</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The name of the token, as is set by the user.</td></tr><tr><th><code>tokenHash</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The token itself.</td></tr><tr><th><code>utcDateCreated</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Creation date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr><tr><th><code>isDeleted</code></th><td>Integer</td><td>Non-null</td><td>0</td><td><code>1</code> if the entity is <a href="../Deleted%20notes.md">deleted</a>, <code>0</code> otherwise.</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,2 @@
# notes
<figure class="table"><table><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>noteId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The unique ID of the note (e.g. <code>2LJrKqIhr0Pe</code>).</td></tr><tr><th><code>title</code></th><td>Text</td><td>Non-null</td><td><code>"note"</code></td><td>The title of the note, as defined by the user.</td></tr><tr><th><code>isProtected</code></th><td>Integer</td><td>Non-null</td><td>0</td><td><code>1</code> if the entity is <a href="../Protected%20entities.md">protected</a>, <code>0</code> otherwise.</td></tr><tr><th><code>type</code></th><td>Text</td><td>Non-null</td><td><code>"text"</code></td><td>The type of note (i.e. <code>text</code>, <code>file</code>, <code>code</code>, <code>relationMap</code>, <code>mermaid</code>, <code>canvas</code>).</td></tr><tr><th><code>mime</code></th><td>Text</td><td>Non-null</td><td><code>"text/html"</code></td><td>The MIME type of the note (e.g. <code>text/html</code>).. Note that it can be an empty string in some circumstances, but not null.</td></tr><tr><th><code>isDeleted</code></th><td>Integer</td><td>Nullable</td><td>0</td><td><code>1</code> if the entity is <a href="../Deleted%20notes.md">deleted</a>, <code>0</code> otherwise.</td></tr><tr><th><code>deleteId</code></th><td>Text</td><td>Non-null</td><td><code>null</code></td><td>&nbsp;</td></tr><tr><th><code>dateCreated</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Localized creation date (e.g. <code>2023-11-08 18:43:44.204+0200</code>)</td></tr><tr><th><code>dateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Localized modification date (e.g. <code>2023-11-08 18:43:44.204+0200</code>)</td></tr><tr><th><code>utcDateCreated</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Creation date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr><tr><th><code>blobId</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td>The corresponding ID from&nbsp;<a class="reference-link" href="blobs.md">blobs</a>. Although it can theoretically be <code>NULL</code>, haven't found any such note yet.</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,2 @@
# options
<figure class="table"><table><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>name</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The name of option (e.g. <code>maxContentWidth</code>)</td></tr><tr><th><code>value</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The value of the option.</td></tr><tr><th><code>isSynced</code></th><td>Integer</td><td>Non-null</td><td>0</td><td><code>0</code> if the option is not synchronized and thus can differ between clients, <code>1</code> if the option is synchronized.</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,2 @@
# recent_notes
<figure class="table"><table><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>noteId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Unique ID of the note (e.g. <code>yRRTLlqTbGoZ</code>).</td></tr><tr><th><code>notePath</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The path (IDs) to the <a href="notes.md">note</a> from root to the note itself, separated by slashes.</td></tr><tr><th><code>utcDateCreated</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Creation date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,2 @@
# revisions
<figure class="table"><table><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>revisionId</code></th><td>TextText</td><td>Non-null</td><td>&nbsp;</td><td>Unique ID of the revision (e.g. <code>0GjgUqnEudI8</code>).</td></tr><tr><th><code>noteId</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>ID of the <a href="notes.md">note</a> this revision belongs to.</td></tr><tr><th><code>type</code></th><td>Text</td><td>Non-null</td><td><code>""</code></td><td>The type of note (i.e. <code>text</code>, <code>file</code>, <code>code</code>, <code>relationMap</code>, <code>mermaid</code>, <code>canvas</code>).</td></tr><tr><th><code>mime</code></th><td>Text</td><td>Non-null</td><td><code>""</code></td><td>The MIME type of the note (e.g. <code>text/html</code>).</td></tr><tr><th><code>title</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>The title of the note, as defined by the user.</td></tr><tr><th><code>isProtected</code></th><td>Integer</td><td>Non-null</td><td>0</td><td><code>1</code> if the entity is <a href="../Protected%20entities.md">protected</a>, <code>0</code> otherwise.</td></tr><tr><th><code>blobId</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td>The corresponding ID from&nbsp;<a class="reference-link" href="blobs.md">blobs</a>. Although it can theoretically be <code>NULL</code>, haven't found any such note yet.</td></tr><tr><th><code>utcDateLastEdited</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td><strong>Not sure how it differs from modification date.</strong></td></tr><tr><th><code>utcDateCreated</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Creation date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr><tr><th><code>dateLastEdited</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td><strong>Not sure how it differs from modification date.</strong></td></tr><tr><th><code>dateCreated</code></th><td>Text</td><td>Non-null</td><td>&nbsp;</td><td>Localized creatino date (e.g. <code>2023-08-12 15:10:04.045+0300</code>)</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,19 @@
# Demo document
The demo document is an exported .zip that resides in `db/demo.zip`.
During on-boarding, if the user selects that they are a new user then the `demo.zip` is imported into the root note.
## Modifying the document
On a dev server, remove all your existing notes in order to ensure a clean setup. Right click → Import to note and select the .zip file in `db/demo.zip`. Make sure to disable “Safe import”.
After making the necessary modifications, simply export the “Trilium Demo” note as “HTML in ZIP archive” and replace `db/demo.zip` with the newly exported one.
## Testing the changes
```
rm -r data
npm run start-server
```
And then do the on-boarding again.

View File

@@ -0,0 +1,18 @@
# Docker
To run a Docker build:
```
./bin/builder-docker.sh
```
To run the built Docker image:
```
sudo docker run -p 8081:8080 triliumnext/notes:v0.90.6-beta
```
To enter a shell in the Docker container:
```
sudo docker run -it --entrypoint=/bin/sh zadam/trilium:0.63-latest
```

View File

@@ -0,0 +1,6 @@
# Hidden notes
## Disallow adding child notes
1. To enforce at server level go to `services/notes.ts` and look for the `getAndValidateParent` method.  Look for the `params.ignoreForbiddenParents` if statement and add it there.
2. To hide the plus button in the note tree, go to `widgets/note_tree` in the client and look for `enhanceTitle`. Look for the if statement which starts with `!["search", "launcher"].includes(note.type)`.
3. To disable it from the contextual menu, go to `tree_context_menu` and look for the `getMenuItems` method. There look for the `insertNoteAfter` and `insertChildNote` actions and look at their `enabled` conditions. If adding a big note type with lots of child notes, see the pattern of optinos & help (rename and augment the `notOptionsOrHelp` variable.

View File

@@ -0,0 +1,26 @@
# Icons
Icons are stored in `images` and in `images/app-icons`.
## Favicon
The favicon is served dynamically via `serve-favicon`, using the icon in `images/app-icons/win/icon.ico`.
## Declarative generation of icons
All the icons are now built off of the SVGs in the `images` directory using the `bin/create-icons.sh` script.
## Main images
These are stored in `images`:
<figure class="table"><table><thead><tr><th>Name</th><th>Resolution</th><th>Description</th></tr></thead><tbody><tr><td><code>icon-black.svg</code></td><td>53x40</td><td>Used by the global menu button when not hovered.</td></tr><tr><td><code>icon-color.svg</code></td><td>53x40</td><td>Used by the global menu when hovered.</td></tr><tr><td><code>icon-grey.svg</code></td><td>53x40</td><td>Used by the dark theme, in place of <code>icon-black.svg</code>.</td></tr></tbody></table></figure>
## App icons
<figure class="table"><table><thead><tr><th>Name</th><th>Resolution</th><th>Description</th></tr></thead><tbody><tr><td><code>ios/apple-touch-icon.png</code></td><td>180x180</td><td>Used as <code>apple-touch-icon</code>, but only in <code>login.ejs</code> and <code>set_password.ejs</code> for some reason.</td></tr><tr><td><code>mac/icon.icns</code></td><td>512x512</td><td>Provided as <code>--icon</code> to <code>electron-packager</code> for <code>mac-arm64</code> and <code>mac-x64</code> <a href="../Building%20and%20deployment/Build%20deliveries%20locally.md">builds</a>.</td></tr><tr><td><code>png/128x128.png</code></td><td>128x128</td><td>Used in <code>linux-x64</code> <a href="../Building%20and%20deployment/Build%20deliveries%20locally.md">build</a>, to provide an <code>icon.png</code>.</td></tr><tr><td><code>png/256x256-dev.png</code></td><td>256x256</td><td>Used by the Electron window icon, if in dev mode.</td></tr><tr><td><code>png/256x256.png</code></td><td>Used by the Electron window icon, if not in dev mode.</td></tr><tr><td><code>win/icon.ico</code></td><td><ul><li>ICO 16x16</li><li>ICO 32x32</li><li>ICO 48x48</li><li>ICO 64x64</li><li>ICO 128x128</li><li>PNG 256x256</li></ul></td><td><ul><li>Used by the <code>win-x64</code> <a href="../Building%20and%20deployment/Build%20deliveries%20locally.md">build</a>.</li><li>Used by Squirrel Windows installer for: setup icon, app icon, control panel icon</li><li>Used as the favicon.</li></ul></td></tr><tr><td><code>win/setup-banner.gif</code></td><td>640x480</td><td>Used by the Squirrel Windows installer during the installation process. Has only one frame.</td></tr></tbody></table></figure>
## Additional locations where the branding is used
* In the client, more specifically in `src/public/app/widgets/buttons/global_menu.js`, where the SVG content of the icon is directly embedded to allow styling via CSS.
* In the <a class="reference-link" href="Demo%20document.md">Demo document</a>, as an attachment.
* In the <a class="reference-link" href="#root/OeKBfN6JbMIq/MF99QFRe1gVy/xkj1bqW7zJwQ/t6mT72MfEzb2">CKEditor</a> build, look for `packages/ckeditor5-build-balloon-block/src/icons/trilium.svg`. Make sure not to have any `fill` overrides in the SVG as the wrong color will be used.

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

View File

@@ -0,0 +1,8 @@
# Icons on Mac
Looks great in Finder:
<figure class="image"><img src="Icons on Mac_image.png"></figure>
Looks great in Dock:
<figure class="image"><img src="1_Icons on Mac_image.png"></figure>

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

View File

@@ -0,0 +1,6 @@
# Adaptive icon
<figure class="table" style="width:100%;"><table class="ck-table-resized"><colgroup><col> <col></colgroup><tbody><tr><th>Before</th><td><figure class="image"><img src="1_Adaptive icon_image.png"></figure></td></tr><tr><th>After</th><td><figure class="image"><img src="6_Adaptive icon_image.png"></figure></td></tr><tr><th>With new scale</th><td><figure class="image"><img src="4_Adaptive icon_image.png"></figure></td></tr></tbody></table></figure>
## Scale
<figure class="table" style="width:300px;"><table><tbody><tr><th>0.9</th><td style="background-color:hsl(0, 0%, 90%)"><figure class="image"><img src="2_Adaptive icon_image.png"></figure></td></tr><tr><th>0.85</th><td style="background-color:hsl(0, 0%, 90%);"><figure class="image"><img src="5_Adaptive icon_image.png"></figure></td></tr><tr><th>0.8</th><td style="background-color:hsl(0, 0%, 90%);"><figure class="image"><img src="Adaptive icon_image.png"></figure></td></tr><tr><th>0.75</th><td style="background-color:hsl(0, 0%, 90%);"><figure class="image"><img src="3_Adaptive icon_image.png"></figure></td></tr></tbody></table></figure>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -0,0 +1,50 @@
# Slightly blurry icon on Mac
Slightly blurry in extended preview on Mac
<figure class="image"><img src="1_Slightly blurry icon on Ma.png"></figure>
In the screenshot, the icon is around 650px whereas the closest image we have is 512px, so that might explain the blur. Adding an `ic10` (`1024x1024`, aka `512x512@2x` to see what happens).
Before:
```
File: ../images/app-icons/mac/icon.icns
ic09: 62069 bytes, png: 512x512
```
After:
```
File: ../images/app-icons/mac/icon.icns
icp4: 1140 bytes, png: 16x16
icp5: 1868 bytes, png: 32x32
ic07: 9520 bytes, png: 128x128
ic09: 62069 bytes, png: 512x512
ic10: 180442 bytes, png: 512x512@2x
```
Even with a 1024x1024 icon, the image is still blurry.
Comparing the `.icns` file from the Electron build reveals that the `.icns` file has been tampered with:
<figure class="table"><table><thead><tr><th>The <code>electron.icns</code> from the resulting build</th><th>The icon source</th></tr></thead><tbody><tr><td><pre><code class="language-text-plain">File: images/app-icons/mac/electron.icns
icp4: 1140 bytes, png: 16x16
icp5: 1868 bytes, png: 32x32
ic07: 9520 bytes, png: 128x128
ic09: 62069 bytes, png: 512x512
ic10: 180442 bytes, png: 512x512@2x</code></pre></td><td><pre><code class="language-text-plain">File: images/app-icons/mac/icon.icns
icp4: 1648 bytes, png: 16x16
icp5: 4364 bytes, png: 32x32
ic07: 26273 bytes, png: 128x128
ic09: 206192 bytes, png: 512x512
ic10: 716034 bytes, png: 512x512@2x</code></pre></td></tr></tbody></table></figure>
The bluriness might come from the image itself: [https://stackoverflow.com/questions/54030521/convert-svg-to-png-with-sharp-edges](https://stackoverflow.com/questions/54030521/convert-svg-to-png-with-sharp-edges) 
Rendering with Inkscape (left) vs ImageMagick (right):
<figure class="image"><img src="2_Slightly blurry icon on Ma.png"></figure>
Now in macOS it's also rendering quite nicely:
<figure class="image"><img src="Slightly blurry icon on Ma.png"></figure>

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 KiB

View File

@@ -0,0 +1,12 @@
# Removed icons
The following icons were removed:
## Main images
These are stored in `images`:
<figure class="table"><table><thead><tr><th>Name</th><th>Resolution</th><th>Description</th></tr></thead><tbody><tr><td><code>icon-black.png</code></td><td>36x36</td><td>Does not appear to be used.</td></tr><tr><td><code>icon-color.png</code></td><td>36x36</td><td>Used only by some tests in <code>test-etapi</code>.</td></tr><tr><td><code>icon-grey.png</code></td><td>36x36</td><td>Does not appear to be used.</td></tr><tr><td><code>icon.svg</code></td><td>210x297</td><td>Does not appear to be used.</td></tr></tbody></table></figure>
## App icons
<figure class="table"><table><thead><tr><th>Name</th><th>Resolution</th><th>Description</th></tr></thead><tbody><tr><td><code>png/16x16-bw.png</code></td><td>16x16</td><td>Do not appear to be used.</td></tr><tr><td><code>png/16x16.png</code></td></tr><tr><td><code>png/24x24.png</code></td><td>24x24</td></tr><tr><td><code>png/32x32.png</code></td><td>32x32</td></tr><tr><td><code>png/48x48.png</code></td><td>48x48</td></tr><tr><td><code>png/64x64.png</code></td><td>64x64</td></tr><tr><td><code>png/96x96.png</code></td><td>96x96</td></tr><tr><td><code>png/512x512.png</code></td><td>512x512</td><td>Does not appear to be used.</td></tr><tr><td><code>win/setup-banner.xcf</code></td><td>&nbsp;</td><td>GIMP source for <code>win/setup-banner.gif</code>. Provided only for future editing.</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,94 @@
# Internationalisation / Translations
During the initial development of Trilium Notes, internationalisation was not considered as it was meant to be an English-only product.
As the application and the user base grows, it makes sense to be able to reach out as many people as possible by providing translations in their native language.
The library used is [i18next](https://www.i18next.com/).
## Where are the translations?
The translations are formatted as JSON files and they are located in `src/public/translations`. For every supported locale, there is a subdirectory in which there is a `translation.json` file (e.g. `src/public/translations/en/translation.json`).
### Message keys
One important aspect is the fact that we are using a key-based approach. This means that each message is identified by an ID rather than a natural-language message (such as the default approach in gettext).
The key-based approach allows a hierarchical structure. For example, a key of `about.title` would be added in `translation.json` as follows:
```json
{
"about": {
"title": "About TriliumNext Notes"
}
}
```
Follow the <a class="reference-link" href="Internationalisation%20%20Translations/Guidelines.md">Guidelines</a> when creating a new message.
### Adding a new locale
To add a new locale, go to `src/public/translations` with your favorite text editor and copy the `en` directory.
Rename the copy to the ISO code (e.g. `fr`, `ro`) of the language being translated.
Translations with a country-language combination, using their corresponding ISO code (e.g. `fr_FR`, `fr_BE`), has not been tested yet.
### Changing the language
Since the internationalisation process is in its early stages, there is no user-facing way to switch the language.
To change the language manually, edit `src/public/app/services/i18n.js` and look for the line containing `lng: "en"`. Replace `en` with the desired language code (from the ones available in `src/public/translations`).
## Client-side translations
### Component-level translations
Most of the client translations are present in the various widgets and layouts.
Translation support has to be added manually for every file.
The first step is to add the translation import with a relative import. For example, if we are in the `src/public/app/widgets/dialogs` directory, the import would look as follows:
```javascript
import { t } from "../../services/i18n.js";
```
Afterwards, simply replace the hard-coded message with:
```javascript
${t("msgid")}
```
where `msgid` is the key of the message being translated.
### Variables
In the translation, enclose the variables with `{{` and `}}`:
```
{
"key": "{{what}} is {{how}}"
}
```
Then pass the arguments when reading the translation:
```
t('key', { what: 'i18next', how: 'great' })
```
### Template-level translations
Templates are `.ejs` files present in `src/views`, these are used to prepare the root layout for desktop, mobile applications as well as setup (onboarding) and the shared notes view.
Due to using a different approach, it is not possible yet to translate those files.
## Server-side translations
Currently the server-side messages are not translatable. They will be added as a separate step.
## Locale/language selection
The language is stored as an option which is synchronized across all devices and the user is able to adjust it via Options → Appearance → Locale.
The options shown to the user are currently hard-coded in `src/routes/api/options.ts`, where there is a `getSupportedLocales()` function. The `id` field must match the corresponding directory in `src/public/translations` and the `name` must be the localized name of the language (so the name must be in that language, not in English).

View File

@@ -0,0 +1,9 @@
# Guidelines
* Use hierarchy whenever appropriate, try to group the messages by:
* Modals (e.g. `about.foo`, `jump_to_note.foo`)
* Don't duplicate messages that are very widely used.
* One such example is `aria-label="Close"` which should go to a single message such as `modal.close` instead of being duplicated in every modal.
* On the other hand, don't overly generalise messages. A `close` message that is used whenever the “Close” word is encountered is not a good approach since it can potentially cause issues due to lack of context.
* Use [variable interpolation](https://www.i18next.com/translation-function/interpolation) whenever appropriate.
* If you see multiple messages joined together only to apply add a variable such as a user-inputted value, try to join those messages together into a single message containing a variable.
* So instead of `“Number of updates: “ + numUpdates + “.”` use `$(t("number_updates", { numUpdates }))` where the message translation would appear as `Number of updates: {{numUpdates}}.`

View File

@@ -0,0 +1,19 @@
# Server translations
* Server-side translations are managed by the same library as the client, i18next.
* The translation files reside in the `/translations` directory, following the same convention as the client (`translations/{{lng}}/{{ns}}.json`), where the namespace is `server.json`. So for the Spanish translations we have `translations/es/server.json`.
* Loading of translations is managed by [i18next-fs-backend](https://github.com/i18next/i18next-fs-backend) which loads the translations directly from the file system (unlike HTTP requests like the client), at the path mentioned previously (relative to `package.json`).
## How to translate a string
Unlike the client which uses a dedicated client service, the i18next library on the server is used directly, as such:
```javascript
import { t } from "i18next";
const translatedString = t("message.id");
```
## What should be translated
* Avoid translating server-side logs, as those are supposed to be for debugging and as such there is no benefit in translating them.
* Translate any user-facing message that comes from the server, such as error messages shown in the Electron application, or information such as keyboard shortcuts, note titles, etc.

View File

@@ -0,0 +1,15 @@
# i18n-ally
[`i18n-ally`](https://github.com/lokalise/i18n-ally) is a VS Code extension that aids in internationalization.
It is currently integrated in the project and offers features such as:
* Highlight, autocomplete translations.
* Display translations inline.
* Extract messages into translation.
### Extracting messages into translation
1. Open any .js file and select an untranslated string inside a template (`TPL`).
2. Press Ctrl+P and look for “i18n Ally: Extract text into i18n messages”
3. Select the first template.
4. Select the path of translation, taking into consideration the  <a class="reference-link" href="Guidelines.md">Guidelines</a> (e.g. `jump_to_note.search-for-note-by-its-name`).

View File

@@ -0,0 +1,13 @@
# Launchers
Launchers are items that are displayed in the launcher bar (left side of the screen). They are of two different types:
* Visible launchers: are displayed by default to the user, can be moved to the available launchers section to hide them.
* Available launchers: can be manually added by the user from settings into the list of visible launchers.
## Adding a new launcher
Regardless of the type, new launchers are added at server level, inside `hidden_subtree.ts` file.
* To add a new available launcher, look for `_lbAvailableLaunchers` and add a new item to its `children`.
* Similarly, to add a visible launcher, look for `_lbVisibleLaunchers`.
* If you add a visible launcher, it will be available for both new and old users, since the application will identify that there is a new launcher to be added regardless of the user preference.

View File

@@ -0,0 +1,20 @@
# Live reload
## Server live reload
If running the server using `npm run start-server`, the server will watch for changes in `src/public` and trigger a frontend reload if that occurs.
## Electron live reload
Similarly, `npm run start-electron` supports live refresh  as well.
However, a core difference is that Electron watches `dist/src/public` instead of `src/public` since Electron runs on its own copy of the files.
To ameliorate that, a separate watch script has been implemented which automatically copies files from `src/public` to `dist/src/public` whenever a change is detected. To run it:
```
npm run
```
## Technical details
* This mechanism is managed at server level by watching for changes in`services/ws.ts`.

View File

@@ -0,0 +1,30 @@
# Note types
The note type is defined by the `type` column in <a class="reference-link" href="Database/notes.md">notes</a>.
Possible types:
<figure class="table" style="width:100%;"><table class="ck-table-resized"><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Note Type</th><th><code>type</code> value</th><th>Corresponding MIME type</th><th>Content of the note's blob</th><th>Relevant attributes</th></tr></thead><tbody><tr><th>Text</th><td><code>text</code></td><td>&nbsp;</td><td>The HTML of the note.</td><td>&nbsp;</td></tr><tr><th><a href="https://github.com/zadam/trilium/wiki/Relation-map">Relation Map&nbsp;</a></th><td><code>relationMap</code></td><td><code>application/json</code></td><td><p>A JSON describing the note:</p><pre><code class="language-text-plain">{
"notes": [
{
"noteId": "gFQDL11KEm9G",
"x": 142,
"y": 405
},
{
"noteId": "8GcjEKyrrCgl",
"x": 100.10406374385552,
"y": 757.0364424520196
}
],
"transform": {
"scale": 0.3,
"x": 480.29766098682165,
"y": 116.83892021963081
}
}</code></pre></td><td>None</td></tr><tr><th><a href="https://github.com/zadam/trilium/wiki/Scripts">Render Note</a></th><td><code>render</code></td><td><code>text/html</code> or blank.</td><td>An empty blob.</td><td><code>~renderNote</code> pointing to the HTML note to render.</td></tr><tr><th>Canvas</th><td><code>canvas</code></td><td><code>application/json</code></td><td><pre><code class="language-text-plain">{
"appState": {},
"elemenets": {},
"files": {},
"type": "excalidraw",
"version": 2
}</code></pre></td><td>None</td></tr><tr><th>Mermaid Diagram</th><td><code>mermaid</code></td><td><code>text/mermaid</code> or <code>text/plain</code></td><td>The plain text content of the Mermaid diagram.</td><td>None</td></tr><tr><th>Book</th><td><code>book</code></td><td><code>text/html</code> or blank.</td><td>An empty blob.</td><td><ul><li><code>#viewType</code> which can be either <code>grid</code> or <code>list</code>.</li><li><code>#expanded</code></li></ul><p>both options are shown to the user via the “Book Properties” ribbon widget.</p></td></tr><tr><th>Web View</th><td><code>webView</code></td><td>blank</td><td>An empty blob.</td><td><code>#webViewSrc</code> pointing to an URL to render.</td></tr><tr><th>Code</th><td><code>code</code></td><td>Depends on the language (e.g. <code>text/plain</code>, <code>text/x-markdown</code>, <code>text/x-c++src</code>).</td><td>The plain text content.</td><td>&nbsp;</td></tr></tbody></table></figure>

View File

@@ -0,0 +1,14 @@
# Options
## Read an option
Add the import to the service (make sure the relative path is correct):
```javascript
import options from "../../services/options.js";
```
Them simply read the option:
```javascript
this.firstDayOfWeek = options.getInt("firstDayOfWeek");
```

View File

@@ -0,0 +1,37 @@
# Check box option
In the TPL:
```
<div class="options-section">
<h4>Background effects</h4>
<p>On the desktop application, it's possible to use a semi-transparent background tinted in the colors of the user's wallpaper to add a touch of color.</p>
<div class="col-6 side-checkbox">
<label class="form-check">
<input type="checkbox" class="background-effects form-check-input" />
Enable background effects (Windows 11 only)
</label>
</div>
</div>
```
In `doRender()`:
```
doRender() {
this.$backgroundEffects = this.$widget.find("input.background-effects");
this.$backgroundEffects.on("change", () => this.updateCheckboxOption("backgroundEffects", this.$backgroundEffects));
}
```
In `optionsLoaded(options)`:
```
async optionsLoaded(options) {
this.setCheckboxState(this.$backgroundEffects, options.backgroundEffects);
}
```

View File

@@ -0,0 +1,5 @@
# Creating a new option
1. Go to `options_interface.ts` and add the option to `OptionDefinitions`, specifying its intended data type (boolean, string, number). Note that in the end the option will still be stored as a string, but this aids in type safety across the application.
2. To add a new option with a set default, go to `options_init.ts` in the server and add a new entry in the `defaultOptions`.
3. **Make the option adjustable by the client**
By default options are not adjustable or visible to the client. To do so, modify `routes/api/options.ts` to add the newly added option to `ALLOWED_OPTIONS`.

View File

@@ -0,0 +1,36 @@
# Displaying the option in settings
Go to `src/public/app/widgets/type_widgets/options` and select a corresponding category, such as `appearance` and edit one of the JS files.
For example, to create a select:
First, modify the template (`TPL`), to add the new widget:
```
<div class="col-6">
<label>First day of the week</label>
<select class="first-day-of-week-select form-control">
<option value="0">Sunday</option>
<option value="1">Monday</option>
</select>
</div>
```
Secondly, create a reference to the new element in `doRender()`:
```
this.$firstDayOfWeek = this.$widget.find(".first-day-of-week-select");
```
Then in `optionsLoaded` adjust the value to the one set in the database:
```
this.$firstDayOfWeek.val(options.firstDayOfWeek);
```
To actually update the option, add a listener in `doRender`:
```
this.$firstDayOfWeek.on("change", () => {
this.updateOption("firstDayOfWeek", this.$firstDayOfWeek.val());
});
```

View File

@@ -0,0 +1,10 @@
# Refresh widget with option change
To make a widget react to a change of a given option, simply add the following to the widget:
```javascript
async entitiesReloadedEvent({loadResults}) {
if (loadResults.getOptionNames().includes("firstDayOfWeek")) {
// Do something.
}
}
```

View File

@@ -0,0 +1,12 @@
# Trigger UI refresh
Call `utils.reloadFrontendApp`, but make sure to wait for the option to be saved first.
```
this.$backgroundEffects.on("change", async () => {
await this.updateCheckboxOption("backgroundEffects", this.$backgroundEffects);
utils.reloadFrontendApp("background effect change");
});
```

View File

@@ -0,0 +1,15 @@
# Printing
Note printing is handled by `note_detail.js`, in the `printActiveNoteEvent` method.
The application uses the [`print-this`](https://www.npmjs.com/package/print-this) library to isolate `.note-detail-printable:visible` and prepare it for printing.
Some scripts like KaTeX are manually injected in the footer, and the CSS to be used is manually defined. The most important one is `print.css`.
## Syntax highlighting
Syntax highlighting for code blocks is supported as well:
* It works by injecting a Highlight.js stylesheet into the print.
* The theme used is hard-coded (the _Visual Studio Light theme_, at the time of writing) in order not to have a dark background in print.
* The Highlight.js library is not needed since the `.note-detail-printable` which is rendered already has the `.hljs` classes added to it in order to achieve the syntax highlighting.
* The user's choice of whether to enable syntax highlighting is also respected.

View File

@@ -0,0 +1,6 @@
# Protected entities
The following entities can be made protected, via their `isProtected` flag:
* <a class="reference-link" href="Database/attachments.md">attachments</a>
* <a class="reference-link" href="Database/notes.md">notes</a>
* <a class="reference-link" href="Database/revisions.md">revisions</a>

View File

@@ -0,0 +1,11 @@
# Safe mode
Safe mode is triggered by setting the `TRILIUM_SAFE_MODE` environment variable to a truthy value, usually `1`.
In each artifact there is a `trilium-safe-mode.sh` (or `.bat`) script to enable it.
What it does:
* Disables `customWidget` launcher types in `app/widgets/containers/launcher.js`.
* Disables the running of `mobileStartup` or `frontendStartup` scripts.
* Displays the root note instead of the previously saved session.
* Disables the running of `backendStartup`, `hourly`, `daily` scripts and checks for the hidden subtree.

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