Compare commits

...

478 Commits

Author SHA1 Message Date
Elian Doran
3b67fd7f4e chore(ci): add playwright testing to the server 2025-11-10 16:21:22 +02:00
Elian Doran
c7369bc9b3 fix(print): copy to clipboard button visible 2025-11-10 14:26:24 +02:00
Adorian Doran
b741662fde style/empty note: fix alignment 2025-11-10 14:17:49 +02:00
Adorian Doran
624610b17c close #7668 2025-11-10 14:17:44 +02:00
Adorian Doran
de004bd8ba fix #7667 2025-11-10 14:17:37 +02:00
Elian Doran
06eb30c69d chore(release): prepare for v0.99.4 2025-11-09 21:29:21 +02:00
Elian Doran
b9b5c13d9c fix(client): ribbon adapter not working 2025-11-09 21:14:28 +02:00
Elian Doran
8e697d0578 fix(ribbon): not dismissing active tab after change 2025-11-09 20:17:13 +02:00
Elian Doran
6f245ec8d5 fix(ribbon): not refreshing if note is temporarily edited 2025-11-09 20:15:06 +02:00
Elian Doran
532df6559a fix(ribbon): formatting toolbar displayed in read-only notes 2025-11-09 20:15:06 +02:00
Adorian Doran
8589f7f164 style/note list widget: fix broken CSS selector 2025-11-09 19:50:48 +02:00
Adorian Doran
4eadf40e20 Merge branch 'main' of https://github.com/TriliumNext/Trilium 2025-11-09 19:35:59 +02:00
Adorian Doran
7b9303b392 style/zen mode: do not show an empty toolbar container when the toolbar is not actually available 2025-11-09 19:35:47 +02:00
Elian Doran
521152ec0e Translations update from Hosted Weblate (#7661) 2025-11-09 17:50:54 +02:00
Hosted Weblate
2ff746253d Update translation files
Updated by "Cleanup translation files" add-on in Weblate.

Translation: Trilium Notes/README
Translate-URL: https://hosted.weblate.org/projects/trilium/readme/
2025-11-09 16:39:21 +01:00
Elian Doran
c270aef738 Translations update from Hosted Weblate (#7660) 2025-11-09 17:39:06 +02:00
Sir-Ivysaur
d0881c09ed Translated using Weblate (Indonesian)
Currently translated at 1.9% (3 of 152 strings)

Translation: Trilium Notes/Website
Translate-URL: https://hosted.weblate.org/projects/trilium/website/id/
2025-11-09 16:15:11 +01:00
Adorian Doran
b905c1d03a style: different appearance tweaks 2025-11-09 17:10:23 +02:00
Adorian Doran
f03448bae4 style/gutter: tweak color on horizontal layout when background effects are enabled 2025-11-09 16:32:32 +02:00
Adorian Doran
f8ac09df38 style/right pane: tweak appearance 2025-11-09 16:16:37 +02:00
Adorian Doran
15c329c331 style/scrolling container widget: fix CSS selector 2025-11-09 15:51:29 +02:00
Adorian Doran
f6afc0b718 style/scrolling container widget: improve full-height widget handling 2025-11-09 15:46:57 +02:00
Adorian Doran
ecfa333491 style/note cards: remove shadow 2025-11-09 14:47:31 +02:00
Adorian Doran
21b0ef9554 style/note cards: improve style, remove no longer unused CSS variables 2025-11-09 14:43:59 +02:00
Adorian Doran
2f3be96dff style/info bar: improve style 2025-11-09 14:17:04 +02:00
Adorian Doran
4ba7907bee client/content header container: fix parent detection 2025-11-09 14:07:27 +02:00
Elian Doran
afa92551ea fix(tree): type issues & error if active node is empty 2025-11-09 11:16:35 +02:00
Elian Doran
cc0646e79c style(next): remove alignment of last toolbar group 2025-11-09 10:35:03 +02:00
Elian Doran
4c8f20be9a ignore toggle tray command if tray is disabled (#7654) 2025-11-09 09:45:37 +02:00
Elian Doran
3407528c03 chore(deps): update softprops/action-gh-release action to v2.4.2 (#7657) 2025-11-09 09:44:45 +02:00
Elian Doran
70575a00cb Translations update from Hosted Weblate (#7656) 2025-11-09 09:34:41 +02:00
renovate[bot]
74ba4b9ee5 chore(deps): update softprops/action-gh-release action to v2.4.2 2025-11-09 00:42:36 +00:00
Francis C.
706abeb307 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (1621 of 1621 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/zh_Hant/
2025-11-09 01:41:35 +01:00
Francis C.
7158c48831 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (1621 of 1621 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/zh_Hans/
2025-11-09 01:41:35 +01:00
Adorian Doran
78e2814068 UI improvements (#7655) 2025-11-09 02:41:20 +02:00
Adorian Doran
7659224e3a style/read-only note info bar: fix zen mode appearance 2025-11-09 02:26:37 +02:00
Adorian Doran
baff349fa2 client: refactor 2025-11-09 02:23:57 +02:00
Adorian Doran
50869d29db client/shared note info bar: improve appearance 2025-11-09 02:14:43 +02:00
Adorian Doran
c4603fce25 client/shared note message: convert to an info bar 2025-11-09 01:56:52 +02:00
Adorian Doran
220aab2b76 client/read-only note info bar: refactor 2025-11-09 01:35:33 +02:00
Adorian Doran
285a7253e3 client: make the info bar part of the scrollable content, prevent overlapping with the floating buttons 2025-11-09 01:19:45 +02:00
Adorian Doran
d8d80ed936 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-11-08 21:25:39 +02:00
Elian Doran
3463cb83a0 fix(collections/board): cloned notes appearing twice (closes #6786) 2025-11-08 20:17:56 +02:00
Elian Doran
b0bd60b9a4 feat(collections/calendar): use formatting locale 2025-11-08 18:01:58 +02:00
contributor
3d70a0534b ignore toggle tray command if tray is disabled 2025-11-08 13:03:42 +02:00
Elian Doran
53805e9c49 fix(server/notes): images not saved on duplication (fixes #7471) 2025-11-08 11:27:18 +02:00
Elian Doran
0e95610d4e fix(server): attachments not copied for templates (closes #7612) 2025-11-08 11:18:03 +02:00
Elian Doran
051e2b4eef Send global shortcut to current window (#7645) 2025-11-08 08:31:17 +02:00
Elian Doran
1d750bde64 chore(deps): update dependency vite to v7.2.2 (#7647) 2025-11-08 08:28:13 +02:00
Elian Doran
4476615d33 fix(deps): update dependency marked to v16.4.2 (#7649) 2025-11-08 08:27:36 +02:00
Elian Doran
bbcc16daab fix(deps): update dependency i18next to v25.6.1 (#7648) 2025-11-08 08:27:05 +02:00
Elian Doran
457dd070c6 chore(deps): update dependency rcedit to v5 (#7651) 2025-11-08 08:26:05 +02:00
Elian Doran
ce229dd6f5 chore(deps): update dependency electron to v38.6.0 (#7650) 2025-11-08 08:22:22 +02:00
renovate[bot]
2e59d9d7bc chore(deps): update dependency rcedit to v5 2025-11-08 01:39:22 +00:00
renovate[bot]
bbe96c3967 chore(deps): update dependency electron to v38.6.0 2025-11-08 01:39:17 +00:00
renovate[bot]
d95eb9f5d3 fix(deps): update dependency marked to v16.4.2 2025-11-08 01:38:37 +00:00
renovate[bot]
d75279316a fix(deps): update dependency i18next to v25.6.1 2025-11-08 01:37:54 +00:00
renovate[bot]
7f6be13a18 chore(deps): update dependency vite to v7.2.2 2025-11-08 01:37:08 +00:00
Adorian Doran
2f74b40095 client/read only note info bar: refactor 2025-11-07 23:45:48 +02:00
Adorian Doran
a844e1faab client: fix typo 2025-11-07 21:19:11 +02:00
contributor
f629f564cd add reusable showAndFocusWindow function 2025-11-07 21:17:34 +02:00
contributor
9a5f2f8d3b make global shortcut work with windows in system tray 2025-11-07 21:17:34 +02:00
Adorian Doran
9bccc72668 client/options/keep content centered: simplify the inner workings 2025-11-07 21:15:51 +02:00
contributor
a29597a4bf add safety check to ensure electron window is not destroyed 2025-11-07 20:25:16 +02:00
contributor
44b34d1ea0 send global shortcut to current window, not the first one 2025-11-07 20:25:09 +02:00
Adorian Doran
c617c84d86 style/options: properly align cards when content centering is enabled 2025-11-07 19:02:59 +02:00
Adorian Doran
b38780755a client: add a CSS class to identify option splits 2025-11-07 19:01:50 +02:00
Adorian Doran
78a54fa9f7 client: refactor 2025-11-07 18:23:30 +02:00
Adorian Doran
fa64ca2c93 client: add an option to center the content 2025-11-07 18:17:28 +02:00
Elian Doran
71d7403690 feat(print): support CSS for collections too 2025-11-07 17:48:37 +02:00
Elian Doran
e4cd946ea8 docs(user): fix wrong page for documentation 2025-11-07 17:31:50 +02:00
Elian Doran
cedd1c4789 docs(user): document custom print CSS 2025-11-07 17:25:14 +02:00
Elian Doran
7a677cff5f feat(print): allow custom CSS (closes #7608) 2025-11-07 17:25:05 +02:00
Adorian Doran
2d03dd22e3 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-11-07 17:06:21 +02:00
Elian Doran
e28da416ba Translations update from Hosted Weblate (#7639) 2025-11-06 22:59:32 +02:00
green
28c0ef52f3 Translated using Weblate (Japanese)
Currently translated at 100.0% (1621 of 1621 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/ja/
2025-11-06 20:28:01 +01:00
Unknown
9464a64d64 Translated using Weblate (Spanish)
Currently translated at 99.7% (1617 of 1621 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/es/
2025-11-06 20:28:00 +01:00
SngAbc
c3af6a6aa2 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.7% (1617 of 1621 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/zh_Hans/
2025-11-06 20:28:00 +01:00
Elian Doran
a4281fe26f fix(deps): update ckeditor monorepo to v47.2.0 (#7634) 2025-11-06 09:04:07 +02:00
Adorian Doran
5c0d6e1fef style/alert bar: update message 2025-11-06 08:55:08 +02:00
Adorian Doran
23f1103822 style/alert bar: update message 2025-11-06 08:45:53 +02:00
renovate[bot]
b45ee6879c fix(deps): update ckeditor monorepo to v47.2.0 2025-11-06 06:34:53 +00:00
Elian Doran
a8116aa264 chore(deps): update dependency vite to v7.2.1 (#7633) 2025-11-06 08:31:51 +02:00
Elian Doran
db3960a23e fix(deps): update dependency mind-elixir to v5.3.5 (#7632) 2025-11-06 08:31:14 +02:00
Elian Doran
a43e08500e chore(deps): update dependency openai to v6.8.1 (#7631) 2025-11-06 08:30:45 +02:00
Adorian Doran
9011d648b5 client: refactor 2025-11-06 08:26:21 +02:00
Adorian Doran
30c1708979 style/alert bar: update the background color for the light color scheme 2025-11-06 08:15:59 +02:00
Adorian Doran
1a55d3433d client/floating buttons: hide the "Edit note" button for the moment 2025-11-06 08:08:56 +02:00
Adorian Doran
bec47c0bb2 client/note context menu: add "Edit note" for read-only notes 2025-11-06 07:49:57 +02:00
Adorian Doran
4fdb502a19 client: allow the isNoteReadOnly hook operate on a note and context other of the current one 2025-11-06 07:48:11 +02:00
renovate[bot]
e9ccd52fd5 chore(deps): update dependency vite to v7.2.1 2025-11-06 04:54:41 +00:00
renovate[bot]
dcd30972bd fix(deps): update dependency mind-elixir to v5.3.5 2025-11-06 02:49:14 +00:00
renovate[bot]
4578541fa8 chore(deps): update dependency openai to v6.8.1 2025-11-06 02:48:32 +00:00
Adorian Doran
914fa3625f client/read only note info bar: style tweaks for zen mode 2025-11-06 02:01:30 +02:00
Adorian Doran
5e3ffc12ce style/zen mode: fix content refusing to get narrower than the max content width preference 2025-11-06 02:01:03 +02:00
Adorian Doran
aa3a8d19ae client: increase the default size limit for auto read-only 2025-11-06 01:46:55 +02:00
Adorian Doran
a57c237c69 client/read only note info bar: style tweaks for zen mode 2025-11-06 01:34:39 +02:00
Adorian Doran
b52e615f0c client/read only note info bar: add support for zen mode 2025-11-06 01:08:26 +02:00
Adorian Doran
95e5c2563e client/read only note info bar: refactor 2025-11-06 00:45:16 +02:00
Adorian Doran
33be7f828b client/read only note info bar: fix file name 2025-11-06 00:24:27 +02:00
Adorian Doran
d23d37baac client/read only note info bar: add translation string 2025-11-06 00:22:00 +02:00
Adorian Doran
dda8b2795b client/read only note info bar: tweak style 2025-11-06 00:17:14 +02:00
Adorian Doran
0b9eb6c532 client/read only note info bar: shorten link caption 2025-11-05 23:56:18 +02:00
Adorian Doran
728f574eac Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-11-05 23:52:53 +02:00
Adorian Doran
8e90826aef client: add a read-only note info bar 2025-11-05 23:52:38 +02:00
Elian Doran
5e5e0afcf0 Translations update from Hosted Weblate (#7630) 2025-11-05 23:36:01 +02:00
kamykO
de85d1f0df Translated using Weblate (Polish)
Currently translated at 100.0% (152 of 152 strings)

Translation: Trilium Notes/Website
Translate-URL: https://hosted.weblate.org/projects/trilium/website/pl/
2025-11-05 21:17:29 +00:00
Elian Doran
b287b892e1 Merge branch 'main' of github.com:TriliumNext/Trilium 2025-11-05 23:17:19 +02:00
Elian Doran
a0edf00caa feat(collections/calendar): context menu option to delete event 2025-11-05 23:17:15 +02:00
Elian Doran
218b9404fc fix(print): missing admonition icons 2025-11-05 22:08:31 +02:00
Elian Doran
54af120e96 fix(search): resolve issue when using = operator in search (#7268) 2025-11-05 21:51:44 +02:00
Elian Doran
ba61ab18ff docs: sync 2025-11-05 21:01:39 +02:00
Elian Doran
2e14522f86 Merge remote-tracking branch 'origin/main' 2025-11-05 21:00:28 +02:00
Elian Doran
4ae38ac5d6 docs(user): widget basics missing template (closes #6148) 2025-11-05 18:32:34 +02:00
Adorian Doran
d5cb6a86c8 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-11-05 17:35:10 +02:00
Elian Doran
a577fd45e2 fix(quick_search): enable Numpad Enter to trigger quick search (#7624) 2025-11-05 14:49:01 +02:00
Elian Doran
977284fe57 docs(user): document read-only database (closes #4341) 2025-11-05 10:20:35 +02:00
SiriusXT
26ea43d604 chore(test): add vitest for NumpadEnter 2025-11-05 16:01:26 +08:00
SiriusXT
4cb328bdb3 Merge branch 'main' into quick_search 2025-11-05 15:41:13 +08:00
SiriusXT
16785a5c0b fix(quick_search): enable Numpad Enter to trigger quick search 2025-11-05 15:40:12 +08:00
Elian Doran
d271fe7fdd docs(demo): clean up expansion state 2025-11-05 09:26:14 +02:00
Elian Doran
88b9709f15 docs(user): launch bar clarifications in the LLM doc 2025-11-05 08:26:34 +02:00
Elian Doran
f55edabe92 chore(edit-docs): set different port to edit-demo 2025-11-05 08:19:37 +02:00
Elian Doran
2b983f871e docs(demo): link to old documentation (closes #5211) 2025-11-05 08:19:25 +02:00
Elian Doran
ab298cbb3b docs(user): how to set data dir on Windows (closes #4853) 2025-11-05 08:09:15 +02:00
Elian Doran
abeeea584f chore(deps): update dependency sax to v1.4.3 (#7622) 2025-11-05 07:47:19 +02:00
Elian Doran
4d5597cc75 chore(deps): update dependency @redocly/cli to v2.11.0 (#7623) 2025-11-05 07:46:39 +02:00
Elian Doran
c684712141 chore(deps): update dependency axios to v1.13.2 (#7621) 2025-11-05 07:45:33 +02:00
renovate[bot]
a8bb301296 chore(deps): update dependency @redocly/cli to v2.11.0 2025-11-05 01:34:43 +00:00
renovate[bot]
d5bfa466a2 chore(deps): update dependency sax to v1.4.3 2025-11-05 01:34:00 +00:00
renovate[bot]
7651c58c47 chore(deps): update dependency axios to v1.13.2 2025-11-05 01:33:17 +00:00
Elian Doran
c2ce36d963 docs(user): mention structure difference 2025-11-04 23:13:34 +02:00
Elian Doran
3359ff5470 docs(dev): update database structure 2025-11-04 22:53:42 +02:00
Elian Doran
421c1f257e fix(electron): port-in-use dialog shown when opening a new window | (#7595) 2025-11-04 19:29:46 +02:00
Elian Doran
97e87741ee Add multi-branch prefix editing support (#7598) 2025-11-04 19:17:31 +02:00
Elian Doran
193caf8c21 chore: clean up generated type definitions 2025-11-04 19:07:42 +02:00
Elian Doran
d521bda6ab Add comprehensive technical and architectural documentation (#7600) 2025-11-04 18:50:48 +02:00
Elian Doran
b80cb22985 chore(deps): clean up package lock 2025-11-04 18:20:12 +02:00
Elian Doran
7131d44d03 docs(dev): integrate rest of the documentation 2025-11-04 18:16:20 +02:00
Elian Doran
7369f9d532 docs(dev): integrate architecture guide 2025-11-04 17:24:38 +02:00
Elian Doran
58ac325634 docs(dev): integrate some of the architecture notes 2025-11-04 15:51:54 +02:00
Elian Doran
579b2ce76e Merge remote-tracking branch 'origin/main' into copilot/add-technical-documentation 2025-11-04 15:19:49 +02:00
copilot-swe-agent[bot]
0494032fb5 Convert ASCII diagrams to Mermaid.js format
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-04 12:35:56 +00:00
Elian Doran
48853555f5 Fix documentation errors, broken links, and standardize to American English (#7599) 2025-11-04 14:31:39 +02:00
Elian Doran
0cd6f0d267 Merge branch 'main' into copilot/improve-user-documentation 2025-11-04 14:30:51 +02:00
Elian Doran
0ae4defc6d docs(dev): reorganize and clean up technical documentation 2025-11-04 10:55:48 +02:00
Elian Doran
db644f20ed docs(dev): releasing a new version 2025-11-04 09:23:56 +02:00
Elian Doran
59a2ef7527 chore(build-docs): add preview entrypoint 2025-11-04 09:15:27 +02:00
Elian Doran
757a046474 feat(build-docs): add root 404 page 2025-11-04 09:13:12 +02:00
Elian Doran
aeb0f44a43 chore(website): fix typecheck issue 2025-11-04 08:55:05 +02:00
Elian Doran
5186ea3fff chore(deps): duplicate dependency in lock 2025-11-04 08:51:54 +02:00
Elian Doran
70a4feff50 edited notes: remove comma for flexible styling (#7609) 2025-11-04 08:43:27 +02:00
Elian Doran
91f85e6675 chore(deps): update typescript-eslint monorepo to v8.46.3 (#7614) 2025-11-04 08:41:51 +02:00
Elian Doran
0cb989e74f chore(deps): update dependency openai to v6.8.0 (#7618) 2025-11-04 07:42:44 +02:00
Elian Doran
d4e31e9d98 fix(deps): update dependency eslint-linter-browserify to v9.39.1 (#7615) 2025-11-04 07:40:52 +02:00
Elian Doran
6c3b5314c8 chore(deps): update dependency sax to v1.4.2 (#7613) 2025-11-04 07:40:20 +02:00
renovate[bot]
3faac9f26e chore(deps): update typescript-eslint monorepo to v8.46.3 2025-11-04 05:35:53 +00:00
Elian Doran
c31ac1a6ee fix(deps): update dependency react-i18next to v16.2.4 (#7616) 2025-11-04 07:34:35 +02:00
Elian Doran
9eff6ad4c2 fix(deps): update eslint monorepo to v9.39.1 (#7617) 2025-11-04 07:33:26 +02:00
Elian Doran
9deb7ba4e9 Translations update from Hosted Weblate (#7619) 2025-11-04 07:30:59 +02:00
Francis C.
93d77ca06e Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (152 of 152 strings)

Translation: Trilium Notes/Website
Translate-URL: https://hosted.weblate.org/projects/trilium/website/zh_Hant/
2025-11-04 01:51:28 +00:00
Giovi
a42daccc2e Translated using Weblate (Italian)
Currently translated at 99.3% (151 of 152 strings)

Translation: Trilium Notes/Website
Translate-URL: https://hosted.weblate.org/projects/trilium/website/it/
2025-11-04 01:51:26 +00:00
Giovi
33c64b604e Translated using Weblate (Italian)
Currently translated at 99.7% (386 of 387 strings)

Translation: Trilium Notes/Server
Translate-URL: https://hosted.weblate.org/projects/trilium/server/it/
2025-11-04 01:51:21 +00:00
Giovi
f89c14b35a Translated using Weblate (Italian)
Currently translated at 100.0% (1617 of 1617 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/it/
2025-11-04 01:51:16 +00:00
Francis C.
1fa3420abe Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (387 of 387 strings)

Translation: Trilium Notes/Server
Translate-URL: https://hosted.weblate.org/projects/trilium/server/zh_Hant/
2025-11-04 01:51:14 +00:00
renovate[bot]
f8b8edd5aa chore(deps): update dependency openai to v6.8.0 2025-11-04 01:42:30 +00:00
renovate[bot]
4c90319c9e fix(deps): update eslint monorepo to v9.39.1 2025-11-04 01:41:49 +00:00
renovate[bot]
3b531544a3 fix(deps): update dependency react-i18next to v16.2.4 2025-11-04 01:41:09 +00:00
renovate[bot]
25d9695db0 fix(deps): update dependency eslint-linter-browserify to v9.39.1 2025-11-04 01:40:28 +00:00
renovate[bot]
caf88473f6 chore(deps): update dependency sax to v1.4.2 2025-11-04 01:38:35 +00:00
SngAbc
b32dc18cf6 fix: incorrect options description 2025-11-04 09:36:34 +08:00
SiriusXT
5a7349121a fix: incorrect options description 2025-11-04 09:24:18 +08:00
Adorian Doran
dcc5b9f422 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-11-03 23:44:18 +02:00
Adorian Doran
0b01890a11 client: add a launcher to open the command palette 2025-11-03 23:44:06 +02:00
Elian Doran
686c8936cb docs(dev): integrate more of the old documentation 2025-11-03 22:48:14 +02:00
Elian Doran
d9071f2d8e docs(dev): update recent technical documentation 2025-11-03 22:16:15 +02:00
perf3ct
2a0472ae42 fix(search): resolve compilation issue due to variables with the same name 2025-11-03 11:44:43 -08:00
Elian Doran
4a47ff2ea0 docs(dev): add shareAlias to all notes 2025-11-03 20:31:53 +02:00
Elian Doran
d784acaf13 docs(dev): add frontpage 2025-11-03 20:13:21 +02:00
Elian Doran
e893c2f17a Integrate Developer Guide into documentation build process (#7601) 2025-11-03 19:44:42 +02:00
Elian Doran
aa526d9735 fix(build-docs): favicon missing 2025-11-03 19:28:03 +02:00
Elian Doran
53e459d0d5 feat(build-docs): add redirect to user-guide 2025-11-03 19:16:23 +02:00
Elian Doran
c54befa8a1 fix(export/share): header link not working 2025-11-03 18:46:24 +02:00
Elian Doran
87c055913f fix(export/share): some links not working 2025-11-03 18:19:34 +02:00
Adorian Doran
8c2354df71 client: format code 2025-11-03 18:16:41 +02:00
Adorian Doran
d650b801e6 client: add a launcher for zen mode 2025-11-03 17:52:08 +02:00
Adorian Doran
fbb27b512e style/zen mode/translucent title bar: fix broken title bar in multi-split windows 2025-11-03 16:09:05 +02:00
Adorian Doran
3ae7bd59ec style/zen mode: disable translucency for the title bar when backdrop effects are turned off 2025-11-03 15:59:34 +02:00
Adorian Doran
55f7a26634 style/zen mode: use translucency for the title bar 2025-11-03 15:53:05 +02:00
Elian Doran
e3e5109270 feat(export/share): export without inner subdirectory 2025-11-03 15:49:31 +02:00
Adorian Doran
aa7f01313a style/zen mode: improve scrolling for text notes 2025-11-03 15:24:09 +02:00
Adorian Doran
6f82c283e9 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-11-03 15:13:21 +02:00
contributor
aa7ecaf684 edited notes: space instead of comma for flexible styling 2025-11-03 15:13:06 +02:00
Elian Doran
056c07591e chore: remove extra sample and generated files 2025-11-03 10:48:45 +02:00
Elian Doran
0df15a02ba Merge remote-tracking branch 'origin/main' into copilot/integrate-technical-documentation 2025-11-03 10:46:37 +02:00
Elian Doran
02404a5f5b fix(build-docs): error due to becca not loading 2025-11-03 10:07:05 +02:00
copilot-swe-agent[bot]
50a69248a7 Fix keyboard shortcut support and address code review feedback
- Add editBranchPrefixCommand in note_tree.ts to support F2 keyboard shortcut with multi-selection
- Extract CSS to separate branch_prefix.css file
- Remove hard-coded color, use CSS class instead
- Fix translation key usage to keep t() calls visible in IDE
- Remove all inline styles

Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-03 08:01:56 +00:00
Elian Doran
ed146f71c5 chore(dev): fix untracked type definitions after typecheck 2025-11-03 09:52:28 +02:00
Elian Doran
4492876293 chore(deps): update dependency rollup-plugin-webpack-stats to v2.1.7 (#7602) 2025-11-03 08:39:04 +02:00
renovate[bot]
51779cf218 chore(deps): update dependency rollup-plugin-webpack-stats to v2.1.7 2025-11-03 06:17:52 +00:00
Elian Doran
5536284826 fix(deps): update dependency debounce to v3 (#7604) 2025-11-03 08:15:40 +02:00
Elian Doran
e4d74108c6 chore(deps): update pnpm to v10.20.0 (#7603) 2025-11-03 08:15:05 +02:00
Elian Doran
faf67f5da2 chore(deps): update dependency @types/node to v24.10.0 (#7605) 2025-11-03 08:13:58 +02:00
renovate[bot]
021d1ba0fb chore(deps): update dependency @types/node to v24.10.0 2025-11-03 01:51:50 +00:00
SngAbc
5782e58db1 Merge branch 'main' into electron_newwindow 2025-11-03 09:49:46 +08:00
renovate[bot]
ffead56a1d fix(deps): update dependency debounce to v3 2025-11-03 01:12:20 +00:00
renovate[bot]
b644701983 chore(deps): update pnpm to v10.20.0 2025-11-03 01:11:39 +00:00
Adorian Doran
e8bf12c4ab style/zen mode: tweak text vertical centering offset 2025-11-03 00:40:00 +02:00
copilot-swe-agent[bot]
18810bb86f Address code review feedback - improve outputSubDir handling
Improved the importAndExportDocs function to better handle the empty outputSubDir case:
- Use meaningful name for temporary zip file ('user-guide' instead of '')
- Explicitly handle empty outputSubDir for root directory output
- Added comments to clarify the behavior

Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 22:31:25 +00:00
copilot-swe-agent[bot]
4f442551a9 Integrate Developer Guide into documentation build process
Added Developer Guide to the documentation build process alongside the User Guide.
- Modified build-docs.ts to import and export both User Guide and Developer Guide
- Created importAndExportDocs helper function to handle multiple documentation sources
- Developer Guide is exported to /site/developer-guide/ subdirectory
- Updated GitHub workflow to validate Developer Guide is built
- Added build-docs app to workflow triggers

The documentation build now produces:
- User Guide at /site/ (root) and /site/user-guide/
- Developer Guide at /site/developer-guide/
- Script API at /site/script-api/{backend,frontend}/
- REST API at /site/rest-api/{internal,etapi}/

Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 22:28:24 +00:00
copilot-swe-agent[bot]
a8f565d912 Remove build artifacts from git and update .gitignore 2025-11-02 22:23:43 +00:00
Adorian Doran
344f2d819e style/zen mode: hide the shared note info bar 2025-11-03 00:19:40 +02:00
copilot-swe-agent[bot]
0c6a57d3bb Fix documentation build system - resolve becca module instance issue
Fixed the issue where multiple becca instances were being created due to inconsistent module import paths. The solution was to export becca from becca_loader and access it from there, ensuring a single instance is used throughout the build process.

Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 22:18:49 +00:00
Adorian Doran
d2e9101675 style/zen mode/fixed formatting toolbar: allow items to overflow if narrow window 2025-11-03 00:14:44 +02:00
copilot-swe-agent[bot]
82e5de2261 Add input validation for prefix to address security concerns
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 22:06:14 +00:00
copilot-swe-agent[bot]
ff4cd7eae5 Fix grammar: 'type of notes' → 'type of note' in Collections.md
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 22:04:34 +00:00
copilot-swe-agent[bot]
a62c9a1a2f Fix broken wiki-style link in Scripting.md
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 22:03:29 +00:00
copilot-swe-agent[bot]
cf406383c3 Standardize spelling to American English (behavior, categorizing)
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 22:01:44 +00:00
copilot-swe-agent[bot]
07fe42d04e Add quick reference guide for technical documentation
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 22:01:17 +00:00
copilot-swe-agent[bot]
5b8bb8587d Address code review feedback - add logging and constant for virtual branches
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 22:00:54 +00:00
copilot-swe-agent[bot]
154492e454 Add comprehensive technical and architectural documentation
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 21:59:29 +00:00
copilot-swe-agent[bot]
b1729ad7ec Fix additional clarity and grammar issues
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 21:59:22 +00:00
copilot-swe-agent[bot]
01deab9c79 Initial plan 2025-11-02 21:57:43 +00:00
copilot-swe-agent[bot]
daec11b981 Fix additional grammar and clarity issues in documentation
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 21:57:26 +00:00
copilot-swe-agent[bot]
7cdd8ffbe2 Add gitignore for build artifacts and verify tests pass
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 21:56:46 +00:00
copilot-swe-agent[bot]
25ac9e2aa1 Fix spelling, grammar, and broken links in documentation
Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 21:54:40 +00:00
copilot-swe-agent[bot]
4fc434a52e Implement multi-branch prefix editing functionality
- Add setPrefixBatch API endpoint to handle batch prefix updates
- Update branch_prefix dialog to support multiple branches
- Remove noSelectedNotes constraint from edit branch prefix menu
- Add translations for multi-branch prefix editing

Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
2025-11-02 21:52:02 +00:00
copilot-swe-agent[bot]
3e0d1bfa44 Initial plan 2025-11-02 21:47:57 +00:00
copilot-swe-agent[bot]
3b02eb8851 Initial plan 2025-11-02 21:47:17 +00:00
copilot-swe-agent[bot]
4c5b2a7c75 Initial plan 2025-11-02 21:39:44 +00:00
Elian Doran
a5a90b582a Translations update from Hosted Weblate (#7597) 2025-11-02 23:05:06 +02:00
Adorian Doran
e6d2009605 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-11-02 23:00:20 +02:00
Adorian Doran
5d706a88d8 style/zen mode/fixed formatting toolbar: fix the position in multi-split mode 2025-11-02 23:00:00 +02:00
Hosted Weblate
510601037d Update translation files
Updated by "Cleanup translation files" add-on in Weblate.

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/
2025-11-02 20:35:51 +00:00
Eugene
b312b6f3bc Translated using Weblate (Russian)
Currently translated at 15.1% (23 of 152 strings)

Translation: Trilium Notes/Website
Translate-URL: https://hosted.weblate.org/projects/trilium/website/ru/
2025-11-02 20:35:47 +00:00
Eugene
0c1efd3402 Translated using Weblate (Russian)
Currently translated at 64.4% (76 of 118 strings)

Translation: Trilium Notes/README
Translate-URL: https://hosted.weblate.org/projects/trilium/readme/ru/
2025-11-02 20:35:46 +00:00
Elian Doran
69182a1a42 feat(mermaid): add link to docs (closes #5378) 2025-11-02 22:32:36 +02:00
Elian Doran
8a63f2028c docs(user): update link to ETAPI 2025-11-02 22:20:41 +02:00
Elian Doran
947330ed73 chore(options/etapi): update help 2025-11-02 22:08:42 +02:00
Elian Doran
4526455486 fix(help): webview source not updating 2025-11-02 21:40:21 +02:00
Adorian Doran
c7c7e05106 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-11-02 21:12:36 +02:00
Adorian Doran
e250107202 style/zen mode: fix collections not showing up 2025-11-02 21:12:23 +02:00
Elian Doran
1d259aab9d Improve documentation building & static Swagger (#7570) 2025-11-02 20:24:58 +02:00
Elian Doran
5171675dee chore(build-docs): fix URL 2025-11-02 20:13:10 +02:00
Elian Doran
6bc54892a3 Update apps/build-docs/src/swagger.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-02 20:12:50 +02:00
Elian Doran
0a6670ce5e Update apps/build-docs/src/backend_script_entrypoint.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-11-02 20:05:44 +02:00
Elian Doran
beb7c66ff5 feat(build-docs): rewrite URLs for in-app help 2025-11-02 19:45:16 +02:00
Adorian Doran
c141cbcf07 style/zen mode/fixed formatting toolbar: improve pointer events handling 2025-11-02 19:08:59 +02:00
Adorian Doran
8e83562e6a style/zen mode/fixed formatting toolbar: fix backdrop blur 2025-11-02 18:37:02 +02:00
Elian Doran
966e5a2ef3 chore(build-docs): update meta 2025-11-02 18:33:13 +02:00
Elian Doran
4f5be54030 chore(build-docs): generate types for doc 2025-11-02 18:28:31 +02:00
Adorian Doran
08197f56d0 style/zen mode/fixed formatting toolbar: add entrance animation 2025-11-02 18:22:07 +02:00
Elian Doran
68c6260e45 chore(build-docs): relocate OpenAPI location 2025-11-02 18:14:03 +02:00
Adorian Doran
ff0d8a70ad style/zen mode/fixed formatting toolbar: add backdrop blur 2025-11-02 18:08:05 +02:00
Elian Doran
85bfd49d1c Merge remote-tracking branch 'origin/main' into feature/api_docs
; Conflicts:
;	_regroup/package.json
;	pnpm-lock.yaml
2025-11-02 18:05:02 +02:00
Adorian Doran
605b317f29 style/zen mode: restyle the fixed formatting toolbar, relocate at the bottom of the screen 2025-11-02 17:21:27 +02:00
SngAbc
6f0a264869 Merge branch 'main' into electron_newwindow 2025-11-02 23:06:58 +08:00
Adorian Doran
6a89e096e5 style/zen mode: hide promoted attributes 2025-11-02 16:37:19 +02:00
Adorian Doran
e4e0f7619b Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-11-02 16:34:18 +02:00
SiriusXT
f3f07cdd28 fix(electron): port-in-use dialog shown when opening a new window 2025-11-02 20:30:01 +08:00
Elian Doran
23f2e1eb45 chore(deps): update dependency eslint-plugin-playwright to v2.3.0 (#7585) 2025-11-02 12:15:15 +02:00
Elian Doran
9bbd6d146b fix(deps): update dependency globals to v16.5.0 (#7591) 2025-11-02 12:14:40 +02:00
Elian Doran
37aa8ec176 chore(deps): update node.js to v24 (#7593) 2025-11-02 12:14:22 +02:00
renovate[bot]
05f3f9627d chore(deps): update node.js to v24 2025-11-02 09:31:25 +00:00
Elian Doran
a9fa99cadf chore(deps): update dependency @smithy/middleware-retry to v4.4.6 (#7574) 2025-11-02 11:30:19 +02:00
Elian Doran
d5c1604a58 chore(deps): update dependency axios to v1.13.1 (#7575) 2025-11-02 11:29:30 +02:00
Elian Doran
e99f821e88 chore(deps): update dependency chardet to v2.1.1 (#7576) 2025-11-02 11:29:19 +02:00
renovate[bot]
6571ff9d84 fix(deps): update dependency globals to v16.5.0 2025-11-02 09:29:14 +00:00
Elian Doran
9d63ef20fb chore(deps): update dependency esbuild to v0.25.12 (#7577) 2025-11-02 11:29:06 +02:00
renovate[bot]
71a3cf0cfe chore(deps): update dependency eslint-plugin-playwright to v2.3.0 2025-11-02 09:28:29 +00:00
Elian Doran
e5e55e1cf1 chore(deps): update dependency happy-dom to v20.0.10 (#7578) 2025-11-02 11:28:12 +02:00
Elian Doran
83b13cae92 chore(deps): update dependency ollama to v0.6.2 (#7579) 2025-11-02 11:27:57 +02:00
Elian Doran
6663c3abc1 fix(deps): update dependency dayjs to v1.11.19 (#7581) 2025-11-02 11:27:37 +02:00
renovate[bot]
738b28c2b3 chore(deps): update dependency esbuild to v0.25.12 2025-11-02 09:27:32 +00:00
Elian Doran
4eec6021c3 fix(deps): update dependency react-i18next to v16.2.3 (#7582) 2025-11-02 11:27:12 +02:00
Elian Doran
39bda30853 chore(deps): update dependency @anthropic-ai/sdk to v0.68.0 (#7583) 2025-11-02 11:26:57 +02:00
Elian Doran
6adcaca5e0 chore(deps): update dependency electron to v38.5.0 (#7584) 2025-11-02 11:26:49 +02:00
Elian Doran
5a5f71fc71 chore(deps): update dependency express-rate-limit to v8.2.1 (#7586) 2025-11-02 11:26:01 +02:00
Elian Doran
f3765f95b5 chore(deps): update dependency node-abi to v4.17.0 (#7587) 2025-11-02 11:25:45 +02:00
Elian Doran
6ebb0eb03e chore(deps): update dependency rimraf to v6.1.0 (#7588) 2025-11-02 11:25:30 +02:00
Elian Doran
b42aa32b72 chore(deps): update pnpm to v10.20.0 (#7589) 2025-11-02 11:25:13 +02:00
Elian Doran
11e1ea7ea5 fix(deps): update dependency eslint-linter-browserify to v9.39.0 (#7590) 2025-11-02 11:24:51 +02:00
Elian Doran
5f6fac994f fix(deps): update eslint monorepo to v9.39.0 (#7592) 2025-11-02 11:24:15 +02:00
Elian Doran
d7460e9fe5 chore(renovate): ignore legacy Dockerfile from Renovate updates 2025-11-02 11:22:29 +02:00
SiriusXT
ef82c3d48b fix(electron): port-in-use dialog shown when opening a new window | 2025-11-02 16:48:05 +08:00
renovate[bot]
89585e38ce fix(deps): update eslint monorepo to v9.39.0 2025-11-02 02:03:29 +00:00
renovate[bot]
938c6e356b fix(deps): update dependency eslint-linter-browserify to v9.39.0 2025-11-02 02:01:50 +00:00
renovate[bot]
b7dd806d07 chore(deps): update pnpm to v10.20.0 2025-11-02 02:01:05 +00:00
renovate[bot]
a1d86cef58 chore(deps): update dependency rimraf to v6.1.0 2025-11-02 02:00:54 +00:00
renovate[bot]
1fec5bb564 chore(deps): update dependency node-abi to v4.17.0 2025-11-02 02:00:49 +00:00
renovate[bot]
35e98addc8 chore(deps): update dependency express-rate-limit to v8.2.1 2025-11-02 01:59:58 +00:00
renovate[bot]
79290633b1 chore(deps): update dependency electron to v38.5.0 2025-11-02 01:58:25 +00:00
renovate[bot]
ffc9e715ef chore(deps): update dependency @anthropic-ai/sdk to v0.68.0 2025-11-02 01:57:40 +00:00
renovate[bot]
8f8302c4a3 fix(deps): update dependency react-i18next to v16.2.3 2025-11-02 01:56:54 +00:00
renovate[bot]
136b449f60 fix(deps): update dependency dayjs to v1.11.19 2025-11-02 01:56:07 +00:00
renovate[bot]
61319c3a14 chore(deps): update dependency ollama to v0.6.2 2025-11-02 01:55:13 +00:00
renovate[bot]
104a1f0c3a chore(deps): update dependency happy-dom to v20.0.10 2025-11-02 01:54:26 +00:00
renovate[bot]
16200312ce chore(deps): update dependency chardet to v2.1.1 2025-11-02 01:52:16 +00:00
renovate[bot]
664de68d53 chore(deps): update dependency axios to v1.13.1 2025-11-02 01:51:29 +00:00
renovate[bot]
6190949dcc chore(deps): update dependency @smithy/middleware-retry to v4.4.6 2025-11-02 01:50:40 +00:00
Elian Doran
3ac248169f chore(build-docs): fix typecheck issues 2025-11-01 23:40:27 +02:00
Elian Doran
15e240ac33 refactor(build-docs): remove old Swagger integration 2025-11-01 23:37:17 +02:00
Elian Doran
d30fc09e73 chore(build-docs): fix link to FNote 2025-11-01 23:13:35 +02:00
Elian Doran
6a2b9b748f chore(build-docs): add project names to typedoc 2025-11-01 23:03:14 +02:00
Elian Doran
b5e2187c0d chore(build-docs): update meta 2025-11-01 23:00:14 +02:00
Elian Doran
d9a349a531 refactor(build-docs): define output for typedoc at script level 2025-11-01 22:54:42 +02:00
Elian Doran
2c1cebfbc3 feat(build-docs): split documentation in two 2025-11-01 22:51:33 +02:00
Elian Doran
c6738ac52f feat(build-docs): generate script API 2025-11-01 22:42:27 +02:00
Elian Doran
604f2abf5a chore(build-docs): fix wrong mkdir 2025-11-01 21:47:07 +02:00
Elian Doran
617703899f chore(build-docs): relocate to /rest-api 2025-11-01 21:35:18 +02:00
Elian Doran
6322ca11c9 feat(share): improve webview layout 2025-11-01 21:28:31 +02:00
Elian Doran
d62aecc551 fix(build-docs): crash in clean environment 2025-11-01 21:15:34 +02:00
Elian Doran
953b376ce3 refactor(build-docs): trigger build of share theme internally 2025-11-01 20:58:32 +02:00
Elian Doran
80f1707d8b chore(build-docs): integrate with docs:build 2025-11-01 20:52:28 +02:00
Elian Doran
4f9f8652e2 fix(build-docs): links to API reference 2025-11-01 20:47:00 +02:00
Elian Doran
6e06d7169f refactor(build-docs): integrate with original build-docs script 2025-11-01 20:37:03 +02:00
Elian Doran
ecf12a4063 feat(build-docs): build both docs 2025-11-01 20:22:17 +02:00
Elian Doran
64428ae761 feat(build-docs): clean before building 2025-11-01 20:16:59 +02:00
Elian Doran
3524c34ff9 feat(build-docs): switch to redocly 2025-11-01 20:15:38 +02:00
Elian Doran
3f99c8b337 feat(build-docs): copy swagger UI 2025-11-01 20:03:53 +02:00
Elian Doran
27d9ae885f Merge branch 'main' of github.com:TriliumNext/Trilium 2025-11-01 19:36:11 +02:00
Adorian Doran
214ba5265a Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-11-01 18:20:08 +02:00
Elian Doran
35efd2a680 test(server): broken test due to CLS 2025-11-01 16:48:49 +02:00
Elian Doran
19c6ae6fe5 Keyboard shortcut for today note button (#7549) 2025-11-01 16:17:24 +02:00
SngAbc
bf0761a303 Fix: activate the nearest path when opening a cloned note (#7552) 2025-11-01 16:06:26 +02:00
Weblate (bot)
8391fd7534 Translations update from Hosted Weblate (#7566)
* Update translation files

Updated by "Cleanup translation files" add-on in Weblate.

Translation: Trilium Notes/README
Translate-URL: https://hosted.weblate.org/projects/trilium/readme/

* Translated using Weblate (Portuguese)

Currently translated at 9.2% (14 of 152 strings)

Translation: Trilium Notes/Website
Translate-URL: https://hosted.weblate.org/projects/trilium/website/pt/

---------

Co-authored-by: Francisco Machado <kikomachado089@gmail.com>
2025-11-01 16:04:10 +02:00
SngAbc
6d4b87888a fix(electron): allow extra window to reload (#7567) 2025-11-01 16:02:17 +02:00
Weblate (bot)
3f0b0f9b62 Translations update from Hosted Weblate (#7565) 2025-11-01 14:09:26 +02:00
Elian Doran
859d9dcd04 docs(user): document system requirements 2025-10-31 11:52:40 +02:00
Adorian Doran
ecb6dc7923 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-31 11:33:07 +02:00
Elian Doran
76dd9baea8 docs(user): document adjusting borders 2025-10-31 11:21:17 +02:00
Elian Doran
82ff5f6660 docs(user): sync 2025-10-31 11:07:22 +02:00
Elian Doran
b52d30c55a chore(dialog/export): strange order with OPML 2025-10-31 11:05:40 +02:00
Elian Doran
99fd088ff5 chore(share): use same sandbox features for iframe 2025-10-31 10:12:56 +02:00
Elian Doran
945f29c759 feat(share): render webviews using iframe 2025-10-31 10:12:15 +02:00
Elian Doran
98f42887d8 Translations update from Hosted Weblate (#7562) 2025-10-31 09:09:29 +02:00
Eduard Frigola
a1b589148b Translated using Weblate (Catalan)
Currently translated at 17.8% (69 of 387 strings)

Translation: Trilium Notes/Server
Translate-URL: https://hosted.weblate.org/projects/trilium/server/ca/
2025-10-31 08:04:01 +01:00
Elian Doran
66bb639a15 docs(user): port patterns of personal knowledge 2025-10-30 22:50:14 +02:00
Elian Doran
1784b50990 docs(user): port privacy policy 2025-10-30 22:37:59 +02:00
Elian Doran
5e9c271bfd docs(release): port v0.48 changelog 2025-10-30 22:36:41 +02:00
Elian Doran
70837fdc69 Translations update from Hosted Weblate (#7559) 2025-10-30 16:07:11 +02:00
Hosted Weblate
67d80512f6 Update translation files
Updated by "Cleanup translation files" add-on in Weblate.

Translation: Trilium Notes/README
Translate-URL: https://hosted.weblate.org/projects/trilium/readme/
2025-10-30 13:46:35 +00:00
Elian Doran
dd8a1e8aca docs(user): document all share theme attributes 2025-10-30 15:46:13 +02:00
Elian Doran
99f43e2280 docs(user): improve fine-grained directory path documentation 2025-10-30 12:02:32 +02:00
Elian Doran
bcffa77c90 docs(user): index page for import/export 2025-10-30 11:54:44 +02:00
Elian Doran
8ab2069411 docs(user): fix empty section in kanban board 2025-10-30 11:43:48 +02:00
Elian Doran
21fc61d132 docs(user): restructure LLM section 2025-10-30 11:42:46 +02:00
Elian Doran
552df50fe4 docs(user): add icons to most notes 2025-10-30 11:40:07 +02:00
Elian Doran
c058b663ee Translations update from Hosted Weblate (#7556) 2025-10-30 09:05:27 +02:00
Francis C
6c19370235 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (152 of 152 strings)

Translation: Trilium Notes/Website
Translate-URL: https://hosted.weblate.org/projects/trilium/website/zh_Hant/
2025-10-30 07:50:44 +01:00
Francis C
d332bb57ba Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (152 of 152 strings)

Translation: Trilium Notes/Website
Translate-URL: https://hosted.weblate.org/projects/trilium/website/zh_Hans/
2025-10-30 07:50:44 +01:00
Antonio Sanchez Castellón
3ef38e7f4e Translated using Weblate (Spanish)
Currently translated at 100.0% (152 of 152 strings)

Translation: Trilium Notes/Website
Translate-URL: https://hosted.weblate.org/projects/trilium/website/es/
2025-10-30 07:50:43 +01:00
Francis C
1abc3b5534 Translated using Weblate (Japanese)
Currently translated at 100.0% (1621 of 1621 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/ja/
2025-10-30 07:50:42 +01:00
Francis C
ddcd27ddf6 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (387 of 387 strings)

Translation: Trilium Notes/Server
Translate-URL: https://hosted.weblate.org/projects/trilium/server/zh_Hant/
2025-10-30 07:50:41 +01:00
Francis C
ff385c8c88 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (1621 of 1621 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/zh_Hant/
2025-10-30 07:50:40 +01:00
Antonio Sanchez Castellón
a641e452ce Translated using Weblate (Spanish)
Currently translated at 100.0% (387 of 387 strings)

Translation: Trilium Notes/Server
Translate-URL: https://hosted.weblate.org/projects/trilium/server/es/
2025-10-30 07:50:39 +01:00
Francis C
5f4fa25da5 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (387 of 387 strings)

Translation: Trilium Notes/Server
Translate-URL: https://hosted.weblate.org/projects/trilium/server/zh_Hans/
2025-10-30 07:50:38 +01:00
Antonio Sanchez Castellón
ea177e972e Translated using Weblate (Spanish)
Currently translated at 100.0% (1621 of 1621 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/es/
2025-10-30 07:50:38 +01:00
Manfred Manni
7e3013bfdc Translated using Weblate (German)
Currently translated at 100.0% (1621 of 1621 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/de/
2025-10-30 07:50:37 +01:00
Francis C
5115baeb21 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (1621 of 1621 strings)

Translation: Trilium Notes/Client
Translate-URL: https://hosted.weblate.org/projects/trilium/client/zh_Hans/
2025-10-30 07:50:36 +01:00
Hosted Weblate
35a924a05a Update translation files
Updated by "Cleanup translation files" add-on in Weblate.

Translation: Trilium Notes/README
Translate-URL: https://hosted.weblate.org/projects/trilium/readme/
2025-10-30 07:50:36 +01:00
Elian Doran
78f067965f fix(share): TOC indicator no longer working due to layout changes 2025-10-30 08:49:48 +02:00
Elian Doran
413b16b51c chore(collections): rename Board to Kanban Board 2025-10-30 08:42:00 +02:00
Elian Doran
59586c53b2 chore(website): rename Board to Kanban Board 2025-10-30 08:34:28 +02:00
Elian Doran
70ed1d7abb chore(website): fix URLs pointing to documentation 2025-10-30 08:33:54 +02:00
Elian Doran
67de6c614c docs(user): change alias for server documentation 2025-10-30 08:31:26 +02:00
Elian Doran
faf030ab3a docs(user): minor improvements to the collection main page 2025-10-30 08:18:13 +02:00
Elian Doran
6e20d4b5dd docs(user): rename Board to Kanban Board 2025-10-30 08:15:57 +02:00
Elian Doran
10e809af75 docs(user): rename and reorder collection pages 2025-10-30 08:14:22 +02:00
Elian Doran
f1478f8149 docs(user): change presentation method for collections 2025-10-30 08:13:34 +02:00
Elian Doran
9087adf254 docs(user): move collections one level up 2025-10-30 08:07:09 +02:00
Elian Doran
f944c6d8e2 docs(user): add slug + tips on how to identify pages without one easily 2025-10-30 08:03:09 +02:00
Adorian Doran
131fb43ab7 style/zen mode: tweak 2025-10-30 02:48:38 +02:00
Adorian Doran
8a76fdb8d1 style/zen mode: center content, increase font size 2025-10-30 02:30:51 +02:00
Adorian Doran
8e3dbb2f65 client: remove redundant code 2025-10-30 02:27:57 +02:00
Adorian Doran
8b4fee1680 client: make code notes full-width 2025-10-30 01:03:22 +02:00
Adorian Doran
a370b52614 client: remove no longer used translation strings 2025-10-30 00:57:27 +02:00
Adorian Doran
4063229982 client: allow changing the max content width option without a frontend reload 2025-10-30 00:49:02 +02:00
Adorian Doran
1ef03b7a77 client: rework max content width handling 2025-10-30 00:23:41 +02:00
Adorian Doran
e510653edb Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-29 23:38:05 +02:00
Elian Doran
444e103047 docs(dev): document exporting functionality 2025-10-29 22:36:45 +02:00
Elian Doran
1d6ab64ae5 docs(guide): document exporting for web publishing 2025-10-29 22:21:15 +02:00
Elian Doran
0bc86d7c75 docs(guide): deduplicate home page with quick start 2025-10-29 22:00:31 +02:00
Elian Doran
cfd55147df Deploy share-based static documentation (#7548) 2025-10-29 21:27:49 +02:00
Elian Doran
754bb61a52 feat(export/share): render 404 page 2025-10-29 21:05:50 +02:00
Adorian Doran
a2c523def1 style: fix a bug preventing background effects to work properly 2025-10-29 20:28:53 +02:00
Elian Doran
4f103375b5 fix(share): 404 not rendering in dev mode 2025-10-29 20:20:35 +02:00
Elian Doran
496091677b style(share): overflow on wrong element 2025-10-29 20:14:32 +02:00
Elian Doran
618b67f551 fix(share): redesign layout to avoid jumping on tablets 2025-10-29 20:02:02 +02:00
Adorian Doran
e3604edad7 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-29 19:59:30 +02:00
contributor
9c791df0ed open today note in current tab #7472
https://github.com/TriliumNext/Trilium/pull/7549#issuecomment-3458822614
2025-10-29 19:22:13 +02:00
Elian Doran
ce4f46c226 chore(share): fix relative imports 2025-10-29 19:13:11 +02:00
Elian Doran
44cfbcf7f4 refactor(share): move icon loading in CSS rather than in JS 2025-10-29 19:11:43 +02:00
Elian Doran
a317331551 fix(share): theme toggle flashing while switching between notes 2025-10-29 19:05:23 +02:00
Elian Doran
eeec3e440d fix(share): flash while theme is loading 2025-10-29 19:00:09 +02:00
Elian Doran
b06aa29ea3 chore(share): remove leftover color management logic 2025-10-29 18:46:55 +02:00
Elian Doran
9c3f9a524e fix(share): flash of dark color on light theme 2025-10-29 18:46:24 +02:00
Elian Doran
1c832182d6 refactor(share): reduce duplication in theme management 2025-10-29 18:40:31 +02:00
Elian Doran
b58e1f146c fix(share): light theme not properly restored 2025-10-29 18:35:27 +02:00
Elian Doran
bc86fb95b5 feat(share): add dev mode 2025-10-29 18:27:43 +02:00
Elian Doran
6c43db692e fix(client): boxicons missing in prod 2025-10-29 18:16:25 +02:00
Elian Doran
6ffce824d1 fix(docker): incorrect version for arm v7 2025-10-29 17:43:10 +02:00
Elian Doran
f1f8f34ef8 fix(export/share): load search index once per page 2025-10-29 15:33:38 +02:00
Elian Doran
a0b19ce526 fix(export/share): search not working on root 2025-10-29 15:26:48 +02:00
Elian Doran
4cc9ba824d chore(export/share): tweak search results 2025-10-29 15:24:25 +02:00
Elian Doran
08e66c18e7 fix(export/share): navigation in search not working 2025-10-29 14:57:53 +02:00
Elian Doran
cf8089b07f feat(export/share): functional full-text search 2025-10-29 13:58:37 +02:00
Adorian Doran
426d8296be Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-29 09:30:50 +02:00
Elian Doran
f8c61ecde9 feat(export/share): use better content parsing for search 2025-10-29 08:45:47 +02:00
Elian Doran
6d51da9b88 feat(export/share): generate search index 2025-10-29 08:41:07 +02:00
Elian Doran
0ad95d00dc chore(ci): try to fix arm v6/v7 build 2025-10-29 08:08:16 +02:00
Adorian Doran
947e43a615 style: allow custom themes to turn off background effects 2025-10-29 03:20:25 +02:00
Adorian Doran
0424fe4fba client/css var utility: add support for parsing boolean values 2025-10-29 03:13:16 +02:00
Adorian Doran
f789b69506 style: disable tab switching animation while background effects are active, improve performance 2025-10-29 02:39:25 +02:00
Adorian Doran
5df512a69c style: use background effects for empty note, refactor 2025-10-29 01:32:47 +02:00
Adorian Doran
2a5f329ada style: darken the main background color 2025-10-29 00:45:40 +02:00
Adorian Doran
4fe3944585 style/right panel: use own background color when background effects are active 2025-10-29 00:34:20 +02:00
Adorian Doran
98b8e97fd9 style/right panel: add translucent background when background effects are active 2025-10-29 00:20:50 +02:00
Adorian Doran
38a1cd0d35 style: tweak gutters 2025-10-28 23:55:51 +02:00
Adorian Doran
ae544a80c2 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-28 23:43:55 +02:00
Elian Doran
9819a92b48 docs(guide): remove a missing note link 2025-10-28 23:01:56 +02:00
Elian Doran
55a7017e92 docs(guide): document the zoom function 2025-10-28 22:55:52 +02:00
Elian Doran
1581568741 docs(guide): add promoted attribute for alias 2025-10-28 22:31:59 +02:00
Elian Doran
d7982c65dd docs(guide): add alias for most pages 2025-10-28 22:30:46 +02:00
Elian Doran
39608a2815 docs(guide): home page & third party hosting + sync 2025-10-28 22:07:05 +02:00
Elian Doran
f656c2caaa fix(export/zip): links breaking down in markdown export 2025-10-28 21:32:05 +02:00
Elian Doran
bd3e92f091 fix(export/zip): export options not considered 2025-10-28 20:40:53 +02:00
Elian Doran
7ce7c66463 chore(build-docs): address requested changes 2025-10-28 19:31:57 +02:00
Elian Doran
61d26fec60 refactor(build-docs): use proper await when building documentation 2025-10-28 19:30:55 +02:00
Elian Doran
1822eea77c chore: remove remaining references to mkdocs 2025-10-28 19:19:39 +02:00
Elian Doran
28c0e4e802 chore(client): remove no longer relevant input 2025-10-28 19:15:01 +02:00
Elian Doran
88d90fdedd fix(export/share): favicon working only on top-level 2025-10-28 18:23:11 +02:00
Elian Doran
2a1ecdbdca feat(share): display admonition icons (closes #6733) 2025-10-28 18:18:03 +02:00
Elian Doran
5772046674 chore(share): remove redundant file 2025-10-28 18:17:06 +02:00
Elian Doran
1e2c8b2ac4 fix(export/share): ckcontent CSS missing 2025-10-28 18:16:37 +02:00
Elian Doran
955b202b8a chore(export/share): hide last updated 2025-10-28 17:59:12 +02:00
Elian Doran
be98a27439 feat(export/share): prefer #shareAlias 2025-10-28 17:57:48 +02:00
Jon Fuller
8d88411fda Merge branch 'main' into fix/fix-equals-operator-in-search 2025-10-28 08:41:47 -07:00
Elian Doran
54200fa0cb chore(export/share): disable non-functional search 2025-10-28 17:33:36 +02:00
Elian Doran
5d82a26c87 fix(build-docs): missing favicon 2025-10-28 17:23:31 +02:00
Elian Doran
e51070e389 chore(share): handle BAttachments too 2025-10-28 17:16:34 +02:00
Elian Doran
e0dc4fee20 fix(share): reference links not working 2025-10-28 17:14:33 +02:00
contributor
e683dc1d66 add openTodayNote to CommandMappings #7472 2025-10-28 16:59:46 +02:00
contributor
14a3438a20 move shortcut definition to "Note navigation" section #7472 2025-10-28 16:59:41 +02:00
contributor
dd483fccbc use common translation for openTodayNote #7472 2025-10-28 16:59:36 +02:00
contributor
5620e7f4a7 feat: add command openTodayNote with empty keyboard shortcut #7472 2025-10-28 16:59:28 +02:00
Elian Doran
187e9b57de fix(share): note tree not visible on mobile 2025-10-28 16:57:04 +02:00
Elian Doran
d6d67e7957 fix(docs/share): share theme not built 2025-10-28 16:45:27 +02:00
Elian Doran
bde03e8378 feat(docs/share): integrate in the CI 2025-10-28 16:42:52 +02:00
Elian Doran
4c3fcdba4a fix(share): images appearing stretched 2025-10-28 16:34:38 +02:00
Elian Doran
7a5c1277f1 feat(docs/share): set up script to build documentation 2025-10-28 16:24:55 +02:00
Adorian Doran
ea45024559 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-28 09:51:32 +02:00
Adorian Doran
64d3589b40 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-25 22:42:20 +03:00
Adorian Doran
638cb4281e style/center pane: optimize the identification of options pages 2025-10-25 11:28:26 +03:00
Adorian Doran
1568908982 style/center pane: allow distinct background colors for note splits 2025-10-25 11:12:00 +03:00
Adorian Doran
4459561308 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-25 10:20:28 +03:00
Adorian Doran
3341e59a80 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-24 02:43:52 +03:00
Adorian Doran
74a805056b style/settings: use Mica for settings pages 2025-10-24 01:03:28 +03:00
Adorian Doran
f42e870de1 style/dropdowns: increase the radius of the backdrop blur 2025-10-23 20:28:36 +03:00
Adorian Doran
ca3964f8b7 style/floating buttons: tweak position 2025-10-23 20:18:52 +03:00
Adorian Doran
ddafda5f4e style/quick edit dialog: tweak the colors for the dark color scheme 2025-10-23 20:01:29 +03:00
Adorian Doran
40b08e1828 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-23 19:43:17 +03:00
Adorian Doran
5141f0a0d5 style/quick edit dialog: tweak the colors for the dark color scheme 2025-10-23 19:43:06 +03:00
Adorian Doran
8c165c0401 style/quick edit dialog: add support for the dark color scheme 2025-10-23 10:57:01 +03:00
Adorian Doran
b4dd40e128 style/quick edit dialog: refactor 2025-10-23 10:48:04 +03:00
Adorian Doran
535b960b76 style/quick edit dialog: ignore monochromatic custom colors 2025-10-23 10:44:23 +03:00
Adorian Doran
b58f37cd4a style/quick edit dialog: tint the dialog background, border and promoted attributes card according to the note's custom color 2025-10-23 10:18:52 +03:00
Adorian Doran
a01fb39599 client/quick edit dialog: make available the CSS variables with the custom color of the edited note 2025-10-23 10:16:18 +03:00
Adorian Doran
be15934b22 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-23 10:03:03 +03:00
Adorian Doran
96b3464f00 Merge branch 'main' of https://github.com/TriliumNext/Trilium into feat/ui-improvements 2025-10-22 21:53:07 +03:00
Adorian Doran
2470b0b334 style: tweak the appearance of the promoted attributes cards 2025-10-22 20:06:06 +03:00
Adorian Doran
4344687303 style: tweak the appearance of the promoted attributes cards 2025-10-22 19:58:42 +03:00
Adorian Doran
b4fe46eba3 style: tweak the appearance of option cards 2025-10-22 19:41:49 +03:00
perf3ct
8e227a6146 fix(search): make sure to highlight exact search results too 2025-10-21 14:35:31 -07:00
Jon Fuller
b03cb1ce1b Merge branch 'main' into fix/fix-equals-operator-in-search 2025-10-21 11:30:05 -07:00
perf3ct
fb0d971e48 fix(search): also support exact phrase matching such as ='test phrase' 2025-10-21 10:12:14 -07:00
perf3ct
4fa4112840 feat(search): also support the use of ="exact match search string" 2025-10-10 12:23:57 -07:00
perf3ct
50f0b88eff fix(search): resolve issue when using = operator in search 2025-10-10 09:51:52 -07:00
728 changed files with 18665 additions and 10545 deletions

View File

@@ -1,6 +1,4 @@
# GitHub Actions workflow for deploying MkDocs documentation to Cloudflare Pages
# This workflow builds and deploys your MkDocs site when changes are pushed to main
name: Deploy MkDocs Documentation
name: Deploy Documentation
on:
# Trigger on push to main branch
@@ -11,11 +9,9 @@ on:
# Only run when docs files change
paths:
- 'docs/**'
- 'README.md' # README is synced to docs/index.md
- 'mkdocs.yml'
- 'requirements-docs.txt'
- '.github/workflows/deploy-docs.yml'
- 'scripts/fix-mkdocs-structure.ts'
- 'apps/edit-docs/**'
- 'apps/build-docs/**'
- 'packages/share-theme/**'
# Allow manual triggering from Actions tab
workflow_dispatch:
@@ -27,15 +23,13 @@ on:
- master
paths:
- 'docs/**'
- 'README.md' # README is synced to docs/index.md
- 'mkdocs.yml'
- 'requirements-docs.txt'
- '.github/workflows/deploy-docs.yml'
- 'scripts/fix-mkdocs-structure.ts'
- 'apps/edit-docs/**'
- 'apps/build-docs/**'
- 'packages/share-theme/**'
jobs:
build-and-deploy:
name: Build and Deploy MkDocs
name: Build and Deploy Documentation
runs-on: ubuntu-latest
timeout-minutes: 10
@@ -49,72 +43,27 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for git info and mkdocs-git-revision-date plugin
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
cache: 'pip'
cache-dependency-path: 'requirements-docs.txt'
- name: Install MkDocs and Dependencies
run: |
pip install --upgrade pip
pip install -r requirements-docs.txt
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
# Setup pnpm before fixing docs structure
- name: Setup pnpm
uses: pnpm/action-setup@v4
# Setup Node.js with pnpm
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'pnpm'
# Install Node.js dependencies for the TypeScript script
- name: Install Dependencies
run: |
pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Fix Documentation Structure
run: |
# Fix duplicate navigation entries by moving overview pages to index.md
pnpm run chore:fix-mkdocs-structure
- name: Build MkDocs Site
run: |
# Build with strict mode but allow expected warnings
mkdocs build --verbose || {
EXIT_CODE=$?
# Check if the only issue is expected warnings
if mkdocs build 2>&1 | grep -E "WARNING.*(README|not found)" && \
[ $(mkdocs build 2>&1 | grep -c "ERROR") -eq 0 ]; then
echo "✅ Build succeeded with expected warnings"
mkdocs build --verbose
else
echo "❌ Build failed with unexpected errors"
exit $EXIT_CODE
fi
}
- name: Fix HTML Links
run: |
# Remove .md extensions from links in generated HTML
pnpm tsx ./scripts/fix-html-links.ts site
- name: Trigger build of documentation
run: pnpm docs:build
- name: Validate Built Site
run: |
# Basic validation that important files exist
test -f site/index.html || (echo "ERROR: site/index.html not found" && exit 1)
test -f site/sitemap.xml || (echo "ERROR: site/sitemap.xml not found" && exit 1)
test -d site/assets || (echo "ERROR: site/assets directory not found" && exit 1)
echo "✅ Site validation passed"
test -f site/developer-guide/index.html || (echo "ERROR: site/developer-guide/index.html not found" && exit 1)
echo "✓ User Guide and Developer Guide built successfully"
- name: Deploy
uses: ./.github/actions/deploy-to-cloudflare-pages

View File

@@ -116,10 +116,10 @@ jobs:
- dockerfile: Dockerfile
platform: linux/arm64
image: ubuntu-24.04-arm
- dockerfile: Dockerfile
- dockerfile: Dockerfile.legacy
platform: linux/arm/v7
image: ubuntu-24.04-arm
- dockerfile: Dockerfile
- dockerfile: Dockerfile.legacy
platform: linux/arm/v8
image: ubuntu-24.04-arm
runs-on: ${{ matrix.image }}

View File

@@ -77,7 +77,7 @@ jobs:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGN_KEY }}
- name: Publish release
uses: softprops/action-gh-release@v2.4.1
uses: softprops/action-gh-release@v2.4.2
if: ${{ github.event_name != 'pull_request' }}
with:
make_latest: false
@@ -118,7 +118,7 @@ jobs:
arch: ${{ matrix.arch }}
- name: Publish release
uses: softprops/action-gh-release@v2.4.1
uses: softprops/action-gh-release@v2.4.2
if: ${{ github.event_name != 'pull_request' }}
with:
make_latest: false

View File

@@ -4,6 +4,7 @@ on:
push:
branches:
- main
- hotfix
paths-ignore:
- "apps/website/**"
pull_request:
@@ -31,7 +32,23 @@ jobs:
run: pnpm install --frozen-lockfile
- run: pnpm exec playwright install --with-deps
- run: pnpm --filter server-e2e e2e
- name: Build the server
uses: ./.github/actions/build-server
with:
os: linux
arch: x64
- name: Unpack and start the server
run: |
file=$(find ./upload -name '*.tar.xz' -print -quit)
name=$(basename "$file" .tar.xz)
mkdir -p ./server-dist
tar -xf "$file" -C ./server-dist
"./server-dist/$name/trilium.sh" &
sleep 10
- name: Server end-to-end tests
run: TRILIUM_DOCKER=1 TRILIUM_PORT=8080 pnpm --filter server-e2e e2e
- name: Upload test report
if: failure()
@@ -39,3 +56,7 @@ jobs:
with:
name: e2e report
path: apps/server-e2e/test-output
- name: Kill the server
if: always()
run: pkill -f trilium || true

View File

@@ -127,7 +127,7 @@ jobs:
path: upload
- name: Publish stable release
uses: softprops/action-gh-release@v2.4.1
uses: softprops/action-gh-release@v2.4.2
with:
draft: false
body_path: docs/Release Notes/Release Notes/${{ github.ref_name }}.md

2
.nvmrc
View File

@@ -1 +1 @@
22.21.0
24.11.0

View File

@@ -38,19 +38,17 @@
"@playwright/test": "1.56.1",
"@stylistic/eslint-plugin": "5.5.0",
"@types/express": "5.0.5",
"@types/node": "24.9.1",
"@types/node": "24.10.0",
"@types/yargs": "17.0.34",
"@vitest/coverage-v8": "3.2.4",
"eslint": "9.38.0",
"eslint": "9.39.1",
"eslint-plugin-simple-import-sort": "12.1.1",
"esm": "3.2.25",
"jsdoc": "4.0.5",
"lorem-ipsum": "2.0.8",
"rcedit": "4.0.1",
"rimraf": "6.0.1",
"tslib": "2.8.1",
"typedoc": "0.28.14",
"typedoc-plugin-missing-exports": "4.1.2"
"rcedit": "5.0.0",
"rimraf": "6.1.0",
"tslib": "2.8.1"
},
"optionalDependencies": {
"appdmg": "0.6.6"

View File

@@ -1,15 +0,0 @@
{
"entryPoints": [
"src/services/backend_script_entrypoint.ts",
"src/public/app/services/frontend_script_entrypoint.ts"
],
"plugin": [
"typedoc-plugin-missing-exports"
],
"outputs": [
{
"name": "html",
"path": "./docs/Script API"
}
]
}

View File

@@ -0,0 +1,22 @@
{
"name": "build-docs",
"version": "1.0.0",
"description": "",
"main": "src/main.ts",
"scripts": {
"start": "tsx ."
},
"keywords": [],
"author": "Elian Doran <contact@eliandoran.me>",
"license": "AGPL-3.0-only",
"packageManager": "pnpm@10.20.0",
"devDependencies": {
"@redocly/cli": "2.11.0",
"archiver": "7.0.1",
"fs-extra": "11.3.2",
"react": "19.2.0",
"react-dom": "19.2.0",
"typedoc": "0.28.14",
"typedoc-plugin-missing-exports": "4.1.2"
}
}

View File

@@ -0,0 +1,36 @@
/**
* The backend script API is accessible to code notes with the "JS (backend)" language.
*
* The entire API is exposed as a single global: {@link api}
*
* @module Backend Script API
*/
/**
* This file creates the entrypoint for TypeDoc that simulates the context from within a
* script note on the server side.
*
* Make sure to keep in line with backend's `script_context.ts`.
*/
export type { default as AbstractBeccaEntity } from "../../server/src/becca/entities/abstract_becca_entity.js";
export type { default as BAttachment } from "../../server/src/becca/entities/battachment.js";
export type { default as BAttribute } from "../../server/src/becca/entities/battribute.js";
export type { default as BBranch } from "../../server/src/becca/entities/bbranch.js";
export type { default as BEtapiToken } from "../../server/src/becca/entities/betapi_token.js";
export type { BNote };
export type { default as BOption } from "../../server/src/becca/entities/boption.js";
export type { default as BRecentNote } from "../../server/src/becca/entities/brecent_note.js";
export type { default as BRevision } from "../../server/src/becca/entities/brevision.js";
import BNote from "../../server/src/becca/entities/bnote.js";
import BackendScriptApi, { type Api } from "../../server/src/services/backend_script_api.js";
export type { Api };
const fakeNote = new BNote();
/**
* The `api` global variable allows access to the backend script API, which is documented in {@link Api}.
*/
export const api: Api = new BackendScriptApi(fakeNote, {});

View File

@@ -0,0 +1,147 @@
process.env.TRILIUM_INTEGRATION_TEST = "memory-no-store";
process.env.TRILIUM_RESOURCE_DIR = "../server/src";
process.env.NODE_ENV = "development";
import cls from "@triliumnext/server/src/services/cls.js";
import { dirname, join, resolve } from "path";
import * as fs from "fs/promises";
import * as fsExtra from "fs-extra";
import archiver from "archiver";
import { WriteStream } from "fs";
import { execSync } from "child_process";
import BuildContext from "./context.js";
const DOCS_ROOT = "../../../docs";
const OUTPUT_DIR = "../../site";
async function importAndExportDocs(sourcePath: string, outputSubDir: string) {
const note = await importData(sourcePath);
// Use a meaningful name for the temporary zip file
const zipName = outputSubDir || "user-guide";
const zipFilePath = `output-${zipName}.zip`;
try {
const { exportToZip } = (await import("@triliumnext/server/src/services/export/zip.js")).default;
const branch = note.getParentBranches()[0];
const taskContext = new (await import("@triliumnext/server/src/services/task_context.js")).default(
"no-progress-reporting",
"export",
null
);
const fileOutputStream = fsExtra.createWriteStream(zipFilePath);
await exportToZip(taskContext, branch, "share", fileOutputStream);
await waitForStreamToFinish(fileOutputStream);
// Output to root directory if outputSubDir is empty, otherwise to subdirectory
const outputPath = outputSubDir ? join(OUTPUT_DIR, outputSubDir) : OUTPUT_DIR;
await extractZip(zipFilePath, outputPath);
} finally {
if (await fsExtra.exists(zipFilePath)) {
await fsExtra.rm(zipFilePath);
}
}
}
async function buildDocsInner() {
const i18n = await import("@triliumnext/server/src/services/i18n.js");
await i18n.initializeTranslations();
const sqlInit = (await import("../../server/src/services/sql_init.js")).default;
await sqlInit.createInitialDatabase(true);
// Wait for becca to be loaded before importing data
const beccaLoader = await import("../../server/src/becca/becca_loader.js");
await beccaLoader.beccaLoaded;
// Build User Guide
console.log("Building User Guide...");
await importAndExportDocs(join(__dirname, DOCS_ROOT, "User Guide"), "user-guide");
// Build Developer Guide
console.log("Building Developer Guide...");
await importAndExportDocs(join(__dirname, DOCS_ROOT, "Developer Guide"), "developer-guide");
// Copy favicon.
await fs.copyFile("../../apps/website/src/assets/favicon.ico", join(OUTPUT_DIR, "favicon.ico"));
await fs.copyFile("../../apps/website/src/assets/favicon.ico", join(OUTPUT_DIR, "user-guide", "favicon.ico"));
await fs.copyFile("../../apps/website/src/assets/favicon.ico", join(OUTPUT_DIR, "developer-guide", "favicon.ico"));
console.log("Documentation built successfully!");
}
export async function importData(path: string) {
const buffer = await createImportZip(path);
const importService = (await import("../../server/src/services/import/zip.js")).default;
const TaskContext = (await import("../../server/src/services/task_context.js")).default;
const context = new TaskContext("no-progress-reporting", "importNotes", null);
const becca = (await import("../../server/src/becca/becca.js")).default;
const rootNote = becca.getRoot();
if (!rootNote) {
throw new Error("Missing root note for import.");
}
return await importService.importZip(context, buffer, rootNote, {
preserveIds: true
});
}
async function createImportZip(path: string) {
const inputFile = "input.zip";
const archive = archiver("zip", {
zlib: { level: 0 }
});
console.log("Archive path is ", resolve(path))
archive.directory(path, "/");
const outputStream = fsExtra.createWriteStream(inputFile);
archive.pipe(outputStream);
archive.finalize();
await waitForStreamToFinish(outputStream);
try {
return await fsExtra.readFile(inputFile);
} finally {
await fsExtra.rm(inputFile);
}
}
function waitForStreamToFinish(stream: WriteStream) {
return new Promise<void>((res, rej) => {
stream.on("finish", () => res());
stream.on("error", (err) => rej(err));
});
}
export async function extractZip(zipFilePath: string, outputPath: string, ignoredFiles?: Set<string>) {
const { readZipFile, readContent } = (await import("@triliumnext/server/src/services/import/zip.js"));
await readZipFile(await fs.readFile(zipFilePath), async (zip, entry) => {
// We ignore directories since they can appear out of order anyway.
if (!entry.fileName.endsWith("/") && !ignoredFiles?.has(entry.fileName)) {
const destPath = join(outputPath, entry.fileName);
const fileContent = await readContent(zip, entry);
await fsExtra.mkdirs(dirname(destPath));
await fs.writeFile(destPath, fileContent);
}
zip.readEntry();
});
}
export default async function buildDocs({ gitRootDir }: BuildContext) {
// Build the share theme.
execSync(`pnpm run --filter share-theme build`, {
stdio: "inherit",
cwd: gitRootDir
});
// Trigger the actual build.
await new Promise((res, rej) => {
cls.init(() => {
buildDocsInner()
.catch(rej)
.then(res);
});
});
}

View File

@@ -0,0 +1,4 @@
export default interface BuildContext {
gitRootDir: string;
baseDir: string;
}

View File

@@ -0,0 +1,28 @@
/**
* The front script API is accessible to code notes with the "JS (frontend)" language.
*
* The entire API is exposed as a single global: {@link api}
*
* @module Frontend Script API
*/
/**
* This file creates the entrypoint for TypeDoc that simulates the context from within a
* script note.
*
* Make sure to keep in line with frontend's `script_context.ts`.
*/
export type { default as BasicWidget } from "../../client/src/widgets/basic_widget.js";
export type { default as FAttachment } from "../../client/src/entities/fattachment.js";
export type { default as FAttribute } from "../../client/src/entities/fattribute.js";
export type { default as FBranch } from "../../client/src/entities/fbranch.js";
export type { default as FNote } from "../../client/src/entities/fnote.js";
export type { Api } from "../../client/src/services/frontend_script_api.js";
export type { default as NoteContextAwareWidget } from "../../client/src/widgets/note_context_aware_widget.js";
export type { default as RightPanelWidget } from "../../client/src/widgets/right_panel_widget.js";
import FrontendScriptApi, { type Api } from "../../client/src/services/frontend_script_api.js";
//@ts-expect-error
export const api: Api = new FrontendScriptApi();

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0; url=/user-guide">
<title>Redirecting...</title>
</head>
<body>
<p>If you are not redirected automatically, <a href="/user-guide">click here</a>.</p>
</body>
</html>

View File

@@ -0,0 +1,30 @@
import { join } from "path";
import BuildContext from "./context";
import buildSwagger from "./swagger";
import { cpSync, existsSync, mkdirSync, rmSync } from "fs";
import buildDocs from "./build-docs";
import buildScriptApi from "./script-api";
const context: BuildContext = {
gitRootDir: join(__dirname, "../../../"),
baseDir: join(__dirname, "../../../site")
};
async function main() {
// Clean input dir.
if (existsSync(context.baseDir)) {
rmSync(context.baseDir, { recursive: true });
}
mkdirSync(context.baseDir);
// Start building.
await buildDocs(context);
buildSwagger(context);
buildScriptApi(context);
// Copy index and 404 files.
cpSync(join(__dirname, "index.html"), join(context.baseDir, "index.html"));
cpSync(join(context.baseDir, "user-guide/404.html"), join(context.baseDir, "404.html"));
}
main();

View File

@@ -0,0 +1,15 @@
import { execSync } from "child_process";
import BuildContext from "./context";
import { join } from "path";
export default function buildScriptApi({ baseDir, gitRootDir }: BuildContext) {
// Generate types
execSync(`pnpm typecheck`, { stdio: "inherit", cwd: gitRootDir });
for (const config of [ "backend", "frontend" ]) {
const outDir = join(baseDir, "script-api", config);
execSync(`pnpm typedoc --options typedoc.${config}.json --html "${outDir}"`, {
stdio: "inherit"
});
}
}

View File

@@ -0,0 +1,32 @@
import BuildContext from "./context";
import { join } from "path";
import { execSync } from "child_process";
import { mkdirSync } from "fs";
interface BuildInfo {
specPath: string;
outDir: string;
}
const DIR_PREFIX = "rest-api";
const buildInfos: BuildInfo[] = [
{
// Paths are relative to Git root.
specPath: "apps/server/internal.openapi.yaml",
outDir: `${DIR_PREFIX}/internal`
},
{
specPath: "apps/server/etapi.openapi.yaml",
outDir: `${DIR_PREFIX}/etapi`
}
];
export default function buildSwagger({ baseDir, gitRootDir }: BuildContext) {
for (const { specPath, outDir } of buildInfos) {
const absSpecPath = join(gitRootDir, specPath);
const targetDir = join(baseDir, outDir);
mkdirSync(targetDir, { recursive: true });
execSync(`pnpm redocly build-docs ${absSpecPath} -o ${targetDir}/index.html`, { stdio: "inherit" });
}
}

View File

@@ -0,0 +1,36 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "bundler",
"target": "ES2020",
"outDir": "dist",
"strict": false,
"types": [
"node",
"express"
],
"rootDir": "src",
"tsBuildInfoFile": "dist/tsconfig.app.tsbuildinfo"
},
"include": [
"src/**/*.ts",
"../server/src/*.d.ts"
],
"exclude": [
"eslint.config.js",
"eslint.config.cjs",
"eslint.config.mjs"
],
"references": [
{
"path": "../server/tsconfig.app.json"
},
{
"path": "../desktop/tsconfig.app.json"
},
{
"path": "../client/tsconfig.app.json"
}
]
}

View File

@@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.base.json",
"include": [],
"references": [
{
"path": "../server"
},
{
"path": "../client"
},
{
"path": "./tsconfig.app.json"
}
]
}

View File

@@ -0,0 +1,10 @@
{
"$schema": "https://typedoc.org/schema.json",
"name": "Trilium Backend API",
"entryPoints": [
"src/backend_script_entrypoint.ts"
],
"plugin": [
"typedoc-plugin-missing-exports"
]
}

View File

@@ -0,0 +1,10 @@
{
"$schema": "https://typedoc.org/schema.json",
"name": "Trilium Frontend API",
"entryPoints": [
"src/frontend_script_entrypoint.ts"
],
"plugin": [
"typedoc-plugin-missing-exports"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@triliumnext/client",
"version": "0.99.3",
"version": "0.99.4",
"description": "JQuery-based client for TriliumNext, used for both web and desktop (via Electron)",
"private": true,
"license": "AGPL-3.0-only",
@@ -15,7 +15,7 @@
"circular-deps": "dpdm -T src/**/*.ts --tree=false --warning=false --skip-dynamic-imports=circular"
},
"dependencies": {
"@eslint/js": "9.38.0",
"@eslint/js": "9.39.1",
"@excalidraw/excalidraw": "0.18.0",
"@fullcalendar/core": "6.1.19",
"@fullcalendar/daygrid": "6.1.19",
@@ -37,13 +37,13 @@
"bootstrap": "5.3.8",
"boxicons": "2.1.4",
"color": "5.0.2",
"dayjs": "1.11.18",
"dayjs": "1.11.19",
"dayjs-plugin-utc": "0.1.2",
"debounce": "2.2.0",
"debounce": "3.0.0",
"draggabilly": "3.0.0",
"force-graph": "1.51.0",
"globals": "16.4.0",
"i18next": "25.6.0",
"globals": "16.5.0",
"i18next": "25.6.1",
"i18next-http-backend": "3.0.2",
"jquery": "3.7.1",
"jquery.fancytree": "2.38.5",
@@ -53,13 +53,13 @@
"leaflet": "1.9.4",
"leaflet-gpx": "2.2.0",
"mark.js": "8.11.1",
"marked": "16.4.1",
"marked": "16.4.2",
"mermaid": "11.12.1",
"mind-elixir": "5.3.4",
"mind-elixir": "5.3.5",
"normalize.css": "8.0.1",
"panzoom": "9.4.3",
"preact": "10.27.2",
"react-i18next": "16.2.1",
"react-i18next": "16.2.4",
"reveal.js": "5.2.1",
"svg-pan-zoom": "3.6.2",
"tabulator-tables": "6.3.1",
@@ -76,7 +76,7 @@
"@types/reveal.js": "5.2.1",
"@types/tabulator-tables": "6.3.0",
"copy-webpack-plugin": "13.0.1",
"happy-dom": "20.0.8",
"happy-dom": "20.0.10",
"script-loader": "0.7.2",
"vite-plugin-static-copy": "3.1.4"
}

View File

@@ -270,6 +270,7 @@ export type CommandMappings = {
closeThisNoteSplit: CommandData;
moveThisNoteSplit: CommandData & { isMovingLeft: boolean };
jumpToNote: CommandData;
openTodayNote: CommandData;
commandPalette: CommandData;
// Keyboard shortcuts
@@ -498,6 +499,10 @@ type EventMappings = {
noteIds: string[];
};
refreshData: { ntxId: string | null | undefined };
contentSafeMarginChanged: {
top: number;
noteContext: NoteContext;
}
};
export type EventListener<T extends EventNames> = {

View File

@@ -159,6 +159,16 @@ export default class Entrypoints extends Component {
this.openInWindowCommand({ notePath: "", hoistedNoteId: "root" });
}
async openTodayNoteCommand() {
const todayNote = await dateNoteService.getTodayNote();
if (!todayNote) {
console.warn("Missing today note.");
return;
}
await appContext.tabManager.openInSameTab(todayNote.noteId);
}
async runActiveNoteCommand() {
const noteContext = appContext.tabManager.getActiveContext();
if (!noteContext) {

View File

@@ -7,7 +7,6 @@ import protectedSessionService from "../services/protected_session.js";
import options from "../services/options.js";
import froca from "../services/froca.js";
import utils from "../services/utils.js";
import LlmChatPanel from "../widgets/llm_chat_panel.js";
import toastService from "../services/toast.js";
import noteCreateService from "../services/note_create.js";
@@ -171,7 +170,8 @@ export default class RootCommandExecutor extends Component {
}
toggleTrayCommand() {
if (!utils.isElectron()) return;
if (!utils.isElectron() || options.is("disableTray")) return;
const { BrowserWindow } = utils.dynamicRequire("@electron/remote");
const windows = BrowserWindow.getAllWindows() as Electron.BaseWindow[];
const isVisible = windows.every((w) => w.isVisible());

View File

@@ -417,7 +417,7 @@ export default class FNote {
return notePaths;
}
getSortedNotePathRecords(hoistedNoteId = "root"): NotePathRecord[] {
getSortedNotePathRecords(hoistedNoteId = "root", activeNotePath: string | null = null): NotePathRecord[] {
const isHoistedRoot = hoistedNoteId === "root";
const notePaths: NotePathRecord[] = this.getAllNotePaths().map((path) => ({
@@ -428,7 +428,23 @@ export default class FNote {
isHidden: path.includes("_hidden")
}));
// Calculate the length of the prefix match between two arrays
const prefixMatchLength = (path: string[], target: string[]) => {
const diffIndex = path.findIndex((seg, i) => seg !== target[i]);
return diffIndex === -1 ? Math.min(path.length, target.length) : diffIndex;
};
notePaths.sort((a, b) => {
if (activeNotePath) {
const activeSegments = activeNotePath.split('/');
const aOverlap = prefixMatchLength(a.notePath, activeSegments);
const bOverlap = prefixMatchLength(b.notePath, activeSegments);
// Paths with more matching prefix segments are prioritized
// when the match count is equal, other criteria are used for sorting
if (bOverlap !== aOverlap) {
return bOverlap - aOverlap;
}
}
if (a.isInHoistedSubTree !== b.isInHoistedSubTree) {
return a.isInHoistedSubTree ? -1 : 1;
} else if (a.isArchived !== b.isArchived) {
@@ -449,10 +465,11 @@ export default class FNote {
* Returns the note path considered to be the "best"
*
* @param {string} [hoistedNoteId='root']
* @param {string|null} [activeNotePath=null]
* @return {string[]} array of noteIds constituting the particular note path
*/
getBestNotePath(hoistedNoteId = "root") {
return this.getSortedNotePathRecords(hoistedNoteId)[0]?.notePath;
getBestNotePath(hoistedNoteId = "root", activeNotePath: string | null = null) {
return this.getSortedNotePathRecords(hoistedNoteId, activeNotePath)[0]?.notePath;
}
/**

View File

@@ -1,47 +1,49 @@
import FlexContainer from "../widgets/containers/flex_container.js";
import TabRowWidget from "../widgets/tab_row.js";
import LeftPaneContainer from "../widgets/containers/left_pane_container.js";
import NoteTreeWidget from "../widgets/note_tree.js";
import NoteTitleWidget from "../widgets/note_title.jsx";
import NoteDetailWidget from "../widgets/note_detail.js";
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
import NoteIconWidget from "../widgets/note_icon.jsx";
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
import RootContainer from "../widgets/containers/root_container.js";
import WatchedFileUpdateStatusWidget from "../widgets/watched_file_update_status.js";
import SpacerWidget from "../widgets/spacer.js";
import QuickSearchWidget from "../widgets/quick_search.js";
import SplitNoteContainer from "../widgets/containers/split_note_container.js";
import CreatePaneButton from "../widgets/buttons/create_pane_button.js";
import ClosePaneButton from "../widgets/buttons/close_pane_button.js";
import RightPaneContainer from "../widgets/containers/right_pane_container.js";
import NoteWrapperWidget from "../widgets/note_wrapper.js";
import FindWidget from "../widgets/find.js";
import TocWidget from "../widgets/toc.js";
import HighlightsListWidget from "../widgets/highlights_list.js";
import PasswordNoteSetDialog from "../widgets/dialogs/password_not_set.js";
import LauncherContainer from "../widgets/containers/launcher_container.js";
import MovePaneButton from "../widgets/buttons/move_pane_button.js";
import UploadAttachmentsDialog from "../widgets/dialogs/upload_attachments.js";
import ScrollPadding from "../widgets/scroll_padding.js";
import options from "../services/options.js";
import utils from "../services/utils.js";
import type { AppContext } from "../components/app_context.js";
import type { WidgetsByParent } from "../services/bundle.js";
import { applyModals } from "./layout_commons.js";
import Ribbon from "../widgets/ribbon/Ribbon.jsx";
import FloatingButtons from "../widgets/FloatingButtons.jsx";
import { DESKTOP_FLOATING_BUTTONS } from "../widgets/FloatingButtonsDefinitions.jsx";
import SearchResult from "../widgets/search_result.jsx";
import ApiLog from "../widgets/api_log.jsx";
import ClosePaneButton from "../widgets/buttons/close_pane_button.js";
import CloseZenModeButton from "../widgets/close_zen_button.jsx";
import ContentHeader from "../widgets/containers/content-header.js";
import CreatePaneButton from "../widgets/buttons/create_pane_button.js";
import FindWidget from "../widgets/find.js";
import FlexContainer from "../widgets/containers/flex_container.js";
import FloatingButtons from "../widgets/FloatingButtons.jsx";
import GlobalMenu from "../widgets/buttons/global_menu.jsx";
import HighlightsListWidget from "../widgets/highlights_list.js";
import LauncherContainer from "../widgets/containers/launcher_container.js";
import LeftPaneContainer from "../widgets/containers/left_pane_container.js";
import LeftPaneToggle from "../widgets/buttons/left_pane_toggle.js";
import MovePaneButton from "../widgets/buttons/move_pane_button.js";
import NoteDetailWidget from "../widgets/note_detail.js";
import NoteIconWidget from "../widgets/note_icon.jsx";
import NoteList from "../widgets/collections/NoteList.jsx";
import NoteTitleWidget from "../widgets/note_title.jsx";
import NoteTreeWidget from "../widgets/note_tree.js";
import NoteWrapperWidget from "../widgets/note_wrapper.js";
import options from "../services/options.js";
import PasswordNoteSetDialog from "../widgets/dialogs/password_not_set.js";
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
import QuickSearchWidget from "../widgets/quick_search.js";
import ReadOnlyNoteInfoBar from "../widgets/ReadOnlyNoteInfoBar.jsx";
import Ribbon from "../widgets/ribbon/Ribbon.jsx";
import RightPaneContainer from "../widgets/containers/right_pane_container.js";
import RootContainer from "../widgets/containers/root_container.js";
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
import ScrollPadding from "../widgets/scroll_padding.js";
import SearchResult from "../widgets/search_result.jsx";
import SharedInfo from "../widgets/shared_info.jsx";
import SpacerWidget from "../widgets/spacer.js";
import SplitNoteContainer from "../widgets/containers/split_note_container.js";
import SqlResults from "../widgets/sql_result.js";
import SqlTableSchemas from "../widgets/sql_table_schemas.js";
import TabRowWidget from "../widgets/tab_row.js";
import TitleBarButtons from "../widgets/title_bar_buttons.jsx";
import LeftPaneToggle from "../widgets/buttons/left_pane_toggle.js";
import ApiLog from "../widgets/api_log.jsx";
import CloseZenModeButton from "../widgets/close_zen_button.jsx";
import SharedInfo from "../widgets/shared_info.jsx";
import NoteList from "../widgets/collections/NoteList.jsx";
import TocWidget from "../widgets/toc.js";
import type { AppContext } from "../components/app_context.js";
import type { WidgetsByParent } from "../services/bundle.js";
import UploadAttachmentsDialog from "../widgets/dialogs/upload_attachments.js";
import utils from "../services/utils.js";
import WatchedFileUpdateStatusWidget from "../widgets/watched_file_update_status.js";
export default class DesktopLayout {
@@ -129,12 +131,15 @@ export default class DesktopLayout {
.child(<CreatePaneButton />)
)
.child(<Ribbon />)
.child(<SharedInfo />)
.child(new WatchedFileUpdateStatusWidget())
.child(<FloatingButtons items={DESKTOP_FLOATING_BUTTONS} />)
.child(
new ScrollingContainer()
.filling()
.child(new ContentHeader()
.child(<ReadOnlyNoteInfoBar />)
.child(<SharedInfo />)
)
.child(new PromotedAttributesWidget())
.child(<SqlTableSchemas />)
.child(new NoteDetailWidget())

View File

@@ -1,32 +1,34 @@
import { applyModals } from "./layout_commons.js";
import { MOBILE_FLOATING_BUTTONS } from "../widgets/FloatingButtonsDefinitions.jsx";
import { useNoteContext } from "../widgets/react/hooks.jsx";
import CloseZenModeButton from "../widgets/close_zen_button.js";
import FilePropertiesTab from "../widgets/ribbon/FilePropertiesTab.jsx";
import FlexContainer from "../widgets/containers/flex_container.js";
import NoteTitleWidget from "../widgets/note_title.js";
import NoteDetailWidget from "../widgets/note_detail.js";
import QuickSearchWidget from "../widgets/quick_search.js";
import NoteTreeWidget from "../widgets/note_tree.js";
import ScreenContainer from "../widgets/mobile_widgets/screen_container.js";
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
import FloatingButtons from "../widgets/FloatingButtons.jsx";
import GlobalMenuWidget from "../widgets/buttons/global_menu.js";
import LauncherContainer from "../widgets/containers/launcher_container.js";
import RootContainer from "../widgets/containers/root_container.js";
import SharedInfoWidget from "../widgets/shared_info.js";
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
import SidebarContainer from "../widgets/mobile_widgets/sidebar_container.js";
import type AppContext from "../components/app_context.js";
import TabRowWidget from "../widgets/tab_row.js";
import MobileEditorToolbar from "../widgets/type_widgets/ckeditor/mobile_editor_toolbar.js";
import { applyModals } from "./layout_commons.js";
import FilePropertiesTab from "../widgets/ribbon/FilePropertiesTab.jsx";
import { useNoteContext } from "../widgets/react/hooks.jsx";
import FloatingButtons from "../widgets/FloatingButtons.jsx";
import { MOBILE_FLOATING_BUTTONS } from "../widgets/FloatingButtonsDefinitions.jsx";
import ToggleSidebarButton from "../widgets/mobile_widgets/toggle_sidebar_button.jsx";
import CloseZenModeButton from "../widgets/close_zen_button.js";
import NoteWrapperWidget from "../widgets/note_wrapper.js";
import MobileDetailMenu from "../widgets/mobile_widgets/mobile_detail_menu.js";
import MobileEditorToolbar from "../widgets/type_widgets/ckeditor/mobile_editor_toolbar.js";
import NoteDetailWidget from "../widgets/note_detail.js";
import NoteList from "../widgets/collections/NoteList.jsx";
import StandaloneRibbonAdapter from "../widgets/ribbon/components/StandaloneRibbonAdapter.jsx";
import NoteTitleWidget from "../widgets/note_title.js";
import ContentHeader from "../widgets/containers/content-header.js";
import NoteTreeWidget from "../widgets/note_tree.js";
import NoteWrapperWidget from "../widgets/note_wrapper.js";
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
import QuickSearchWidget from "../widgets/quick_search.js";
import ReadOnlyNoteInfoBar from "../widgets/ReadOnlyNoteInfoBar.jsx";
import RootContainer from "../widgets/containers/root_container.js";
import ScreenContainer from "../widgets/mobile_widgets/screen_container.js";
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
import SearchDefinitionTab from "../widgets/ribbon/SearchDefinitionTab.jsx";
import SearchResult from "../widgets/search_result.jsx";
import SharedInfoWidget from "../widgets/shared_info.js";
import SidebarContainer from "../widgets/mobile_widgets/sidebar_container.js";
import StandaloneRibbonAdapter from "../widgets/ribbon/components/StandaloneRibbonAdapter.jsx";
import TabRowWidget from "../widgets/tab_row.js";
import ToggleSidebarButton from "../widgets/mobile_widgets/toggle_sidebar_button.jsx";
import type AppContext from "../components/app_context.js";
const MOBILE_CSS = `
<style>
@@ -149,13 +151,16 @@ export default class MobileLayout {
.child(<NoteTitleWidget />)
.child(<MobileDetailMenu />)
)
.child(<SharedInfoWidget />)
.child(<FloatingButtons items={MOBILE_FLOATING_BUTTONS} />)
.child(new PromotedAttributesWidget())
.child(
new ScrollingContainer()
.filling()
.contentSized()
.child(new ContentHeader()
.child(<ReadOnlyNoteInfoBar />)
.child(<SharedInfoWidget />)
)
.child(new NoteDetailWidget())
.child(<NoteList media="screen" />)
.child(<StandaloneRibbonAdapter component={SearchDefinitionTab} />)

View File

@@ -137,7 +137,7 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Tree
command: "editBranchPrefix",
keyboardShortcut: "editBranchPrefix",
uiIcon: "bx bx-rename",
enabled: isNotRoot && parentNotSearch && noSelectedNotes && notOptionsOrHelp
enabled: isNotRoot && parentNotSearch && notOptionsOrHelp
},
{ title: t("tree-context-menu.convert-to-attachment"), command: "convertNoteToAttachment", uiIcon: "bx bx-paperclip", enabled: isNotRoot && !isHoisted && notOptionsOrHelp },

View File

@@ -1,3 +1,5 @@
@import "boxicons/css/boxicons.min.css";
:root {
--print-font-size: 11pt;
--ck-content-color-image-caption-background: transparent !important;

View File

@@ -70,6 +70,9 @@ function SingleNoteRenderer({ note, onReady }: RendererProps) {
});
})
);
// Check custom CSS.
await loadCustomCss(note);
}
load().then(() => requestAnimationFrame(onReady))
@@ -89,7 +92,10 @@ function CollectionRenderer({ note, onReady }: RendererProps) {
ntxId="print"
highlightedTokens={null}
media="print"
onReady={onReady}
onReady={async () => {
await loadCustomCss(note);
onReady();
}}
/>;
}
@@ -102,4 +108,25 @@ function Error404({ noteId }: { noteId: string }) {
)
}
async function loadCustomCss(note: FNote) {
const printCssNotes = await note.getRelationTargets("printCss");
let loadPromises: JQueryPromise<void>[] = [];
for (const printCssNote of printCssNotes) {
if (!printCssNote || (printCssNote.type !== "code" && printCssNote.mime !== "text/css")) continue;
const linkEl = document.createElement("link");
linkEl.href = `/api/notes/${printCssNote.noteId}/download`;
linkEl.rel = "stylesheet";
const promise = $.Deferred();
loadPromises.push(promise.promise());
linkEl.onload = () => promise.resolve();
document.head.appendChild(linkEl);
}
await Promise.allSettled(loadPromises);
}
main();

View File

@@ -1,28 +0,0 @@
/**
* The front script API is accessible to code notes with the "JS (frontend)" language.
*
* The entire API is exposed as a single global: {@link api}
*
* @module Frontend Script API
*/
/**
* This file creates the entrypoint for TypeDoc that simulates the context from within a
* script note.
*
* Make sure to keep in line with frontend's `script_context.ts`.
*/
export type { default as BasicWidget } from "../widgets/basic_widget.js";
export type { default as FAttachment } from "../entities/fattachment.js";
export type { default as FAttribute } from "../entities/fattribute.js";
export type { default as FBranch } from "../entities/fbranch.js";
export type { default as FNote } from "../entities/fnote.js";
export type { Api } from "./frontend_script_api.js";
export type { default as NoteContextAwareWidget } from "../widgets/note_context_aware_widget.js";
export type { default as RightPanelWidget } from "../widgets/right_panel_widget.js";
import FrontendScriptApi, { type Api } from "./frontend_script_api.js";
//@ts-expect-error
export const api: Api = new FrontendScriptApi();

View File

@@ -10,7 +10,7 @@ export const byNoteType: Record<Exclude<NoteType, "book">, string | null> = {
file: null,
image: null,
launcher: null,
mermaid: null,
mermaid: "s1aBHPd79XYj",
mindMap: null,
noteMap: null,
relationMap: null,

View File

@@ -159,7 +159,7 @@ describe("shortcuts", () => {
expect(matchesShortcut(event, "Shift+F1")).toBeTruthy();
// Special keys
for (const keyCode of [ "Delete", "Enter" ]) {
for (const keyCode of [ "Delete", "Enter", "NumpadEnter" ]) {
event = createKeyboardEvent({ key: keyCode, code: keyCode });
expect(matchesShortcut(event, keyCode), `Key ${keyCode}`).toBeTruthy();
}

View File

@@ -46,6 +46,7 @@ for (let i = 1; i <= 19; i++) {
const KEYCODES_WITH_NO_MODIFIER = new Set([
"Delete",
"Enter",
"NumpadEnter",
...functionKeyCodes
]);

View File

@@ -24,7 +24,9 @@ export async function formatCodeBlocks($container: JQuery<HTMLElement>) {
continue;
}
applyCopyToClipboardButton($(codeBlock));
if (glob.device !== "print") {
applyCopyToClipboardButton($(codeBlock));
}
if (syntaxHighlightingEnabled) {
applySingleBlockSyntaxHighlight($(codeBlock), normalizedMimeType);

View File

@@ -26,21 +26,12 @@ async function resolveNotePathToSegments(notePath: string, hoistedNoteId = "root
}
const path = notePath.split("/").reverse();
if (!path.includes("root")) {
path.push("root");
}
const effectivePathSegments: string[] = [];
let childNoteId: string | null = null;
let i = 0;
while (true) {
if (i >= path.length) {
break;
}
const parentNoteId = path[i++];
for (let i = 0; i < path.length; i++) {
const parentNoteId = path[i];
if (childNoteId !== null) {
const child = await froca.getNote(childNoteId, !logErrors);
@@ -65,7 +56,7 @@ async function resolveNotePathToSegments(notePath: string, hoistedNoteId = "root
return null;
}
if (!parents.some((p) => p.noteId === parentNoteId)) {
if (!parents.some(p => p.noteId === parentNoteId) || (i === path.length - 1 && parentNoteId !== 'root')) {
if (logErrors) {
const parent = froca.getNoteFromCache(parentNoteId);
@@ -77,7 +68,8 @@ async function resolveNotePathToSegments(notePath: string, hoistedNoteId = "root
);
}
const bestNotePath = child.getBestNotePath(hoistedNoteId);
const activeNotePath = appContext.tabManager.getActiveContextNotePath();
const bestNotePath = child.getBestNotePath(hoistedNoteId, activeNotePath);
if (bestNotePath) {
const pathToRoot = bestNotePath.reverse().slice(1);
@@ -108,7 +100,9 @@ async function resolveNotePathToSegments(notePath: string, hoistedNoteId = "root
if (!note) {
throw new Error(`Unable to find note: ${notePath}.`);
}
const bestNotePath = note.getBestNotePath(hoistedNoteId);
const activeNotePath = appContext.tabManager.getActiveContextNotePath();
const bestNotePath = note.getBestNotePath(hoistedNoteId, activeNotePath);
if (!bestNotePath) {
throw new Error(`Did not find any path segments for '${note.toString()}', hoisted note '${hoistedNoteId}'`);

View File

@@ -11,7 +11,11 @@ export function reloadFrontendApp(reason?: string) {
logInfo(`Frontend app reload: ${reason}`);
}
window.location.reload();
if (isElectron()) {
dynamicRequire("@electron/remote").BrowserWindow.getFocusedWindow()?.reload();
} else {
window.location.reload();
}
}
export function restartDesktopApp() {
@@ -837,7 +841,7 @@ export function arrayEqual<T>(a: T[], b: T[]) {
return true;
}
type Indexed<T extends object> = T & { index: number };
export type Indexed<T extends object> = T & { index: number };
/**
* Given an object array, alters every object in the array to have an index field assigned to it.

View File

@@ -1,24 +0,0 @@
import "normalize.css";
import "boxicons/css/boxicons.min.css";
import "@triliumnext/ckeditor5/src/theme/ck-content.css";
import "@triliumnext/share-theme/styles/index.css";
import "@triliumnext/share-theme/scripts/index.js";
async function ensureJQuery() {
const $ = (await import("jquery")).default;
(window as any).$ = $;
}
async function formatCodeBlocks() {
const anyCodeBlock = document.querySelector("#content pre");
if (!anyCodeBlock) {
return;
}
await ensureJQuery();
const { formatCodeBlocks } = await import("./services/syntax_highlight.js");
await formatCodeBlocks($("#content"));
}
async function setupTextNote() {
formatCodeBlocks();
}

View File

@@ -5,7 +5,6 @@
.note-detail-relation-map {
height: 100%;
overflow: hidden !important;
padding: 10px;
position: relative;
}

View File

@@ -1104,7 +1104,6 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href
.card {
color: inherit !important;
background-color: inherit !important;
border-color: var(--main-border-color) !important;
}
@@ -1759,10 +1758,10 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
flex-direction: column;
margin-inline-start: 10px;
margin-inline-end: 5px;
background: transparent;
}
#right-pane .card-header {
background: inherit;
padding: 6px 0 3px 0;
width: 99%; /* to give minimal right margin */
background-color: var(--button-background-color);
@@ -1809,12 +1808,15 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
}
.note-split {
/* Limits the maximum width of the note */
--max-content-width: var(--preferred-max-content-width);
margin-inline-start: auto;
margin-inline-end: auto;
}
.note-split.full-content-width {
max-width: 999999px;
--max-content-width: unset;
}
button.close:hover {
@@ -2034,13 +2036,16 @@ body.zen #right-pane,
body.zen #mobile-sidebar-wrapper,
body.zen .tab-row-container,
body.zen .tab-row-widget,
body.zen .shared-info-widget,
body.zen .ribbon-container:not(:has(.classic-toolbar-widget)),
body.zen .ribbon-container:has(.classic-toolbar-widget) .ribbon-top-row,
body.zen .ribbon-container .ribbon-body:not(:has(.classic-toolbar-widget)),
body.zen .note-icon-widget,
body.zen .title-row .icon-action,
body.zen .promoted-attributes-widget,
body.zen .floating-buttons-children > *:not(.bx-edit-alt),
body.zen .action-button {
body.zen .action-button,
body.zen .note-split:not(.type-book) .note-list-widget {
display: none !important;
}
@@ -2084,12 +2089,121 @@ body.zen .note-title-widget,
body.zen .note-title-widget input {
font-size: 1rem !important;
background: transparent !important;
pointer-events: none;
}
body.zen #detail-container {
width: 100%;
}
body.zen .note-split:not(.full-content-width) .scrolling-container {
display: flex;
flex-direction: column;
scroll-behavior: unset !important;
}
body.zen .note-split:not(.full-content-width) .note-detail {
margin: auto;
padding-bottom: 25vh;
max-width: var(--max-content-width);
width: 100%;
}
body.zen .note-split:not(.full-content-width) .scroll-padding-widget {
display: none;
}
body.zen .note-split.type-text {
position: relative;
font-size: 1.15em;
}
body.zen:not(.backdrop-effects-disabled) .note-split.type-text .title-row {
--start-color: var(--main-background-color);
position: absolute;
width: 100%;
background: linear-gradient(var(--start-color) 30%, transparent 100%);
z-index: 1000;
}
@supports (background: color-mix(in srgb, white, transparent)) {
body.zen .note-split.type-text .title-row {
--start-color: color-mix(in srgb, var(--main-background-color), transparent 10%);
}
}
body.zen .note-split.type-text .scrolling-container {
--padding-bottom: 130px; /* Should be enough to avoid caret being hidden by the formatting toolbar */
/* (Usually) keeps the caret above the fixed toolbar */
scroll-padding-bottom: var(--padding-bottom);
}
body.zen:not(.backdrop-effects-disabled) .note-split.type-text .scrolling-container {
--padding-top: 50px; /* Should be enough to cover the title row */
padding-top: var(--padding-top);
scroll-padding-top: var(--padding-top);
}
/* Fixed formatting toolbar */
body.zen .note-split .ribbon-container {
position: fixed;
left: 0;
bottom: 20px;
width: 100%;
z-index: 1000;
opacity: 0; /* Hidden unless the current note split is focused */
pointer-events: none;
transition: opacity 100ms linear;
}
body.zen .note-split:focus-within .ribbon-container {
opacity: 1; /* Show when the note split is focused */
}
body.zen .note-split .ribbon-container .ribbon-body {
border: 0;
}
body.zen .note-split .ribbon-container .classic-toolbar-widget {
margin: auto;
width: fit-content;
box-shadow: 0px 10px 20px rgba(0, 0, 0, .1);
border-radius: 8px;
border: 1px solid var(--main-border-color);
padding: 4px;
background: var(--menu-background-color);
}
body.zen .note-split .ribbon-container .classic-toolbar-widget:not(:has(> .ck-toolbar)) {
/* Hide the toolbar wrapper if the toolbar is missing */
display: none;
}
body.zen .note-split:focus-within .ribbon-container .classic-toolbar-widget {
pointer-events: all;
}
@media (max-width: 1300px) {
body.zen .note-split .ribbon-container .classic-toolbar-widget {
/* Set the toolbar to full with */
width: 100%;
}
body.zen .classic-toolbar-widget .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,
body.zen .classic-toolbar-widget .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw,
body.zen .classic-toolbar-widget .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,
body.zen .classic-toolbar-widget .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,
body.zen .classic-toolbar-widget .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s {
/* Force toolbar items overflow dropdowns open upwards */
top: auto;
bottom: 100%;
}
}
/* Content renderer */
footer.file-footer,
@@ -2406,7 +2520,7 @@ footer.webview-footer button {
transform: rotate(180deg);
}
/* CK Edito */
/* CK Editor */
/* Insert text snippet: limit the width of the listed items to avoid overly long names */
:root body.desktop div.ck-template-form li.ck-list__item .ck-template-form__text-part > span {
@@ -2436,4 +2550,18 @@ iframe.print-iframe {
.excalidraw.theme--dark canvas {
--theme-filter: invert(100%) hue-rotate(180deg);
}
/* Scrolling container */
.scrolling-container:has(> :is(.note-detail.full-height, .note-list-widget.full-height)) {
display: flex;
flex-direction: column;
}
.scrolling-container > .note-detail.full-height,
.scrolling-container > .note-list-widget.full-height {
position: relative;
flex-grow: 1;
width: 100%;
}

View File

@@ -15,7 +15,7 @@
--native-titlebar-background: #00000000;
--window-background-color-bgfx: transparent; /* When background effects enabled */
--main-background-color: #272727;
--main-background-color: #242424;
--main-text-color: #ccc;
--main-border-color: #454545;
--subtle-border-color: #313131;
@@ -166,6 +166,9 @@
--protected-session-active-icon-color: #8edd8e;
--sync-status-error-pulse-color: #f47871;
--center-pane-vert-layout-background-color-bgfx: #0c0c0c69;
--center-pane-horiz-layout-background-color-bgfx: #1e1e1ec7;
--right-pane-heading-color: gray;
--root-background: var(--left-pane-background-color);
@@ -192,9 +195,9 @@
--badge-background-color: #ffffff1a;
--badge-text-color: var(--muted-text-color);
--promoted-attribute-card-background-color: var(--card-background-color);
--promoted-attribute-card-shadow-color: #000000b3;
--promoted-attribute-card-background-color: #ffffff21;
--promoted-attribute-card-shadow: none;
--floating-button-shadow-color: #00000080;
--floating-button-background-color: #494949d2;
--floating-button-color: var(--button-text-color);
@@ -208,6 +211,8 @@
--floating-button-hide-button-background: #00000029;
--floating-button-hide-button-color: #ffffff63;
--right-pane-background-color: var(--main-background-color);
--right-pane-background-color-bgfx: #0c0c0c24; /* Only for the vertical layout */
--right-pane-item-hover-background: #ffffff26;
--right-pane-item-hover-color: white;
@@ -225,10 +230,9 @@
--code-block-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
--card-background-color: #ffffff12;
--card-background-hover-color: #3c3c3c;
--card-background-press-color: #464646;
--card-border-color: #222222;
--card-box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
--card-background-hover-color: #ffffff20;
--card-border-color: transparent;
--card-box-shadow: none;
--calendar-color: var(--menu-text-color);
--calendar-weekday-labels-color: var(--muted-text-color);
@@ -294,4 +298,10 @@ body ::-webkit-calendar-picker-indicator {
body .todo-list input[type="checkbox"]:not(:checked):before {
border-color: var(--muted-text-color) !important;
}
.tinted-quick-edit-dialog {
--modal-background-color: hsl(var(--custom-color-hue), 8.8%, 11.2%);
--modal-border-color: hsl(var(--custom-color-hue), 9.4%, 25.1%);
--promoted-attribute-card-background-color: hsl(var(--custom-color-hue), 13.2%, 20.8%);
}

View File

@@ -159,6 +159,9 @@
--protected-session-active-icon-color: #16b516;
--sync-status-error-pulse-color: #ff5528;
--center-pane-vert-layout-background-color-bgfx: #ffffff75;
--center-pane-horiz-layout-background-color-bgfx: #ffffffd6;
--right-pane-heading-color: gray;
--root-background: var(--left-pane-background-color);
@@ -180,13 +183,13 @@
--inactive-tab-hover-background-color: #00000016;
--inactive-tab-text-color: #4e4e4e;
--alert-bar-background: #32637b29;
--alert-bar-background: #f9cf2b29;
--badge-background-color: #00000011;
--badge-text-color: var(--muted-text-color);
--promoted-attribute-card-background-color: var(--card-background-color);
--promoted-attribute-card-shadow-color: #00000033;
--promoted-attribute-card-background-color: #00000014;
--promoted-attribute-card-shadow: none;
--floating-button-shadow-color: #00000042;
--floating-button-background-color: #eaeaeacc;
@@ -207,7 +210,9 @@
--new-tab-button-hover-background: white;
--new-tab-button-hover-color: black;
--right-pane-item-hover-background: #ececec;
--right-pane-background-color: var(--main-background-color);
--right-pane-background-color-bgfx: #ffffff9e; /* Only for the vertical layout */
--right-pane-item-hover-background: #00000013;
--right-pane-item-hover-color: inherit;
--scrollbar-thumb-color: #0000005c;
@@ -223,12 +228,11 @@
--code-block-box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1), 0px 0px 2px rgba(0, 0, 0, 0.2);
--card-background-color: var(--accented-background-color);
--card-background-hover-color: #f9f9f9;
--card-background-press-color: #efefef;
--card-border-color: #eaeaea;
--card-background-color: #0000000d;
--card-background-hover-color: #0000001c;
--card-border-color: transparent;
--card-shadow-color: rgba(0, 0, 0, 0.1);
--card-box-shadow: 0 0 12px var(--card-shadow-color);
--card-box-shadow: none;
--calendar-color: var(--menu-text-color);
--calendar-weekday-labels-color: var(--muted-text-color);
@@ -270,4 +274,10 @@
* The --custom-color-hue variable contains the hue of the user-selected note color.
* This value is unset for gray tones. */
--custom-bg-color: hsl(var(--custom-color-hue), 37%, 89%, 1);
}
.tinted-quick-edit-dialog {
--modal-background-color: hsl(var(--custom-color-hue), 56%, 96%);
--modal-border-color: hsl(var(--custom-color-hue), 33%, 41%);
--promoted-attribute-card-background-color: hsl(var(--custom-color-hue), 40%, 88%);
}

View File

@@ -82,6 +82,7 @@
/* Theme capabilities */
--tab-note-icons: true;
--allow-background-effects: true;
/* To ensure that a tree item's custom color remains sufficiently contrasted and readable,
* the color is adjusted based on the current color scheme (light or dark). The lightness
@@ -131,7 +132,8 @@ body.mobile .dropdown-menu .dropdown-menu {
body.desktop .dropdown-menu::before,
:root .ck.ck-dropdown__panel::before,
:root .excalidraw .popover::before {
:root .excalidraw .popover::before,
body.zen .note-split .ribbon-container .classic-toolbar-widget::before {
content: "";
backdrop-filter: var(--dropdown-backdrop-filter);
border-radius: var(--dropdown-border-radius);
@@ -485,13 +487,21 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
--note-list-vertical-padding: 15px;
background-color: var(--card-background-color);
border: 1px solid var(--card-border-color) !important;
box-shadow: 2px 3px 4px var(--card-shadow-color);
border-radius: 12px;
user-select: none;
padding: 0;
margin: 5px 10px 5px 0;
}
:root .note-list .note-book-card:hover {
background-color: var(--card-background-hover-color);
transition: background-color 200ms ease-out;
}
:root .note-list.grid-view .note-book-card:active {
transform: scale(.98);
}
.note-list.list-view .note-book-card {
box-shadow: 0 0 3px var(--card-shadow-color);
}
@@ -500,10 +510,6 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
vertical-align: middle;
}
.note-list-wrapper .note-book-card:active {
background-color: var(--card-background-press-color);
}
.note-list-wrapper .note-book-card a {
color: inherit !important;
}
@@ -585,7 +591,6 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
}
.note-list.grid-view .note-book-card:hover {
background: var(--card-background-color) !important;
filter: contrast(105%);
}

View File

@@ -258,11 +258,6 @@
border-inline-start: 1px solid var(--ck-color-toolbar-border);
}
/* The last separator of the toolbar */
:root .classic-toolbar-widget .ck.ck-toolbar__separator:last-of-type {
flex-grow: 1;
}
/* Heading dropdown */
:root .ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item {
@@ -679,4 +674,17 @@ html .note-detail-editable-text :not(figure, .include-note, hr):first-child {
.ck-content a.reference-link > span {
text-decoration: underline;
}
/*
* Read-only text content
*/
.note-detail-readonly-text:focus-visible {
outline: 2px solid var(--input-focus-outline-color);
border-radius: 4px;
}
.note-list-widget {
outline: 0 !important;
}

View File

@@ -101,7 +101,7 @@
.sql-table-schemas-widget .sql-table-schemas button:hover,
.sql-table-schemas-widget .sql-table-schemas button:active,
.sql-table-schemas-widget .sql-table-schemas button:focus-visible {
--background: var(--card-background-press-color);
--background: var(--card-background-hover-color);
--color: var(--main-text-color);
}
@@ -123,8 +123,12 @@
*/
/* The container */
div.note-detail-empty {
max-width: 70%;
.note-split.empty-note {
--max-content-width: 70%;
}
.note-split.empty-note div.note-detail {
margin: 50px auto;
}
@@ -148,7 +152,7 @@ div.note-detail-empty {
--options-card-min-width: 500px;
--options-card-max-width: 900px;
--options-card-padding: 17px;
--options-title-font-size: 1rem;
--options-title-font-size: .75rem;
--options-title-offset: 13px;
}
/* Create a gap at the top of the option pages */
@@ -173,16 +177,19 @@ div.note-detail-empty {
}
.options-section:not(.tn-no-card) {
margin: auto;
border-radius: 12px;
border: 1px solid var(--card-border-color) !important;
margin-bottom: calc(var(--options-title-offset) + 26px) !important;
box-shadow: var(--card-box-shadow);
border: 1px solid var(--card-border-color) !important;
border-radius: 8px;
background: var(--card-background-color);
padding: var(--options-card-padding);
margin-bottom: calc(var(--options-title-offset) + 26px) !important;
}
body.desktop .option-section:not(.tn-no-card) {
body.prefers-centered-content .options-section:not(.tn-no-card) {
margin-inline: auto;
}
body.desktop .options-section:not(.tn-no-card) {
min-width: var(--options-card-min-width);
max-width: var(--options-card-max-width);
}
@@ -193,9 +200,16 @@ body.desktop .option-section:not(.tn-no-card) {
padding-bottom: var(--default-padding);
}
.options-section:not(.tn-no-card) h4,
.options-section:not(.tn-no-card) h5 {
text-transform: uppercase;
letter-spacing: .4pt;
}
.options-section:not(.tn-no-card) h4 {
font-size: var(--options-title-font-size);
font-weight: bold;
font-weight: 600;
color: var(--launcher-pane-text-color);
margin-top: calc(-1 * var(--options-card-padding) - var(--options-title-font-size) - var(--options-title-offset)) !important;
margin-bottom: calc(var(--options-title-offset) + var(--options-card-padding)) !important;

View File

@@ -34,6 +34,7 @@
div.promoted-attributes-container {
margin-top: 8px;
margin-bottom: 8px;
margin-inline-start: 12px;
}
/*

View File

@@ -8,7 +8,7 @@
}
:root {
--dropdown-backdrop-filter: blur(10px) saturate(6);
--dropdown-backdrop-filter: blur(20px) saturate(6);
--dropdown-border-radius: 10px;
}
@@ -35,30 +35,53 @@ body.mobile {
}
/* #region Mica */
body.background-effects.platform-win32 {
/* Quirk: --background-material is read before "theme-supports-background-effects" class
* is applied. Apply the matterial even if the theme doesn't support it. */
--background-material: tabbed;
}
body.background-effects.theme-supports-background-effects.platform-win32 {
--launcher-pane-horiz-border-color: var(--launcher-pane-horiz-border-color-bgfx);
--launcher-pane-horiz-background-color: var(--launcher-pane-horiz-background-color-bgfx);
--launcher-pane-vert-background-color: var(--launcher-pane-vert-background-color-bgfx);
--tab-background-color: var(--window-background-color-bgfx);
--new-tab-button-background: var(--window-background-color-bgfx);
--active-tab-background-color: var(--launcher-pane-horiz-background-color);
--root-background: transparent;
}
body.background-effects.platform-win32.layout-vertical {
--left-pane-background-color: var(--window-background-color-bgfx);
--background-material: mica;
}
body.background-effects.platform-win32,
body.background-effects.platform-win32 #root-widget {
body.background-effects.theme-supports-background-effects.platform-win32.layout-vertical {
--left-pane-background-color: var(--window-background-color-bgfx);
--center-pane-background-color-bgfx: var(--center-pane-vert-layout-background-color-bgfx);
--right-pane-background-color: var(--right-pane-background-color-bgfx);
}
body.background-effects.theme-supports-background-effects.platform-win32.layout-horizontal {
--center-pane-background-color-bgfx: var(--center-pane-horiz-layout-background-color-bgfx);
--gutter-color: var(--left-pane-background-color);
}
body.background-effects.theme-supports-background-effects.platform-win32,
body.background-effects.theme-supports-background-effects.platform-win32 #root-widget {
background: var(--window-background-color-bgfx) !important;
}
body.background-effects.platform-win32.layout-horizontal #horizontal-main-container,
body.background-effects.platform-win32.layout-vertical #vertical-main-container {
body.background-effects.theme-supports-background-effects.platform-win32.layout-horizontal #horizontal-main-container,
body.background-effects.theme-supports-background-effects.platform-win32.layout-vertical #vertical-main-container {
background-color: var(--root-background);
}
/* Note split with background effects */
body.background-effects.theme-supports-background-effects.platform-win32 #center-pane .note-split.bgfx {
--note-split-background-color: var(--center-pane-background-color-bgfx);
}
/* #endregion */
/* Matches when the left pane is collapsed */
@@ -72,9 +95,21 @@ body.layout-vertical #horizontal-main-container.left-pane-hidden #launcher-pane.
border-inline-end: 2px solid var(--left-pane-collapsed-border-color);
}
body.background-effects.zen #root-widget {
--main-background-color: transparent;
--root-background: transparent;
/*
* Zen mode
*/
@keyframes zen-formatting-toolbar-entrance {
from {
transform: translateY(200%);
} to {
transform: translateY(0);
}
}
body.zen .note-split .ribbon-container .classic-toolbar-widget {
position: relative;
animation: zen-formatting-toolbar-entrance 300ms ease-out;
}
/*
@@ -1171,23 +1206,18 @@ body.layout-vertical .tab-row-widget-is-sorting .note-tab.note-tab-is-dragging .
* CENTER PANE
*/
#center-pane {
background: var(--main-background-color);
}
.vertical-layout #center-pane {
/* The first visible note split */
.vertical-layout #center-pane .note-split:not(.visible ~ .visible) {
border-radius: var(--center-pane-border-radius) 0 0 0;
}
.note-split {
#center-pane .note-split {
padding-top: 2px;
animation: note-entrance 100ms linear;
/* will-change: opacity; -- causes some weird artifacts to the note menu in split view */
background-color: var(--note-split-background-color, var(--main-background-color));
}
.split-note-container-widget > .gutter {
background: var(--root-background) !important;
transition: background 150ms ease-out;
body:not(.background-effects) #center-pane .note-split {
animation: note-entrance 100ms linear;
}
/*
@@ -1200,9 +1230,9 @@ body.layout-vertical .tab-row-widget-is-sorting .note-tab.note-tab-is-dragging .
@keyframes note-entrance {
from {
opacity: 0;
filter: opacity(0);
} to {
opacity: 1;
filter: opacity(1);
}
}
@@ -1328,8 +1358,7 @@ div.promoted-attribute-cell {
--pa-card-padding-inline-end: 2px;
--input-background-color: transparent;
box-shadow: 1px 1px 2px var(--promoted-attribute-card-shadow-color);
box-shadow: var(--promoted-attribute-card-shadow);
display: inline-flex;
margin: 0;
border-radius: 8px;
@@ -1716,7 +1745,7 @@ div.find-replace-widget div.find-widget-found-wrapper > span {
*/
#right-pane {
background: var(--main-background-color);
background: var(--right-pane-background-color);
}
#right-pane div.card-header {

View File

@@ -520,9 +520,7 @@
"max_content_width": {
"max_width_unit": "بكسل",
"title": "عرض المحتوى",
"reload_button": "اعادة تحميل الواجهة",
"max_width_label": "اقصى عرض للمحتوى",
"reload_description": "تغييرات من خيارات المظهر"
"max_width_label": "اقصى عرض للمحتوى"
},
"native_title_bar": {
"enabled": "مفعل",
@@ -716,7 +714,6 @@
"backup_database_now": "نسخ اختياطي لقاعدة البيانات الان"
},
"etapi": {
"wiki": "ويكي",
"created": "تم الأنشاء",
"actions": "أجراءات",
"title": "ETAPI",

View File

@@ -39,7 +39,10 @@
"help_on_tree_prefix": "有关树前缀的帮助",
"prefix": "前缀: ",
"save": "保存",
"branch_prefix_saved": "分支前缀已保存。"
"branch_prefix_saved": "分支前缀已保存。",
"edit_branch_prefix_multiple": "编辑 {{count}} 个分支的前缀",
"branch_prefix_saved_multiple": "已为 {{count}} 个分支保存分支前缀。",
"affected_branches": "受影响的分支 {{count}}:"
},
"bulk_actions": {
"bulk_actions": "批量操作",
@@ -51,7 +54,7 @@
"bulk_actions_executed": "批量操作已成功执行。",
"none_yet": "暂无操作 ... 通过点击上方的可用操作添加一个操作。",
"labels": "标签",
"relations": "关联关系",
"relations": "关系",
"notes": "笔记",
"other": "其它"
},
@@ -104,7 +107,8 @@
"export_status": "导出状态",
"export_in_progress": "导出进行中:{{progressCount}}",
"export_finished_successfully": "导出成功完成。",
"format_pdf": "PDF - 用于打印或共享目的。"
"format_pdf": "PDF - 用于打印或共享目的。",
"share-format": "HTML 网页发布——采用与共享笔记相同的主题,但可发布为静态网站。"
},
"help": {
"noteNavigation": "笔记导航",
@@ -184,7 +188,8 @@
},
"import-status": "导入状态",
"in-progress": "导入进行中:{{progress}}",
"successful": "导入成功完成。"
"successful": "导入成功完成。",
"importZipRecommendation": "导入 ZIP 文件时,笔记层级将反映压缩文件内的子目录结构。"
},
"include_note": {
"dialog_title": "包含笔记",
@@ -1105,9 +1110,6 @@
"title": "内容宽度",
"default_description": "Trilium默认会限制内容的最大宽度以提高在宽屏中全屏时的可读性。",
"max_width_label": "内容最大宽度(像素)",
"apply_changes_description": "要应用内容宽度更改,请点击",
"reload_button": "重载前端",
"reload_description": "来自外观选项的更改",
"max_width_unit": "像素"
},
"native_title_bar": {
@@ -1287,10 +1289,6 @@
"etapi": {
"title": "ETAPI",
"description": "ETAPI 是一个 REST API用于以编程方式访问 Trilium 实例,而无需 UI。",
"see_more": "有关更多详细信息,请参见 {{- link_to_wiki}} 和 {{- link_to_openapi_spec}} 或 {{- link_to_swagger_ui}}。",
"wiki": "维基",
"openapi_spec": "ETAPI OpenAPI 规范",
"swagger_ui": "ETAPI Swagger UI",
"create_token": "创建新的 ETAPI 令牌",
"existing_tokens": "现有令牌",
"no_tokens_yet": "目前还没有令牌。点击上面的按钮创建一个。",
@@ -1557,7 +1555,9 @@
"window-on-top": "保持此窗口置顶"
},
"note_detail": {
"could_not_find_typewidget": "找不到类型为 '{{type}}' 的 typeWidget"
"could_not_find_typewidget": "找不到类型为 '{{type}}' 的 typeWidget",
"printing": "正在打印…",
"printing_pdf": "正在导出为PDF…"
},
"note_title": {
"placeholder": "请输入笔记标题..."
@@ -1917,7 +1917,7 @@
},
"custom_date_time_format": {
"title": "自定义日期/时间格式",
"description": "通过<shortcut />或工具栏的方式可自定义日期和时间格式有关日期/时间格式字符串中各个字符的含义,请参阅<doc>Day.js docs</doc>。",
"description": "自定义通过 <shortcut /> 或工具栏插入的日期和时间格式有关日期/时间格式字符串中各个字符的含义,请参阅<doc>Day.js docs</doc>。",
"format_string": "日期/时间格式字符串:",
"formatted_time": "格式化后日期/时间:"
},
@@ -2079,5 +2079,8 @@
"edit-slide": "编辑此幻灯片",
"start-presentation": "开始演示",
"slide-overview": "切换幻灯片概览"
},
"calendar_view": {
"delete_note": "删除笔记..."
}
}

View File

@@ -104,7 +104,8 @@
"export_status": "Exportstatus",
"export_in_progress": "Export läuft: {{progressCount}}",
"export_finished_successfully": "Der Export wurde erfolgreich abgeschlossen.",
"format_pdf": "PDF - für Ausdrucke oder Teilen."
"format_pdf": "PDF - für Ausdrucke oder Teilen.",
"share-format": "HTML für die Web-Veröffentlichung verwendet dasselbe Theme wie bei freigegebenen Notizen, kann jedoch als statische Website veröffentlicht werden."
},
"help": {
"noteNavigation": "Notiz Navigation",
@@ -1103,9 +1104,6 @@
"title": "Inhaltsbreite",
"default_description": "Trilium begrenzt standardmäßig die maximale Inhaltsbreite, um die Lesbarkeit für maximierte Bildschirme auf Breitbildschirmen zu verbessern.",
"max_width_label": "Maximale Inhaltsbreite in Pixel",
"apply_changes_description": "Um Änderungen an der Inhaltsbreite anzuwenden, klicke auf",
"reload_button": "Frontend neu laden",
"reload_description": "Änderungen an den Darstellungsoptionen",
"max_width_unit": "Pixel"
},
"native_title_bar": {
@@ -1285,10 +1283,6 @@
"etapi": {
"title": "ETAPI",
"description": "ETAPI ist eine REST-API, die für den programmgesteuerten Zugriff auf die Trilium-Instanz ohne Benutzeroberfläche verwendet wird.",
"see_more": "Weitere Details können im {{- link_to_wiki}} und in der {{- link_to_openapi_spec}} oder der {{- link_to_swagger_ui }} gefunden werden.",
"wiki": "Wiki",
"openapi_spec": "ETAPI OpenAPI-Spezifikation",
"swagger_ui": "ETAPI Swagger UI",
"create_token": "Erstelle ein neues ETAPI-Token",
"existing_tokens": "Vorhandene Token",
"no_tokens_yet": "Es sind noch keine Token vorhanden. Klicke auf die Schaltfläche oben, um eine zu erstellen.",

View File

@@ -36,10 +36,13 @@
},
"branch_prefix": {
"edit_branch_prefix": "Edit branch prefix",
"edit_branch_prefix_multiple": "Edit branch prefix for {{count}} branches",
"help_on_tree_prefix": "Help on Tree prefix",
"prefix": "Prefix: ",
"save": "Save",
"branch_prefix_saved": "Branch prefix has been saved."
"branch_prefix_saved": "Branch prefix has been saved.",
"branch_prefix_saved_multiple": "Branch prefix has been saved for {{count}} branches.",
"affected_branches": "Affected branches ({{count}}):"
},
"bulk_actions": {
"bulk_actions": "Bulk actions",
@@ -1108,9 +1111,7 @@
"default_description": "Trilium by default limits max content width to improve readability for maximized screens on wide screens.",
"max_width_label": "Max content width",
"max_width_unit": "pixels",
"apply_changes_description": "To apply content width changes, click on",
"reload_button": "reload frontend",
"reload_description": "changes from appearance options"
"centerContent": "Keep content centered"
},
"native_title_bar": {
"title": "Native Title Bar (requires app restart)",
@@ -1453,10 +1454,6 @@
"etapi": {
"title": "ETAPI",
"description": "ETAPI is a REST API used to access Trilium instance programmatically, without UI.",
"see_more": "See more details in the {{- link_to_wiki}} and the {{- link_to_openapi_spec}} or the {{- link_to_swagger_ui }}.",
"wiki": "wiki",
"openapi_spec": "ETAPI OpenAPI spec",
"swagger_ui": "ETAPI Swagger UI",
"create_token": "Create new ETAPI token",
"existing_tokens": "Existing tokens",
"no_tokens_yet": "There are no tokens yet. Click on the button above to create one.",
@@ -1640,6 +1637,12 @@
"shared_locally": "This note is shared locally on {{- link}}.",
"help_link": "For help visit <a href=\"https://triliumnext.github.io/Docs/Wiki/sharing.html\">wiki</a>."
},
"read-only-info": {
"read-only-note": "Currently viewing a read-only note.",
"auto-read-only-note": "This note is shown in a read-only mode for faster loading.",
"auto-read-only-learn-more": "Learn more",
"edit-note": "Edit note"
},
"note_types": {
"text": "Text",
"code": "Code",
@@ -2038,6 +2041,9 @@
"start-presentation": "Start presentation",
"slide-overview": "Toggle an overview of the slides"
},
"calendar_view": {
"delete_note": "Delete note..."
},
"command_palette": {
"tree-action-name": "Tree: {{name}}",
"export_note_title": "Export Note",

View File

@@ -104,7 +104,8 @@
"export_status": "Estado de exportación",
"export_in_progress": "Exportación en curso: {{progressCount}}",
"export_finished_successfully": "La exportación finalizó exitosamente.",
"format_pdf": "PDF - para propósitos de impresión o compartición."
"format_pdf": "PDF - para propósitos de impresión o compartición.",
"share-format": "HTML para publicación web: utiliza el mismo tema que se utiliza en las notas compartidas, pero se puede publicar como un sitio web estático."
},
"help": {
"noteNavigation": "Navegación de notas",
@@ -184,7 +185,8 @@
},
"import-status": "Estado de importación",
"in-progress": "Importación en progreso: {{progress}}",
"successful": "Importación finalizada exitosamente."
"successful": "Importación finalizada exitosamente.",
"importZipRecommendation": "Al importar un archivo ZIP, la jerarquía de notas reflejará la estructura de subdirectorios dentro del archivo comprimido."
},
"include_note": {
"dialog_title": "Incluir nota",
@@ -1105,10 +1107,7 @@
"title": "Ancho del contenido",
"default_description": "Trilium limita de forma predeterminada el ancho máximo del contenido para mejorar la legibilidad de ventanas maximizadas en pantallas anchas.",
"max_width_label": "Ancho máximo del contenido en píxeles",
"max_width_unit": "píxeles",
"apply_changes_description": "Para aplicar cambios en el ancho del contenido, haga clic en",
"reload_button": "recargar la interfaz",
"reload_description": "cambios desde las opciones de apariencia"
"max_width_unit": "píxeles"
},
"native_title_bar": {
"title": "Barra de título nativa (requiere reiniciar la aplicación)",
@@ -1444,10 +1443,6 @@
"etapi": {
"title": "ETAPI",
"description": "ETAPI es una REST API que se utiliza para acceder a la instancia de Trilium mediante programación, sin interfaz de usuario.",
"see_more": "Véa más detalles en el {{- link_to_wiki}} y el {{- link_to_openapi_spec}} o el {{- link_to_swagger_ui }}.",
"wiki": "wiki",
"openapi_spec": "Especificación ETAPI OpenAPI",
"swagger_ui": "ETAPI Swagger UI",
"create_token": "Crear nuevo token ETAPI",
"existing_tokens": "Tokens existentes",
"no_tokens_yet": "Aún no hay tokens. Dé clic en el botón de arriba para crear uno.",
@@ -1594,7 +1589,7 @@
"tree-context-menu": {
"open-in-a-new-tab": "Abrir en nueva pestaña",
"open-in-a-new-split": "Abrir en nueva división",
"insert-note-after": "Insertar nota después de",
"insert-note-after": "Insertar nota contigua",
"insert-child-note": "Insertar subnota",
"delete": "Eliminar",
"search-in-subtree": "Buscar en subárbol",
@@ -1714,7 +1709,9 @@
"window-on-top": "Mantener esta ventana en la parte superior"
},
"note_detail": {
"could_not_find_typewidget": "No se pudo encontrar typeWidget para el tipo '{{type}}'"
"could_not_find_typewidget": "No se pudo encontrar typeWidget para el tipo '{{type}}'",
"printing": "Impresión en curso...",
"printing_pdf": "Exportando a PDF en curso.."
},
"note_title": {
"placeholder": "escriba el título de la nota aquí..."

View File

@@ -1106,9 +1106,6 @@
"title": "Largeur du contenu",
"default_description": "Trilium limite par défaut la largeur maximale du contenu pour améliorer la lisibilité sur des écrans larges.",
"max_width_label": "Largeur maximale du contenu en pixels",
"apply_changes_description": "Pour appliquer les modifications de largeur du contenu, cliquez sur",
"reload_button": "recharger l'interface",
"reload_description": "changements par rapport aux options d'apparence",
"max_width_unit": "Pixels"
},
"native_title_bar": {
@@ -1288,8 +1285,6 @@
"etapi": {
"title": "ETAPI",
"description": "ETAPI est une API REST utilisée pour accéder à l'instance Trilium par programme, sans interface utilisateur.",
"wiki": "wiki",
"openapi_spec": "Spec ETAPI OpenAPI",
"create_token": "Créer un nouveau jeton ETAPI",
"existing_tokens": "Jetons existants",
"no_tokens_yet": "Il n'y a pas encore de jetons. Cliquez sur le bouton ci-dessus pour en créer un.",
@@ -1306,9 +1301,7 @@
"delete_token": "Supprimer/désactiver ce token",
"rename_token_title": "Renommer le jeton",
"rename_token_message": "Veuillez saisir le nom du nouveau jeton",
"delete_token_confirmation": "Êtes-vous sûr de vouloir supprimer le jeton ETAPI « {{name}} » ?",
"see_more": "Voir plus de détails dans le {{- link_to_wiki}} et le {{- link_to_openapi_spec}} ou le {{- link_to_swagger_ui }}.",
"swagger_ui": "Interface utilisateur ETAPI Swagger"
"delete_token_confirmation": "Êtes-vous sûr de vouloir supprimer le jeton ETAPI « {{name}} » ?"
},
"options_widget": {
"options_status": "Statut des options",

View File

@@ -109,7 +109,8 @@
"export_type_single": "Solo questa nota, senza le sottostanti",
"format_opml": "OPML - formato per scambio informazioni outline. Formattazione, immagini e files non sono inclusi.",
"opml_version_1": "OPML v.1.0 - solo testo semplice",
"opml_version_2": "OPML v2.0 - supporta anche HTML"
"opml_version_2": "OPML v2.0 - supporta anche HTML",
"share-format": "HTML per la pubblicazione sul web - utilizza lo stesso tema utilizzato per le note condivise, ma può essere pubblicato come sito web statico."
},
"password_not_set": {
"body1": "Le note protette sono crittografate utilizzando una password utente, ma la password non è stata ancora impostata.",
@@ -132,10 +133,6 @@
"new_token_message": "Inserisci il nome del nuovo token",
"title": "ETAPI",
"description": "ETAPI è un'API REST utilizzata per accedere alle istanze di Trilium in modo programmatico, senza interfaccia utente.",
"see_more": "Per maggiori dettagli consulta {{- link_to_wiki}} e {{- link_to_openapi_spec}} o {{- link_to_swagger_ui}}.",
"wiki": "wiki",
"openapi_spec": "Specifiche ETAPI OpenAPI",
"swagger_ui": "Interfaccia utente ETAPI Swagger",
"create_token": "Crea un nuovo token ETAPI",
"existing_tokens": "Token esistenti",
"no_tokens_yet": "Non ci sono ancora token. Clicca sul pulsante qui sopra per crearne uno.",
@@ -1573,10 +1570,7 @@
"title": "Larghezza del contenuto",
"default_description": "Per impostazione predefinita, Trilium limita la larghezza massima del contenuto per migliorare la leggibilità sugli schermi più grandi.",
"max_width_label": "Larghezza massima del contenuto",
"max_width_unit": "pixel",
"apply_changes_description": "Per applicare le modifiche alla larghezza del contenuto, fare clic su",
"reload_button": "ricarica frontend",
"reload_description": "modifiche dalle opzioni di aspetto"
"max_width_unit": "pixel"
},
"native_title_bar": {
"title": "Barra del titolo nativa (richiede il riavvio dell'app)",

View File

@@ -39,7 +39,10 @@
"edit_branch_prefix": "ブランチ接頭辞の編集",
"help_on_tree_prefix": "ツリー接頭辞に関するヘルプ",
"prefix": "接頭辞: ",
"branch_prefix_saved": "ブランチの接頭辞が保存されました。"
"branch_prefix_saved": "ブランチの接頭辞が保存されました。",
"edit_branch_prefix_multiple": "{{count}} ブランチのブランチ接頭辞を編集",
"branch_prefix_saved_multiple": "{{count}} 個のブランチのブランチ接頭辞が保存されました。",
"affected_branches": "影響を受けるブランチ {{count}}:"
},
"global_menu": {
"menu": "メニュー",
@@ -254,7 +257,8 @@
"export_status": "エクスポート状況",
"export_in_progress": "エクスポート処理中: {{progressCount}}",
"export_finished_successfully": "エクスポートが正常に完了しました。",
"format_pdf": "PDF - 印刷または共有目的に。"
"format_pdf": "PDF - 印刷または共有目的に。",
"share-format": "Web 公開用の HTML - 共有ノートで使用されるのと同じテーマを使用しますが、静的 Web サイトとして公開できます。"
},
"help": {
"title": "チートシート",
@@ -656,10 +660,6 @@
"created": "作成日時",
"title": "ETAPI",
"description": "ETAPI は、Trilium インスタンスに UI なしでプログラム的にアクセスするための REST API です。",
"see_more": "詳細は{{- link_to_wiki}}と{{- link_to_openapi_spec}}または{{- link_to_swagger_ui }}を参照してください。",
"wiki": "wiki",
"openapi_spec": "ETAPI OpenAPIの仕様",
"swagger_ui": "ETAPI Swagger UI",
"create_token": "新しくETAPIトークンを作成",
"existing_tokens": "既存のトークン",
"no_tokens_yet": "トークンはまだありません。上のボタンをクリックして作成してください。",
@@ -833,13 +833,10 @@
"theme_defined": "テーマが定義されました"
},
"max_content_width": {
"reload_button": "フロントエンドをリロード",
"title": "コンテンツ幅",
"default_description": "Triliumは、ワイドスクリーンで最大化された画面での可読性を向上させるために、デフォルトでコンテンツの最大幅を制限しています。",
"max_width_label": "最大コンテンツ幅",
"max_width_unit": "ピクセル",
"apply_changes_description": "コンテンツ幅の変更を適用するには、クリックしてください",
"reload_description": "外観設定から変更"
"max_width_unit": "ピクセル"
},
"theme": {
"title": "アプリのテーマ",
@@ -2082,5 +2079,8 @@
"edit-slide": "このスライドを編集",
"start-presentation": "プレゼンテーションを開始",
"slide-overview": "スライドの概要を切り替え"
},
"calendar_view": {
"delete_note": "ノートを削除..."
}
}

View File

@@ -1464,10 +1464,7 @@
"title": "Szerokość zawartości",
"default_description": "Trilium domyślnie ogranicza maksymalną szerokość zawartości, aby poprawić czytelność na zmaksymalizowanych ekranach o dużej szerokości.",
"max_width_label": "Maksymalna szerokość zawartości",
"max_width_unit": "piksele",
"apply_changes_description": "Aby zastosować zmiany szerokości zawartości, kliknij na",
"reload_button": "przeładuj frontend",
"reload_description": "zmiany z opcji wyglądu"
"max_width_unit": "piksele"
},
"native_title_bar": {
"title": "Natywny pasek tytułu (wymaga ponownego uruchomienia aplikacji)",
@@ -1663,10 +1660,6 @@
"etapi": {
"title": "ETAPI",
"description": "ETAPI to interfejs API REST używany do programowego dostępu do instancji Trilium, bez interfejsu użytkownika.",
"see_more": "Zobacz więcej szczegółów w {{- link_to_wiki}} oraz w {{- link_to_openapi_spec}} lub {{- link_to_swagger_ui }}.",
"wiki": "wiki",
"openapi_spec": "specyfikacja ETAPI OpenAPI",
"swagger_ui": "ETAPI Swagger UI",
"create_token": "Utwórz nowy token ETAPI",
"existing_tokens": "Istniejące tokeny",
"no_tokens_yet": "Nie ma jeszcze żadnych tokenów. Kliknij przycisk powyżej, aby utworzyć jeden.",

View File

@@ -1082,10 +1082,7 @@
"title": "Largura do Conteúdo",
"default_description": "Por padrão, o Trilium limita a largura máxima do conteúdo para melhorar a legibilidade em janelas maximizadas em ecrãs largos.",
"max_width_label": "Largura máxima do conteúdo",
"max_width_unit": "pixels",
"apply_changes_description": "Para aplicar as alterações de largura do conteúdo, clique em",
"reload_button": "recarregar frontend",
"reload_description": "alterações de opções de aparência"
"max_width_unit": "pixels"
},
"native_title_bar": {
"title": "Barra de Título Nativa (requer recarregar a app)",
@@ -1422,10 +1419,6 @@
"etapi": {
"title": "ETAPI",
"description": "ETAPI é uma API REST usada para aceder a instância do Trilium programaticamente, sem interface gráfica.",
"see_more": "Veja mais pormenores no {{- link_to_wiki}}, na {{- link_to_openapi_spec}} ou na {{- link_to_swagger_ui}}.",
"wiki": "wiki",
"openapi_spec": "Especificação OpenAPI do ETAPI",
"swagger_ui": "ETAPI Swagger UI",
"create_token": "Criar token ETAPI",
"existing_tokens": "Tokens existentes",
"no_tokens_yet": "Ainda não existem tokens. Clique no botão acima para criar um.",

View File

@@ -1304,9 +1304,6 @@
"title": "Largura do Conteúdo",
"max_width_label": "Largura máxima do conteúdo",
"max_width_unit": "pixels",
"apply_changes_description": "Para aplicar as alterações de largura do conteúdo, clique em",
"reload_button": "recarregar frontend",
"reload_description": "alterações de opções de aparência",
"default_description": "Por padrão, o Trilium limita a largura máxima do conteúdo para melhorar a legibilidade em janelas maximizadas em telas wide."
},
"native_title_bar": {
@@ -1932,10 +1929,6 @@
"etapi": {
"title": "ETAPI",
"description": "ETAPI é uma API REST usada para acessar a instância do Trilium programaticamente, sem interface gráfica.",
"see_more": "Veja mais detalhes no {{- link_to_wiki}}, na {{- link_to_openapi_spec}} ou na {{- link_to_swagger_ui}}.",
"wiki": "wiki",
"openapi_spec": "Especificação OpenAPI do ETAPI",
"swagger_ui": "ETAPI Swagger UI",
"create_token": "Criar novo token ETAPI",
"existing_tokens": "Tokens existentes",
"no_tokens_yet": "Ainda não existem tokens. Clique no botão acima para criar um.",

View File

@@ -507,17 +507,13 @@
"new_token_message": "Introduceți denumirea noului token",
"new_token_title": "Token ETAPI nou",
"no_tokens_yet": "Nu există încă token-uri. Clic pe butonul de deasupra pentru a crea una.",
"openapi_spec": "Specificația OpenAPI pentru ETAPI",
"swagger_ui": "UI-ul Swagger pentru ETAPI",
"rename_token": "Redenumește token-ul",
"rename_token_message": "Introduceți denumirea noului token",
"rename_token_title": "Redenumire token",
"see_more": "Vedeți mai multe detalii în {{- link_to_wiki}} și în {{- link_to_openapi_spec}} sau în {{- link_to_swagger_ui }}.",
"title": "ETAPI",
"token_created_message": "Copiați token-ul creat în clipboard. Trilium stochează token-ul ca hash așadar această valoare poate fi văzută doar acum.",
"token_created_title": "Token ETAPI creat",
"token_name": "Denumire token",
"wiki": "wiki"
"token_name": "Denumire token"
},
"execute_script": {
"example_1": "De exemplu, pentru a adăuga un șir de caractere la titlul unei notițe, se poate folosi acest mic script:",
@@ -800,12 +796,9 @@
"modal_body_text": "Din cauza limitărilor la nivel de navigator, nu este posibilă citirea clipboard-ului din JavaScript. Inserați Markdown-ul pentru a-l importa în caseta de mai jos și dați clic pe butonul Import"
},
"max_content_width": {
"apply_changes_description": "Pentru a aplica schimbările de lățime a conținutului, dați click pe",
"default_description": "În mod implicit Trilium limitează lățimea conținutului pentru a îmbunătăți lizibilitatea pentru ferestrele maximizate pe ecrane late.",
"max_width_label": "Lungimea maximă a conținutului",
"max_width_unit": "pixeli",
"reload_button": "reîncarcă interfața",
"reload_description": "schimbări din opțiunile de afișare",
"title": "Lățime conținut"
},
"mobile_detail_menu": {

View File

@@ -1203,11 +1203,8 @@
"max_content_width": {
"max_width_unit": "пикселей",
"title": "Ширина контентной области",
"reload_button": "перезагрузить интерфейс",
"default_description": "Trilium по умолчанию ограничивает максимальную ширину контента, чтобы улучшить читаемость на широких экранах.",
"max_width_label": "Максимальная ширина контентной области",
"apply_changes_description": "Чтобы применить изменения, нажмите на",
"reload_description": "изменения в параметрах внешнего вида"
"max_width_label": "Максимальная ширина контентной области"
},
"native_title_bar": {
"enabled": "включено",
@@ -1440,7 +1437,6 @@
},
"etapi": {
"title": "ETAPI",
"wiki": "вики",
"created": "Создано",
"actions": "Действия",
"existing_tokens": "Существующие токены",
@@ -1448,10 +1444,7 @@
"default_token_name": "новый токен",
"rename_token_title": "Переименовать токен",
"description": "ETAPI — это REST API, используемый для программного доступа к экземпляру Trilium без пользовательского интерфейса.",
"see_more": "Более подробную информацию смотрите в {{- link_to_wiki}} и {{- link_to_openapi_spec}} или {{- link_to_swagger_ui }}.",
"create_token": "Создать новый токен ETAPI",
"openapi_spec": "Спецификация ETAPI OpenAPI",
"swagger_ui": "Пользовательский интерфейс ETAPI Swagger",
"new_token_title": "Новый токен ETAPI",
"token_created_title": "Создан токен ETAPI",
"rename_token": "Переименовать этот токен",

View File

@@ -39,7 +39,10 @@
"help_on_tree_prefix": "有關樹前綴的說明",
"prefix": "前綴: ",
"save": "儲存",
"branch_prefix_saved": "已儲存分支前綴。"
"branch_prefix_saved": "已儲存分支前綴。",
"edit_branch_prefix_multiple": "編輯 {{count}} 個分支的前綴",
"branch_prefix_saved_multiple": "已為 {{count}} 個分支儲存分支前綴。",
"affected_branches": "受影響的分支 ({{count}}):"
},
"bulk_actions": {
"bulk_actions": "批次操作",
@@ -104,7 +107,8 @@
"export_in_progress": "正在匯出:{{progressCount}}",
"export_finished_successfully": "成功匯出。",
"format_html": "HTML - 推薦,因為它保留了所有格式",
"format_pdf": "PDF - 用於列印或與他人分享。"
"format_pdf": "PDF - 用於列印或與他人分享。",
"share-format": "HTML 網頁發佈——使用與共享筆記相同的佈景主題,但可發佈為靜態網站。"
},
"help": {
"noteNavigation": "筆記導航",
@@ -1103,9 +1107,6 @@
"title": "內容寬度",
"default_description": "Trilium 預設會限制內容的最大寬度以提高在寬螢幕中全螢幕時的可讀性。",
"max_width_label": "內容最大寬度(像素)",
"apply_changes_description": "要套用內容寬度更改,請點擊",
"reload_button": "重新載入前端",
"reload_description": "來自外觀選項的更改",
"max_width_unit": "像素"
},
"native_title_bar": {
@@ -1280,8 +1281,6 @@
"etapi": {
"title": "ETAPI",
"description": "ETAPI 是一個 REST API用於以編程方式訪問 Trilium 實例,而無需 UI。",
"wiki": "維基",
"openapi_spec": "ETAPI OpenAPI 規範",
"create_token": "新增 ETAPI 令牌",
"existing_tokens": "現有令牌",
"no_tokens_yet": "目前還沒有令牌。點擊上面的按鈕新增一個。",
@@ -1298,9 +1297,7 @@
"delete_token": "刪除 / 停用此令牌",
"rename_token_title": "重新命名令牌",
"rename_token_message": "請輸入新的令牌名稱",
"delete_token_confirmation": "您確定要刪除 ETAPI 令牌 \"{{name}}\" 嗎?",
"see_more": "有關更多詳細資訊,請參閱 {{- link_to_wiki}} 和 {{- link_to_openapi_spec}} 或 {{- link_to_swagger_ui}}。",
"swagger_ui": "ETAPI Swagger UI"
"delete_token_confirmation": "您確定要刪除 ETAPI 令牌 \"{{name}}\" 嗎?"
},
"options_widget": {
"options_status": "選項狀態",
@@ -2082,5 +2079,8 @@
"edit-slide": "編輯此投影片",
"start-presentation": "開始簡報",
"slide-overview": "切換投影片概覽"
},
"calendar_view": {
"delete_note": "刪除筆記…"
}
}

View File

@@ -1204,10 +1204,7 @@
"title": "Ширина вмісту",
"default_description": "Trilium за замовчуванням обмежує максимальну ширину вмісту, щоб поліпшити читабельність на широкоформатних екранах у режимі максимального розширення.",
"max_width_label": "Максимальна ширина вмісту",
"max_width_unit": "пікселів",
"apply_changes_description": "Щоб застосувати зміни ширини вмісту, натисніть на",
"reload_button": "перезавантажити інтерфейс",
"reload_description": "зміни в параметрах зовнішнього вигляду"
"max_width_unit": "пікселів"
},
"native_title_bar": {
"title": "Нативний рядок заголовка (потрібен перезапуск)",
@@ -1402,10 +1399,6 @@
"etapi": {
"title": "ETAPI",
"description": "ETAPI — це REST API, який використовується для програмного доступу до екземпляра Trilium без інтерфейсу користувача.",
"see_more": "Див. докладнішу інформацію у {{- link_to_wiki}} та {{- link_to_openapi_spec}} або {{- link_to_swagger_ui }}.",
"wiki": "вікі",
"openapi_spec": "ETAPI OpenAPI spec",
"swagger_ui": "ETAPI Swagger UI",
"create_token": "Створити новий токен ETAPI",
"existing_tokens": "Існуючі токени",
"no_tokens_yet": "Токенів поки що немає. Натисніть кнопку вище, щоб створити його.",

View File

@@ -215,6 +215,30 @@ declare namespace Fancytree {
enableUpdate(enabled: boolean): void;
}
interface FancytreeNodeData {
noteId: string;
parentNoteId: string;
branchId: string;
isProtected: boolean;
noteType: NoteType;
}
interface FancytreeNewNode extends FancytreeNodeData {
title: string;
extraClasses: string;
icon: string;
refKey: string;
/** True if this node is loaded on demand, i.e. on first expansion. */
lazy: boolean;
/** Folder nodes have different default icons and click behavior. Note: Also non-folders may have children. */
folder: boolean;
/** Use isExpanded(), setExpanded() to access this property. */
expanded: boolean;
/** Node id (must be unique inside the tree) */
key: string;
children?: FancytreeNewNode[];
}
/** A FancytreeNode represents the hierarchical data model and operations. */
interface FancytreeNode {
// #region Properties
@@ -227,7 +251,7 @@ declare namespace Fancytree {
/** Display name (may contain HTML) */
title: string;
/** Contains all extra data that was passed on node creation */
data: any;
data: FancytreeNodeData;
/** Array of child nodes. For lazy nodes, null or undefined means 'not yet loaded'. Use an empty array to define a node that has no children. */
children: FancytreeNode[];
/** Use isExpanded(), setExpanded() to access this property. */

View File

@@ -23,6 +23,24 @@ export class CssVarReader {
return (!isNaN(number.valueOf()) ? number.valueOf() : defaultValue)
}
asBoolean(defaultValue?: boolean) {
let value = this.value.toLocaleLowerCase().trim();
let result: boolean | undefined;
switch (value) {
case "true":
case "1":
result = true;
break;
case "false":
case "0":
result = false;
break;
}
return (result !== undefined) ? result : defaultValue;
}
asEnum<T>(enumType: T, defaultValue?: T[keyof T]): T[keyof T] | undefined {
let result: T[keyof T] | undefined;

View File

@@ -6,7 +6,7 @@
.floating-buttons-children,
.show-floating-buttons {
position: absolute;
top: var(--floating-buttons-vert-offset, 10px);
top: var(--floating-buttons-vert-offset, 14px);
inset-inline-end: var(--floating-buttons-horiz-offset, 10px);
display: flex;
flex-direction: row;

View File

@@ -1,6 +1,6 @@
import { t } from "i18next";
import "./FloatingButtons.css";
import { useNoteContext, useNoteLabel, useNoteLabelBoolean } from "./react/hooks";
import { useNoteContext, useNoteLabel, useNoteLabelBoolean, useTriliumEvent } from "./react/hooks";
import { useContext, useEffect, useMemo, useState } from "preact/hooks";
import { ParentComponent } from "./react/react_utils";
import { EventData, EventNames } from "../components/app_context";
@@ -20,6 +20,7 @@ interface FloatingButtonsProps {
* properly handle rounded corners, as defined by the --border-radius CSS variable.
*/
export default function FloatingButtons({ items }: FloatingButtonsProps) {
const [ top, setTop ] = useState(0);
const { note, noteContext } = useNoteContext();
const parentComponent = useContext(ParentComponent);
const [ viewType ] = useNoteLabel(note, "viewType");
@@ -47,8 +48,14 @@ export default function FloatingButtons({ items }: FloatingButtonsProps) {
const [ visible, setVisible ] = useState(true);
useEffect(() => setVisible(true), [ note ]);
useTriliumEvent("contentSafeMarginChanged", (e) => {
if (e.noteContext === noteContext) {
setTop(e.top);
}
});
return (
<div className="floating-buttons no-print">
<div className="floating-buttons no-print" style={{top}}>
<div className={`floating-buttons-children ${!visible ? "temporarily-hidden" : ""}`}>
{context && items.map((Component) => (
<Component {...context} />

View File

@@ -4,7 +4,7 @@ import Component from "../components/component";
import NoteContext from "../components/note_context";
import FNote from "../entities/fnote";
import ActionButton, { ActionButtonProps } from "./react/ActionButton";
import { useNoteLabelBoolean, useTriliumEvent, useTriliumOption, useWindowSize } from "./react/hooks";
import { useIsNoteReadOnly, useNoteLabelBoolean, useTriliumEvent, useTriliumOption, useWindowSize } from "./react/hooks";
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
import { createImageSrcUrl, openInAppHelpFromUrl } from "../services/utils";
import server from "../services/server";
@@ -13,8 +13,6 @@ import toast from "../services/toast";
import { t } from "../services/i18n";
import { copyImageReferenceToClipboard } from "../services/image";
import tree from "../services/tree";
import protected_session_holder from "../services/protected_session_holder";
import options from "../services/options";
import { getHelpUrlForNote } from "../services/in_app_help";
import froca from "../services/froca";
import NoteLink from "./react/NoteLink";
@@ -101,48 +99,26 @@ function ToggleReadOnlyButton({ note, viewType, isDefaultViewMode }: FloatingBut
/>
}
function EditButton({ note, noteContext, isDefaultViewMode }: FloatingButtonContext) {
const [ animationClass, setAnimationClass ] = useState("");
const [ isEnabled, setIsEnabled ] = useState(false);
function EditButton({ note, noteContext }: FloatingButtonContext) {
const [animationClass, setAnimationClass] = useState("");
const {isReadOnly, enableEditing} = useIsNoteReadOnly(note, noteContext);
const isReadOnlyInfoBarDismissed = false; // TODO
useEffect(() => {
noteContext.isReadOnly().then(isReadOnly => {
setIsEnabled(
isDefaultViewMode
&& (!note.isProtected || protected_session_holder.isProtectedSessionAvailable())
&& !options.is("databaseReadonly")
&& isReadOnly
);
});
}, [ note ]);
useTriliumEvent("readOnlyTemporarilyDisabled", ({ noteContext: eventNoteContext }) => {
if (noteContext?.ntxId === eventNoteContext.ntxId) {
setIsEnabled(false);
}
});
// make the edit button stand out on the first display, otherwise
// it's difficult to notice that the note is readonly
useEffect(() => {
if (isEnabled) {
if (isReadOnly) {
setAnimationClass("bx-tada bx-lg");
setTimeout(() => {
setAnimationClass("");
}, 1700);
}
}, [ isEnabled ]);
}, [ isReadOnly ]);
return isEnabled && <FloatingButton
return !!isReadOnly && isReadOnlyInfoBarDismissed && <FloatingButton
text={t("edit_button.edit_this_note")}
icon="bx bx-pencil"
className={animationClass}
onClick={() => {
if (noteContext.viewScope) {
noteContext.viewScope.readOnlyTemporarilyDisabled = true;
appContext.triggerEvent("readOnlyTemporarilyDisabled", { noteContext });
}
}}
onClick={() => enableEditing()}
/>
}

View File

@@ -0,0 +1,19 @@
body.zen div.read-only-note-info-bar-widget {
width: fit-content;
max-width: var(--max-content-width);
border-radius: 8px;
border: unset;
margin: 0 auto 10px auto;
}
.read-only-note-info-bar-widget-content {
display: flex;
justify-content: space-between;
align-items: center;
gap: 20px;
}
:root div.read-only-note-info-bar-widget button {
white-space: nowrap;
padding: 2px 8px;
}

View File

@@ -0,0 +1,36 @@
import "./ReadOnlyNoteInfoBar.css";
import { t } from "../services/i18n";
import { useIsNoteReadOnly, useNoteContext, useTriliumEvent } from "./react/hooks"
import Button from "./react/Button";
import InfoBar from "./react/InfoBar";
export default function ReadOnlyNoteInfoBar(props: {}) {
const {note, noteContext} = useNoteContext();
const {isReadOnly, enableEditing} = useIsNoteReadOnly(note, noteContext);
const isExplicitReadOnly = note?.isLabelTruthy("readOnly");
return <InfoBar className="read-only-note-info-bar-widget"
type={(isExplicitReadOnly ? "subtle" : "prominent")}
style={{display: (!isReadOnly) ? "none" : undefined}}>
<div class="read-only-note-info-bar-widget-content">
{(isExplicitReadOnly) ? (
<div>{t("read-only-info.read-only-note")}</div>
) : (
<div>
{t("read-only-info.auto-read-only-note")}
&nbsp;
<a class="tn-link"
href="https://docs.triliumnotes.org/user-guide/concepts/notes/read-only-notes#automatic-read-only-mode">
{t("read-only-info.auto-read-only-learn-more")}
</a>
</div>
)}
<Button text={t("read-only-info.edit-note")}
icon="bx-pencil" onClick={() => enableEditing()} />
</div>
</InfoBar>
}

View File

@@ -1,9 +1,16 @@
.note-list-widget {
min-height: 0;
max-width: var(--max-content-width); /* Inherited from .note-split */
overflow: auto;
contain: none !important;
}
body.prefers-centered-content .note-list-widget:not(.full-height) {
/* Horizontally center the widget in its parent when the "Keep content centered" option is on */
margin-inline: auto;
}
.note-list-widget .note-list {
padding: 10px;
}

View File

@@ -0,0 +1,32 @@
import { it, describe, expect } from "vitest";
import { buildNote } from "../../../test/easy-froca";
import { getBoardData } from "./data";
import FBranch from "../../../entities/fbranch";
import froca from "../../../services/froca";
describe("Board data", () => {
it("deduplicates cloned notes", async () => {
const parentNote = buildNote({
title: "Board",
"#collection": "",
"#viewType": "board",
children: [
{ id: "note1", title: "First note", "#status": "To Do" },
{ id: "note2", title: "Second note", "#status": "In progress" },
{ id: "note3", title: "Third note", "#status": "Done" }
]
});
const branch = new FBranch(froca, {
branchId: "note1_note2",
notePosition: 10,
fromSearchNote: false,
noteId: "note2",
parentNoteId: "note1"
});
froca.branches["note1_note2"] = branch;
froca.getNoteFromCache("note1").addChild("note2", "note1_note2", false);
const data = await getBoardData(parentNote, "status", {}, false);
const noteIds = Array.from(data.byColumn.values()).flat().map(item => item.note.noteId);
expect(noteIds.length).toBe(3);
});
});

View File

@@ -11,7 +11,7 @@ export async function getBoardData(parentNote: FNote, groupByColumn: string, per
const byColumn: ColumnMap = new Map();
// First, scan all notes to find what columns actually exist
await recursiveGroupBy(parentNote.getChildBranches(), byColumn, groupByColumn, includeArchived);
await recursiveGroupBy(parentNote.getChildBranches(), byColumn, groupByColumn, includeArchived, new Set<string>());
// Get all columns that exist in the notes
const columnsFromNotes = [...byColumn.keys()];
@@ -61,26 +61,28 @@ export async function getBoardData(parentNote: FNote, groupByColumn: string, per
};
}
async function recursiveGroupBy(branches: FBranch[], byColumn: ColumnMap, groupByColumn: string, includeArchived: boolean) {
async function recursiveGroupBy(branches: FBranch[], byColumn: ColumnMap, groupByColumn: string, includeArchived: boolean, seenNoteIds: Set<string>) {
for (const branch of branches) {
const note = await branch.getNote();
if (!note || (!includeArchived && note.isArchived)) continue;
if (note.type !== "search" && note.hasChildren()) {
await recursiveGroupBy(note.getChildBranches(), byColumn, groupByColumn, includeArchived);
await recursiveGroupBy(note.getChildBranches(), byColumn, groupByColumn, includeArchived, seenNoteIds);
}
const group = note.getLabelValue(groupByColumn);
if (!group) {
if (!group || seenNoteIds.has(note.noteId)) {
continue;
}
if (!byColumn.has(group)) {
byColumn.set(group, []);
}
byColumn.get(group)!.push({
branch,
note
});
seenNoteIds.add(note.noteId);
}
}

View File

@@ -0,0 +1,28 @@
import FNote from "../../../entities/fnote";
import contextMenu, { ContextMenuEvent } from "../../../menus/context_menu";
import link_context_menu from "../../../menus/link_context_menu";
import branches from "../../../services/branches";
import { t } from "../../../services/i18n";
export function openCalendarContextMenu(e: ContextMenuEvent, noteId: string, parentNote: FNote) {
e.preventDefault();
e.stopPropagation();
contextMenu.show({
x: e.pageX,
y: e.pageY,
items: [
...link_context_menu.getItems(),
{ kind: "separator" },
{
title: t("calendar_view.delete_note"),
uiIcon: "bx bx-trash",
handler: async () => {
const branchId = parentNote.childToBranch[noteId];
await branches.deleteNotes([ branchId ], false, false);
}
}
],
selectMenuItemHandler: ({ command }) => link_context_menu.handleLinkContextMenuItem(command, noteId),
})
}

View File

@@ -1,6 +1,7 @@
.calendar-view {
overflow: hidden;
position: relative;
outline: 0;
height: 100%;
user-select: none;
padding: 10px;
@@ -67,6 +68,7 @@
}
body.desktop:not(.zen) .calendar-view .calendar-header {
padding-block-start: 4px;
padding-inline-end: 5em;
}

View File

@@ -20,6 +20,7 @@ import Button, { ButtonGroup } from "../../react/Button";
import ActionButton from "../../react/ActionButton";
import { RefObject } from "preact";
import TouchBar, { TouchBarButton, TouchBarLabel, TouchBarSegmentedControl, TouchBarSpacer } from "../../react/TouchBar";
import { openCalendarContextMenu } from "./context_menu";
interface CalendarViewData {
@@ -106,7 +107,7 @@ export default function CalendarView({ note, noteIds }: ViewModeProps<CalendarVi
const plugins = usePlugins(isEditable, isCalendarRoot);
const locale = useLocale();
const { eventDidMount } = useEventDisplayCustomization();
const { eventDidMount } = useEventDisplayCustomization(note);
const editingProps = useEditing(note, isEditable, isCalendarRoot);
// React to changes.
@@ -196,11 +197,11 @@ function usePlugins(isEditable: boolean, isCalendarRoot: boolean) {
}
function useLocale() {
const [ locale ] = useTriliumOption("locale");
const [ formattingLocale ] = useTriliumOption("formattingLocale");
const [ calendarLocale, setCalendarLocale ] = useState<LocaleInput>();
useEffect(() => {
const correspondingLocale = LOCALE_MAPPINGS[locale];
const correspondingLocale = LOCALE_MAPPINGS[formattingLocale];
if (correspondingLocale) {
correspondingLocale().then((locale) => setCalendarLocale(locale.default));
} else {
@@ -253,7 +254,7 @@ function useEditing(note: FNote, isEditable: boolean, isCalendarRoot: boolean) {
};
}
function useEventDisplayCustomization() {
function useEventDisplayCustomization(parentNote: FNote) {
const eventDidMount = useCallback((e: EventMountArg) => {
const { iconClass, promotedAttributes } = e.event.extendedProps;
@@ -302,6 +303,11 @@ function useEventDisplayCustomization() {
}
$(mainContainer ?? e.el).append($(promotedAttributesHtml));
}
e.el.addEventListener("contextmenu", (contextMenuEvent) => {
const noteId = e.event.extendedProps.noteId;
openCalendarContextMenu(contextMenuEvent, noteId, parentNote);
});
}, []);
return { eventDidMount };
}

View File

@@ -0,0 +1,62 @@
import { EventData } from "../../components/app_context";
import BasicWidget from "../basic_widget";
import Container from "./container";
import NoteContext from "../../components/note_context";
export default class ContentHeader extends Container<BasicWidget> {
noteContext?: NoteContext;
thisElement?: HTMLElement;
parentElement?: HTMLElement;
resizeObserver: ResizeObserver;
currentHeight: number = 0;
currentSafeMargin: number = NaN;
constructor() {
super();
this.css("contain", "unset");
this.resizeObserver = new ResizeObserver(this.onResize.bind(this));
}
setNoteContextEvent({ noteContext }: EventData<"setNoteContext">) {
this.noteContext = noteContext;
this.init();
}
init() {
this.parentElement = this.parent?.$widget.get(0);
if (!this.parentElement) {
console.warn("No parent set for <ContentHeader>.");
return;
}
this.thisElement = this.$widget.get(0)!;
this.resizeObserver.observe(this.thisElement);
this.parentElement.addEventListener("scroll", this.updateSafeMargin.bind(this));
}
updateSafeMargin() {
const newSafeMargin = Math.max(this.currentHeight - this.parentElement!.scrollTop, 0);
if (newSafeMargin !== this.currentSafeMargin) {
this.currentSafeMargin = newSafeMargin;
this.triggerEvent("contentSafeMarginChanged", {
top: newSafeMargin,
noteContext: this.noteContext!
});
}
}
onResize(entries: ResizeObserverEntry[]) {
for (const entry of entries) {
if (entry.target === this.thisElement) {
this.currentHeight = entry.contentRect.height;
this.updateSafeMargin();
}
}
}
}

View File

@@ -1,9 +1,10 @@
import { EventData } from "../../components/app_context.js";
import { LOCALES } from "@triliumnext/commons";
import { readCssVar } from "../../utils/css-var.js";
import FlexContainer from "./flex_container.js";
import options from "../../services/options.js";
import type BasicWidget from "../basic_widget.js";
import utils from "../../services/utils.js";
import { LOCALES } from "@triliumnext/commons";
/**
* The root container is the top-most widget/container, from which the entire layout derives.
@@ -30,9 +31,11 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
window.visualViewport?.addEventListener("resize", () => this.#onMobileResize());
}
this.#setMotion(options.is("motionEnabled"));
this.#setShadows(options.is("shadowsEnabled"));
this.#setBackdropEffects(options.is("backdropEffectsEnabled"));
this.#setMaxContentWidth();
this.#setMotion();
this.#setShadows();
this.#setBackdropEffects();
this.#setThemeCapabilities();
this.#setLocaleAndDirection(options.get("locale"));
return super.render();
@@ -40,15 +43,21 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {
if (loadResults.isOptionReloaded("motionEnabled")) {
this.#setMotion(options.is("motionEnabled"));
this.#setMotion();
}
if (loadResults.isOptionReloaded("shadowsEnabled")) {
this.#setShadows(options.is("shadowsEnabled"));
this.#setShadows();
}
if (loadResults.isOptionReloaded("backdropEffectsEnabled")) {
this.#setBackdropEffects(options.is("backdropEffectsEnabled"));
this.#setBackdropEffects();
}
if (loadResults.isOptionReloaded("maxContentWidth")
|| loadResults.isOptionReloaded("centerContent")) {
this.#setMaxContentWidth();
}
}
@@ -58,19 +67,38 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
this.$widget.toggleClass("virtual-keyboard-opened", isKeyboardOpened);
}
#setMotion(enabled: boolean) {
#setMaxContentWidth() {
const width = Math.max(options.getInt("maxContentWidth") || 0, 640);
document.body.style.setProperty("--preferred-max-content-width", `${width}px`);
document.body.classList.toggle("prefers-centered-content", options.is("centerContent"));
}
#setMotion() {
const enabled = options.is("motionEnabled");
document.body.classList.toggle("motion-disabled", !enabled);
jQuery.fx.off = !enabled;
}
#setShadows(enabled: boolean) {
#setShadows() {
const enabled = options.is("shadowsEnabled");
document.body.classList.toggle("shadows-disabled", !enabled);
}
#setBackdropEffects(enabled: boolean) {
#setBackdropEffects() {
const enabled = options.is("backdropEffectsEnabled");
document.body.classList.toggle("backdrop-effects-disabled", !enabled);
}
#setThemeCapabilities() {
// Supports background effects
const useBgfx = readCssVar(document.documentElement, "allow-background-effects")
.asBoolean(false);
document.body.classList.toggle("theme-supports-background-effects", useBgfx);
}
#setLocaleAndDirection(locale: string) {
const correspondingLocale = LOCALES.find(l => l.id === locale);
document.body.lang = locale;

View File

@@ -0,0 +1,13 @@
.branch-prefix-dialog .branch-prefix-notes-list {
margin-top: 10px;
}
.branch-prefix-dialog .branch-prefix-notes-list ul {
max-height: 200px;
overflow: auto;
margin-top: 5px;
}
.branch-prefix-dialog .branch-prefix-current {
opacity: 0.6;
}

View File

@@ -10,53 +10,86 @@ import Button from "../react/Button.jsx";
import FormGroup from "../react/FormGroup.js";
import { useTriliumEvent } from "../react/hooks.jsx";
import FBranch from "../../entities/fbranch.js";
import type { ContextMenuCommandData } from "../../components/app_context.js";
import "./branch_prefix.css";
// Virtual branches (e.g., from search results) start with this prefix
const VIRTUAL_BRANCH_PREFIX = "virt-";
export default function BranchPrefixDialog() {
const [ shown, setShown ] = useState(false);
const [ branch, setBranch ] = useState<FBranch>();
const [ branches, setBranches ] = useState<FBranch[]>([]);
const [ prefix, setPrefix ] = useState("");
const branchInput = useRef<HTMLInputElement>(null);
useTriliumEvent("editBranchPrefix", async () => {
const notePath = appContext.tabManager.getActiveContextNotePath();
if (!notePath) {
useTriliumEvent("editBranchPrefix", async (data?: ContextMenuCommandData) => {
let branchIds: string[] = [];
if (data?.selectedOrActiveBranchIds && data.selectedOrActiveBranchIds.length > 0) {
// Multi-select mode from tree context menu
branchIds = data.selectedOrActiveBranchIds.filter((branchId) => !branchId.startsWith(VIRTUAL_BRANCH_PREFIX));
} else {
// Single branch mode from keyboard shortcut or when no selection
const notePath = appContext.tabManager.getActiveContextNotePath();
if (!notePath) {
return;
}
const { noteId, parentNoteId } = tree.getNoteIdAndParentIdFromUrl(notePath);
if (!noteId || !parentNoteId) {
return;
}
const branchId = await froca.getBranchId(parentNoteId, noteId);
if (!branchId) {
return;
}
const parentNote = await froca.getNote(parentNoteId);
if (!parentNote || parentNote.type === "search") {
return;
}
branchIds = [branchId];
}
if (branchIds.length === 0) {
return;
}
const { noteId, parentNoteId } = tree.getNoteIdAndParentIdFromUrl(notePath);
const newBranches = branchIds
.map(id => froca.getBranch(id))
.filter((branch): branch is FBranch => branch !== null);
if (!noteId || !parentNoteId) {
if (newBranches.length === 0) {
return;
}
const newBranchId = await froca.getBranchId(parentNoteId, noteId);
if (!newBranchId) {
return;
}
const parentNote = await froca.getNote(parentNoteId);
if (!parentNote || parentNote.type === "search") {
return;
}
const newBranch = froca.getBranch(newBranchId);
setBranch(newBranch);
setPrefix(newBranch?.prefix ?? "");
setBranches(newBranches);
// Use the prefix of the first branch as the initial value
setPrefix(newBranches[0]?.prefix ?? "");
setShown(true);
});
async function onSubmit() {
if (!branch) {
if (branches.length === 0) {
return;
}
savePrefix(branch.branchId, prefix);
if (branches.length === 1) {
await savePrefix(branches[0].branchId, prefix);
} else {
await savePrefixBatch(branches.map(b => b.branchId), prefix);
}
setShown(false);
}
const isSingleBranch = branches.length === 1;
return (
<Modal
className="branch-prefix-dialog"
title={t("branch_prefix.edit_branch_prefix")}
title={isSingleBranch ? t("branch_prefix.edit_branch_prefix") : t("branch_prefix.edit_branch_prefix_multiple", { count: branches.length })}
size="lg"
onShown={() => branchInput.current?.focus()}
onHidden={() => setShown(false)}
@@ -69,9 +102,27 @@ export default function BranchPrefixDialog() {
<div class="input-group">
<input class="branch-prefix-input form-control" value={prefix} ref={branchInput}
onChange={(e) => setPrefix((e.target as HTMLInputElement).value)} />
<div class="branch-prefix-note-title input-group-text"> - {branch && branch.getNoteFromCache().title}</div>
{isSingleBranch && branches[0] && (
<div class="branch-prefix-note-title input-group-text"> - {branches[0].getNoteFromCache().title}</div>
)}
</div>
</FormGroup>
{!isSingleBranch && (
<div className="branch-prefix-notes-list">
<strong>{t("branch_prefix.affected_branches", { count: branches.length })}</strong>
<ul>
{branches.map((branch) => {
const note = branch.getNoteFromCache();
return (
<li key={branch.branchId}>
{branch.prefix && <span className="branch-prefix-current">{branch.prefix} - </span>}
{note.title}
</li>
);
})}
</ul>
</div>
)}
</Modal>
);
}
@@ -80,3 +131,8 @@ async function savePrefix(branchId: string, prefix: string) {
await server.put(`branches/${branchId}/set-prefix`, { prefix: prefix });
toast.showMessage(t("branch_prefix.branch_prefix_saved"));
}
async function savePrefixBatch(branchIds: string[], prefix: string) {
await server.put("branches/set-prefix-batch", { branchIds, prefix });
toast.showMessage(t("branch_prefix.branch_prefix_saved_multiple", { count: branchIds.length }));
}

View File

@@ -79,8 +79,8 @@ export default function ExportDialog() {
values={[
{ value: "html", label: t("export.format_html_zip") },
{ value: "markdown", label: t("export.format_markdown") },
{ value: "opml", label: t("export.format_opml") },
{ value: "share", label: t("export.share-format") }
{ value: "share", label: t("export.share-format") },
{ value: "opml", label: t("export.format_opml") }
]}
/>

View File

@@ -57,17 +57,19 @@ const TPL = /*html*/`\
}
</style>
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title">
<!-- This is where the first child will be injected -->
<div class="quick-edit-dialog-wrapper">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title">
<!-- This is where the first child will be injected -->
</div>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<!-- This is where all but the first child will be injected. -->
<div class="modal-body">
<!-- This is where all but the first child will be injected. -->
</div>
</div>
</div>
</div>
@@ -79,6 +81,7 @@ export default class PopupEditorDialog extends Container<BasicWidget> {
private noteContext: NoteContext;
private $modalHeader!: JQuery<HTMLElement>;
private $modalBody!: JQuery<HTMLElement>;
private $wrapper!: JQuery<HTMLDivElement>;
constructor() {
super();
@@ -93,6 +96,7 @@ export default class PopupEditorDialog extends Container<BasicWidget> {
const $newWidget = $(TPL);
this.$modalHeader = $newWidget.find(".modal-title");
this.$modalBody = $newWidget.find(".modal-body");
this.$wrapper = $newWidget.find(".quick-edit-dialog-wrapper");
const children = this.$widget.children();
this.$modalHeader.append(children[0]);
@@ -112,6 +116,21 @@ export default class PopupEditorDialog extends Container<BasicWidget> {
}
});
const colorClass = this.noteContext.note?.getColorClass();
const wrapperElement = this.$wrapper.get(0)!;
if (colorClass) {
wrapperElement.className = "quick-edit-dialog-wrapper " + colorClass;
} else {
wrapperElement.className = "quick-edit-dialog-wrapper";
}
const customHue = getComputedStyle(wrapperElement).getPropertyValue("--custom-color-hue");
if (customHue) {
/* Apply the tinted-dialog class only if the custom color CSS class specifies a hue */
wrapperElement.classList.add("tinted-quick-edit-dialog");
}
const activeEl = document.activeElement;
if (activeEl && "blur" in activeEl) {
(activeEl as HTMLElement).blur();

View File

@@ -39,12 +39,14 @@ const TPL = /*html*/`
<div class="note-detail">
<style>
.note-detail {
max-width: var(--max-content-width); /* Inherited from .note-split */
font-family: var(--detail-font-family);
font-size: var(--detail-font-size);
}
.note-detail.full-height {
height: 100%;
body.prefers-centered-content .note-detail {
/* Horizontally center the widget in its parent when the "Keep content centered" option is on */
margin-inline: auto;
}
</style>
</div>

View File

@@ -173,14 +173,6 @@ interface ExpandedSubtreeResponse {
branchIds: string[];
}
interface Node extends Fancytree.NodeData {
noteId: string;
parentNoteId: string;
branchId: string;
isProtected: boolean;
noteType: NoteType;
}
interface RefreshContext {
noteIdsToUpdate: Set<string>;
noteIdsToReload: Set<string>;
@@ -769,7 +761,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
prepareChildren(parentNote: FNote) {
utils.assertArguments(parentNote);
const noteList: Node[] = [];
const noteList: Fancytree.FancytreeNewNode[] = [];
const hideArchivedNotes = this.hideArchivedNotes;
@@ -837,7 +829,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
const isFolder = note.isFolder();
const node: Node = {
const node: Fancytree.FancytreeNewNode = {
noteId: note.noteId,
parentNoteId: branch.parentNoteId,
branchId: branch.branchId,
@@ -849,7 +841,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
refKey: note.noteId,
lazy: true,
folder: isFolder,
expanded: branch.isExpanded && note.type !== "search",
expanded: !!branch.isExpanded && note.type !== "search",
key: utils.randomString(12) // this should prevent some "duplicate key" errors
};
@@ -911,7 +903,6 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
return extraClasses.join(" ");
}
/** @returns {FancytreeNode[]} */
getSelectedNodes(stopOnParents = false) {
return this.tree.getSelectedNodes(stopOnParents);
}
@@ -1532,7 +1523,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
// Automatically expand the hoisted note by default
const node = this.getActiveNode();
if (node?.data.noteId === this.noteContext.hoistedNoteId){
if (node && node.data.noteId === this.noteContext.hoistedNoteId){
this.setExpanded(node.data.branchId, true);
}
}
@@ -1591,6 +1582,20 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
this.clearSelectedNodes();
}
async editBranchPrefixCommand({ node }: CommandListenerData<"editBranchPrefix">) {
const branchIds = this.getSelectedOrActiveBranchIds(node).filter((branchId) => !branchId.startsWith("virt-"));
if (!branchIds.length) {
return;
}
// Trigger the event with the selected branch IDs
appContext.triggerEvent("editBranchPrefix", {
selectedOrActiveBranchIds: branchIds,
node: node
});
}
canBeMovedUpOrDown(node: Fancytree.FancytreeNode) {
if (node.data.noteId === "root") {
return false;

View File

@@ -52,6 +52,7 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
const note = this.noteContext?.note;
if (!note) {
this.$widget.addClass("bgfx empty-note");
return;
}
@@ -61,7 +62,7 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
this.$widget.addClass(utils.getNoteTypeClass(note.type));
this.$widget.addClass(utils.getMimeTypeClass(note.mime));
this.$widget.toggleClass(["bgfx", "options"], note.isOptions());
this.$widget.toggleClass("protected", note.isProtected);
const noteLanguage = note?.getLabelValue("language");
@@ -70,7 +71,7 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
}
#isFullWidthNote(note: FNote) {
if (["image", "mermaid", "book", "render", "canvas", "webView", "mindMap"].includes(note.type)) {
if (["code", "image", "mermaid", "book", "render", "canvas", "webView", "mindMap"].includes(note.type)) {
return true;
}

View File

@@ -0,0 +1,23 @@
.info-bar {
--link-color: currentColor;
margin-top: 4px;
contain: unset !important;
padding: 8px 20px;
color: var(--read-only-note-info-bar-color);
font-size: .9em;
cursor: default;
user-select: none;
}
.info-bar-prominent {
background: var(--alert-bar-background, var(--accented-background-color));
}
.info-bar-subtle {
color: var(--muted-text-color);
border-bottom: 1px solid var(--main-border-color);
margin-block: 0;
margin-inline: 10px;
padding-inline: 12px;
}

View File

@@ -0,0 +1,19 @@
import "./InfoBar.css";
import { ComponentChildren, CSSProperties } from "preact";
export type InfoBarParams = {
type: "prominent" | "subtle",
className: string;
style: CSSProperties
children: ComponentChildren;
};
export default function InfoBar(props: InfoBarParams) {
return <div className={`info-bar ${props.className} info-bar-${props.type}`} style={props.style}>
{props?.children}
</div>
}
InfoBar.defaultProps = {
type: "prominent"
} as InfoBarParams

View File

@@ -1,25 +1,26 @@
import { Inputs, MutableRef, useCallback, useContext, useDebugValue, useEffect, useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
import { CommandListenerData, EventData, EventNames } from "../../components/app_context";
import { ParentComponent } from "./react_utils";
import SpacedUpdate from "../../services/spaced_update";
import { CSSProperties } from "preact/compat";
import { DragData } from "../note_tree";
import { FilterLabelsByType, KeyboardActionNames, OptionNames, RelationNames } from "@triliumnext/commons";
import options, { type OptionValue } from "../../services/options";
import utils, { escapeRegExp, reloadFrontendApp } from "../../services/utils";
import NoteContext from "../../components/note_context";
import BasicWidget, { ReactWrappedWidget } from "../basic_widget";
import FNote from "../../entities/fnote";
import attributes from "../../services/attributes";
import FBlob from "../../entities/fblob";
import NoteContextAwareWidget from "../note_context_aware_widget";
import { Inputs, MutableRef, useCallback, useContext, useDebugValue, useEffect, useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
import { ParentComponent } from "./react_utils";
import { RefObject, VNode } from "preact";
import { Tooltip } from "bootstrap";
import { CSSProperties } from "preact/compat";
import { ViewMode } from "../../services/link";
import appContext, { CommandListenerData, EventData, EventNames } from "../../components/app_context";
import attributes from "../../services/attributes";
import BasicWidget, { ReactWrappedWidget } from "../basic_widget";
import Component from "../../components/component";
import FBlob from "../../entities/fblob";
import FNote from "../../entities/fnote";
import keyboard_actions from "../../services/keyboard_actions";
import Mark from "mark.js";
import { DragData } from "../note_tree";
import Component from "../../components/component";
import NoteContext from "../../components/note_context";
import NoteContextAwareWidget from "../note_context_aware_widget";
import options, { type OptionValue } from "../../services/options";
import protected_session_holder from "../../services/protected_session_holder";
import SpacedUpdate from "../../services/spaced_update";
import toast, { ToastOptions } from "../../services/toast";
import { ViewMode } from "../../services/link";
import utils, { escapeRegExp, reloadFrontendApp } from "../../services/utils";
export function useTriliumEvent<T extends EventNames>(eventName: T, handler: (data: EventData<T>) => void) {
const parentComponent = useContext(ParentComponent);
@@ -198,6 +199,7 @@ export function useNoteContext() {
const [ notePath, setNotePath ] = useState<string | null | undefined>();
const [ note, setNote ] = useState<FNote | null | undefined>();
const [ , setViewMode ] = useState<ViewMode>();
const [ isReadOnlyTemporarilyDisabled, setIsReadOnlyTemporarilyDisabled ] = useState<boolean | null | undefined>(noteContext?.viewScope?.isReadOnly);
const [ refreshCounter, setRefreshCounter ] = useState(0);
useEffect(() => {
@@ -217,6 +219,11 @@ export function useNoteContext() {
setRefreshCounter(refreshCounter + 1);
}
});
useTriliumEvent("readOnlyTemporarilyDisabled", ({ noteContext: eventNoteContext }) => {
if (eventNoteContext.ntxId === noteContext?.ntxId) {
setIsReadOnlyTemporarilyDisabled(eventNoteContext?.viewScope?.readOnlyTemporarilyDisabled);
}
});
const parentComponent = useContext(ParentComponent) as ReactWrappedWidget;
useDebugValue(() => `notePath=${notePath}, ntxId=${noteContext?.ntxId}`);
@@ -230,7 +237,8 @@ export function useNoteContext() {
viewScope: noteContext?.viewScope,
componentId: parentComponent.componentId,
noteContext,
parentComponent
parentComponent,
isReadOnlyTemporarilyDisabled
};
}
@@ -701,3 +709,51 @@ export function useResizeObserver(ref: RefObject<HTMLElement>, callback: () => v
return () => observer.disconnect();
}, [ callback, ref ]);
}
/**
* Indicates that the current note is in read-only mode, while an editing mode is available,
* and provides a way to switch to editing mode.
*/
export function useIsNoteReadOnly(note: FNote | null | undefined, noteContext: NoteContext | undefined) {
const [isReadOnly, setIsReadOnly] = useState<boolean | undefined>(undefined);
const enableEditing = useCallback(() => {
if (noteContext?.viewScope) {
noteContext.viewScope.readOnlyTemporarilyDisabled = true;
appContext.triggerEvent("readOnlyTemporarilyDisabled", {noteContext});
}
}, [noteContext]);
useEffect(() => {
if (note && noteContext) {
isNoteReadOnly(note, noteContext).then((readOnly) => {
setIsReadOnly(readOnly);
});
}
}, [note, noteContext]);
useTriliumEvent("readOnlyTemporarilyDisabled", ({noteContext: eventNoteContext}) => {
if (noteContext?.ntxId === eventNoteContext.ntxId) {
setIsReadOnly(false);
}
});
return {isReadOnly, enableEditing};
}
async function isNoteReadOnly(note: FNote, noteContext: NoteContext) {
if (note.isProtected && !protected_session_holder.isProtectedSessionAvailable()) {
return false;
}
if (options.is("databaseReadonly")) {
return false;
}
if (noteContext.viewScope?.viewMode !== "default" || !await noteContext.isReadOnly()) {
return false;
}
return true;
}

View File

@@ -13,8 +13,8 @@ export default function EditedNotesTab({ note }: TabContext) {
useEffect(() => {
if (!note) return;
server.get<EditedNotesResponse>(`edited-notes/${note.getLabelValue("dateNote")}`).then(async editedNotes => {
editedNotes = editedNotes.filter((n) => n.noteId !== note.noteId);
const noteIds = editedNotes.flatMap((n) => n.noteId);
editedNotes = editedNotes.filter((n) => n.noteId !== note.noteId);
const noteIds = editedNotes.flatMap((n) => n.noteId);
await froca.getNotes(noteIds, true); // preload all at once
setEditedNotes(editedNotes);
});
@@ -41,11 +41,11 @@ export default function EditedNotesTab({ note }: TabContext) {
)}
</span>
)
}))}
}), " ")}
</div>
) : (
<div className="no-edited-notes-found">{t("edited_notes.no_edited_notes_found")}</div>
)}
</div>
)
)
}

View File

@@ -1,19 +1,20 @@
import { ConvertToAttachmentResponse } from "@triliumnext/commons";
import appContext, { CommandNames } from "../../components/app_context";
import FNote from "../../entities/fnote"
import dialog from "../../services/dialog";
import { t } from "../../services/i18n"
import server from "../../services/server";
import toast from "../../services/toast";
import ws from "../../services/ws";
import ActionButton from "../react/ActionButton"
import Dropdown from "../react/Dropdown";
import { FormDropdownDivider, FormListItem } from "../react/FormList";
import { isElectron as getIsElectron, isMac as getIsMac } from "../../services/utils";
import { ParentComponent } from "../react/react_utils";
import { t } from "../../services/i18n"
import { useContext } from "preact/hooks";
import NoteContext from "../../components/note_context";
import { useIsNoteReadOnly } from "../react/hooks";
import ActionButton from "../react/ActionButton"
import appContext, { CommandNames } from "../../components/app_context";
import branches from "../../services/branches";
import dialog from "../../services/dialog";
import Dropdown from "../react/Dropdown";
import FNote from "../../entities/fnote"
import NoteContext from "../../components/note_context";
import server from "../../services/server";
import toast from "../../services/toast";
import ws from "../../services/ws";
interface NoteActionsProps {
note?: FNote;
@@ -52,6 +53,7 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not
const isMac = getIsMac();
const hasSource = ["text", "code", "relationMap", "mermaid", "canvas", "mindMap"].includes(note.type);
const isSearchOrBook = ["search", "book"].includes(note.type);
const {isReadOnly, enableEditing} = useIsNoteReadOnly(note, noteContext);
return (
<Dropdown
@@ -59,8 +61,14 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not
className="note-actions"
hideToggleArrow
noSelectButtonStyle
iconAction
>
iconAction>
{isReadOnly && <>
<CommandItem icon="bx bx-pencil" text={t("read-only-info.edit-note")}
command={() => enableEditing()} />
<FormDropdownDivider />
</>}
{canBeConvertedToAttachment && <ConvertToAttachment note={note} /> }
{note.type === "render" && <CommandItem command="renderActiveNote" icon="bx bx-extension" text={t("note_actions.re_render_note")} />}
<CommandItem command="findInText" icon="bx bx-search" disabled={!isSearchable} text={t("note_actions.search_in_note")} />

View File

@@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "preact/hooks"
import { useNoteContext, useNoteProperty, useStaticTooltipWithKeyboardShortcut, useTriliumEvents } from "../react/hooks";
import "./style.css";
import { numberObjectsInPlace } from "../../services/utils";
import { Indexed, numberObjectsInPlace } from "../../services/utils";
import { EventNames } from "../../components/app_context";
import NoteActions from "./NoteActions";
import { KeyboardActionNames } from "@triliumnext/commons";
@@ -11,30 +11,47 @@ import { TabConfiguration, TitleContext } from "./ribbon-interface";
const TAB_CONFIGURATION = numberObjectsInPlace<TabConfiguration>(RIBBON_TAB_DEFINITIONS);
interface ComputedTab extends Indexed<TabConfiguration> {
shouldShow: boolean;
}
export default function Ribbon() {
const { note, ntxId, hoistedNoteId, notePath, noteContext, componentId } = useNoteContext();
const { note, ntxId, hoistedNoteId, notePath, noteContext, componentId, isReadOnlyTemporarilyDisabled } = useNoteContext();
const noteType = useNoteProperty(note, "type");
const titleContext: TitleContext = { note };
const [ activeTabIndex, setActiveTabIndex ] = useState<number | undefined>();
const computedTabs = useMemo(
() => TAB_CONFIGURATION.map(tab => {
const shouldShow = typeof tab.show === "boolean" ? tab.show : tab.show?.(titleContext);
return {
const [ computedTabs, setComputedTabs ] = useState<ComputedTab[]>();
const titleContext: TitleContext = useMemo(() => ({
note,
noteContext
}), [ note, noteContext ]);
async function refresh() {
const computedTabs: ComputedTab[] = [];
for (const tab of TAB_CONFIGURATION) {
const shouldShow = await shouldShowTab(tab.show, titleContext);
computedTabs.push({
...tab,
shouldShow
}
}),
[ titleContext, note, noteType ]);
shouldShow: !!shouldShow
});
}
setComputedTabs(computedTabs);
}
useEffect(() => {
refresh();
}, [ note, noteType, isReadOnlyTemporarilyDisabled ]);
// Automatically activate the first ribbon tab that needs to be activated whenever a note changes.
useEffect(() => {
if (!computedTabs) return;
const tabToActivate = computedTabs.find(tab => tab.shouldShow && (typeof tab.activate === "boolean" ? tab.activate : tab.activate?.(titleContext)));
setActiveTabIndex(tabToActivate?.index);
}, [ note?.noteId ]);
}, [ computedTabs, note?.noteId ]);
// Register keyboard shortcuts.
const eventsToListenTo = useMemo(() => TAB_CONFIGURATION.filter(config => config.toggleCommand).map(config => config.toggleCommand) as EventNames[], []);
useTriliumEvents(eventsToListenTo, useCallback((e, toggleCommand) => {
if (!computedTabs) return;
const correspondingTab = computedTabs.find(tab => tab.toggleCommand === toggleCommand);
if (correspondingTab) {
if (activeTabIndex !== correspondingTab.index) {
@@ -51,7 +68,7 @@ export default function Ribbon() {
<>
<div className="ribbon-top-row">
<div className="ribbon-tab-container">
{computedTabs.map(({ title, icon, index, toggleCommand, shouldShow }) => (
{computedTabs && computedTabs.map(({ title, icon, index, toggleCommand, shouldShow }) => (
shouldShow && <RibbonTab
icon={icon}
title={typeof title === "string" ? title : title(titleContext)}
@@ -74,7 +91,7 @@ export default function Ribbon() {
</div>
<div className="ribbon-body-container">
{computedTabs.map(tab => {
{computedTabs && computedTabs.map(tab => {
const isActive = tab.index === activeTabIndex;
if (!isActive && !tab.stayInDom) {
return;
@@ -129,3 +146,9 @@ function RibbonTab({ icon, title, active, onClick, toggleCommand }: { icon: stri
)
}
export async function shouldShowTab(showConfig: boolean | ((context: TitleContext) => Promise<boolean | null | undefined> | boolean | null | undefined), context: TitleContext) {
if (showConfig === null || showConfig === undefined) return true;
if (typeof showConfig === "boolean") return showConfig;
if ("then" in showConfig) return await showConfig(context);
return showConfig(context);
}

View File

@@ -21,7 +21,9 @@ export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [
{
title: t("classic_editor_toolbar.title"),
icon: "bx bx-text",
show: ({ note }) => note?.type === "text" && options.get("textNoteEditorType") === "ckeditor-classic",
show: async ({ note, noteContext }) => note?.type === "text"
&& options.get("textNoteEditorType") === "ckeditor-classic"
&& !(await noteContext?.isReadOnly()),
toggleCommand: "toggleRibbonTabClassicEditor",
content: FormattingToolbar,
activate: true,

View File

@@ -1,8 +1,9 @@
import { ComponentChildren } from "preact";
import { useNoteContext } from "../../react/hooks";
import { TabContext, TitleContext } from "../ribbon-interface";
import { TabContext } from "../ribbon-interface";
import { useEffect, useMemo, useState } from "preact/hooks";
import { RIBBON_TAB_DEFINITIONS } from "../RibbonDefinition";
import { shouldShowTab } from "../Ribbon";
interface StandaloneRibbonAdapterProps {
component: (props: TabContext) => ComponentChildren;
@@ -16,10 +17,11 @@ export default function StandaloneRibbonAdapter({ component }: StandaloneRibbonA
const Component = component;
const { note, ntxId, hoistedNoteId, notePath, noteContext, componentId } = useNoteContext();
const definition = useMemo(() => RIBBON_TAB_DEFINITIONS.find(def => def.content === component), [ component ]);
const [ shown, setShown ] = useState(unwrapShown(definition?.show, { note }));
const [ shown, setShown ] = useState<boolean | null | undefined>(false);
useEffect(() => {
setShown(unwrapShown(definition?.show, { note }));
if (!definition) return;
shouldShowTab(definition.show, { note, noteContext }).then(setShown);
}, [ note ]);
return (
@@ -35,9 +37,3 @@ export default function StandaloneRibbonAdapter({ component }: StandaloneRibbonA
/>
);
}
function unwrapShown(value: boolean | ((context: TitleContext) => boolean | null | undefined) | undefined, context: TitleContext) {
if (!value) return true;
if (typeof value === "boolean") return value;
return !!value(context);
}

View File

@@ -16,13 +16,14 @@ export interface TabContext {
export interface TitleContext {
note: FNote | null | undefined;
noteContext: NoteContext | undefined;
}
export interface TabConfiguration {
title: string | ((context: TitleContext) => string);
icon: string;
content: (context: TabContext) => VNode | false;
show: boolean | ((context: TitleContext) => boolean | null | undefined);
show: boolean | ((context: TitleContext) => Promise<boolean | null | undefined> | boolean | null | undefined);
toggleCommand?: KeyboardActionNames;
activate?: boolean | ((context: TitleContext) => boolean);
/**

View File

@@ -0,0 +1,7 @@
.shared-info-widget {
display: flex;
}
.shared-info-widget button {
margin-inline-start: 8px;
}

View File

@@ -1,11 +1,12 @@
import { useEffect, useState } from "preact/hooks";
import "./shared_info.css";
import { t } from "../services/i18n";
import Alert from "./react/Alert";
import { useEffect, useState } from "preact/hooks";
import { useNoteContext, useTriliumEvent, useTriliumOption } from "./react/hooks";
import FNote from "../entities/fnote";
import attributes from "../services/attributes";
import RawHtml from "./react/RawHtml";
import FNote from "../entities/fnote";
import HelpButton from "./react/HelpButton";
import InfoBar from "./react/InfoBar";
import RawHtml from "./react/RawHtml";
export default function SharedInfo() {
const { note } = useNoteContext();
@@ -35,7 +36,7 @@ export default function SharedInfo() {
link = `${location.protocol}//${host}${location.pathname}share/${shareId}`;
}
setLink(`<a href="${link}" class="external">${link}</a>`);
setLink(`<a href="${link}" class="external tn-link">${link}</a>`);
}
useEffect(refresh, [ note ]);
@@ -48,20 +49,14 @@ export default function SharedInfo() {
});
return (
<Alert className="shared-info-widget" type="warning" style={{
contain: "none",
margin: "10px",
padding: "10px",
fontWeight: "bold",
display: !link ? "none" : undefined
}}>
<InfoBar className="shared-info-widget" type="subtle" style={{display: (!link) ? "none" : undefined}}>
{link && (
<RawHtml html={syncServerHost
? t("shared_info.shared_publicly", { link })
: t("shared_info.shared_locally", { link })} />
)}
<HelpButton helpPage="R9pX4DGra2Vt" style={{ width: "24px", height: "24px" }} />
</Alert>
</InfoBar>
)
}

View File

@@ -13,6 +13,10 @@ import protected_session_holder from "../../services/protected_session_holder.js
const TPL = /*html*/`
<div class="canvas-widget note-detail-canvas note-detail-printable note-detail">
<style>
.canvas-widget {
height: 100%;
}
.excalidraw .App-menu_top .buttonList {
display: flex;
}

View File

@@ -284,7 +284,8 @@ function SmoothScrollEnabledOption() {
}
function MaxContentWidth() {
const [ maxContentWidth, setMaxContentWidth ] = useTriliumOption("maxContentWidth");
const [maxContentWidth, setMaxContentWidth] = useTriliumOption("maxContentWidth");
const [centerContent, setCenterContent] = useTriliumOptionBool("centerContent");
return (
<OptionsSection title={t("max_content_width.title")}>
@@ -300,9 +301,9 @@ function MaxContentWidth() {
</FormGroup>
</Column>
<p>
{t("max_content_width.apply_changes_description")} <Button text={t("max_content_width.reload_button")} size="micro" onClick={reloadFrontendApp} />
</p>
<FormCheckbox label={t("max_content_width.centerContent")}
currentValue={centerContent}
onChange={setCenterContent} />
</OptionsSection>
)
}

View File

@@ -2,7 +2,7 @@ import type { ComponentChildren } from "preact";
import { CSSProperties } from "preact/compat";
interface OptionsSectionProps {
title?: string;
title?: ComponentChildren;
children: ComponentChildren;
noCard?: boolean;
style?: CSSProperties;

View File

@@ -11,6 +11,7 @@ import dialog from "../../../services/dialog";
import { formatDateTime } from "../../../utils/formatters";
import ActionButton from "../../react/ActionButton";
import { useTriliumEvent } from "../../react/hooks";
import HelpButton from "../../react/HelpButton";
type RenameTokenCallback = (tokenId: string, oldName: string) => Promise<void>;
type DeleteTokenCallback = (tokenId: string, name: string ) => Promise<void>;
@@ -48,19 +49,13 @@ export default function EtapiSettings() {
message: t("etapi.token_created_message"),
defaultValue: authToken
});
}, []);
}, []);
return (
<OptionsSection title={t("etapi.title")}>
<FormText>
{t("etapi.description")}<br />
<RawHtml
html={t("etapi.see_more", {
link_to_wiki: `<a class="tn-link" href="https://triliumnext.github.io/Docs/Wiki/etapi.html">${t("etapi.wiki")}</a>`,
// TODO: We use window.open src/public/app/services/link.ts -> prevents regular click behavior on "a" element here because it's a relative path
link_to_openapi_spec: `<a class="tn-link" onclick="window.open('etapi/etapi.openapi.yaml')" href="etapi/etapi.openapi.yaml">${t("etapi.openapi_spec")}</a>`,
link_to_swagger_ui: `<a class="tn-link" href="#_help_f3xpgx6H01PW">${t("etapi.swagger_ui")}</a>`
})} />
{t("etapi.description")}
<HelpButton helpPage="pgxEVkzLl1OP" />
</FormText>
<Button
@@ -68,6 +63,7 @@ export default function EtapiSettings() {
text={t("etapi.create_token")}
onClick={createTokenCallback}
/>
<hr />
<h5>{t("etapi.existing_tokens")}</h5>
@@ -101,7 +97,7 @@ function TokenList({ tokens }: { tokens: EtapiToken[] }) {
return (
tokens.length ? (
<div style={{ overflow: "auto", height: "500px"}}>
<div style={{ overflow: "auto"}}>
<table className="table table-stripped">
<thead>
<tr>
@@ -123,7 +119,7 @@ function TokenList({ tokens }: { tokens: EtapiToken[] }) {
text={t("etapi.rename_token")}
onClick={() => renameCallback(etapiTokenId, name)}
/>
<ActionButton
icon="bx bx-trash"
text={t("etapi.delete_token")}

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