Compare commits

...

414 Commits

Author SHA1 Message Date
Elian Doran
a6e7f98f69 chore(release): 0.92.3-beta 2025-03-07 23:59:10 +02:00
Elian Doran
e76601cd21 fix(bin): empty package.json 2025-03-07 23:58:41 +02:00
Elian Doran
e252b491ba chore(bin): make less error-tolerant 2025-03-07 23:57:31 +02:00
Elian Doran
555dcc956e chore(release): 0.92.3-beta 2025-03-07 23:55:26 +02:00
Elian Doran
3958312651 fix(e2e): flaky test due to navigation 2025-03-07 20:34:08 +02:00
Elian Doran
eb19e31fc3 fix(e2e): tests failing when run locally 2025-03-07 20:34:01 +02:00
Elian Doran
9d05fedc69 Merge pull request #1355 from TriliumNext/renovate/npm-axios-vulnerability
fix(deps): update dependency axios to v1.8.2 [security]
2025-03-07 20:25:21 +02:00
Elian Doran
cbd6278a0b Merge pull request #1348 from TriliumNext/renovate/electron-34.x
chore(deps): update dependency electron to v34.3.1
2025-03-07 20:14:30 +02:00
Elian Doran
f6b52f5ce9 Merge pull request #1349 from TriliumNext/renovate/vitest-monorepo
chore(deps): update vitest monorepo to v3.0.8
2025-03-07 20:14:17 +02:00
renovate[bot]
efc57e383c fix(deps): update dependency axios to v1.8.2 [security] 2025-03-07 18:13:51 +00:00
Elian Doran
40d6a28751 Merge pull request #1350 from TriliumNext/renovate/force-graph-1.x
fix(deps): update dependency force-graph to v1.49.3
2025-03-07 20:13:43 +02:00
Elian Doran
73791211c5 Merge pull request #1351 from TriliumNext/renovate/playwright-monorepo
chore(deps): update dependency @playwright/test to v1.51.0
2025-03-07 20:13:18 +02:00
Elian Doran
b0f86af57e Merge branch 'develop' into renovate/playwright-monorepo 2025-03-07 20:13:10 +02:00
Elian Doran
4c6556cf18 Merge pull request #1352 from TriliumNext/renovate/happy-dom-monorepo
chore(deps): update dependency happy-dom to v17.3.0
2025-03-07 20:12:57 +02:00
Elian Doran
3465bc3f1a Merge branch 'develop' into renovate/happy-dom-monorepo 2025-03-07 19:44:26 +02:00
Elian Doran
c1c9bf9122 Merge branch 'develop' into renovate/playwright-monorepo 2025-03-07 19:44:24 +02:00
Elian Doran
02b50703b2 Merge branch 'develop' into renovate/force-graph-1.x 2025-03-07 19:44:19 +02:00
Elian Doran
ab104af9ac Merge branch 'develop' into renovate/vitest-monorepo 2025-03-07 19:44:16 +02:00
Elian Doran
178a58375a Merge branch 'develop' into renovate/electron-34.x 2025-03-07 19:43:42 +02:00
Elian Doran
313d418345 fix(test): rollback database version 2025-03-07 10:23:02 +02:00
renovate[bot]
633369b5bd chore(deps): update dependency happy-dom to v17.3.0 2025-03-07 01:27:34 +00:00
renovate[bot]
06d5abded4 chore(deps): update dependency @playwright/test to v1.51.0 2025-03-07 01:27:24 +00:00
renovate[bot]
41368db8b6 fix(deps): update dependency force-graph to v1.49.3 2025-03-07 01:27:12 +00:00
renovate[bot]
4ff3b87f23 chore(deps): update vitest monorepo to v3.0.8 2025-03-07 01:27:02 +00:00
renovate[bot]
a40dc2047b chore(deps): update dependency electron to v34.3.1 2025-03-07 01:26:47 +00:00
Elian Doran
00e576b052 Revert "Merge pull request #1234 from TriliumNext/feature/task_list"
This reverts commit 58a8821c22, reversing
changes made to 50d491b432.
2025-03-06 23:52:01 +02:00
Elian Doran
ee7b97ae56 revert(db): back to 228 (no tasks) 2025-03-06 23:45:06 +02:00
Elian Doran
89767d0135 feat(client): allow triggering search on hash change 2025-03-06 22:21:50 +02:00
Elian Doran
79cc1cbf17 fix(link): search from URL not working (closes #1335) 2025-03-06 22:17:14 +02:00
Elian Doran
1ba6104e36 feat(vscode): set XML formatter 2025-03-06 21:19:35 +02:00
Elian Doran
f209e4f14d feat(vscode): add vitest integration 2025-03-06 21:19:28 +02:00
Elian Doran
a162fbfe42 fix(mermaid): <br> breaking diagram rendering (closes #1345) 2025-03-06 21:18:36 +02:00
Elian Doran
e795caa2f3 fix(note_language): no separator when no languages 2025-03-06 20:50:58 +02:00
Elian Doran
ddd0c3a878 Merge pull request #1319 from TriliumNext/feature/rtl
Right-to-left support
2025-03-06 18:12:44 +02:00
Elian Doran
7c5430ba49 Merge pull request #1341 from TriliumNext/renovate/node-22.x
chore(deps): update dependency @types/node to v22.13.9
2025-03-06 08:22:03 +02:00
Elian Doran
c155702d91 Merge pull request #1342 from TriliumNext/renovate/ws-8.x
chore(deps): update dependency @types/ws to v8.18.0
2025-03-06 08:21:37 +02:00
renovate[bot]
ab578f9379 chore(deps): update dependency @types/ws to v8.18.0 2025-03-06 02:50:55 +00:00
renovate[bot]
ebaa909488 chore(deps): update dependency @types/node to v22.13.9 2025-03-06 02:50:47 +00:00
Adorian Doran
c463106ccc style(next): tweak modals 2025-03-06 03:02:41 +02:00
Adorian Doran
283d192fe8 style(next)/jump to note: fix modal footer background 2025-03-06 02:30:32 +02:00
Adorian Doran
fbba1021cc style(next): restyle modals 2025-03-06 02:28:19 +02:00
Elian Doran
a3a34cfab0 fix(rtl): wrong content when switching to an empty note 2025-03-05 23:06:18 +02:00
Elian Doran
77d6cdc546 fix(note_language): double separator when only RTL languages 2025-03-05 23:00:48 +02:00
Elian Doran
deb5d82c02 fix(test): broken after adding content-only languages 2025-03-05 22:18:24 +02:00
Elian Doran
ca757b20d5 fix(note_language): duplicate separators if no language selected 2025-03-05 22:16:31 +02:00
Elian Doran
15075c8626 fix(build): tests failing due to cyclic dependencies 2025-03-05 22:11:03 +02:00
Elian Doran
07dbacb61f fix(build): incorrect import 2025-03-05 22:05:12 +02:00
Elian Doran
1976fe6729 Merge remote-tracking branch 'origin/develop' into feature/rtl
; Conflicts:
;	src/public/app/widgets/floating_buttons/help_button.ts
2025-03-05 21:57:53 +02:00
Elian Doran
c99c4a4302 Revert "feat(rtl): add language switcher toolbar"
This reverts commit e930ae5f40.
2025-03-05 21:57:08 +02:00
Elian Doran
8d60429b9c style(note_language): size and positioning of the help button 2025-03-05 21:51:08 +02:00
Elian Doran
84c480c4c6 feat(in-app-help): remove "contextual-help" suffix 2025-03-05 21:44:40 +02:00
Elian Doran
01f9ddaea7 fix(in-app-help): unnecessary bottom padding 2025-03-05 21:39:26 +02:00
Elian Doran
07b1f69f7a fix(in-app-help): fix image max width 2025-03-05 21:38:56 +02:00
Elian Doran
dd28ce9e5d feat(note_language): add in-app help 2025-03-05 21:38:41 +02:00
Elian Doran
e514396c42 feat(docs): prepare documentation for RTL text support 2025-03-05 21:27:53 +02:00
Adorian Doran
f2d1726852 style(next)/tab bar: do not use a distinct visual state for tabs being dragged in horizontal toolbar layout 2025-03-05 21:15:35 +02:00
Adorian Doran
6b9311f9ef style(next)/toolbar: rollback the sync status icon animation 2025-03-05 21:03:23 +02:00
Elian Doran
9ced699751 feat(rtl): reposition buttons for read-only language change 2025-03-05 19:23:04 +02:00
Elian Doran
c217d1c037 chore(i18n: rename localization setting 2025-03-05 19:20:34 +02:00
Elian Doran
a9938cbf7d feat(options/language): improve description & add translations 2025-03-05 18:54:59 +02:00
Elian Doran
3d600c885a feat(note_language): refresh rtl for read-only notes 2025-03-05 17:33:46 +02:00
Elian Doran
24c2b54bc9 feat(note_language): reload list of languages when changed 2025-03-05 17:23:22 +02:00
Elian Doran
8e2517459f feat(rtl): align floating buttons properly 2025-03-05 17:12:14 +02:00
Elian Doran
25c9f52cf4 feat(note_language): add a button to configure the language 2025-03-05 16:44:36 +02:00
Elian Doran
4a75f9f48b feat(rtl): adjust padding for read-only text 2025-03-05 14:39:26 +02:00
Elian Doran
51813099b3 feat(note_language): reinitialize editor when switching between RTL and LTR notes 2025-03-05 14:35:05 +02:00
Elian Doran
93e2515190 Merge pull request #1332 from TriliumNext/port_dialogs
port dialogs
2025-03-05 14:21:02 +02:00
JYC333
883a67bcfe Merge branch 'develop' into port_dialogs 2025-03-05 13:09:00 +01:00
Elian Doran
17e3bd9f6d Merge pull request #1339 from TriliumNext/build_server-build-dump-db
build(build-server): stop copying dump-db during build
2025-03-05 13:48:13 +02:00
Jin
d4fe8cf4b9 refactor: 💡 add event data and remove redundant code 2025-03-05 12:44:36 +01:00
Elian Doran
4c0ecc4df9 Merge pull request #1315 from TriliumNext/chore_add-eslint
chore: add eslint as linter
2025-03-05 12:55:48 +02:00
Elian Doran
2b0cb8225f Merge branch 'develop' into build_server-build-dump-db 2025-03-05 12:55:14 +02:00
Elian Doran
3d7798859f Merge pull request #1338 from TriliumNext/chore_move-deps-to-dev
chore(deps): move deps to devDeps
2025-03-05 12:54:59 +02:00
Panagiotis Papadopoulos
f8c8b9eb3f build(build-server): stop copying dump-db during build 2025-03-05 09:28:41 +01:00
Panagiotis Papadopoulos
33eb8fe820 chore(deps): move deps to devDeps
* happy-dom → only needed for tests
* knockout → this is now bundled by webpack during build stage
* ts-loader → only needed during build stage
2025-03-05 09:24:20 +01:00
Panagiotis Papadopoulos
d8ea415b84 Merge branch 'develop' into chore_add-eslint 2025-03-05 09:16:02 +01:00
Elian Doran
7bcbf29f21 fix(canvas): unable to copy-paste 2025-03-05 09:27:20 +02:00
Elian Doran
ea3364ab09 feat(note_language): support RTL in read-only text 2025-03-04 23:13:23 +02:00
Elian Doran
115c3bbeb0 chore(client/ts): port read_only_text 2025-03-04 22:59:46 +02:00
Elian Doran
f150ec15bc refactor(client): move finding by locale in service 2025-03-04 22:45:38 +02:00
Elian Doran
d582fdea02 feat(settings/i18n): filter only display languages 2025-03-04 22:19:37 +02:00
Elian Doran
775fd3f22b feat(note_language): filter by enabled languages 2025-03-04 21:56:21 +02:00
Elian Doran
9f6b97cdfa feat(note_language): display checkbox to the right 2025-03-04 21:31:19 +02:00
Elian Doran
d31ba6f47c feat(note_language): add checkbox 2025-03-04 21:04:50 +02:00
Elian Doran
b150a05a55 feat(note_language): group right-to-left languages 2025-03-04 20:58:32 +02:00
Elian Doran
4c89a2ac27 feat(i18n): sort languages alphabetically 2025-03-04 20:51:22 +02:00
Elian Doran
951f4c4921 feat(note_language): align list of languages to the right 2025-03-04 20:48:36 +02:00
Elian Doran
856410120c feat(note_language): improve layout of list of languages 2025-03-04 20:39:30 +02:00
Elian Doran
427b7fe992 feat(note_language): rebuild editor when language is switched 2025-03-04 20:34:36 +02:00
Elian Doran
c6b3c1bf88 feat(note_language): add right-to-left languages 2025-03-04 20:31:51 +02:00
Elian Doran
42d3334c9d feat(note_language): initialize CKEditor with right language 2025-03-04 19:29:02 +02:00
Elian Doran
3546ac6ded refactor(note_language): remove unnecessary fields 2025-03-04 18:40:26 +02:00
Elian Doran
b81fd69981 fix(note_language): crash if user entered invalid locale 2025-03-04 18:38:07 +02:00
Elian Doran
bb42b5fb19 feat(note_language): allow removing language tag 2025-03-04 18:35:42 +02:00
Elian Doran
598586f735 feat(note_language): update value of combobox 2025-03-04 18:30:43 +02:00
Elian Doran
bccfeed431 feat(note_language): set language attribute for note 2025-03-04 17:54:52 +02:00
Elian Doran
dbea35f9f3 feat(note_language): set a default value for the combo 2025-03-04 17:49:58 +02:00
Elian Doran
acc76f9b74 feat(note_language): add an option for no language set 2025-03-04 17:48:04 +02:00
Elian Doran
5b4d323936 feat(client): display list of languages 2025-03-04 17:43:24 +02:00
Elian Doran
fd652ea7a5 feat(client): hide language for non-text notes 2025-03-04 17:29:37 +02:00
Elian Doran
642b84ce6b feat(client): create an empty language switcher at note level 2025-03-04 17:27:00 +02:00
Elian Doran
c0c85e96ce chore(client/ts): port basic_properties 2025-03-04 17:18:17 +02:00
Panagiotis Papadopoulos
2c7a25b7fc chore(eslint): add rule for unused vars
this is already used across codebase: using "_" as placeholder for deliberately unused vars (e.g. when destructuring arrays)
2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
6a5e622637 scripts(linter): remove "--cache" flag
using it is not recommended for ts-eslint:
https://typescript-eslint.io/troubleshooting/faqs/eslint#can-i-use-eslints---cache-with-typescript-eslint
2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
b2ac5b6337 chore(eslint): ignore certain folders 2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
40144fc171 deps: update typescript-eslint to 8.26.0 2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
1e599af480 chore(eslint): disable 'no-undef' rule
For TS projects this is already enforced by tsc, see:
https://eslint.org/docs/latest/rules/no-undef#handled_by_typescript
2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
744a0b8042 chore: ignore build related folder in eslint config 2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
0d66f9d4eb chore(scripts): add dev:linter-check and dev:linter-fix
purposely *not* named as dev:eslint, just to "decouple" the script from eslint, in case there ever is the need to change that :-)
2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
aed835b6c2 chore: add initial eslint configuration
rules will need some finetuning still
2025-03-04 12:19:23 +01:00
Adorian Doran
ce2961ebd6 style(next)/toolbar: animate the sync status icon 2025-03-04 11:55:37 +02:00
Adorian Doran
b03c75c09b style(next): fix note menu artifacts in split view 2025-03-04 11:19:33 +02:00
Adorian Doran
77c4b50215 style(next)/SQL Console: tweak appearance 2025-03-04 11:14:10 +02:00
Elian Doran
901d2d72ae feat(print): improve code block style 2025-03-04 09:29:53 +02:00
Adorian Doran
6555add2aa client/options/other: tweak the "HTML Import Tags" section 2025-03-04 01:48:09 +02:00
Jin
c4d2c2b8de refactor: 💡 remove redundant code 2025-03-04 00:42:31 +01:00
Jin
f1ecab84d9 refactor: 💡 remove unused code 2025-03-04 00:35:29 +01:00
Jin
f1f55fd4f8 fix: 🐛 fix add external link
fix can't add external link from add link dialog
2025-03-04 00:33:09 +01:00
Adorian Doran
a97c8087a1 style(next)/shell: correct border offset, add entrance animation for notes 2025-03-04 01:31:36 +02:00
Adorian Doran
ee40bb3b33 style(next)/ribbon/note info: improve the layout on constrained width 2025-03-04 00:55:24 +02:00
Jin
5543650166 chore: 🤖 (ts) port add_link dialog 2025-03-03 23:54:09 +01:00
Adorian Doran
dcea67fa9d Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-04 00:12:15 +02:00
Adorian Doran
3d2801096f style(next): add a border to separate note splits 2025-03-04 00:12:02 +02:00
Elian Doran
c41fbe8e45 fix(client): build error due to null 2025-03-03 23:40:32 +02:00
Elian Doran
3855f0e75f Revert "port tab manager to ts"
This reverts commit 45a50f3aa1.
2025-03-03 23:34:54 +02:00
Adorian Doran
3f641c98fb Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-03 23:08:25 +02:00
Adorian Doran
9ca43aceed style(next)/search in note: tweak the border line 2025-03-03 23:08:16 +02:00
Jin
0e81f086c0 chore: 🤖 (ts) port about dialog 2025-03-03 22:06:04 +01:00
Elian Doran
5289f94553 Merge pull request #1320 from TriliumNext/porting_js
chore: port more js to ts
2025-03-03 23:04:14 +02:00
Adorian Doran
d779cc1854 Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-03 22:49:16 +02:00
Adorian Doran
3b16ad508e style(next)/search in note: gracefully handle narrow widths 2025-03-03 22:47:32 +02:00
Elian Doran
cf554fc4af Merge branch 'develop' into porting_js 2025-03-03 22:46:10 +02:00
Jin
1b76442367 chore: 🤖 fix webpack build error 2025-03-03 21:03:45 +01:00
Elian Doran
2213c500c2 fix(client): allow overriding position using getter (closes #1321) 2025-03-03 21:03:45 +01:00
Elian Doran
3c290c9fc5 fix(client): allow overriding position using getter (closes #1321) 2025-03-03 21:20:42 +02:00
Elian Doran
8e66dc300f Merge branch 'develop' into porting_js 2025-03-03 20:30:15 +02:00
Elian Doran
ef9eebc030 Merge pull request #1283 from TriliumNext/chore_prettier
chore: fix prettier code style issues
2025-03-03 20:28:33 +02:00
Elian Doran
65a51153b3 Merge remote-tracking branch 'origin/develop' into chore_prettier 2025-03-03 20:21:47 +02:00
Elian Doran
741a4af570 fix(build): an argument was not provided 2025-03-03 20:00:52 +02:00
Elian Doran
2a4d3b71f2 Merge pull request #1324 from TriliumNext/renovate/prettier-3.x
chore(deps): update dependency prettier to v3.5.3
2025-03-03 19:57:33 +02:00
JYC333
0d5bef422a Merge branch 'develop' into renovate/prettier-3.x 2025-03-03 18:30:58 +01:00
Adorian Doran
605d99a7e8 style(next): horizontal toolbar layout tweaks 2025-03-03 18:17:13 +02:00
Elian Doran
e930ae5f40 feat(rtl): add language switcher toolbar 2025-03-03 18:12:15 +02:00
Adorian Doran
4d6e115208 style(next)/attribute detail dialog: tweak input labels 2025-03-03 18:04:21 +02:00
Adorian Doran
495a394d79 style(next)/search in note: remove the italic font style from the match counters 2025-03-03 17:50:59 +02:00
Adorian Doran
e55708f79f client/settings/appearance: fix restart application button style 2025-03-03 16:04:23 +02:00
Adorian Doran
c7e9963db1 client/setup dialog: add a margin after the password field 2025-03-03 16:00:03 +02:00
Jin
ad711ff00c chore: 🤖 clean up debug code 2025-03-03 11:29:37 +01:00
renovate[bot]
125eef234b chore(deps): update dependency prettier to v3.5.3 2025-03-03 02:26:21 +00:00
Jin
45a50f3aa1 port tab manager to ts 2025-03-03 01:04:42 +01:00
Jin
8e0b9d17a4 port split note container to ts 2025-03-02 21:52:48 +01:00
Elian Doran
b99ead6a84 feat(setings): add option section for settings 2025-03-02 22:23:47 +02:00
Elian Doran
e7d2be4663 feat(options/language): store list of languages 2025-03-02 21:58:40 +02:00
Panagiotis Papadopoulos
2efc1a0e2e chore(prettier): ignore public/app/doc_notes 2025-03-02 20:48:07 +01:00
Panagiotis Papadopoulos
2beaaa95bf chore(prettier): fix code style 2025-03-02 20:47:57 +01:00
Elian Doran
bc787213f4 feat(options/language): display list of languages 2025-03-02 21:47:53 +02:00
Elian Doran
73daec6644 feat(settings): create a language settings section 2025-03-02 21:24:31 +02:00
Elian Doran
43d8affcc8 feat(i18n): translate unknown content widget message 2025-03-02 21:17:04 +02:00
Elian Doran
67509bc92f fix(migration): no such table "tasks" 2025-03-02 20:43:52 +02:00
Elian Doran
1ca485e4b5 fix(migration): using async in transaction 2025-03-02 20:43:01 +02:00
Elian Doran
16ad054d2a refactor(migration): remove async import from migration scripts 2025-03-02 20:28:41 +02:00
Elian Doran
b4310b5275 fix(migration): ESM imports not working on Windows 2025-03-02 20:23:38 +02:00
Elian Doran
f04e747786 fix(migration): TypeScript migrations not run 2025-03-02 19:59:50 +02:00
Elian Doran
a80c3e32f1 fix(migration): JavaScript-based migrations not working 2025-03-02 19:39:06 +02:00
Elian Doran
01ff3d396d chore(test): add database testing migration 2025-03-02 17:11:07 +02:00
Elian Doran
49a22bce80 Merge pull request #1316 from TriliumNext/renovate/force-graph-1.x
fix(deps): update dependency force-graph to v1.49.2
2025-03-02 11:43:36 +02:00
renovate[bot]
436788cf96 fix(deps): update dependency force-graph to v1.49.2 2025-03-02 02:33:14 +00:00
Elian Doran
c8a7f893e1 Merge pull request #1312 from TriliumNext/renovate/node-22.x
chore(deps): update dependency @types/node to v22.13.8
2025-03-01 10:18:47 +02:00
Elian Doran
17884558ad fix(server): build errors after newer types 2025-03-01 10:16:24 +02:00
Elian Doran
8e4530293d Merge pull request #1314 from hasecilu/i18n/Spanish
chore(i18n): update Spanish translation
2025-03-01 10:07:11 +02:00
Elian Doran
072b5b2035 Merge pull request #1313 from TriliumNext/renovate/typescript-5.x
chore(deps): update dependency typescript to v5.8.2
2025-03-01 10:06:30 +02:00
renovate[bot]
455b2bf338 chore(deps): update dependency @types/node to v22.13.8 2025-03-01 08:05:52 +00:00
Elian Doran
9a5c08f117 Merge pull request #1304 from TriliumNext/chore_ts-port_read_only_code
chore(ts): start porting read_only_code
2025-03-01 10:05:11 +02:00
hasecilu
038e3a15cd chore(i18n): update Spanish translation 2025-02-28 22:44:48 -06:00
renovate[bot]
6c67c9a41f chore(deps): update dependency typescript to v5.8.2 2025-03-01 01:31:56 +00:00
Panagiotis Papadopoulos
d6b164413e chore(ts): port read_only_code 2025-02-28 23:19:42 +01:00
Elian Doran
259ce440c5 fix(build): type error due to test 2025-02-28 22:02:41 +02:00
Elian Doran
2a75819734 chore(docs): start writing entrypoint for editing docs 2025-02-28 22:02:29 +02:00
Elian Doran
4211e4e11c chore(deps): npm audit fix 2025-02-28 21:24:26 +02:00
Elian Doran
f76f679800 feat(calendar): allow relations in promoted attributes 2025-02-28 20:46:41 +02:00
Elian Doran
e7d06fceba test(calendar): labels as promoted attributes 2025-02-28 20:34:30 +02:00
Elian Doran
a8b119e4df test(calendar): relation as custom title with attribute relation 2025-02-28 20:13:37 +02:00
Elian Doran
f953f6514f test(calendar): relation as custom title with attribute label 2025-02-28 20:11:45 +02:00
Elian Doran
ca7cff45c9 test(calendar): relation as custom title 2025-02-28 19:55:02 +02:00
Elian Doran
6f2a0f9ee1 refactor(types): better type definitions 2025-02-28 19:44:32 +02:00
Elian Doran
5b9bfac1f8 test(calendar): custom label as title 2025-02-28 19:36:50 +02:00
Elian Doran
f674ba0d4a test(calendar): custom start/end date 2025-02-28 19:32:32 +02:00
Elian Doran
5731cb9b4d test(calendar): start date & end date 2025-02-28 19:23:45 +02:00
Elian Doran
d83b2a6a38 refactor(test): dedicated helper for froca 2025-02-28 19:18:37 +02:00
Elian Doran
ad18916973 refactor(test): dedicated folder for test support 2025-02-28 19:13:33 +02:00
Elian Doran
2531e5617f refactor(test): remove need for async import 2025-02-28 19:12:19 +02:00
Elian Doran
f646e0f724 refactor(test): global initialisation 2025-02-28 19:11:12 +02:00
Elian Doran
7a34a2f59c Merge branch 'develop' of ssh://github.com/TriliumNext/Notes into develop 2025-02-28 19:03:50 +02:00
Elian Doran
85882d843b chore(test): basic test harness for calendar view event testing 2025-02-28 19:03:08 +02:00
Elian Doran
f60667b618 Merge pull request #1306 from clsty/develop
Translation: Fix, improve and finish for zh-CN
2025-02-28 18:56:19 +02:00
clsty
c8c7680a10 Fix missing translation on zh-CN translation 2025-03-01 00:13:25 +08:00
Elian Doran
6df588da22 chore(client/ts): port backend_log 2025-02-28 17:59:38 +02:00
Elian Doran
423037b9d6 chore(client/ts): port search_options 2025-02-28 17:58:51 +02:00
Elian Doran
2c714afa21 chore(client/ts): port floating buttons 2025-02-28 17:55:47 +02:00
Elian Doran
83d25964c7 Merge pull request #1307 from TriliumNext/porting_js
porting js
2025-02-28 17:49:35 +02:00
Elian Doran
e58a61051b Merge pull request #1302 from TriliumNext/build_webpack-i18n-dayjs-splitjs
build: let webpack handle `dayjs`, `split.js` and `i18next`
2025-02-28 17:44:33 +02:00
clsty
77c0bfe93b Minor improves on zh-CN translation 2025-02-28 23:23:29 +08:00
clsty
9826256e29 Fix indent 2025-02-28 23:03:59 +08:00
Jin
a3d9b04d96 port history navigation, remove redundance 2025-02-28 15:45:26 +01:00
Jin
c67445f511 optimize month selector behavior 2025-02-28 15:09:28 +01:00
Jin
a99c86ea9f port calender to ts 2025-02-28 15:09:01 +01:00
clsty
23553692ac Update zh-CN translation. 2025-02-28 19:30:14 +08:00
Panagiotis Papadopoulos
1450e57a6a chore(deps): move "i18next-http-backend" to devDependencies
since it is not used in server side code and it is bundled by webpack, it is only needed during build stage -> devDependency
on server-side we use i18next and i18next-fs-backend -> so these need to stay in dependencies
2025-02-28 08:35:57 +01:00
Panagiotis Papadopoulos
d3283746fc fix(type_widgets/doc): import i18next
since we don't export the full i18n object (not sure why?),
I had to add an additional export "getCurrentLanguage"

-> needs to be a function, because otherwise it will be a static value (being set to undefined),
which is *not* what we want
2025-02-28 08:30:35 +01:00
Panagiotis Papadopoulos
f3148bf478 build: let webpack bundle i18next 2025-02-28 08:26:48 +01:00
Panagiotis Papadopoulos
b60f22c6b9 chore(deps): move "split.js" to devDependencies
since it is not used in server side code and it is bundled by webpack, it is only needed during build stage -> devDependency
2025-02-28 08:09:36 +01:00
Panagiotis Papadopoulos
559517ace1 build: let webpack bundle split.js 2025-02-27 23:00:44 +01:00
Panagiotis Papadopoulos
49a2eb0ccf build: let webpack bundle dayjs 2025-02-27 22:44:18 +01:00
Elian Doran
06a439e95d feat(options/apperance): hide layout orientation section 2025-02-27 19:31:36 +02:00
Elian Doran
a615b473a7 Merge pull request #1297 from TriliumNext/renovate/force-graph-1.x
fix(deps): update dependency force-graph to v1.49.1
2025-02-27 19:17:05 +02:00
Elian Doran
1a9c28f9bd Merge pull request #1298 from TriliumNext/renovate/electron-34.x
chore(deps): update dependency electron to v34.3.0
2025-02-27 19:16:29 +02:00
Elian Doran
93d5b20362 Merge pull request #1299 from TriliumNext/renovate/axios-1.x
fix(deps): update dependency axios to v1.8.1
2025-02-27 19:14:51 +02:00
Elian Doran
6501b95eac Merge pull request #1300 from TriliumNext/renovate/mind-elixir-4.x
fix(deps): update dependency mind-elixir to v4.4.1
2025-02-27 19:14:08 +02:00
renovate[bot]
b0fa70870c fix(deps): update dependency mind-elixir to v4.4.1 2025-02-27 02:27:48 +00:00
renovate[bot]
74fc5562b2 fix(deps): update dependency axios to v1.8.1 2025-02-27 02:27:39 +00:00
renovate[bot]
c033ad261c chore(deps): update dependency electron to v34.3.0 2025-02-27 02:27:30 +00:00
renovate[bot]
fe7f2e43be fix(deps): update dependency force-graph to v1.49.1 2025-02-27 02:27:17 +00:00
Elian Doran
5435b3c8fd feat(calendar): allow customisable start & end dates 2025-02-27 00:02:58 +02:00
Elian Doran
7d5b0f825c Merge pull request #1295 from TriliumNext/feat_add-link-to-swagger-ui
feat(options/etapi): improve etapi options page description
2025-02-26 23:42:38 +02:00
Elian Doran
fd66da95f3 fix(options/etapi): comments being visible to the user 2025-02-26 23:42:03 +02:00
Elian Doran
8e5762b125 chore(i18n/ro): translate new messages 2025-02-26 23:09:39 +02:00
Elian Doran
bee1df4fdf feat(options/etapi): open swagger UI in in-app-help 2025-02-26 23:06:35 +02:00
Elian Doran
4df76fafe1 Merge branch 'develop' into feat_add-link-to-swagger-ui 2025-02-26 22:46:31 +02:00
Elian Doran
3d36d6d121 Merge pull request #1276 from TriliumNext/renovate/apple-actions-import-codesign-certs-3.x
chore(deps): update apple-actions/import-codesign-certs action to v3
2025-02-26 22:46:15 +02:00
Elian Doran
995d963450 Merge pull request #1294 from TriliumNext/fix-macos-artifact-names
Fix MacOS artifact names
2025-02-26 22:45:02 +02:00
Elian Doran
5d61f9fb12 fix(tasks): alignment of checkbox 2025-02-26 22:43:38 +02:00
Elian Doran
09f7645925 feat(tasks): improve layout 2025-02-26 22:43:38 +02:00
Elian Doran
2ea85dc238 feat(tasks): trim task name 2025-02-26 22:43:38 +02:00
Elian Doran
d0c703515b feat(tasks): display due date without time 2025-02-26 22:43:38 +02:00
Elian Doran
d73c9308a9 chore(server/test): adjust includes/excludes 2025-02-26 22:43:38 +02:00
Elian Doran
89eab387ba chore(test): html coverage 2025-02-26 22:43:38 +02:00
Elian Doran
6f9fd76465 fix(share): double request of credentials 2025-02-26 22:43:38 +02:00
Elian Doran
7ea3cb71f3 chore(server/test): password protected share 2025-02-26 22:43:38 +02:00
Elian Doran
fa60295ab2 feat(note_list): improve file footer 2025-02-26 22:43:38 +02:00
Elian Doran
ab5df9e010 feat(note_list): improve video preview 2025-02-26 22:43:38 +02:00
Elian Doran
e330d91df2 feat(file): display videos in full width 2025-02-26 22:43:38 +02:00
Elian Doran
07c2342b7b feat(file): display video in full-width & full-height 2025-02-26 22:43:38 +02:00
Elian Doran
9cc3598095 chore(ci): separate client & server coverage 2025-02-26 22:43:38 +02:00
Panagiotis Papadopoulos
0f1b4614fb chore(options/etapi): add TODO notice to get rid of current workaround 2025-02-26 21:07:56 +01:00
Panagiotis Papadopoulos
f1f5839ea2 feat(options/etapi): link to the swagger UI that we ship
since we are shipping it, why not link to it as well :-)
2025-02-26 21:07:56 +01:00
Panagiotis Papadopoulos
ba84c694b2 i18n(options/etapi): improve translatability of description string
convert the split up string into a single interpolated string,
which improves translatability (and allows LTR translations)
2025-02-26 21:07:56 +01:00
perf3ct
5109f865c7 Fix MacOS artifact names 2025-02-26 20:06:18 +00:00
Elian Doran
47f84fe4b4 Merge pull request #1292 from TriliumNext/bugfix/macos-fix2
Pass the required `APPLE` secrets to the `build-electron` action
2025-02-26 21:01:29 +02:00
perf3ct
1056176624 we have to pass the secret values to the composite github actions 2025-02-26 18:51:14 +00:00
perf3ct
634b57ce5d let's see if we can contain the signing explosion to just build-electron 2025-02-26 18:33:57 +00:00
Elian Doran
6fcd229b52 chore(ci): run unit tests in dev workflow 2025-02-26 18:58:27 +02:00
Elian Doran
bd933dde28 chore(test): disable download of images 2025-02-26 18:58:08 +02:00
Elian Doran
ef736edf09 chore(test): separate client & server tests 2025-02-26 18:39:00 +02:00
Elian Doran
909a74e8ac chore(test): disable regularly scheduled backup 2025-02-26 18:00:53 +02:00
Elian Doran
180c02d647 chore(test): migrate database to new version 2025-02-26 18:00:45 +02:00
Elian Doran
d92959e23a chore(i18n): reach 100% for Romanian 2025-02-26 17:44:25 +02:00
Elian Doran
3c8a42ed73 Merge pull request #1289 from Potjoe-97/FR-tra
Translation : FR update & tweaks
2025-02-26 17:33:27 +02:00
Elian Doran
43b1b8a306 Merge pull request #1286 from TriliumNext/fix_views_appPath_#1285
fix: EJS crash after failed login
2025-02-26 17:32:53 +02:00
Elian Doran
bb8277d035 Merge pull request #1281 from TriliumNext/porting_js
port toc widget button
2025-02-26 17:28:36 +02:00
Potjoe-97
9d188f9ecc Merge pull request #8 from Potjoe-97/patch-2
Translation: Update FR translation.json
2025-02-26 15:52:15 +01:00
Potjoe-97
f04d749440 Update translation.json 2025-02-26 15:47:25 +01:00
Potjoe-97
631a4ed9b2 Update server.json 2025-02-26 15:13:20 +01:00
Panagiotis Papadopoulos
1a0c35f43d refactor(routes/login): use "shorter" syntax for passing to ejs render 2025-02-26 08:50:36 +01:00
Panagiotis Papadopoulos
0aa1d602a1 fix(routes/login): add missing "appPath" to ejs render 2025-02-26 08:45:35 +01:00
Jin
d28dfc2b64 port toc widget button 2025-02-26 00:53:15 +01:00
Elian Doran
8b2788fa8c chore(scripts): fix start-prod environment 2025-02-25 20:44:10 +02:00
Elian Doran
ea04457c06 chore(i18n): refine error message for DB migration 2025-02-25 20:18:23 +02:00
Elian Doran
c935cb65a0 fix(tasks): not being able to mark tasks as done 2025-02-25 20:10:57 +02:00
Elian Doran
e7601f65bb feat(tasks): highlight overdue tasks 2025-02-25 19:55:10 +02:00
Elian Doran
64647df043 feat(tasks): sort by due date 2025-02-25 19:48:26 +02:00
Elian Doran
5838ac3bca feat(tasks): display due date in calendar-relative format 2025-02-25 19:38:15 +02:00
Elian Doran
7bc9114976 feat(tasks): display due date 2025-02-25 19:19:09 +02:00
Elian Doran
637ba78100 feat(tasks): display due date in editable textbox 2025-02-25 18:40:20 +02:00
Elian Doran
fcd7b986aa feat(tasks): make due date editable 2025-02-25 18:36:46 +02:00
Elian Doran
84e8559401 feat(tasks): allow only one editable section at one time 2025-02-25 17:46:17 +02:00
Elian Doran
06831ddc76 feat(tasks): start implementing expandable edit container 2025-02-25 17:43:28 +02:00
Elian Doran
cd78955080 Merge pull request #1270 from TriliumNext/porting_js
port js to ts
2025-02-25 17:21:22 +02:00
Elian Doran
175852f6cb refactor(client): remove unnecessary return type 2025-02-25 17:20:13 +02:00
Elian Doran
4149ebdc69 Merge pull request #1277 from TriliumNext/build_fix-missing-types-webpack
build(webpack): fix missing type declarations
2025-02-25 17:19:29 +02:00
Elian Doran
6d52d7943b Merge pull request #1275 from TriliumNext/renovate/chardet-2.x
fix(deps): update dependency chardet to v2.1.0
2025-02-25 17:18:26 +02:00
Elian Doran
8e4aead110 Merge pull request #1274 from TriliumNext/renovate/vitest-monorepo
chore(deps): update vitest monorepo to v3.0.7
2025-02-25 17:17:51 +02:00
Elian Doran
d434b416f3 Merge pull request #1273 from TriliumNext/renovate/typedoc-0.x
chore(deps): update dependency typedoc to v0.27.9
2025-02-25 17:17:28 +02:00
Elian Doran
ac050bca3b Merge pull request #1272 from TriliumNext/renovate/sass-1.x
chore(deps): update dependency sass to v1.85.1
2025-02-25 17:17:05 +02:00
Panagiotis Papadopoulos
194640db66 build(webpack): fix missing type declarations 2025-02-25 08:58:37 +01:00
renovate[bot]
05975a02fb chore(deps): update apple-actions/import-codesign-certs action to v3 2025-02-25 02:37:14 +00:00
renovate[bot]
7345cddc0a fix(deps): update dependency chardet to v2.1.0 2025-02-25 02:37:10 +00:00
renovate[bot]
a01da98b37 chore(deps): update vitest monorepo to v3.0.7 2025-02-25 02:37:01 +00:00
renovate[bot]
c80ec03126 chore(deps): update dependency typedoc to v0.27.9 2025-02-25 02:36:48 +00:00
renovate[bot]
cd5df24e6a chore(deps): update dependency sass to v1.85.1 2025-02-25 02:36:38 +00:00
Jin
1be92baf4a remove edit_button.js 2025-02-25 02:11:53 +01:00
Jin
16b58a58a3 port js to ts 2025-02-25 02:02:20 +01:00
Elian Doran
34762236d1 fix(build): errors due to missing command 2025-02-24 22:50:16 +02:00
Elian Doran
4240af6c43 Merge pull request #1267 from perfectra1n/develop
Enable MacOS code signing and notarization in GitHub Actions
2025-02-24 22:37:09 +02:00
Elian Doran
d85c670d7b Merge pull request #1268 from TriliumNext/port/client_ts
Port note tree to TypeScript
2025-02-24 21:59:31 +02:00
Elian Doran
23d01ec351 fix(build): type definitions for context menu 2025-02-24 21:35:35 +02:00
Elian Doran
7874e88b4a fix(build): fancytree's JQuery UI interfering with bootstrap 2025-02-24 21:35:23 +02:00
Jon Fuller
9d6caa84cd Merge branch 'develop' into develop 2025-02-24 08:13:59 -08:00
perf3ct
36ce2a3342 add back prettier-ignore comment for pano 2025-02-24 16:12:53 +00:00
Elian Doran
65804f9c2a chore(deps): revert changges to package-lock 2025-02-24 17:46:44 +02:00
Elian Doran
28ed616fa6 feat(search): focus on search string by default 2025-02-24 13:51:02 +02:00
Elian Doran
675a5e96e6 chore(client/ts): port search_string 2025-02-24 13:50:08 +02:00
Elian Doran
8ab0084e10 chore(client/ts): port search_definition 2025-02-24 13:45:36 +02:00
Elian Doran
2ab22e7b0e fix(client): type errors due to command change 2025-02-24 12:39:40 +02:00
Elian Doran
147c340529 Merge remote-tracking branch 'origin/develop' into port/client_ts 2025-02-24 10:14:52 +02:00
Elian Doran
87e687147d Merge remote-tracking branch 'origin/develop' into port/client_ts 2025-02-24 10:10:34 +02:00
perf3ct
b88980ea49 Clean up some of the verbosity 2025-02-24 00:59:08 +00:00
perf3ct
fe93ee90c7 Update Entitlements for MacOS 2025-02-24 00:59:02 +00:00
perf3ct
e9d4356492 Now we'll try the name with a space in it? 2025-02-24 00:44:50 +00:00
perf3ct
226cf8dfd7 Set up Signing and Notarizing for MacOS 2025-02-23 23:36:30 +00:00
Elian Doran
b91b243432 fix(tasks): selection contains spaces 2025-02-23 22:00:50 +02:00
Elian Doran
0ba4c9b9c7 fix(tasks): content flash when updating list of tasks 2025-02-23 21:54:58 +02:00
Elian Doran
31fcf7ea60 feat(tasks): clear text box when entering a task 2025-02-23 21:39:05 +02:00
Elian Doran
24c02e013b fix(import/enex): "Missing or wrong content type for resource" (fixes #943) 2025-02-23 19:58:43 +02:00
Elian Doran
d319eede1f style(views/calendar): disable link underline 2025-02-23 19:23:00 +02:00
Elian Doran
143b91936c Merge pull request #1261 from rom1dep/calendar_enh_attributes
feat(view/calendar): let the user specify attributes to be promoted o…
2025-02-23 19:16:35 +02:00
Elian Doran
95e6919dcf chore(calendar/view): remove unnecessary comment 2025-02-23 19:15:33 +02:00
Elian Doran
07147bf857 fix(view/calendar): add basic support for promoted attributes 2025-02-23 19:14:09 +02:00
Elian Doran
249c42e781 fix(view/calendar): guard condition breaking recursion 2025-02-23 18:39:34 +02:00
Elian Doran
2578d480a8 Merge remote-tracking branch 'origin/develop' into calendar_enh_attributes 2025-02-23 18:38:11 +02:00
Elian Doran
937a314260 Merge pull request #1260 from TriliumNext/chore_port-to-ts_attach
chore(ts): port various attachment related files to TS
2025-02-23 18:33:41 +02:00
Elian Doran
560b7ebe35 refactor(client): use workaround for TS error 2025-02-23 18:32:53 +02:00
Elian Doran
4883debd8d Merge remote-tracking branch 'origin/develop' into chore_port-to-ts_attach 2025-02-23 18:28:29 +02:00
Elian Doran
637845c396 Merge pull request #1258 from TriliumNext/fix_zenmode-ui-fixes
fix/i18n: tiny zen mode UI fixes
2025-02-23 18:27:56 +02:00
Elian Doran
d16026f8e6 Merge pull request #1257 from TriliumNext/chore_deps-update
chore: package.json maintenance
2025-02-23 18:26:59 +02:00
Elian Doran
e5aed0a3fc Merge pull request #1167 from TriliumNext/chore_ts-port_sync_status
chore(ts): port sync_status.ts
2025-02-23 18:26:23 +02:00
Elian Doran
8a08664dd5 Merge pull request #1263 from TriliumNext/renovate/prettier-3.x
chore(deps): update dependency prettier to v3.5.2
2025-02-23 18:24:51 +02:00
Elian Doran
b9f30fc501 chore(build): update Electron version for nix 2025-02-23 18:22:56 +02:00
Adorian Doran
70af260f0f style(next): note map: tweak the color of the "fix nodes" button while toggled 2025-02-23 17:48:58 +02:00
Adorian Doran
474b44608b style(next): forms: remove the background for range inputs 2025-02-23 17:13:56 +02:00
Adorian Doran
12f7119427 style(next): forms: fix tool buttons wrapped inside button groups 2025-02-23 17:01:32 +02:00
Panagiotis Papadopoulos
223a1fb203 refactor: FAttachment/Attachment_details - make fields public and get rid of getters
as per
https://github.com/TriliumNext/Notes/pull/1260#discussion_r1966615186
2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
fb0487ca36 chore(ts): port widgets/attachment_detail to TS 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
add6f80aeb chore(ts/content_renderer): add FAttachment types as used in attachment_detail 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
5d4dc91cc3 chore(ts/Fattachment): add getContentLength, since contentLength is private 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
99e520cbbc chore(ts/Fattachment): add getUtcDateScheduledForErasureSince, since UtcDateScheduledForErasureSince is private 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
1e7dee51fc chore(ts/Fattachment): add getOwnerId, since ownerId is private 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
4ddc36f6b8 chore(ts): import AttachmentRow type in load_results 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
3f2ae81fe4 chore(ts): start port of widgets/attachment_detail 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
d99a44867c chore(ts): add temporary ts-ignore to widgets/buttons/attachments_actions 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
8f643c62e3 chore(ts): port of type_widgets/attachment_list 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
f6785f7980 chore(ts): add missing isDeleted and deleteId types to AttachmentRow 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
bf15192b25 chore(ts): start port of widgets/buttons/attachment_actions 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
70756fe795 chore(ts): start port of type_widgets/attachment_detail 2025-02-23 12:52:36 +01:00
Panagiotis Papadopoulos
31170744d1 chore(ts): allow link.createLink notePath type to accept undefined
it can also accept undefined -> it is even handled in that first if block.
change required for upcoming port of attachment_*.js files
2025-02-23 12:52:36 +01:00
Adorian Doran
1dfa4a8bc2 client: note map: improve the appearance 2025-02-23 06:17:57 +02:00
renovate[bot]
e9f5272d98 chore(deps): update dependency prettier to v3.5.2 2025-02-23 02:09:16 +00:00
Romain DEP.
07443042a1 feat(view/calendar): let the user specify attributes to be promoted onto the calendar view, and render them inside the event title 2025-02-22 23:34:14 +01:00
Panagiotis Papadopoulos
4523307ead i18n(close_zen_button): add a translatable title to the button
previously it only displayed the keyboard shortcut, without any extra info
2025-02-22 16:12:12 +01:00
Panagiotis Papadopoulos
755b20bbab fix(global_menu): add missing <kbd> to zen mode 2025-02-22 16:01:49 +01:00
Panagiotis Papadopoulos
49b52d3124 chore: run npm audit fix
1 vuln fixed, 6 still open, but there is no fix for these yet
https://github.com/advisories/GHSA-67mh-4wv8-2f99
2025-02-22 15:47:30 +01:00
Panagiotis Papadopoulos
da69ee3285 chore(types): move types to devDependencies 2025-02-22 15:44:35 +01:00
Panagiotis Papadopoulos
9fb95585f5 chore(ts): port sync_status.ts 2025-02-22 14:21:56 +01:00
Elian Doran
2380d0af85 Merge pull request #1254 from TriliumNext/ci_remove-extra-arm64-handling
ci: remove unneeded extra arm64 handling
2025-02-22 14:58:50 +02:00
Elian Doran
f6224d9ec4 Merge pull request #1168 from TriliumNext/chore_bootstrap-ts-ignore
build: bundle bootstrap with webpack
2025-02-22 14:57:47 +02:00
Elian Doran
58a8821c22 Merge pull request #1234 from TriliumNext/feature/task_list
Task List
2025-02-22 14:37:44 +02:00
Elian Doran
fc27c4fc7b feat(db): create task database in schema 2025-02-22 14:36:15 +02:00
Elian Doran
0b11f4d9c7 chore(server): bump sync version 2025-02-22 14:34:44 +02:00
Elian Doran
50d491b432 build(release): update master branch automatically 2025-02-22 14:25:31 +02:00
Panagiotis Papadopoulos
2492bf60df chore(ci): add zip to description 2025-02-22 13:15:45 +01:00
Panagiotis Papadopoulos
49550e8e69 chore(ci): remove now unneeded arm64 workaround
the change is now part of electron-forge 7.7.0 which we depend on since
fa05f15753
2025-02-22 13:15:45 +01:00
Panagiotis Papadopoulos
a0442ded58 chore: get rid of bootstrap related ts-ignore 2025-02-22 13:09:28 +01:00
Panagiotis Papadopoulos
cdb988ff64 webpack: revert accidental changing of devtool 2025-02-22 13:02:40 +01:00
Elian Doran
899ad6450a build(release): use different commit message 2025-02-22 14:02:13 +02:00
Panagiotis Papadopoulos
e7d204dfd2 chore(copy-dist): remove now unneeded manual copying of bootstrap dir
webpack is taking care of that for us
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
1ded78975e deps: remove now unused style-loader 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
55bdd4fffc views: add TODO comment 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
0b4f5e998e webpack: add filename option to miniCssExtractPlugin
commented out for now, because it currently does not make sense yet.
This will be working, when I change webpack output to the "build" folder
instead of the current (messy) way, where it outputs into src/public/app-dist
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
dde24785b8 entrypoint: add missing login entry point and port to TS 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
f6d9b42911 entrypoint: add missing, currently required set_password entry point
TODO: I think this can actually be part of the setup entrypoint/view at some point
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
f78a6ed14b views: import webpack created entrypoint css
→ this is currently only consisting of bootstrap, but should in future be more useful
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
837697c503 bootstrap: import bootstrap css in entry points 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
1b309675c8 fix(webpackMiddleware): add (now) missing plugins declaration from productionConfig
required since we used `mini-css-extract-plugin` now
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
ac53079a39 webpack: replace style-loader with mini-css-extract-plugin
will allow to have css files instead of style blocks in the html file
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
19e19ca052 assets: remove bootstrap reference 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
5361161433 views: remove bootstrap references 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
762c7dab83 build: add bootstrap webpack related dependencies
https://getbootstrap.com/docs/5.3/getting-started/webpack/
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
ba3599911f chore(bootstrap): import Bootstrap modules 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
fc6b9e00bc webpack: add bootstrap webpack config
https://getbootstrap.com/docs/5.3/getting-started/webpack/
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
17860e6715 fix(note_type_choosers): fix glob.activeDialog assignment
the same thing is done in `confirm.ts` as well, where glob.activeDialog is set to `this.$widget`
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
ad8adeda0a fix(global_menu): fix non-existing option (according to TS) 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
bc28f323b8 chore(ts): get rid of bootstrap related ts-ignores 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
4f171fd966 chore(ts): get rid of bootstrap related ts-ignores 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
65ad4c3a2b chore(ts): get rid of bootstrap related ts-ignores 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
cc1a01955a chore(ts): get rid of bootstrap related ts-ignores 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
cf11be7f35 chore(ts): get rid of bootstrap related ts-ignores 2025-02-22 11:56:56 +01:00
Elian Doran
a3fbf15902 Merge remote-tracking branch 'origin/develop' into feature/task_list 2025-02-22 11:03:18 +02:00
Elian Doran
0e5b8af3a4 Merge remote-tracking branch 'origin/develop' into feature/task_list 2025-02-21 08:53:51 +02:00
Elian Doran
ef487f46d1 Merge branch 'develop' into feature/task_list 2025-02-20 17:34:36 +02:00
Elian Doran
a433c9c189 feat(tasks): add SQL migration 2025-02-20 12:07:10 +02:00
Elian Doran
62c96fc95e feat(tasks): implement basic refresh support 2025-02-19 22:34:52 +02:00
Elian Doran
c0d3e8d834 feat(tasks): filter by parent note 2025-02-19 22:13:13 +02:00
Elian Doran
bb822126cd feat(tasks): store parent note ID 2025-02-19 21:52:33 +02:00
Elian Doran
034b93c99c feat(tasks): support entities reloaded properly 2025-02-19 21:30:53 +02:00
Elian Doran
f743f634b4 feat(tasks): hide completed tasks for now 2025-02-19 20:33:20 +02:00
Elian Doran
9ed075b675 fix(tasks): task list not clearing properly 2025-02-19 20:02:43 +02:00
Elian Doran
7f0df441b5 fix(tasks): initial state for checkbox 2025-02-19 19:45:23 +02:00
Elian Doran
2de46eb5d2 fix(build): task row should be optional 2025-02-19 19:37:07 +02:00
Elian Doran
2a3546edd5 feat(client/tasks): display completed tasks 2025-02-19 19:27:04 +02:00
Elian Doran
7c0b43db85 feat(tasks): mark tasks as completed 2025-02-19 19:22:38 +02:00
Elian Doran
d4ef15212f style(tasks): improve individual items design 2025-02-19 18:40:26 +02:00
Elian Doran
ad492619f5 style(tasks): floating header 2025-02-19 18:30:39 +02:00
Elian Doran
35af12b6e7 fix(vscode): F5 to start server 2025-02-19 18:18:28 +02:00
Elian Doran
0baa804544 fix(server/tasks): becca not updating on task creation 2025-02-19 18:18:20 +02:00
Elian Doran
575ef5e10e fix(build): missing note type in help button 2025-02-19 18:14:49 +02:00
Elian Doran
0b8e3b976f fix(client/tasks): error due to froca update 2025-02-18 21:16:32 +02:00
Elian Doran
373e0b45f2 fix(server/tasks): missing utcDateModified causing errors on create 2025-02-18 21:07:06 +02:00
Elian Doran
c00505cd7b feat(client/tasks): create flow for creating a task 2025-02-18 21:06:51 +02:00
Elian Doran
fc1ee7c6f0 feat(client/tasks): add a text box for adding a new task 2025-02-18 20:01:04 +02:00
Elian Doran
7cba5a7c7d feat(client/tasks): display tasks 2025-02-18 19:58:00 +02:00
Elian Doran
1024733252 feat(client/tasks): create task list note type 2025-02-18 19:42:27 +02:00
Elian Doran
17f9fa7e89 feat(tasks): add POST API 2025-02-18 19:30:02 +02:00
Elian Doran
98dff61305 feat(tasks): add GET API 2025-02-18 19:06:02 +02:00
Elian Doran
c0e42e23a6 feat(tasks): create backend model for task 2025-02-18 18:42:26 +02:00
Elian Doran
565989dd4c feat(client/ts): port tree (WIP) 2025-01-30 10:14:10 +02:00
328 changed files with 8654 additions and 3550 deletions

View File

@@ -1,3 +1,6 @@
name: "Build Electron App"
description: "Builds and packages the Electron app for different platforms"
inputs:
os:
description: "One of the supported platforms: macos, linux, windows"
@@ -6,15 +9,47 @@ inputs:
description: "The architecture to build for: x64, arm64"
required: true
extension:
description: "Platform specific extensions to copy in the output: dmg, deb, rpm, exe"
description: "Platform specific extensions to copy in the output: dmg, deb, rpm, exe, zip"
required: true
runs:
using: composite
steps:
- name: Set up Python for appdmg to be installed
# Certificate setup
- name: Import Apple certificates
if: inputs.os == 'macos'
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ env.APPLE_APP_CERTIFICATE_BASE64 }}
p12-password: ${{ env.APPLE_APP_CERTIFICATE_PASSWORD }}
keychain: build
keychain-password: ${{ github.run_id }}
- name: Install Installer certificate
if: inputs.os == 'macos'
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ env.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
p12-password: ${{ env.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
keychain: build
keychain-password: ${{ github.run_id }}
# We don't need to create a keychain here because we're using the build keychain that was created in the previous step
create-keychain: false
- name: Verify certificates
if: inputs.os == 'macos'
shell: bash
run: |
echo "Available signing identities:"
security find-identity -v -p codesigning build.keychain
- name: Set up Python and other macOS dependencies
if: ${{ inputs.os == 'macos' }}
shell: bash
run: brew install python-setuptools
run: |
brew install python-setuptools
brew install create-dmg
- name: Install dependencies for RPM and Flatpak package building
if: ${{ inputs.os == 'linux' }}
shell: bash
@@ -24,25 +59,155 @@ runs:
FLATPAK_ARCH=$(if [[ ${{ inputs.arch }} = 'arm64' ]]; then echo 'aarch64'; else echo 'x86_64'; fi)
FLATPAK_VERSION='24.08'
flatpak install --user --no-deps --arch $FLATPAK_ARCH --assumeyes runtime/org.freedesktop.Platform/$FLATPAK_ARCH/$FLATPAK_VERSION runtime/org.freedesktop.Sdk/$FLATPAK_ARCH/$FLATPAK_VERSION org.electronjs.Electron2.BaseApp/$FLATPAK_ARCH/$FLATPAK_VERSION
# Build setup
- name: Install dependencies
shell: bash
run: npm ci
- name: Temporary Flatpak arm64 workaround till https://github.com/electron/forge/pull/3839 is merged
if: ${{ inputs.os == 'linux' && inputs.arch == 'arm64' }}
shell: bash
run: sed -e "s/case 'armv7l'/case 'arm64'/g" -e "s/return 'arm'/return 'aarch64'/g" -i node_modules/@electron-forge/maker-flatpak/dist/MakerFlatpak.js
- name: Update build info
shell: bash
run: npm run chore:update-build-info
- name: Run electron-forge
# Critical debugging configuration
- name: Run electron-forge build with enhanced logging
shell: bash
run: npm run electron-forge:make -- --arch=${{ inputs.arch }}
env:
# Pass through required environment variables for signing and notarization
APPLE_TEAM_ID: ${{ env.APPLE_TEAM_ID }}
APPLE_ID: ${{ env.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
run: |
# Map OS names to Electron Forge platform names
if [ "${{ inputs.os }}" = "macos" ]; then
PLATFORM="darwin"
elif [ "${{ inputs.os }}" = "windows" ]; then
PLATFORM="win32"
else
PLATFORM="${{ inputs.os }}"
fi
npm run electron-forge:make -- \
--arch=${{ inputs.arch }} \
--platform=$PLATFORM
# Add DMG signing step
- name: Sign DMG
if: inputs.os == 'macos'
shell: bash
run: |
echo "Signing DMG file..."
dmg_file=$(find out -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file"
# Get the first valid signing identity from the keychain
SIGNING_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application" | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
if [ -z "$SIGNING_IDENTITY" ]; then
echo "Error: No valid Developer ID Application certificate found in keychain"
exit 1
fi
echo "Using signing identity: $SIGNING_IDENTITY"
# Sign the DMG
codesign --force --sign "$SIGNING_IDENTITY" --options runtime --timestamp "$dmg_file"
# Notarize the DMG
xcrun notarytool submit "$dmg_file" --apple-id "$APPLE_ID" --password "$APPLE_ID_PASSWORD" --team-id "$APPLE_TEAM_ID" --wait
# Staple the notarization ticket
xcrun stapler staple "$dmg_file"
else
echo "No DMG found to sign"
fi
- name: Verify code signing
if: inputs.os == 'macos'
shell: bash
run: |
echo "Verifying code signing for all artifacts..."
# First check the .app bundle
echo "Looking for .app bundle..."
app_bundle=$(find out -name "*.app" -print -quit)
if [ -n "$app_bundle" ]; then
echo "Found app bundle: $app_bundle"
echo "Verifying app bundle signing..."
codesign --verify --deep --strict --verbose=2 "$app_bundle"
echo "Displaying app bundle signing info..."
codesign --display --verbose=2 "$app_bundle"
echo "Checking entitlements..."
codesign --display --entitlements :- "$app_bundle"
echo "Checking notarization status..."
xcrun stapler validate "$app_bundle" || echo "Warning: App bundle not notarized yet"
else
echo "No .app bundle found to verify"
fi
# Then check DMG if it exists
echo "Looking for DMG..."
dmg_file=$(find out -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file"
echo "Verifying DMG signing..."
codesign --verify --deep --strict --verbose=2 "$dmg_file"
echo "Displaying DMG signing info..."
codesign --display --verbose=2 "$dmg_file"
echo "Checking DMG notarization..."
xcrun stapler validate "$dmg_file" || echo "Warning: DMG not notarized yet"
else
echo "No DMG found to verify"
fi
# Finally check ZIP if it exists
echo "Looking for ZIP..."
zip_file=$(find out -name "*.zip" -print -quit)
if [ -n "$zip_file" ]; then
echo "Found ZIP: $zip_file"
echo "Note: ZIP files are not code signed, but their contents should be"
fi
- name: Prepare artifacts
shell: bash
run: |
mkdir -p upload;
for ext in ${{ inputs.extension }};
do
file=$(find out/make -name "*.$ext" -print -quit);
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.$ext";
mkdir -p upload
if [ "${{ inputs.os }}" = "macos" ]; then
# For macOS, we need to look in specific directories based on the maker
echo "Collecting macOS artifacts..."
# Look for DMG files recursively
echo "Looking for DMG files..."
dmg_file=$(find out -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file"
cp "$dmg_file" "upload/TriliumNextNotes-${{ github.ref_name }}-macos-${{ inputs.arch }}.dmg"
else
echo "Warning: No DMG file found"
fi
# Look for ZIP files recursively
echo "Looking for ZIP files..."
zip_file=$(find out -name "*.zip" -print -quit)
if [ -n "$zip_file" ]; then
echo "Found ZIP: $zip_file"
cp "$zip_file" "upload/TriliumNextNotes-${{ github.ref_name }}-macos-${{ inputs.arch }}.zip"
else
echo "Warning: No ZIP file found"
fi
else
# For other platforms, use the existing logic but with better error handling
echo "Collecting artifacts for ${{ inputs.os }}..."
for ext in ${{ inputs.extension }}; do
echo "Looking for .$ext files..."
file=$(find out -name "*.$ext" -print -quit)
if [ -n "$file" ]; then
echo "Found $file for extension $ext"
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.$ext"
else
echo "Warning: No file found with extension .$ext"
fi
done
fi
echo "Final contents of upload directory:"
ls -la upload/

View File

@@ -33,6 +33,10 @@ jobs:
- name: Run the TypeScript build
run: npx tsc
- name: Run the unit tests
run: npm run test
build_docker:
name: Build Docker image
runs-on: ubuntu-latest

View File

@@ -43,6 +43,21 @@ jobs:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
extension: ${{ matrix.os.extension }}
env:
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
APPLE_INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
APPLE_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
# Clean up keychain after build
- name: Clean up keychain
if: matrix.os.name == 'macos' && always()
run: |
security delete-keychain build.keychain
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:

View File

@@ -2,7 +2,7 @@ name: Nightly Release
on:
# This can be used to automatically publish nightlies at UTC nighttime
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
- cron: "0 2 * * *" # run at 2 AM UTC
# This can be used to allow manually triggering nightlies from the web interface
workflow_dispatch:
env:
@@ -45,6 +45,14 @@ jobs:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
extension: ${{ join(matrix.os.extension, ' ') }}
env:
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
APPLE_INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
APPLE_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
- name: Publish release
uses: softprops/action-gh-release@v2

View File

@@ -40,6 +40,15 @@ jobs:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
extension: ${{ join(matrix.os.extension, ' ') }}
env:
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
APPLE_INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
APPLE_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
- name: Publish release
uses: softprops/action-gh-release@v2
with:

1
.gitignore vendored
View File

@@ -11,6 +11,7 @@ po-*/
.flatpak-builder/
*.db
!test/**/*.db
!integration-tests/db/document.db
!integration-tests/db/config.ini
integration-tests/db/log

View File

@@ -3,3 +3,4 @@
*.yml
libraries/*
docs/*
src/public/app/doc_notes/**/*

View File

@@ -1,3 +1,7 @@
{
"recommendations": ["lokalise.i18n-ally", "editorconfig.editorconfig"]
"recommendations": [
"lokalise.i18n-ally",
"editorconfig.editorconfig",
"vitest.explorer"
]
}

View File

@@ -19,5 +19,12 @@
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"npm.exclude": ["**/build", "**/dist", "**/out/**"]
"npm.exclude": [
"**/build",
"**/dist",
"**/out/**"
],
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
}
}

View File

@@ -66,8 +66,6 @@ chmod 755 $PKG_DIR/trilium.sh
cp bin/tpl/anonymize-database.sql $PKG_DIR/
cp -r translations $PKG_DIR/
cp -r dump-db $PKG_DIR/
rm -rf $PKG_DIR/dump-db/node_modules
VERSION=`jq -r ".version" package.json`

View File

@@ -95,7 +95,6 @@ const copy = async () => {
"node_modules/mark.js/dist/",
"node_modules/normalize.css/",
"node_modules/jquery.fancytree/dist/",
"node_modules/bootstrap/dist/",
"node_modules/autocomplete.js/dist/",
"node_modules/codemirror/lib/",
"node_modules/codemirror/addon/",

View File

@@ -1,6 +1,6 @@
import { fileURLToPath } from "url";
import { dirname, join } from "path";
import swaggerJsdoc from 'swagger-jsdoc';
import swaggerJsdoc from "swagger-jsdoc";
import fs from "fs";
/*
@@ -12,27 +12,29 @@ import fs from "fs";
const options = {
definition: {
openapi: '3.1.1',
openapi: "3.1.1",
info: {
title: 'Trilium Notes - Sync server API',
version: '0.96.6',
description: "This is the internal sync server API used by Trilium Notes / TriliumNext Notes.\n\n_If you're looking for the officially supported External Trilium API, see [here](https://triliumnext.github.io/Docs/Wiki/etapi.html)._\n\nThis page does not yet list all routes. For a full list, see the [route controller](https://github.com/TriliumNext/Notes/blob/v0.91.6/src/routes/routes.ts).",
title: "Trilium Notes - Sync server API",
version: "0.96.6",
description:
"This is the internal sync server API used by Trilium Notes / TriliumNext Notes.\n\n_If you're looking for the officially supported External Trilium API, see [here](https://triliumnext.github.io/Docs/Wiki/etapi.html)._\n\nThis page does not yet list all routes. For a full list, see the [route controller](https://github.com/TriliumNext/Notes/blob/v0.91.6/src/routes/routes.ts).",
contact: {
name: "TriliumNext issue tracker",
url: "https://github.com/TriliumNext/Notes/issues",
url: "https://github.com/TriliumNext/Notes/issues"
},
license: {
name: "GNU Free Documentation License 1.3 (or later)",
url: "https://www.gnu.org/licenses/fdl-1.3",
},
},
url: "https://www.gnu.org/licenses/fdl-1.3"
}
}
},
apis: [
// Put individual files here to have them ordered first.
'./src/routes/api/setup.ts',
"./src/routes/api/setup.ts",
// all other files
'./src/routes/api/*.ts', './bin/generate-openapi.js'
],
"./src/routes/api/*.ts",
"./bin/generate-openapi.js"
]
};
const openapiSpecification = swaggerJsdoc(options);

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export GITHUB_REPO=trilium
set -e
if [[ $# -eq 0 ]] ; then
echo "Missing argument of new version"
@@ -40,10 +40,18 @@ TAG=v$VERSION
echo "Committing package.json version change"
git commit -m "release $VERSION"
git commit -m "chore(release): $VERSION"
git push
echo "Tagging commit with $TAG"
git tag $TAG
git push origin $TAG
echo "Updating master"
git fetch
git checkout master
git reset --hard origin/master
git merge origin/develop
git push

View File

@@ -1,11 +1,24 @@
module.exports = () => {
const sql = require("../../src/services/sql");
const utils = require("../../src/services/utils");
import sql from "../../src/services/sql";
import utils from "../../src/services/utils";
interface NoteContentsRow {
noteId: string;
content: string | Buffer;
dateModified: string;
utcDateModified: string;
}
interface NoteRevisionContents {
noteRevisionId: string;
content: string | Buffer;
utcDateModified: string;
}
export default () => {
const existingBlobIds = new Set();
for (const noteId of sql.getColumn(`SELECT noteId FROM note_contents`)) {
const row = sql.getRow(`SELECT noteId, content, dateModified, utcDateModified FROM note_contents WHERE noteId = ?`, [noteId]);
for (const noteId of sql.getColumn<string>(`SELECT noteId FROM note_contents`)) {
const row = sql.getRow<NoteContentsRow>(`SELECT noteId, content, dateModified, utcDateModified FROM note_contents WHERE noteId = ?`, [noteId]);
const blobId = utils.hashedBlobId(row.content);
if (!existingBlobIds.has(blobId)) {
@@ -28,7 +41,7 @@ module.exports = () => {
}
for (const noteRevisionId of sql.getColumn(`SELECT noteRevisionId FROM note_revision_contents`)) {
const row = sql.getRow(`SELECT noteRevisionId, content, utcDateModified FROM note_revision_contents WHERE noteRevisionId = ?`, [noteRevisionId]);
const row = sql.getRow<NoteRevisionContents>(`SELECT noteRevisionId, content, utcDateModified FROM note_revision_contents WHERE noteRevisionId = ?`, [noteRevisionId]);
const blobId = utils.hashedBlobId(row.content);
if (!existingBlobIds.has(blobId)) {
@@ -44,7 +57,7 @@ module.exports = () => {
sql.execute("UPDATE entity_changes SET entityName = 'blobs', entityId = ? WHERE entityName = 'note_revision_contents' AND entityId = ?", [blobId, row.noteRevisionId]);
} else {
// duplicates
sql.execute("DELETE FROM entity_changes WHERE entityName = 'note_revision_contents' AND entityId = ?", [row.noteId]);
sql.execute("DELETE FROM entity_changes WHERE entityName = 'note_revision_contents' AND entityId = ?", [row.noteRevisionId]);
}
sql.execute("UPDATE note_revisions SET blobId = ? WHERE noteRevisionId = ?", [blobId, row.noteRevisionId]);

View File

@@ -1,15 +1,15 @@
module.exports = () => {
const beccaLoader = require("../../src/becca/becca_loader");
const becca = require("../../src/becca/becca");
const cls = require("../../src/services/cls");
const log = require("../../src/services/log");
const sql = require("../../src/services/sql");
import becca from "../../src/becca/becca";
import becca_loader from "../../src/becca/becca_loader";
import cls from "../../src/services/cls";
import log from "../../src/services/log";
import sql from "../../src/services/sql";
export default () => {
cls.init(() => {
// emergency disabling of image compression since it appears to make problems in migration to 0.61
sql.execute(`UPDATE options SET value = 'false' WHERE name = 'compressImages'`);
beccaLoader.load();
becca_loader.load();
for (const note of Object.values(becca.notes)) {
try {

View File

@@ -11,16 +11,14 @@ test("Displays translation on desktop", async ({ page, context }) => {
const app = new App(page, context);
await app.goto();
await expect(page.locator("#left-pane .quick-search input"))
.toHaveAttribute("placeholder", "Quick search");
await expect(page.locator("#left-pane .quick-search input")).toHaveAttribute("placeholder", "Quick search");
});
test("Displays translation on mobile", async ({ page, context }) => {
const app = new App(page, context);
await app.goto({ isMobile: true });
await expect(page.locator("#mobile-sidebar-wrapper .quick-search input"))
.toHaveAttribute("placeholder", "Quick search");
await expect(page.locator("#mobile-sidebar-wrapper .quick-search input")).toHaveAttribute("placeholder", "Quick search");
});
test("Displays translations in Settings", async ({ page, context }) => {
@@ -44,14 +42,16 @@ test("User can change language from settings", async ({ page, context }) => {
// Check that the default value (English) is set.
await expect(app.currentNoteSplit).toContainText("Theme");
const languageCombobox = await app.currentNoteSplit.getByRole("combobox").first();
const languageCombobox = app.currentNoteSplit.getByRole("combobox").first();
await expect(languageCombobox).toHaveValue("en");
// Select Chinese and ensure the translation is set.
await languageCombobox.selectOption("cn");
await expect(app.currentNoteSplit).toContainText("主题", { timeout: 15000 });
await expect(languageCombobox).toHaveValue("cn");
// Select English again.
await languageCombobox.selectOption("en");
await expect(app.currentNoteSplit).toContainText("Language", { timeout: 15000 });
await expect(languageCombobox).toHaveValue("en");
});

View File

@@ -19,13 +19,13 @@ test("Can drag tabs around", async ({ page, context }) => {
let tab = app.getTab(0);
// Drag the first tab at the end
await tab.dragTo(app.getTab(2), { targetPosition: { x: 50, y: 0 }});
await tab.dragTo(app.getTab(2), { targetPosition: { x: 50, y: 0 } });
tab = app.getTab(2);
await expect(tab).toContainText(NOTE_TITLE);
// Drag the tab to the left
await tab.dragTo(app.getTab(0), { targetPosition: { x: 50, y: 0 }});
await tab.dragTo(app.getTab(0), { targetPosition: { x: 50, y: 0 } });
await expect(app.getTab(0)).toContainText(NOTE_TITLE);
});

View File

@@ -39,7 +39,9 @@ test("Displays lint errors for backend script", async ({ page, context }) => {
});
async function expectTooltip(page: Page, tooltip: string) {
await expect(page.locator(".CodeMirror-lint-tooltip:visible", {
"hasText": tooltip
})).toBeVisible();
await expect(
page.locator(".CodeMirror-lint-tooltip:visible", {
hasText: tooltip
})
).toBeVisible();
}

View File

@@ -3,7 +3,8 @@ import App from "../support/app";
test("renders ELK flowchart", async ({ page, context }) => {
await testAriaSnapshot({
page, context,
page,
context,
noteTitle: "Flowchart ELK on",
snapshot: `
- document:
@@ -22,12 +23,13 @@ test("renders ELK flowchart", async ({ page, context }) => {
- paragraph: Guarantee
- text: Interfaces for B
`
})
});
});
test("renders standard flowchart", async ({ page, context }) => {
await testAriaSnapshot({
page, context,
page,
context,
noteTitle: "Flowchart ELK off",
snapshot: `
- document:
@@ -46,7 +48,7 @@ test("renders standard flowchart", async ({ page, context }) => {
- paragraph: C
- text: Interfaces for B
`
})
});
});
interface AriaTestOpts {

View File

@@ -44,8 +44,8 @@ test("Highlights list is displayed", async ({ page, context }) => {
await expect(app.sidebar).toContainText("Highlights List");
const rootList = app.sidebar.locator(".highlights-list ol");
let index=0;
for (const highlightedEl of [ "Bold 1", "Italic 1", "Underline 1", "Colored text 1", "Background text 1", "Bold 2", "Italic 2", "Underline 2", "Colored text 2", "Background text 2" ]) {
let index = 0;
for (const highlightedEl of ["Bold 1", "Italic 1", "Underline 1", "Colored text 1", "Background text 1", "Bold 2", "Italic 2", "Underline 2", "Colored text 2", "Background text 2"]) {
await expect(rootList.locator("li").nth(index++)).toContainText(highlightedEl);
}
});
@@ -54,7 +54,7 @@ test("Displays math popup", async ({ page, context }) => {
const app = new App(page, context);
await app.goto();
await app.goToNoteInNewTab("Empty text");
const noteContent = app.currentNoteSplit.locator(".note-detail-editable-text-editor")
const noteContent = app.currentNoteSplit.locator(".note-detail-editable-text-editor");
await noteContent.fill("Hello world");
await noteContent.press("ControlOrMeta+M");

View File

@@ -25,7 +25,7 @@ export default class App {
this.tabBar = page.locator(".tab-row-widget-container");
this.noteTree = page.locator(".tree-wrapper");
this.launcherBar = page.locator("#launcher-container");
this.currentNoteSplit = page.locator(".note-split:not(.hidden-ext)")
this.currentNoteSplit = page.locator(".note-split:not(.hidden-ext)");
this.sidebar = page.locator("#right-pane");
}
@@ -42,12 +42,11 @@ export default class App {
url = "/";
}
await this.page.goto(url, { waitUntil: "networkidle" });
await this.page.goto(url, { waitUntil: "networkidle", timeout: 30_000 });
// Wait for the page to load.
if (url === "/") {
await expect(this.page.locator(".tree"))
.toContainText("Trilium Integration Test");
await expect(this.page.locator(".tree")).toContainText("Trilium Integration Test");
await this.closeAllTabs();
}
}
@@ -109,11 +108,12 @@ export default class App {
});
expect(csrfToken).toBeTruthy();
await expect(await this.page.request.put(`${BASE_URL}/api/options/${key}/${value}`, {
await expect(
await this.page.request.put(`${BASE_URL}/api/options/${key}/${value}`, {
headers: {
"x-csrf-token": csrfToken
}
})).toBeOK();
})
).toBeOK();
}
}

26
electron-docs-main.ts Normal file
View File

@@ -0,0 +1,26 @@
import cls from "./src/services/cls.js";
import sql_init from "./src/services/sql_init.js";
async function startElectron() {
await import("./electron-main.js");
}
async function initializeDb() {
return new Promise<void>((resolve) => {
cls.init(async () => {
await sql_init.createInitialDatabase();
sql_init.setDbAsInitialized();
resolve();
});
})
}
async function main() {
if (!sql_init.isDbInitialized()) {
initializeDb();
}
await startElectron();
}
await main();

10
entitlements.plist Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>

43
eslint.config.js Normal file
View File

@@ -0,0 +1,43 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommended,
// consider using rules below, once we have a full TS codebase and can be more strict
// tseslint.configs.strictTypeChecked,
// tseslint.configs.stylisticTypeChecked,
// tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname
}
}
},
{
rules: {
// add rule overrides here
"no-undef": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
}
]
}
},
{
ignores: [
"build/*",
"dist/*",
"docs/*",
"libraries/*",
"src/public/app-dist/*",
"src/public/app/doc_notes/*"
]
}
);

View File

@@ -17,34 +17,40 @@ module.exports = {
overwrite: true,
asar: true,
icon: "./images/app-icons/icon",
osxSign: {},
osxNotarize: {
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASSWORD,
teamId: process.env.APPLE_TEAM_ID
},
extraResource: [
// Moved to root
...extraResourcesForPlatform,
// All resources should stay in Resources directory for macOS
...(process.platform === "darwin" ? [] : extraResourcesForPlatform),
// Moved to resources (TriliumNext Notes.app/Contents/Resources on macOS)
// These always go in Resources
"translations/",
"node_modules/@highlightjs/cdn-assets/styles"
],
afterComplete: [
(buildPath, _electronVersion, platform, _arch, callback) => {
// Only move resources on non-macOS platforms
if (platform !== "darwin") {
for (const resource of extraResourcesForPlatform) {
const baseName = path.basename(resource);
// prettier-ignore
const sourcePath = (platform === "darwin")
? path.join(buildPath, `${APP_NAME}.app`, "Contents", "Resources", baseName)
: path.join(buildPath, "resources", baseName);
const sourcePath = path.join(buildPath, "resources", baseName);
// prettier-ignore
const destPath = (baseName !== "256x256.png")
? path.join(buildPath, baseName)
: path.join(buildPath, "icon.png");
// Copy files from resources folder to root
fs.move(sourcePath, destPath)
.then(() => callback())
.catch((err) => callback(err));
}
} else {
callback();
}
}
]
},

View File

@@ -6,7 +6,7 @@ instanceName=
noAuthentication=true
# set to true to disable backups (e.g. because of limited space on server)
noBackup=false
noBackup=true
# Disable automatically generating desktop icon
# noDesktopIcon=true

Binary file not shown.

2613
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
"name": "trilium",
"productName": "TriliumNext Notes",
"description": "Build your personal knowledge base with TriliumNext Notes",
"version": "0.92.2-beta",
"version": "0.92.3-beta",
"license": "AGPL-3.0-only",
"main": "./dist/electron-main.js",
"author": {
@@ -28,14 +28,15 @@
"server:switch": "rimraf ./node_modules/better-sqlite3 && npm install",
"electron:start": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./electron-main.ts --inspect=5858 .",
"electron:start-no-dir": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_ENV=dev electron --inspect=5858 .",
"electron:start-nix": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./electron-main.ts --inspect=5858 .\"",
"electron:start-nix": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_34 --run \"electron ./electron-main.ts --inspect=5858 .\"",
"electron:start-nix-no-dir": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./electron-main.ts --inspect=5858 .\"",
"electron:start-prod": "npm run build:prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .",
"electron:start-prod-no-dir": "npm run build:prepare-dist && cross-env TRILIUM_ENV=dev electron --inspect=5858 .",
"electron:start-prod": "npm run build:prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=prod electron ./dist/electron-main.js --inspect=5858 .",
"electron:start-prod-no-dir": "npm run build:prepare-dist && cross-env TRILIUM_ENV=prod electron --inspect=5858 .",
"electron:start-prod-nix": "electron-rebuild --version 33.3.1 && npm run build:prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"",
"electron:start-prod-nix-no-dir": "electron-rebuild --version 33.3.1 && npm run build:prepare-dist && cross-env TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"",
"electron:qstart": "npm run electron:switch && npm run electron:start",
"electron:switch": "electron-rebuild",
"docs:edit": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data-docs TRILIUM_ENV=dev electron ./electron-docs-main.ts .",
"electron-forge:start": "npm run build:prepare-dist && electron-forge start",
"electron-forge:make": "npm run build:prepare-dist && electron-forge make",
"electron-forge:package": "npm run build:prepare-dist && electron-forge package",
@@ -44,15 +45,20 @@
"docs:build": "npm run docs:build-backend && npm run docs:build-frontend",
"build:webpack": "tsx node_modules/webpack/bin/webpack.js -c webpack.config.ts",
"build:prepare-dist": "npm run build:webpack && rimraf ./dist && tsc && tsx ./bin/copy-dist.ts",
"test": "cross-env TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest",
"test:coverage": "cross-env TRILIUM_DATA_DIR=./integration-tests/db vitest --coverage",
"test:playwright": "playwright test",
"test": "npm run client:test && npm run server:test",
"server:test": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest",
"server:coverage": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest --coverage",
"client:test": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest --root src/public/app",
"client:coverage": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest --root src/public/app --coverage",
"test:playwright": "playwright test --workers 1",
"test:integration-edit-db": "cross-env TRILIUM_INTEGRATION_TEST=edit TRILIUM_PORT=8081 TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
"test:integration-mem-db": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
"test:integration-mem-db-dev": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
"dev:watch-dist": "tsx ./bin/watch-dist.ts",
"dev:prettier-check": "prettier . --check",
"dev:prettier-fix": "prettier . --write",
"dev:linter-check": "eslint .",
"dev:linter-fix": "eslint . --fix",
"chore:update-build-info": "tsx bin/update-build-info.ts",
"chore:ci-update-nightly-version": "tsx ./bin/update-nightly-version.ts",
"chore:generate-document": "cross-env nodemon ./bin/generate_document.ts 1000",
@@ -70,18 +76,13 @@
"@mermaid-js/layout-elk": "0.1.7",
"@mind-elixir/node-menu": "1.0.4",
"@triliumnext/express-partial-content": "1.0.1",
"@types/js-yaml": "4.0.9",
"@types/leaflet": "1.9.16",
"@types/react-dom": "18.3.5",
"@types/swagger-ui-express": "4.1.8",
"archiver": "7.0.1",
"async-mutex": "0.5.0",
"autocomplete.js": "0.38.1",
"axios": "1.7.9",
"axios": "1.8.2",
"better-sqlite3": "11.8.1",
"bootstrap": "5.3.3",
"boxicons": "2.1.4",
"chardet": "2.0.0",
"chardet": "2.1.0",
"cheerio": "1.0.0",
"chokidar": "4.0.3",
"cls-hooked": "4.2.2",
@@ -102,7 +103,7 @@
"express": "4.21.2",
"express-rate-limit": "7.5.0",
"express-session": "1.18.1",
"force-graph": "1.49.0",
"force-graph": "1.49.3",
"fs-extra": "11.3.0",
"helmet": "8.0.0",
"html": "1.0.0",
@@ -111,7 +112,6 @@
"https-proxy-agent": "7.0.6",
"i18next": "24.2.2",
"i18next-fs-backend": "2.6.0",
"i18next-http-backend": "3.0.2",
"image-type": "5.2.0",
"ini": "5.0.0",
"is-animated": "2.0.2",
@@ -124,14 +124,13 @@
"jsdom": "26.0.0",
"jsplumb": "2.15.6",
"katex": "0.16.21",
"knockout": "3.5.1",
"leaflet": "1.9.4",
"leaflet-gpx": "2.1.2",
"mark.js": "8.11.1",
"marked": "15.0.7",
"mermaid": "11.4.1",
"mime-types": "2.1.35",
"mind-elixir": "4.3.7",
"mind-elixir": "4.4.1",
"multer": "1.4.5-lts.1",
"normalize-strings": "1.1.1",
"normalize.css": "8.0.1",
@@ -146,13 +145,11 @@
"serve-favicon": "2.5.0",
"session-file-store": "1.5.0",
"source-map-support": "0.5.21",
"split.js": "1.6.5",
"stream-throttle": "0.1.3",
"strip-bom": "5.0.0",
"striptags": "3.2.0",
"swagger-ui-express": "5.0.1",
"tmp": "0.2.3",
"ts-loader": "9.5.2",
"turndown": "7.2.0",
"unescape": "1.0.1",
"vanilla-js-wheel-zoom": "9.0.4",
@@ -170,7 +167,9 @@
"@electron-forge/maker-zip": "7.7.0",
"@electron-forge/plugin-auto-unpack-natives": "7.7.0",
"@electron/rebuild": "3.7.1",
"@playwright/test": "1.50.1",
"@eslint/js": "9.21.0",
"@playwright/test": "1.51.0",
"@popperjs/core": "2.11.8",
"@types/archiver": "6.0.3",
"@types/better-sqlite3": "7.6.12",
"@types/bootstrap": "5.2.10",
@@ -188,12 +187,15 @@
"@types/html": "1.0.4",
"@types/ini": "4.1.1",
"@types/jquery": "3.5.32",
"@types/js-yaml": "4.0.9",
"@types/jsdom": "21.1.7",
"@types/leaflet": "1.9.16",
"@types/leaflet-gpx": "1.3.7",
"@types/mime-types": "2.1.4",
"@types/multer": "1.4.12",
"@types/node": "22.13.5",
"@types/node": "22.13.9",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@types/safe-compare": "1.1.2",
"@types/sanitize-html": "2.13.0",
"@types/sax": "1.2.7",
@@ -201,27 +203,44 @@
"@types/session-file-store": "1.2.5",
"@types/source-map-support": "0.5.10",
"@types/stream-throttle": "0.1.4",
"@types/supertest": "6.0.2",
"@types/swagger-ui-express": "4.1.8",
"@types/tmp": "0.2.6",
"@types/turndown": "5.0.5",
"@types/ws": "8.5.14",
"@types/ws": "8.18.0",
"@types/xml2js": "0.4.14",
"@types/yargs": "17.0.33",
"@vitest/coverage-v8": "3.0.6",
"@vitest/coverage-v8": "3.0.8",
"autoprefixer": "10.4.20",
"bootstrap": "5.3.3",
"cross-env": "7.0.3",
"electron": "34.2.0",
"css-loader": "7.1.2",
"electron": "34.3.1",
"eslint": "9.21.0",
"esm": "3.2.25",
"happy-dom": "17.3.0",
"i18next-http-backend": "3.0.2",
"jsdoc": "4.0.4",
"knockout": "3.5.1",
"lorem-ipsum": "2.0.8",
"mini-css-extract-plugin": "2.9.2",
"nodemon": "3.1.9",
"prettier": "3.5.1",
"postcss-loader": "8.1.1",
"prettier": "3.5.3",
"rcedit": "4.0.1",
"rimraf": "6.0.1",
"sass": "1.85.1",
"sass-loader": "16.0.5",
"split.js": "1.6.5",
"supertest": "7.0.0",
"swagger-jsdoc": "6.2.8",
"ts-loader": "9.5.2",
"tslib": "2.8.1",
"tsx": "4.19.3",
"typedoc": "0.27.8",
"typescript": "5.7.3",
"vitest": "3.0.6",
"typedoc": "0.27.9",
"typescript": "5.8.2",
"typescript-eslint": "8.26.0",
"vitest": "3.0.8",
"webpack": "5.98.0",
"webpack-cli": "6.0.1",
"webpack-dev-middleware": "7.4.2"

View File

@@ -1,6 +1,6 @@
import { defineConfig, devices } from '@playwright/test';
import { defineConfig, devices } from "@playwright/test";
const SERVER_URL = 'http://127.0.0.1:8082';
const SERVER_URL = "http://127.0.0.1:8082";
/**
* Read environment variables from file.
@@ -14,7 +14,7 @@ const SERVER_URL = 'http://127.0.0.1:8082';
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './e2e',
testDir: "./e2e",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
@@ -24,22 +24,22 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
reporter: "html",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: SERVER_URL,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
trace: "on-first-retry"
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
name: "chromium",
use: { ...devices["Desktop Chrome"] }
}
// {
// name: 'firefox',
@@ -73,9 +73,11 @@ export default defineConfig({
],
/* Run your local dev server before starting the tests */
webServer: !process.env.TRILIUM_DOCKER ? {
command: 'npm run test:integration-mem-db-dev',
webServer: !process.env.TRILIUM_DOCKER
? {
command: "npm run test:integration-mem-db-dev",
url: SERVER_URL,
reuseExistingServer: !process.env.CI,
} : undefined,
reuseExistingServer: !process.env.CI
}
: undefined
});

View File

@@ -1,4 +1,5 @@
// TODO: Booleans should probably be numbers instead (as SQLite does not have booleans.);
// TODO: check against schema.sql which properties really are "optional"
export interface AttachmentRow {
attachmentId?: string;
@@ -12,6 +13,8 @@ export interface AttachmentRow {
dateModified?: string;
utcDateModified?: string;
utcDateScheduledForErasureSince?: string;
isDeleted?: boolean;
deleteId?: string;
contentLength?: number;
content?: Buffer | string;
}

View File

@@ -18,13 +18,13 @@ import type NoteDetailWidget from "../widgets/note_detail.js";
import type { ResolveOptions } from "../widgets/dialogs/delete_notes.js";
import type { PromptDialogOptions } from "../widgets/dialogs/prompt.js";
import type { ConfirmWithMessageOptions, ConfirmWithTitleOptions } from "../widgets/dialogs/confirm.js";
import type { Node } from "../services/tree.js";
import type LoadResults from "../services/load_results.js";
import type { Attribute } from "../services/attribute_parser.js";
import type NoteTreeWidget from "../widgets/note_tree.js";
import type { default as NoteContext, GetTextEditorCallback } from "./note_context.js";
import type { ContextMenuEvent } from "../menus/context_menu.js";
import type TypeWidget from "../widgets/type_widgets/type_widget.js";
import type EditableTextTypeWidget from "../widgets/type_widgets/editable_text.js";
interface Layout {
getRootWidget: (appContext: AppContext) => RootWidget;
@@ -49,21 +49,21 @@ export interface CommandData {
* Represents a set of commands that are triggered from the context menu, providing information such as the selected note.
*/
export interface ContextMenuCommandData extends CommandData {
node: Node;
notePath: string;
node: Fancytree.FancytreeNode;
notePath?: string;
noteId?: string;
selectedOrActiveBranchIds: any; // TODO: Remove any once type is defined
selectedOrActiveBranchIds?: any; // TODO: Remove any once type is defined
selectedOrActiveNoteIds: any; // TODO: Remove any once type is defined
}
export interface NoteCommandData extends CommandData {
notePath: string;
notePath?: string;
hoistedNoteId?: string;
viewScope?: ViewScope;
}
export interface ExecuteCommandData<T> extends CommandData {
resolve: (data: T) => void
resolve: (data: T) => void;
}
/**
@@ -71,7 +71,8 @@ export interface ExecuteCommandData<T> extends CommandData {
*/
export type CommandMappings = {
"api-log-messages": CommandData;
focusTree: CommandData,
focusTree: CommandData;
focusOnTitle: CommandData;
focusOnDetail: CommandData;
focusOnSearchDefinition: Required<CommandData>;
searchNotes: CommandData & {
@@ -79,6 +80,7 @@ export type CommandMappings = {
ancestorNoteId?: string | null;
};
closeTocCommand: CommandData;
closeHlt: CommandData;
showLaunchBarSubtree: CommandData;
showRevisions: CommandData;
showOptions: CommandData & {
@@ -106,13 +108,18 @@ export type CommandMappings = {
showPromptDialog: PromptDialogOptions;
showInfoDialog: ConfirmWithMessageOptions;
showConfirmDialog: ConfirmWithMessageOptions;
showRecentChanges: CommandData & { ancestorNoteId: string };
showImportDialog: CommandData & { noteId: string };
openNewNoteSplit: NoteCommandData;
openInWindow: NoteCommandData;
openNoteInNewTab: CommandData;
openNoteInNewSplit: CommandData;
openNoteInNewWindow: CommandData;
openAboutDialog: CommandData;
hideFloatingButtons: {};
hideLeftPane: CommandData;
showLeftPane: CommandData;
hoistNote: CommandData & { noteId: string };
leaveProtectedSession: CommandData;
enterProtectedSession: CommandData;
@@ -122,9 +129,14 @@ export type CommandMappings = {
insertNoteAfter: ContextMenuCommandData;
insertChildNote: ContextMenuCommandData;
delete: ContextMenuCommandData;
editNoteTitle: ContextMenuCommandData;
protectSubtree: ContextMenuCommandData;
unprotectSubtree: ContextMenuCommandData;
openBulkActionsDialog: ContextMenuCommandData;
openBulkActionsDialog:
| ContextMenuCommandData
| {
selectedOrActiveNoteIds?: string[];
};
editBranchPrefix: ContextMenuCommandData;
convertNoteToAttachment: ContextMenuCommandData;
duplicateSubtree: ContextMenuCommandData;
@@ -143,6 +155,11 @@ export type CommandMappings = {
importIntoNote: ContextMenuCommandData;
exportNote: ContextMenuCommandData;
searchInSubtree: ContextMenuCommandData;
moveNoteUp: ContextMenuCommandData;
moveNoteDown: ContextMenuCommandData;
moveNoteUpInHierarchy: ContextMenuCommandData;
moveNoteDownInHierarchy: ContextMenuCommandData;
selectAllNotesInParent: ContextMenuCommandData;
addNoteLauncher: ContextMenuCommandData;
addScriptLauncher: ContextMenuCommandData;
@@ -175,6 +192,7 @@ export type CommandMappings = {
importMarkdownInline: CommandData;
showPasswordNotSet: CommandData;
showProtectedSessionPasswordDialog: CommandData;
showUploadAttachmentsDialog: CommandData & { noteId: string };
closeProtectedSessionPasswordDialog: CommandData;
copyImageReferenceToClipboard: CommandData;
copyImageToClipboard: CommandData;
@@ -198,6 +216,7 @@ export type CommandMappings = {
screen: Screen;
};
closeTab: CommandData;
closeToc: CommandData;
closeOtherTabs: CommandData;
closeRightTabs: CommandData;
closeAllTabs: CommandData;
@@ -205,26 +224,34 @@ export type CommandMappings = {
moveTabToNewWindow: CommandData;
copyTabToNewWindow: CommandData;
closeActiveTab: CommandData & {
$el: JQuery<HTMLElement>
},
$el: JQuery<HTMLElement>;
};
setZoomFactorAndSave: {
zoomFactor: string;
}
};
reEvaluateRightPaneVisibility: CommandData;
runActiveNote: CommandData;
scrollContainerToCommand: CommandData & {
position: number;
};
moveThisNoteSplit: CommandData & {
isMovingLeft: boolean;
};
scrollToEnd: CommandData;
closeThisNoteSplit: CommandData;
moveThisNoteSplit: CommandData & { isMovingLeft: boolean };
// Geomap
deleteFromMap: { noteId: string },
openGeoLocation: { noteId: string, event: JQuery.MouseDownEvent }
deleteFromMap: { noteId: string };
openGeoLocation: { noteId: string; event: JQuery.MouseDownEvent };
toggleZenMode: CommandData;
updateAttributeList: CommandData & { attributes: Attribute[] };
saveAttributes: CommandData;
reloadAttributes: CommandData;
refreshNoteList: CommandData & { noteId: string };
refreshResults: {};
refreshSearchDefinition: {};
};
type EventMappings = {
@@ -288,6 +315,13 @@ type EventMappings = {
showHighlightsListWidget: {
noteId: string;
};
showTocWidget: {
noteId: string;
};
showSearchError: {
error: string;
};
searchRefreshed: { ntxId?: string | null };
hoistedNoteChanged: {
noteId: string;
ntxId: string | null;
@@ -317,17 +351,23 @@ type EventMappings = {
ntxId: string | null | undefined; // TODO: deduplicate ntxId
};
tabReorder: {
ntxIdsInOrder: string[]
ntxIdsInOrder: string[];
};
refreshNoteList: {
noteId: string;
};
showToc: {
noteId: string;
};
scrollToEnd: { ntxId: string };
noteTypeMimeChanged: { noteId: string };
zenModeChanged: { isEnabled: boolean };
relationMapCreateChildNote: { ntxId: string | null | undefined };
relationMapResetPanZoom: { ntxId: string | null | undefined };
relationMapResetZoomIn: { ntxId: string | null | undefined };
relationMapResetZoomOut: { ntxId: string | null | undefined };
activeNoteChangedEvent: {};
showAddLinkDialog: {
textTypeWidget: EditableTextTypeWidget;
text: string;
};
};
export type EventListener<T extends EventNames> = {
@@ -365,6 +405,8 @@ class AppContext extends Component {
layout?: Layout;
noteTreeWidget?: NoteTreeWidget;
lastSearchString?: string;
constructor(isMainWindow: boolean) {
super();
@@ -509,10 +551,12 @@ $(window).on("beforeunload", () => {
});
$(window).on("hashchange", function () {
const { notePath, ntxId, viewScope } = linkService.parseNavigationStateFromUrl(window.location.href);
const { notePath, ntxId, viewScope, searchString } = linkService.parseNavigationStateFromUrl(window.location.href);
if (notePath || ntxId) {
appContext.tabManager.switchToNoteContext(ntxId, notePath, viewScope);
} else if (searchString) {
appContext.triggerCommand("searchNotes", { searchString });
}
});

View File

@@ -18,7 +18,7 @@ export class TypedComponent<ChildT extends TypedComponent<ChildT>> {
children: ChildT[];
initialized: Promise<void> | null;
parent?: TypedComponent<any>;
position!: number;
_position!: number;
constructor() {
this.componentId = `${this.sanitizedClassName}-${utils.randomString(8)}`;
@@ -31,6 +31,14 @@ export class TypedComponent<ChildT extends TypedComponent<ChildT>> {
return this.constructor.name.replace(/[^A-Z0-9]/gi, "_");
}
get position() {
return this._position;
}
set position(newPosition: number) {
this._position = newPosition;
}
setParent(parent: TypedComponent<any>) {
this.parent = parent;
return this;
@@ -80,8 +88,7 @@ export class TypedComponent<ChildT extends TypedComponent<ChildT>> {
return promises.length > 0 ? Promise.all(promises) : null;
}
triggerCommand<K extends CommandNames>(name: string, _data?: CommandMappings[K]): Promise<unknown> | undefined | null {
const data = _data || {};
triggerCommand<K extends CommandNames>(name: K, data?: CommandMappings[K]): Promise<unknown> | undefined | null {
const fun = (this as any)[`${name}Command`];
if (fun) {

View File

@@ -11,7 +11,7 @@ import type { ViewScope } from "../services/link.js";
import type FNote from "../entities/fnote.js";
import type TypeWidget from "../widgets/type_widgets/type_widget.js";
interface SetNoteOpts {
export interface SetNoteOpts {
triggerSwitchEvent?: unknown;
viewScope?: ViewScope;
}
@@ -369,7 +369,8 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">
const { note, viewScope } = this;
let title = viewScope?.viewMode === "default" ? note.title : `${note.title}: ${viewScope?.viewMode}`;
const isNormalView = (viewScope?.viewMode === "default" || viewScope?.viewMode === "contextual-help");
let title = (isNormalView ? note.title : `${note.title}: ${viewScope?.viewMode}`);
if (viewScope?.attachmentId) {
// assuming the attachment has been already loaded

View File

@@ -17,7 +17,7 @@ export default class ShortcutComponent extends Component implements EventListene
}
bindNoteShortcutHandler(labelOrRow: AttributeRow) {
const handler = () => appContext.tabManager.getActiveContext().setNote(labelOrRow.noteId);
const handler = () => appContext.tabManager.getActiveContext()?.setNote(labelOrRow.noteId);
const namespace = labelOrRow.attributeId;
if (labelOrRow.isDeleted) {

View File

@@ -248,7 +248,7 @@ export default class TabManager extends Component {
await noteContext.setEmpty();
}
async openEmptyTab(ntxId = null, hoistedNoteId = "root", mainNtxId = null) {
async openEmptyTab(ntxId = null, hoistedNoteId = "root", mainNtxId) {
const noteContext = new NoteContext(ntxId, hoistedNoteId, mainNtxId);
const existingNoteContext = this.children.find((nc) => nc.ntxId === noteContext.ntxId);

View File

@@ -10,6 +10,7 @@ import { t } from "./services/i18n.js";
import options from "./services/options.js";
import type ElectronRemote from "@electron/remote";
import type Electron from "electron";
import "../stylesheets/bootstrap.scss";
await appContext.earlyInit();

View File

@@ -1,6 +1,6 @@
{
"formatVersion": 2,
"appVersion": "0.92.0-beta",
"appVersion": "0.92.2-beta",
"files": [
{
"isClone": false,
@@ -34,7 +34,7 @@
"OkOZllzB3fqN",
"yoAe4jV2yzbd"
],
"title": "Features",
"title": "New Features",
"notePosition": 40,
"prefix": null,
"isExpanded": false,
@@ -47,53 +47,91 @@
"value": "bx bx-star",
"isInheritable": false,
"position": 10
},
{
"type": "label",
"name": "sorted",
"value": "dateCreated",
"isInheritable": false,
"position": 20
},
{
"type": "label",
"name": "sortDirection",
"value": "desc",
"isInheritable": false,
"position": 30
}
],
"format": "html",
"attachments": [],
"dirFileName": "Features",
"dirFileName": "New Features",
"children": [
{
"isClone": false,
"noteId": "13D1lOc9sqmZ",
"noteId": "3I277VKYxWDH",
"notePath": [
"OkOZllzB3fqN",
"yoAe4jV2yzbd",
"13D1lOc9sqmZ"
"3I277VKYxWDH"
],
"title": "Export as PDF",
"notePosition": 20,
"title": "Right-to-left text notes",
"notePosition": 10,
"prefix": null,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [],
"attributes": [
{
"type": "label",
"name": "iconClass",
"value": "bx bx-align-right",
"isInheritable": false,
"position": 10
}
],
"format": "html",
"dataFileName": "Export as PDF.html",
"dataFileName": "Right-to-left text notes.html",
"attachments": [
{
"attachmentId": "xsGM34t8ssKV",
"attachmentId": "PSBNAvDyj5Vy",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "Export as PDF_image.png"
"dataFileName": "Right-to-left text notes_i.png"
},
{
"attachmentId": "cvyes4f1Vhmm",
"attachmentId": "YXYIJznak915",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "1_Export as PDF_image.png"
"dataFileName": "1_Right-to-left text notes_i.png"
},
{
"attachmentId": "b3v1pLE6TF1Y",
"attachmentId": "Do0S17lDl7uu",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "2_Export as PDF_image.png"
"dataFileName": "2_Right-to-left text notes_i.png"
},
{
"attachmentId": "D3lyhPvPvocb",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "3_Right-to-left text notes_i.png"
},
{
"attachmentId": "Tu7llk3GgRkA",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "4_Right-to-left text notes_i.png"
}
]
},
@@ -106,12 +144,20 @@
"B3YLYM4erjnW"
],
"title": "Zen mode",
"notePosition": 30,
"notePosition": 20,
"prefix": null,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [],
"attributes": [
{
"type": "label",
"name": "iconClass",
"value": "bx bxs-yin-yang",
"isInheritable": false,
"position": 10
}
],
"format": "html",
"dataFileName": "Zen mode.html",
"attachments": [
@@ -180,6 +226,50 @@
"dataFileName": "7_Zen mode_image.png"
}
]
},
{
"isClone": false,
"noteId": "13D1lOc9sqmZ",
"notePath": [
"OkOZllzB3fqN",
"yoAe4jV2yzbd",
"13D1lOc9sqmZ"
],
"title": "Export as PDF",
"notePosition": 30,
"prefix": null,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [
{
"type": "label",
"name": "iconClass",
"value": "bx bxs-file-pdf",
"isInheritable": false,
"position": 30
}
],
"format": "html",
"dataFileName": "Export as PDF.html",
"attachments": [
{
"attachmentId": "xsGM34t8ssKV",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "Export as PDF_image.png"
},
{
"attachmentId": "b3v1pLE6TF1Y",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "1_Export as PDF_image.png"
}
]
}
]
},
@@ -233,8 +323,47 @@
}
],
"format": "html",
"dataFileName": "Text.html",
"attachments": []
"attachments": [],
"dirFileName": "Text",
"children": [
{
"isClone": false,
"noteId": "B0lcI9xz1r8K",
"notePath": [
"OkOZllzB3fqN",
"wmegHv51MJMd",
"crJtzsol4olb",
"B0lcI9xz1r8K"
],
"title": "Content language",
"notePosition": 10,
"prefix": null,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "3I277VKYxWDH",
"isInheritable": false,
"position": 10
}
],
"format": "html",
"dataFileName": "Content language.html",
"attachments": [
{
"attachmentId": "OpIv6CnYCLVa",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "Content language_image.png"
}
]
}
]
},
{
"isClone": false,
@@ -382,7 +511,7 @@
"title": "Book",
"notePosition": 70,
"prefix": null,
"isExpanded": true,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [
@@ -576,6 +705,14 @@
"mime": "image/png",
"position": 10,
"dataFileName": "18_Calendar View_image.png"
},
{
"attachmentId": "JM6AU8N4MIgB",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "19_Calendar View_image.png"
}
]
}
@@ -697,7 +834,7 @@
"wmegHv51MJMd",
"foPEtsL51pD2"
],
"title": "Geo Map",
"title": "Geo map",
"notePosition": 120,
"prefix": null,
"isExpanded": false,
@@ -713,23 +850,15 @@
}
],
"format": "html",
"dataFileName": "Geo Map.html",
"dataFileName": "Geo map.html",
"attachments": [
{
"attachmentId": "J0baLTpafs7C",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "Geo Map_image.png"
},
{
"attachmentId": "kcYjOvJDFkbS",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "1_Geo Map_image.png"
"dataFileName": "Geo map_image.png"
},
{
"attachmentId": "FDP3JzIVSnuJ",
@@ -737,7 +866,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "2_Geo Map_image.png"
"dataFileName": "1_Geo map_image.png"
},
{
"attachmentId": "eUrcqc8RRuZG",
@@ -745,7 +874,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "3_Geo Map_image.png"
"dataFileName": "2_Geo map_image.png"
},
{
"attachmentId": "1quk4yxJpeHZ",
@@ -753,7 +882,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "4_Geo Map_image.png"
"dataFileName": "3_Geo map_image.png"
},
{
"attachmentId": "iSpyhQ5Ya6Nk",
@@ -761,7 +890,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "5_Geo Map_image.png"
"dataFileName": "4_Geo map_image.png"
},
{
"attachmentId": "ut6vm2aXVfXI",
@@ -769,7 +898,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "6_Geo Map_image.png"
"dataFileName": "5_Geo map_image.png"
},
{
"attachmentId": "uYdb9wWf5Nuv",
@@ -777,15 +906,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "7_Geo Map_image.png"
},
{
"attachmentId": "GhHYO2LteDmZ",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "8_Geo Map_image.png"
"dataFileName": "6_Geo map_image.png"
},
{
"attachmentId": "viN50n5G4kB0",
@@ -793,7 +914,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "9_Geo Map_image.png"
"dataFileName": "7_Geo map_image.png"
},
{
"attachmentId": "mgwGrtQZjxxb",
@@ -801,7 +922,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "10_Geo Map_image.png"
"dataFileName": "8_Geo map_image.png"
},
{
"attachmentId": "PMqmCbNLlZOG",
@@ -809,7 +930,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "11_Geo Map_image.png"
"dataFileName": "9_Geo map_image.png"
},
{
"attachmentId": "0AwaQMqt3FVA",
@@ -817,7 +938,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "12_Geo Map_image.png"
"dataFileName": "10_Geo map_image.png"
},
{
"attachmentId": "gR2c2Thmfy3I",
@@ -825,7 +946,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "13_Geo Map_image.png"
"dataFileName": "11_Geo map_image.png"
},
{
"attachmentId": "JULizn130rVI",
@@ -833,7 +954,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "14_Geo Map_image.png"
"dataFileName": "12_Geo map_image.png"
},
{
"attachmentId": "MdC0DpifJwu4",
@@ -841,7 +962,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "15_Geo Map_image.png"
"dataFileName": "13_Geo map_image.png"
},
{
"attachmentId": "gFR2Izzp18LQ",
@@ -849,7 +970,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "16_Geo Map_image.png"
"dataFileName": "14_Geo map_image.png"
},
{
"attachmentId": "42AncDs7SSAf",
@@ -857,15 +978,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "17_Geo Map_image.png"
},
{
"attachmentId": "pKdtiq4r0eFY",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "18_Geo Map_image.png"
"dataFileName": "15_Geo map_image.png"
},
{
"attachmentId": "FXRVvYpOxWyR",
@@ -873,7 +986,23 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "19_Geo Map_image.png"
"dataFileName": "16_Geo map_image.png"
},
{
"attachmentId": "qudP7UCtwIq3",
"title": "image.png",
"role": "image",
"mime": "image/jpg",
"position": 10,
"dataFileName": "17_Geo map_image.png"
},
{
"attachmentId": "utecGxWk08QY",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "18_Geo map_image.png"
}
]
}
@@ -943,173 +1072,6 @@
}
]
},
{
"isClone": false,
"noteId": "DtJJ20yEozPA",
"notePath": [
"OkOZllzB3fqN",
"DtJJ20yEozPA"
],
"title": "Theme development",
"notePosition": 130,
"prefix": null,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [
{
"type": "label",
"name": "iconClass",
"value": "bx bx-palette",
"isInheritable": false,
"position": 10
}
],
"format": "html",
"attachments": [],
"dirFileName": "Theme development",
"children": [
{
"isClone": false,
"noteId": "5HH79ztN0fZA",
"notePath": [
"OkOZllzB3fqN",
"DtJJ20yEozPA",
"5HH79ztN0fZA"
],
"title": "Creating a custom theme",
"notePosition": 10,
"prefix": null,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "aH8Dk5aMiq7R",
"isInheritable": false,
"position": 10
}
],
"format": "html",
"dataFileName": "Creating a custom theme.html",
"attachments": [
{
"attachmentId": "AJHVfQtIQgJ7",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "Creating a custom theme_im.png"
},
{
"attachmentId": "gXLyv5KXjfxg",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "1_Creating a custom theme_im.png"
},
{
"attachmentId": "on1gD7BzCWdN",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "2_Creating a custom theme_im.png"
},
{
"attachmentId": "17p6z24yW5eP",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "3_Creating a custom theme_im.png"
},
{
"attachmentId": "K3cdwj8f90m0",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "4_Creating a custom theme_im.png"
},
{
"attachmentId": "bn93hwF7C8sR",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "5_Creating a custom theme_im.png"
}
]
},
{
"isClone": false,
"noteId": "aH8Dk5aMiq7R",
"notePath": [
"OkOZllzB3fqN",
"DtJJ20yEozPA",
"aH8Dk5aMiq7R"
],
"title": "Customize the Next theme",
"notePosition": 20,
"prefix": null,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [],
"format": "html",
"dataFileName": "Customize the Next theme.html",
"attachments": [
{
"attachmentId": "5z4bC0x0eH0P",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "Customize the Next theme_i.png"
},
{
"attachmentId": "u0zkXkD7rGXA",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "1_Customize the Next theme_i.png"
}
]
},
{
"isClone": false,
"noteId": "pMq6N1oBV9oo",
"notePath": [
"OkOZllzB3fqN",
"DtJJ20yEozPA",
"pMq6N1oBV9oo"
],
"title": "Reference",
"notePosition": 30,
"prefix": null,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "po38jIc0LD2H",
"isInheritable": false,
"position": 10
}
],
"format": "html",
"dataFileName": "Reference.html",
"attachments": []
}
]
},
{
"isClone": false,
"noteId": "LTnkDnYmmZ7s",
@@ -1283,7 +1245,7 @@
"title": "ETAPI",
"notePosition": 10,
"prefix": null,
"isExpanded": true,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [],
@@ -1333,7 +1295,7 @@
"title": "Internal API",
"notePosition": 20,
"prefix": null,
"isExpanded": true,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@@ -23,7 +23,7 @@
as PDF. On the server or PWA (mobile), the option is not available due
to technical constraints and it will be hidden.</p>
<p>To print a note, select the
<img src="2_Export as PDF_image.png" width="29"
<img src="1_Export as PDF_image.png" width="29"
height="31">button to the right of the note and select <i>Export as PDF</i>.</p>
<p>Afterwards you will be prompted to select where to save the PDF file.
Upon confirmation, the resulting PDF will be opened automatically using
@@ -33,7 +33,7 @@
<a
href="#root/OeKBfN6JbMIq/jRV1MPt4mNSP/hrC6xn7hnDq5">report the issue</a>. In this case, it's best to offer a sample note (click
on the
<img src="2_Export as PDF_image.png" width="29" height="31">button, select Export note → This note and all of its descendants → HTML
<img src="1_Export as PDF_image.png" width="29" height="31">button, select Export note → This note and all of its descendants → HTML
in ZIP archive). Make sure not to accidentally leak any personal information.</p>
<h2>Landscape mode</h2>
<p>When exporting to PDF, there are no customizable settings such as page

View File

@@ -0,0 +1,56 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Right-to-left text notes</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Right-to-left text notes</h1>
<div class="ck-content">
<p>Trilium now has basic support for right-to-left text, at note level.</p>
<figure
class="table">
<table>
<tbody>
<tr>
<td>
<figure class="image">
<img style="aspect-ratio:906/557;" src="3_Right-to-left text notes_i.png"
width="906" height="557">
</figure>
</td>
<td>
<figure class="image">
<img style="aspect-ratio:906/557;" src="2_Right-to-left text notes_i.png"
width="906" height="557">
</figure>
</td>
</tr>
</tbody>
</table>
</figure>
<p>Note that only the Text note type supports this.</p>
<p>The list of languages is configurable via the a new dedicated settings
page:</p>
<figure class="image">
<img style="aspect-ratio:1248/635;" src="4_Right-to-left text notes_i.png"
width="1248" height="635">
</figure>
<p>To select the corresponding language of the text, go to “Basic Properties”
and select your desired language.</p>
<p>
<img src="1_Right-to-left text notes_i.png" width="635" height="492">
</p>
<p>Feel free to report any issues regarding right to left support.</p>
<p>&nbsp;</p>
</div>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -118,6 +118,12 @@
<td>When present (regardless of value), it will show the number of the week
on the calendar.</td>
</tr>
<tr>
<td><code>~child:template</code>
</td>
<td>Defines the template for newly created notes in the calendar (via dragging
or clicking).</td>
</tr>
</tbody>
</table>
</figure>
@@ -175,6 +181,36 @@
than the title, either a label (e.g. <code>#assignee</code>) or a relation
(e.g. <code>~for</code>). See <i>Advanced use-cases</i> for more information.</td>
</tr>
<tr>
<td><code>#calendar:promotedAttributes</code>
</td>
<td>
<p>Allows displaying the value of one or more promoted attributes in the
calendar like this:
<img src="19_Calendar View_image.png" width="131" height="113">
</p><pre><code class="language-text-x-trilium-auto">#label:weight="promoted,number,single,precision=1"
#label:mood="promoted,alias=Mood,single,text"
#calendar:promotedAttributes="label:weight,label:mood" </code></pre>
<p>It can also be used with relations, case in which it will display the
title of the target note:</p><pre><code class="language-text-x-trilium-auto">#relation:assignee="promoted,alias=Assignee,single,text"
#calendar:promotedAttributes="relation:assignee"
~assignee=@My assignee</code></pre>
</td>
</tr>
<tr>
<td><code>#calendar:startDate</code>
</td>
<td>Allows using a different label to represent the start date, other than <code>#startDate</code> (e.g. <code>#expiryDate</code>).
The label name must be prefixed with <code>#</code>. If the label is not
defined for a note, the default will be used instead.</td>
</tr>
<tr>
<td><code>#calendar:endDate</code>
</td>
<td>Allows using a different label to represent the start date, other than <code>#endDate</code>.
The label name must be prefixed with <code>#</code>. If the label is not
defined for a note, the default will be used instead.</td>
</tr>
</tbody>
</table>
</figure>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

View File

@@ -5,12 +5,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Geo Map</title>
<title data-trilium-title>Geo map</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Geo Map</h1>
<h1 data-trilium-h1>Geo map</h1>
<div class="ck-content">
<h2>Creating a new geo map</h2>
@@ -26,7 +26,7 @@
<th>1</th>
<td>
<figure class="image image_resized" style="width:100%;">
<img style="aspect-ratio:1256/1044;" src="9_Geo Map_image.png" width="1256"
<img style="aspect-ratio:1256/1044;" src="7_Geo map_image.png" width="1256"
height="1044">
</figure>
</td>
@@ -36,7 +36,7 @@
<th>2</th>
<td>
<figure class="image image_resized" style="width:100%;">
<img style="aspect-ratio:1720/1396;" src="3_Geo Map_image.png" width="1720"
<img style="aspect-ratio:1720/1396;" src="2_Geo map_image.png" width="1720"
height="1396">
</figure>
</td>
@@ -69,18 +69,18 @@
<p>To create a marker, first navigate to the desired point on the map. Then
press the
<img class="image_resized" style="aspect-ratio:72/66;width:7.37%;"
src="4_Geo Map_image.png" width="72" height="66">button on the top-right of the map.</p>
src="3_Geo map_image.png" width="72" height="66">button on the top-right of the map.</p>
<p>If the button is not visible, make sure the button section is visible
by pressing the chevron button (
<img class="image_resized" style="aspect-ratio:72/66;width:7.51%;"
src="10_Geo Map_image.png" width="72" height="66">) in the top-right of the map.</p>
src="8_Geo map_image.png" width="72" height="66">) in the top-right of the map.</p>
</td>
</tr>
<tr>
<th>2</th>
<td>
<figure class="image image_resized" style="width:100%;">
<img style="aspect-ratio:1730/416;" src="14_Geo Map_image.png" width="1730"
<img style="aspect-ratio:1730/416;" src="12_Geo map_image.png" width="1730"
height="416">
</figure>
<p>&nbsp;</p>
@@ -96,7 +96,7 @@
<th>3</th>
<td>
<figure class="image">
<img style="aspect-ratio:1586/404;" src="1_Geo Map_image.png" width="1586"
<img style="aspect-ratio:1586/404;" src="Geo map_image.png" width="1586"
height="404">
</figure>
<p>&nbsp;</p>
@@ -107,7 +107,7 @@
<th>4</th>
<td>
<figure class="image">
<img style="aspect-ratio:1696/608;" src="6_Geo Map_image.png" width="1696"
<img style="aspect-ratio:1696/608;" src="5_Geo map_image.png" width="1696"
height="608">
</figure>
<p>&nbsp;</p>
@@ -122,7 +122,7 @@
<p>The location of a marker is stored in the <code>#geolocation</code> attribute
of the child notes:</p>
<figure class="image">
<img style="aspect-ratio:1288/278;" src="12_Geo Map_image.png" width="1288"
<img style="aspect-ratio:1288/278;" src="10_Geo map_image.png" width="1288"
height="278">
</figure>
<p>This value can be added manually if needed. The value of the attribute
@@ -155,6 +155,13 @@
</ul>
</li>
</ul>
<h2>Icon and color of the markers</h2>
<p>
<img src="18_Geo map_image.png" alt="image" width="523" height="295">
</p>
<p>The markers will have the same icon as the note.</p>
<p>It's possible to add a custom color to a marker by assigning them a <code>#color</code> attribute
such as <code>#color=green</code>.</p>
<h2>Adding the coordinates manually</h2>
<p>In a nutshell, create a child note and set the <code>#geolocation</code> attribute
to the coordinates.</p>
@@ -168,7 +175,7 @@
<th>1</th>
<td>
<figure class="image image-style-align-center image_resized" style="width:100%;">
<img style="aspect-ratio:732/918;" src="16_Geo Map_image.png" width="732"
<img style="aspect-ratio:732/918;" src="14_Geo map_image.png" width="732"
height="918">
</figure>
</td>
@@ -185,7 +192,7 @@
<th>2</th>
<td>
<figure class="image image_resized" style="width:100%;">
<img style="aspect-ratio:518/84;" src="19_Geo Map_image.png" width="518"
<img style="aspect-ratio:518/84;" src="16_Geo map_image.png" width="518"
height="84">
</figure>
</td>
@@ -199,7 +206,7 @@
<th>3</th>
<td>
<figure class="image image_resized" style="width:100%;">
<img style="aspect-ratio:1074/276;" src="11_Geo Map_image.png" width="1074"
<img style="aspect-ratio:1074/276;" src="9_Geo map_image.png" width="1074"
height="276">
</figure>
</td>
@@ -225,7 +232,7 @@
<th>1</th>
<td>
<figure class="image image_resized" style="width:100%;">
<img style="aspect-ratio:562/454;" src="17_Geo Map_image.png" width="562"
<img style="aspect-ratio:562/454;" src="15_Geo map_image.png" width="562"
height="454">
</figure>
</td>
@@ -236,7 +243,7 @@
<th>2</th>
<td>
<figure class="image image_resized" style="width:100%;">
<img style="aspect-ratio:696/480;" src="13_Geo Map_image.png" width="696"
<img style="aspect-ratio:696/480;" src="11_Geo map_image.png" width="696"
height="480">
</figure>
</td>
@@ -250,7 +257,7 @@
<th>3</th>
<td>
<figure class="image">
<img style="aspect-ratio:640/276;" src="2_Geo Map_image.png" width="640"
<img style="aspect-ratio:640/276;" src="1_Geo map_image.png" width="640"
height="276">
</figure>
</td>
@@ -275,7 +282,7 @@
<th>1</th>
<td>
<figure class="image">
<img style="aspect-ratio:226/74;" src="7_Geo Map_image.png" width="226"
<img style="aspect-ratio:226/74;" src="6_Geo map_image.png" width="226"
height="74">
</figure>
</td>
@@ -286,7 +293,7 @@
<th>2</th>
<td>
<figure class="image">
<img style="aspect-ratio:322/222;" src="5_Geo Map_image.png" width="322"
<img style="aspect-ratio:322/222;" src="4_Geo map_image.png" width="322"
height="222">
</figure>
</td>
@@ -297,7 +304,7 @@
<th>3</th>
<td>
<figure class="image image_resized" style="width:100%;">
<img style="aspect-ratio:620/530;" src="15_Geo Map_image.png" width="620"
<img style="aspect-ratio:620/530;" src="13_Geo map_image.png" width="620"
height="530">
</figure>
</td>
@@ -310,9 +317,16 @@
</tbody>
</table>
</figure>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Troubleshooting</h2>
<h3>Grid-like artifacts on the map</h3>
<p>
<img class="image_resized" style="aspect-ratio:678/499;width:58%;" src="17_Geo map_image.png"
width="678" height="499">
</p>
<p>This occurs if the application is not at 100% zoom which causes the pixels
of the map to not render correctly due to fractional scaling. The only
possible solution i to set the UI zoom at 100% (default keyboard shortcut
is Ctrl+0).</p>
<p>&nbsp;</p>
</div>
</div>

View File

@@ -1,19 +0,0 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Text</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Text</h1>
<div class="ck-content"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Content language</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Content language</h1>
<div class="ck-content">
<p>A language hint can be provided for text notes. This option informs the
browser or the desktop application about the language the note is written
in (for example this might help with spellchecking), and it also determines
whether the text is displayed from right-to-left for languages such as
Arabic, Hebrew, etc.</p>
<p>For more information about right-to-left support, see&nbsp;<a class="reference-link"
href="../../New%20Features/Right-to-left%20text%20notes.html">Right-to-left text notes</a>.</p>
<p>To set the language of the content, go to “Basic Properties” and look
for the “Language” field. By default there will be no content languages
set, they can be configured by going to settings or by selecting the “Configure
languages” item in the list.</p>
<p>
<img src="Content language_image.png" width="635" height="492">
</p>
</div>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View File

@@ -1,94 +0,0 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Creating a custom theme</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Creating a custom theme</h1>
<div class="ck-content">
<h2>Step 1. Find a place to place the themes</h2>
<p>Organization is an important aspect of managing a knowledge base. When
developing a new theme or importing an existing one it's a good idea to
keep them into one place.</p>
<p>As such, the first step is to create a new note to gather all the themes.</p>
<p>
<img src="5_Creating a custom theme_im.png" width="181" height="84">
</p>
<h2>Step 2. Create the theme</h2>
<figure class="table" style="width:100%;">
<table class="ck-table-resized">
<colgroup>
<col style="width:32.47%;">
<col style="width:67.53%;">
</colgroup>
<tbody>
<tr>
<td>
<figure class="image">
<img style="aspect-ratio:651/220;" src="3_Creating a custom theme_im.png"
width="651" height="220">
</figure>
</td>
<td style="vertical-align:top;">Themes are code notes with a special attribute. Start by creating a new
code note.</td>
</tr>
<tr>
<td>
<figure class="image">
<img style="aspect-ratio:302/349;" src="1_Creating a custom theme_im.png"
width="302" height="349">
</figure>
</td>
<td style="vertical-align:top;">Then change the note type to a CSS code.</td>
</tr>
<tr>
<td>
<figure class="image">
<img style="aspect-ratio:316/133;" src="Creating a custom theme_im.png"
width="316" height="133">
</figure>
</td>
<td style="vertical-align:top;">In the <i>Owned Attributes</i> section define the <code>#appTheme</code> attribute
to point to any desired name. This is the name that will show up in the
appearance section in settings.</td>
</tr>
</tbody>
</table>
</figure>
<h2>Step 3. Define the theme's CSS</h2>
<p>As a very simple example we will change the background color of the launcher
pane to a shade of blue.</p>
<p>To alter the different variables of the theme:</p><pre><code class="language-text-css">:root {
--launcher-pane-background-color: #0d6efd;
}</code></pre>
<h2>Step 4. Activating the theme</h2>
<p>Refresh the application (Ctrl+Shift+R is a good way to do so) and go to
settings. You should see the newly created theme:</p>
<p>
<img src="2_Creating a custom theme_im.png" width="631" height="481">
</p>
<p>Afterwards the application will refresh itself with the new theme:</p>
<p>
<img src="4_Creating a custom theme_im.png" width="653" height="554">
</p>
<p>Do note that the theme will be based off of the legacy theme. To override
that and base the theme on the new TriliumNext theme, see:&nbsp;<a class="reference-link"
href="Customize%20the%20Next%20theme.html">Theme base (legacy vs. next)</a>
</p>
<h2>Step 5. Making changes</h2>
<p>Simply go back to the note and change according to needs. To apply the
changes to the current window, press Ctrl+Shift+R to refresh.</p>
<p>It's a good idea to keep two windows, one for editing and the other one
for previewing the changes.</p>
</div>
</div>
</body>
</html>

View File

@@ -1,36 +0,0 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Customize the Next theme</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Customize the Next theme</h1>
<div class="ck-content">
<p>By default, any custom theme will be based on the legacy light theme.
To use the TriliumNext theme instead, add the <code>#appThemeBase=next</code> attribute
onto the existing theme. The <code>appTheme</code> attribute must also be
present.</p>
<p>
<img src="Customize the Next theme_i.png" width="424" height="140">
</p>
<p>When <code>appThemeBase</code> is set to <code>next</code> it will use the
“TriliumNext (auto)” theme. Any other value is ignored and will use the
legacy white theme instead.</p>
<h2>Overrides</h2>
<p>Do note that the TriliumNext theme has a few more overrides than the legacy
theme, so you might need to suffix <code>!important</code> if the style changes
are not applied.</p><pre><code class="language-text-css">:root {
--launcher-pane-background-color: #0d6efd !important;
}</code></pre>
</div>
</div>
</body>
</html>

View File

@@ -1,180 +0,0 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Reference</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Reference</h1>
<div class="ck-content">
<h2>Detecting mobile vs. desktop</h2>
<p>The mobile layout is different than the one on the desktop. Use <code>body.mobile</code> and <code>body.desktop</code> to
differentiate between them.</p><pre><code class="language-text-css">body.mobile #root-widget {
/* Do something on mobile */
}
body.desktop #root-widget {
/* Do something on desktop */
}</code></pre>
<p>Do note that there is also a “tablet mode” in the mobile layout. For that
particular case media queries are required:</p><pre><code class="language-text-css">@media (max-width: 991px) {
#launcher-pane {
/* Do something on mobile layout */
}
}
@media (min-width: 992px) {
#launcher-pane {
/* Do something on mobile tablet + desktop layout */
}
}</code></pre>
<h2>Detecting horizontal vs. vertical layout</h2>
<p>The user can select between vertical layout (the classical one, where
the launcher bar is on the left) and a horizontal layout (where the launcher
bar is on the top and tabs are full-width).</p>
<p>Different styles can be applied by using classes at <code>body</code> level:</p><pre><code class="language-text-x-trilium-auto">body.layout-vertical #left-pane {
/* Do something */
}
body.layout-horizontal #center-pane {
/* Do something else */
}</code></pre>
<p>The two different layouts use different containers (but they are present
in the DOM regardless of the user's choice), for example <code>#horizontal-main-container</code> and <code>#vertical-main-container</code> can
be used to customize the background of the content section.</p>
<h2>Detecting platform (Windows, macOS) or Electron</h2>
<p>It is possible to add particular styles that only apply to a given platform
by using the classes in <code>body</code>:</p>
<figure class="table">
<table>
<thead>
<tr>
<th>Windows</th>
<th>macOS</th>
</tr>
</thead>
<tbody>
<tr>
<td><pre><code class="language-text-x-trilium-auto">body.platform-win32 {
background: red;
}</code></pre>
</td>
<td><pre><code class="language-text-x-trilium-auto">body.platform-darwin {
background: red;
}</code></pre>
</td>
</tr>
</tbody>
</table>
</figure>
<p>It is also possible to only apply a style if running under Electron (desktop
application):</p><pre><code class="language-text-x-trilium-auto">body.electron {
background: blue;
}</code></pre>
<h3>Native title bar</h3>
<p>It's possible to detect if the user has selected the native title bar
or the custom title bar by querying against <code>body</code>:</p><pre><code class="language-text-x-trilium-auto">body.electron.native-titlebar {
/* Do something */
}
body.electron:not(.native-titlebar) {
/* Do something else */
}</code></pre>
<h3>Native window buttons</h3>
<p>When running under Electron with native title bar off, a feature was introduced
to use the platform-specific window buttons such as the semaphore on macOS.</p>
<p>See <a href="https://github.com/TriliumNext/Notes/pull/702">Native title bar buttons by eliandoran · Pull Request #702 · TriliumNext/Notes</a> for
the original implementation of this feature, including screenshots.</p>
<h4>On Windows</h4>
<p>The colors of the native window button area can be adjusted using a RGB
hex color:</p><pre><code class="language-text-x-trilium-auto">body {
--native-titlebar-foreground: #ffffff;
--native-titlebar-background: #ff0000;
}</code></pre>
<p>It is also possible to use transparency at the cost of reduced hover colors
using a RGBA hex color:</p><pre><code class="language-text-x-trilium-auto">body {
--native-titlebar-background: #ff0000aa;
}</code></pre>
<p>Note that the value is read when the window is initialized and then it
is refreshed only when the user changes their light/dark mode preference.</p>
<h4>On macOS</h4>
<p>On macOS the semaphore window buttons are enabled by default when the
native title bar is disabled. The offset of the buttons can be adjusted
using:</p><pre><code class="language-text-css">body {
--native-titlebar-darwin-x-offset: 12;
--native-titlebar-darwin-y-offset: 14 !important;
}</code></pre>
<h3>Background/transparency effects on Windows (Mica)</h3>
<p>Windows 11 offers a special background/transparency effect called Mica,
which can be enabled by themes by setting the <code>--background-material</code> variable
at <code>body</code> level:</p><pre><code class="language-text-css">body.electron.platform-win32 {
--background-material: tabbed;
}</code></pre>
<p>The value can be either <code>tabbed</code> (especially useful for the horizontal
layout) or <code>mica</code> (ideal for the vertical layout).</p>
<p>Do note that the Mica effect is applied at <code>body</code> level and the
theme needs to make the entire hierarchy (semi-)transparent in order for
it to be visible. Use the TrilumNext theme as an inspiration.</p>
<h2>Note icons, tab workspace accent color</h2>
<p>Theme capabilities are small adjustments done through CSS variables that
can affect the layout or the visual aspect of the application.</p>
<p>In the tab bar, to display the icons of notes instead of the icon of the
workspace:</p><pre><code class="language-text-css">:root {
--tab-note-icons: true;
}</code></pre>
<p>When a workspace is hoisted for a given tab, it is possible to get the
background color of that workspace, for example to apply a small strip
on the tab instead of the whole background color:</p><pre><code class="language-text-css">.note-tab .note-tab-wrapper {
--tab-background-color: initial !important;
}
.note-tab .note-tab-wrapper::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background-color: var(--workspace-tab-background-color);
}</code></pre>
<h2>Custom fonts</h2>
<p>Currently the only way to include a custom font is to use&nbsp;<a class="reference-link"
href="../Advanced%20topics/Custom%20resource%20providers.html">Custom resource providers</a>.
Basically import a font into Trilium and assign it <code>#customResourceProvider=fonts/myfont.ttf</code> and
then import the font in CSS via <code>/custom/fonts/myfont.ttf</code>.</p>
<h2>Dark and light themes</h2>
<p>A light theme needs to have the following CSS:</p><pre><code class="language-text-css">:root {
--theme-style: light;
}</code></pre>
<p>if the theme is dark, then <code>--theme-style</code> needs to be <code>dark</code>.</p>
<p>If the theme is auto (e.g. supports both light or dark based on <code>prefers-color-scheme</code>)
it must also declare (in addition to setting <code>--theme-style</code> to
either <code>light</code> or <code>dark</code>):</p><pre><code class="language-text-css">:root {
--theme-style-auto: true;
}</code></pre>
<p>This will affect the behavior of the Electron application by informing
the operating system of the color preference (e.g. background effects will
appear correct on Windows).</p>
</div>
</div>
</body>
</html>

View File

@@ -6,6 +6,6 @@
</head>
<frameset cols="25%,75%">
<frame name="navigation" src="navigation.html">
<frame name="detail" src="User%20Guide/Features/Export%20as%20PDF.html">
<frame name="detail" src="User%20Guide/New%20Features/Right-to-left%20text%20notes.html">
</frameset>
</html>

View File

@@ -9,17 +9,24 @@
<ul>
<li>User Guide
<ul>
<li>Features
<li>New Features
<ul>
<li><a href="User%20Guide/Features/Export%20as%20PDF.html" target="detail">Export as PDF</a>
<li><a href="User%20Guide/New%20Features/Right-to-left%20text%20notes.html"
target="detail">Right-to-left text notes</a>
</li>
<li><a href="User%20Guide/Features/Zen%20mode.html" target="detail">Zen mode</a>
<li><a href="User%20Guide/New%20Features/Zen%20mode.html" target="detail">Zen mode</a>
</li>
<li><a href="User%20Guide/New%20Features/Export%20as%20PDF.html" target="detail">Export as PDF</a>
</li>
</ul>
</li>
<li>Note Types
<ul>
<li><a href="User%20Guide/Note%20Types/Text.html" target="detail">Text</a>
<li>Text
<ul>
<li><a href="User%20Guide/Note%20Types/Text/Content%20language.html" target="detail">Content language</a>
</li>
</ul>
</li>
<li><a href="User%20Guide/Note%20Types/Code.html" target="detail">Code</a>
</li>
@@ -45,7 +52,7 @@
</li>
<li><a href="User%20Guide/Note%20Types/Mind%20Map.html" target="detail">Mind Map</a>
</li>
<li><a href="User%20Guide/Note%20Types/Geo%20Map.html" target="detail">Geo Map</a>
<li><a href="User%20Guide/Note%20Types/Geo%20map.html" target="detail">Geo map</a>
</li>
</ul>
</li>
@@ -56,18 +63,6 @@
</li>
</ul>
</li>
<li>Theme development
<ul>
<li><a href="User%20Guide/Theme%20development/Creating%20a%20custom%20theme.html"
target="detail">Creating a custom theme</a>
</li>
<li><a href="User%20Guide/Theme%20development/Customize%20the%20Next%20theme.html"
target="detail">Customize the Next theme</a>
</li>
<li><a href="User%20Guide/Theme%20development/Reference.html" target="detail">Reference</a>
</li>
</ul>
</li>
<li>Scripting
<ul>
<li>Examples

View File

@@ -19,18 +19,18 @@ export interface FAttachmentRow {
class FAttachment {
private froca: Froca;
attachmentId!: string;
private ownerId!: string;
ownerId!: string;
role!: string;
mime!: string;
title!: string;
isProtected!: boolean; // TODO: Is this used?
private dateModified!: string;
utcDateModified!: string;
private utcDateScheduledForErasureSince!: string;
utcDateScheduledForErasureSince!: string;
/**
* optionally added to the entity
*/
private contentLength!: number;
contentLength!: number;
constructor(froca: Froca, row: FAttachmentRow) {
/** @type {Froca} */

View File

@@ -8,6 +8,7 @@ export interface FBranchRow {
prefix?: string;
isExpanded?: boolean;
fromSearchNote: boolean;
isDeleted?: boolean;
}
/**

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