Compare commits

...

564 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
Elian Doran
8390807212 release 0.92.2-beta 2025-02-22 13:59:41 +02:00
Elian Doran
60da367570 Merge pull request #1253 from TriliumNext/ci_fix-missing-windows-zip
fix(ci): add missing windows zip build target
2025-02-22 13:56:01 +02:00
Panagiotis Papadopoulos
36b0970835 fix(ci): add missing windows zip build target 2025-02-22 12:41:24 +01:00
Elian Doran
3bea6af20e chore(release): 0.92.1-beta 2025-02-22 12:58:30 +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
3c83112240 Merge pull request #1250 from TriliumNext/feat_typescript-codenote
feat(options_init): add typescript as default set codeNotesMimeTypes value
2025-02-22 12:55:40 +02:00
Elian Doran
4e876ed24d fix(build): build errors after changing meta data type 2025-02-22 12:52:25 +02:00
Elian Doran
94ce01bbc2 chore(docs): update documentation 2025-02-22 12:49:09 +02:00
Elian Doran
411e3dfa0e server(export): export Markdown using ATX heading syntax (closes #1251) 2025-02-22 12:45:21 +02:00
Elian Doran
a1bfc6aae7 feat(hidden_subtree): update help note icons 2025-02-22 12:31:39 +02:00
Elian Doran
97bc103e76 feat(in_app_help): support folder icons 2025-02-22 12:30:47 +02:00
Panagiotis Papadopoulos
9da1f55409 feat(options_init): add typescript as default set codeNotesMimeTypes value
since it is a very widespread/popular language, it makes sense to have it on by default.

closes #1219
2025-02-22 11:19:32 +01:00
Elian Doran
017fba518d feat(in_app_help): remove help notes that are no longer present in structure 2025-02-22 12:09:11 +02:00
Elian Doran
63584c153c feat(views/calendar): filter notes by ancestor 2025-02-22 11:31:36 +02:00
Adorian Doran
a4a2e55415 Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-02-22 11:13:24 +02:00
Adorian Doran
4a1691ac31 style(next): promoted attributes widget: update narrow view breakpoint 2025-02-22 11:13:20 +02:00
Elian Doran
a3fbf15902 Merge remote-tracking branch 'origin/develop' into feature/task_list 2025-02-22 11:03:18 +02:00
Elian Doran
5a8d5c59f5 feat(views/calendar): support workspaceCalendarRoot 2025-02-22 10:59:03 +02:00
Elian Doran
a9cebe312f refactor(views/calendar): use specific API for date notes for performance 2025-02-22 10:59:03 +02:00
Elian Doran
43f79ca813 feat(views/calendar): click to go to day note 2025-02-22 10:59:03 +02:00
Elian Doran
5c1db3cab2 feat(views/calendar): disable interaction in calendar root mode 2025-02-22 10:59:03 +02:00
Elian Doran
bc4d820cb0 feat(views/calendar): display child notes of days 2025-02-22 10:59:03 +02:00
Elian Doran
f4e6edd19e feat(views/calendar): basic recursion for calendar root 2025-02-22 10:59:03 +02:00
Elian Doran
530340f753 fix(client): sporadious crash with classic toolbar not being available 2025-02-22 10:59:03 +02:00
Adorian Doran
fcc1068b06 style(next): promoted attributes widget: improve appearance 2025-02-22 10:55:01 +02:00
Adorian Doran
6d19e315f4 style(next): promoted attributes widget: improve appearance on narrow width 2025-02-22 10:19:26 +02:00
Adorian Doran
7269c1b0aa style(next): promoted attributes widget: improve appearance 2025-02-22 10:10:58 +02:00
Adorian Doran
8e69cf79a6 client: promoted attributes widget: add placeholder for blank input fields 2025-02-22 10:05:14 +02:00
Elian Doran
46f543ad54 Merge pull request #1207 from maphew/bare2share2
Bare2share - Redirect bare domain to defined #shareRoot
2025-02-22 09:25:30 +02:00
Elian Doran
38dbf6efcd Merge pull request #1220 from TriliumNext/feat_friendly-numbers-note-revision
feat: friendly numbers note revision
2025-02-22 09:24:37 +02:00
Elian Doran
8e68ddafd5 Merge pull request #1239 from TriliumNext/i18n_use-empty-string-instead-of-english
i18n: use empty string instead of English string
2025-02-22 09:24:14 +02:00
Elian Doran
0c43b387ce Merge pull request #1228 from TriliumNext/feat_friendly-numbers-protected_session_timeout
feat: friendly numbers protected session timeout
2025-02-22 09:23:23 +02:00
Elian Doran
8aa560eb82 Merge pull request #1243 from TriliumNext/renovate/typedoc-0.x
chore(deps): update dependency typedoc to v0.27.8
2025-02-22 09:22:23 +02:00
Elian Doran
3a2b8e9791 Merge pull request #1242 from TriliumNext/renovate/node-22.x
chore(deps): update dependency @types/node to v22.13.5
2025-02-22 09:22:09 +02:00
Elian Doran
468b3b6027 Merge pull request #1244 from TriliumNext/renovate/swagger-ui-express-4.x
fix(deps): update dependency @types/swagger-ui-express to v4.1.8
2025-02-22 09:21:48 +02:00
Elian Doran
f872073f65 Merge pull request #1245 from TriliumNext/renovate/ws-8.x
fix(deps): update dependency ws to v8.18.1
2025-02-22 09:21:23 +02:00
Elian Doran
ef4fc0a180 feat(html_sanitizer): enforce strict style rules (closes #931) 2025-02-22 09:18:47 +02:00
Adorian Doran
1d47df5f28 style(next): forms/input groups: improve CSS 2025-02-22 02:37:13 +02:00
Adorian Doran
77264b5385 style(next): forms/input groups: fix icons being skewed in certain conditions 2025-02-22 02:35:24 +02:00
Adorian Doran
41e925dc94 style(next): forms: add support for date and time input fields 2025-02-22 02:31:20 +02:00
Adorian Doran
789178061b style(next): promoted attributes widget: improve CSS, add right margin 2025-02-22 02:21:19 +02:00
renovate[bot]
8011969b9d fix(deps): update dependency ws to v8.18.1 2025-02-22 00:06:30 +00:00
renovate[bot]
9ab2fe85bd fix(deps): update dependency @types/swagger-ui-express to v4.1.8 2025-02-22 00:06:21 +00:00
renovate[bot]
6c818427fc chore(deps): update dependency typedoc to v0.27.8 2025-02-22 00:06:14 +00:00
renovate[bot]
7dab171a0c chore(deps): update dependency @types/node to v22.13.5 2025-02-22 00:06:04 +00:00
Adorian Doran
c680c3476b Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-02-22 02:05:22 +02:00
Adorian Doran
bf0b6ce554 style(next): promoted attributes widget: improve appearance 2025-02-22 02:05:19 +02:00
Elian Doran
bedc61c3d0 feat(import/zip): support UTF-16 LE with BOM (closes #1241) 2025-02-22 01:37:22 +02:00
Elian Doran
c925ae5f15 feat(import/single): support UTF-16 LE with BOM for markdown notes 2025-02-22 01:37:22 +02:00
Elian Doran
77ee7f96c1 feat(import/single): support UTF-16 LE with BOM for text notes 2025-02-22 01:37:22 +02:00
Elian Doran
cadd78524c feat(import/single): support UTF-16 LE with BOM for code notes 2025-02-22 01:37:22 +02:00
Elian Doran
fd4f35e879 feat(import/single): support UTF-16 LE with BOM for HTML 2025-02-22 01:37:22 +02:00
Adorian Doran
39f00bd568 style(next): promoted attributes widget: tweak input groups 2025-02-22 01:35:10 +02:00
Adorian Doran
ee2d4c6830 style(next): promoted attributes widget: tweak checkboxes 2025-02-22 01:30:55 +02:00
Adorian Doran
e93d47f664 style(next): promoted attributes widget: tweak buttons 2025-02-22 00:53:24 +02:00
Adorian Doran
0c88c4c3ee style(next): partially restyle the promoted attributes widget 2025-02-21 21:31:26 +02:00
Elian Doran
81bdd57398 feat(views/calendar): display event icon 2025-02-21 18:40:54 +02:00
Elian Doran
fe5182ebc6 feat(views/calendar): add option to show week numbers 2025-02-21 17:56:34 +02:00
Elian Doran
42d46bdb72 feat(views/calendar): add option to hide weekends 2025-02-21 17:56:34 +02:00
Elian Doran
710cf68c06 feat(views/calendar): make calendar full height 2025-02-21 17:56:34 +02:00
Elian Doran
300bb561bb Merge pull request #1240 from rom1dep/calendar_enh_color
feat(view/calendar): support coloring
2025-02-21 17:56:24 +02:00
Panagiotis Papadopoulos
96961898ca i18n: use empty string instead of English string
it will fallback to the English string by default
2025-02-21 08:04:43 +01:00
Panagiotis Papadopoulos
1520913686 i18n: use empty string instead of English string
it will fallback to the English string by default
2025-02-21 07:57:07 +01:00
Elian Doran
0e5b8af3a4 Merge remote-tracking branch 'origin/develop' into feature/task_list 2025-02-21 08:53:51 +02:00
Panagiotis Papadopoulos
6fae7a98f5 i18n: use empty string instead of English string
it will fallback to the English string by default
2025-02-21 07:41:50 +01:00
Elian Doran
57dc168c26 Merge pull request #1223 from TriliumNext/feat_timeSelector-min-input
feat: time selector add support for handling min required input
2025-02-20 22:49:14 +02:00
Elian Doran
946d9aee40 feat(settings/share): add subtitles 2025-02-20 22:34:51 +02:00
Elian Doran
16b16927ef feat(settings/share): add title to section 2025-02-20 22:08:04 +02:00
Elian Doran
c2e4def523 Merge branch 'develop' into feat_friendly-numbers-note-revision 2025-02-20 21:45:49 +02:00
Elian Doran
1e11625f14 Merge branch 'develop' into feat_friendly-numbers-protected_session_timeout 2025-02-20 21:45:30 +02:00
Elian Doran
5495677fc2 Merge branch 'develop' into feat_timeSelector-min-input 2025-02-20 21:45:24 +02:00
Elian Doran
2cefdf8b9f Merge pull request #1229 from McSido/feature/colorful-marker-icons
Enhance geomap marker icons with color
2025-02-20 21:43:42 +02:00
Elian Doran
57b3035559 feat(geomap): refresh map if color attribute is changed 2025-02-20 21:39:35 +02:00
Elian Doran
4f84ad8b81 Merge pull request #1230 from TriliumNext/renovate/tsx-4.x
chore(deps): update dependency tsx to v4.19.3
2025-02-20 21:31:28 +02:00
Elian Doran
1626767f30 Merge pull request #1231 from TriliumNext/renovate/vitest-monorepo
chore(deps): update vitest monorepo to v3.0.6
2025-02-20 21:30:57 +02:00
Elian Doran
91003af092 Merge pull request #1232 from TriliumNext/renovate/electron-forge-monorepo
chore(deps): update electron-forge monorepo to v7.7.0
2025-02-20 21:30:11 +02:00
Elian Doran
860de346a7 feat(import/single): treat mdx as markdown 2025-02-20 20:38:58 +02:00
Elian Doran
324a3d0d8b feat(import): trim .mdx extension from import 2025-02-20 20:29:00 +02:00
Elian Doran
f9e4ae7210 feat(import/zip): treat mdx as markdown (closes #1236) 2025-02-20 20:25:42 +02:00
matt wilkie
bdd6395a76 works! verify shareRoot is set and note is shared 2025-02-20 09:08:24 -07:00
Elian Doran
1c118f2aa9 feat(startup): display migration errors using system modal 2025-02-20 18:06:19 +02:00
Elian Doran
4010cb2789 Merge branch 'develop' into renovate/electron-forge-monorepo 2025-02-20 17:35:40 +02:00
Elian Doran
f83beafd76 Merge branch 'develop' into renovate/vitest-monorepo 2025-02-20 17:35:38 +02:00
Elian Doran
366264f3a9 Merge branch 'develop' into renovate/tsx-4.x 2025-02-20 17:35:35 +02:00
Elian Doran
ba91ed1855 Merge branch 'develop' into feature/colorful-marker-icons 2025-02-20 17:34:54 +02:00
Elian Doran
ef487f46d1 Merge branch 'develop' into feature/task_list 2025-02-20 17:34:36 +02:00
matt wilkie
2734e230ab WIP: 1st step at verifying shareRoot is set 2025-02-20 08:12:51 -07:00
Elian Doran
ca1d5207d8 fix(build): try using ARM runner for building docker 2025-02-20 17:10:16 +02:00
Elian Doran
f6b6b2e740 feat(test): ensure backend translations are valid JSON 2025-02-20 12:42:42 +02:00
Elian Doran
c255af67c9 fix(i18n): Chinese translations missing due to invalid JSON 2025-02-20 12:40:11 +02:00
Elian Doran
34b4e6d069 feat(test): ensure frontend translations are valid JSON 2025-02-20 12:39:56 +02:00
Elian Doran
4e01534d76 refactor(i18n): move list of locales out of options 2025-02-20 12:27:33 +02:00
Elian Doran
a433c9c189 feat(tasks): add SQL migration 2025-02-20 12:07:10 +02:00
renovate[bot]
fa05f15753 chore(deps): update electron-forge monorepo to v7.7.0 2025-02-20 02:57:15 +00:00
renovate[bot]
68c7df797d chore(deps): update vitest monorepo to v3.0.6 2025-02-20 02:57:00 +00:00
renovate[bot]
587a051430 chore(deps): update dependency tsx to v4.19.3 2025-02-20 02:56:46 +00:00
McSido
04a6175630 feat(geomap): enhance icon building to include color class 2025-02-19 22:52:38 +01:00
Panagiotis Papadopoulos
bf6c5dfb20 i18n: adjust protected_session_timeout_label
we are not limited to seconds now anymore (at least in the UI :-))
2025-02-19 22:45:07 +01:00
Panagiotis Papadopoulos
19816493d6 chore: rename ProtectedSessionTimeoutOption to plural
matches the remaining Options widgets
2025-02-19 22:37:08 +01:00
Panagiotis Papadopoulos
cecde349b7 feat: add ProtectedSessionTimeoutOption to content_widget 2025-02-19 22:35:02 +01:00
Panagiotis Papadopoulos
1a80a379dc refactor(password): move password.ts to password subfolder 2025-02-19 22:32:48 +01:00
Panagiotis Papadopoulos
739eaf9fc0 refactor(password): remove protected_session_timeout TPL element
-> now part of protected_session_timeout widget
2025-02-19 22:27:35 +01:00
Panagiotis Papadopoulos
7f173b287a feat(protected_session_timeout): add minimumSeconds 2025-02-19 22:21:49 +01: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
Matt Wilkie
5a6c3ae426 use the standard classes
per @pano9000 advice, https://github.com/TriliumNext/Notes/pull/1207#issuecomment-2667896424
2025-02-19 08:33:03 -07:00
Elian Doran
6b5d905ebe fix(client/file): flicker when too big alert is not needed 2025-02-19 13:43:50 +02:00
Elian Doran
61f2e35717 feat(client/file): trim big files in order to improve performance 2025-02-19 13:41:05 +02:00
Elian Doran
4a34d5b2df Merge pull request #1227 from greg1904/feat/german_translation
feat/german translation - adding missing translations from base english and adding adjustments of inconsistent german translations
2025-02-19 09:39:37 +02:00
greg1904
549917c1f1 small consistency adjustment 2025-02-18 23:56:15 +01:00
greg1904
4ed3a28e29 german adjustments 2025-02-18 23:49:27 +01:00
greg1904
c261bf7f7a Kind --> Unternotiz and some other additions 2025-02-18 23:30:14 +01:00
greg1904
62c9e865f5 added some fields in translation.json + switched "Hinweis" to "Notiz" 2025-02-18 23:12:57 +01:00
Panagiotis Papadopoulos
bd75a26803 feat: use TimeSelector for protected_session_timeout
to be used in the Password options
2025-02-18 22:37:20 +01:00
Panagiotis Papadopoulos
9a1d26e129 feat: add protectedSessionTimeoutScale option
to be used in the protected_session_timeout widget, when it is ported to use TimeSelector
2025-02-18 22:37:20 +01:00
Panagiotis Papadopoulos
bf41c54bd0 feat: set TimeSelector minimumSeconds for revision_snapshot_interval and remove TODO 2025-02-18 22:32:43 +01:00
Panagiotis Papadopoulos
28148b32d2 i18n: adjust labels for update revision_snapshot_interval options
we don't do seconds only anymore, so strings needed adjusting
2025-02-18 22:29:56 +01:00
Panagiotis Papadopoulos
eb08a976dd feat: use TimeSelector for revision_snapshot_interval
added one TODO that needs to be handled in TimeSelector: minimum allowed value (!in seconds!)
2025-02-18 22:29:56 +01:00
Panagiotis Papadopoulos
eeb99cf37c feat: add revisionSnapshotTimeIntervalTimeScale option
to be used in the revision_snapshot_interval widget, when it is ported to use TimeSelector
2025-02-18 22:29:56 +01:00
Panagiotis Papadopoulos
a0c2715980 i18n(time_selector): add i18n for minimum_input 2025-02-18 22:26:32 +01:00
greg1904
e35ff07b9b Launchbar --> Startleiste 2025-02-18 22:25:05 +01:00
Panagiotis Papadopoulos
ce1f418aa7 feat(time_selector): make use of optionsService 2025-02-18 22:18:58 +01:00
greg1904
fbc4206908 adding new fields for launchbar to german translation 2025-02-18 22:18:55 +01:00
Panagiotis Papadopoulos
bb4c3ae6ff feat(time_selector): add minimumSeconds handling 2025-02-18 22:18:11 +01:00
Panagiotis Papadopoulos
0332ade13c refactor(time_selector): simplify setting of includedTimeScales 2025-02-18 22:16:13 +01:00
Panagiotis Papadopoulos
2d968b8e9c refactor(time_selector): mark methods as private 2025-02-18 22:15:36 +01:00
Panagiotis Papadopoulos
fd2c65dcc0 feat(time_selector): add minimumSeconds class property 2025-02-18 22:14:56 +01: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
Matt Wilkie
aab35955bf remove duplicated sync_2 2025-02-17 16:45:47 -07:00
Romain DEP.
bcb40b531f feat(view/calendar): support coloring 2025-02-17 22:20:20 +01:00
Matt Wilkie
32bb43f9c1 fix indent 2025-02-17 13:55:55 -07:00
Matt Wilkie
86ab2d4008 Merge remote-tracking branch 'origin/develop' into bare2share2
# Conflicts:
#	src/public/translations/en/translation.json
2025-02-17 13:54:40 -07:00
Matt Wilkie
657638ee54 responding to code review (thanks pano!) 2025-02-17 13:46:03 -07:00
Elian Doran
50d37bbcb1 chore(client/ts): port note_type 2025-02-17 22:28:54 +02:00
Elian Doran
6706332be3 Merge pull request #1204 from TriliumNext/feat_timeScaleSelectWidget
feat: add time selector option widget
2025-02-17 22:23:29 +02:00
Matt Wilkie
2ec2d784ec results of npx prettier 2025-02-17 13:19:55 -07:00
Elian Doran
16caae191e fix(geomap): stuck viewport and zoom when switching between two geomaps 2025-02-17 21:59:02 +02:00
Elian Doran
c7d75b759c feat(webview): remove disclaimer 2025-02-17 21:50:59 +02:00
Elian Doran
b837c57d06 chore(lock): update 2025-02-17 21:49:34 +02:00
Elian Doran
ef3a75d58e feat(webview): set up some sandboxing for <iframe> 2025-02-17 21:49:24 +02:00
Elian Doran
59b474df35 feat(webview): render in browser using iframe 2025-02-17 21:26:00 +02:00
Elian Doran
fd47412d51 chore(client/ts): port web_view 2025-02-17 21:22:58 +02:00
Elian Doran
237f2ead73 fix(ci): server platform name missing due to invalid input 2025-02-17 21:16:53 +02:00
Elian Doran
558bee72e9 fix(ci): add missing zip for Windows on nightly 2025-02-17 21:15:12 +02:00
Elian Doran
ed082f34d5 fix(ci): add missing zip for Windows 2025-02-17 21:01:06 +02:00
Elian Doran
fabafeac86 fix(ci): missing os name in server release artifact 2025-02-17 19:53:25 +02:00
Panagiotis Papadopoulos
d26d668741 feat(time_selector): avoid "template concatenation" 2025-02-17 09:00:44 +01:00
Panagiotis Papadopoulos
fc8f805b28 i18n(time_selector): adjust attachment erasure message
as we now are allowing entering the time in other formats (minutes, hours, days) – it doesn't make sense for the label to say "after X seconds".
2025-02-17 06:52:29 +01:00
matt wilkie
ed8b8e50a4 feature complete; tested and working on local linux machine 2025-02-16 22:47:50 -07:00
matt wilkie
bc66e98533 okay, we can start npm server now, but new db redirects to share 2025-02-16 22:17:59 -07:00
matt wilkie
7af4e52766 brought over changes from 879035d
The last known good state before I got sidetracked into docker changes
2025-02-16 21:29:38 -07:00
Panagiotis Papadopoulos
ccbed7bbc3 feat(time_selector): use showError since this is an error 2025-02-16 18:30:56 +01:00
Panagiotis Papadopoulos
10ba467202 chore(prettier): run prettier on time_selector related files 2025-02-16 18:30:56 +01:00
Panagiotis Papadopoulos
793b0c9fe8 feat(time_selector): add possibility to omit time scales 2025-02-16 18:30:56 +01:00
Panagiotis Papadopoulos
35a3d326f7 i18n(time_selector): translate invalid_input message 2025-02-16 18:30:56 +01:00
Panagiotis Papadopoulos
f672054441 feat(time_selector): use time_selector in attachment_erasure_timeout 2025-02-16 18:30:56 +01:00
Panagiotis Papadopoulos
e0e530b219 feat(time_selector): use time_selector in note_erasure_timeout 2025-02-16 18:30:56 +01:00
Panagiotis Papadopoulos
c0714a92d5 feat(time_selector): add time_selector options widget 2025-02-16 18:30:56 +01:00
Elian Doran
565989dd4c feat(client/ts): port tree (WIP) 2025-01-30 10:14:10 +02:00
370 changed files with 11471 additions and 4526 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";
done
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

@@ -1,4 +1,7 @@
inputs:
os:
description: "One of the supported platforms: windows"
required: true
arch:
description: "The architecture to build for: x64, arm64"
required: true

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
@@ -45,7 +49,7 @@ jobs:
with:
node-version: 20
cache: "npm"
- run: npm ci
- run: npm ci
- name: Run the TypeScript build
run: npx tsc
- name: Create server-package.json
@@ -55,7 +59,7 @@ jobs:
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max
test_docker:
name: Check Docker build
runs-on: ubuntu-latest
@@ -69,7 +73,7 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set IMAGE_NAME to lowercase
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV
- name: Set TEST_TAG to lowercase
@@ -83,12 +87,12 @@ jobs:
with:
node-version: 20
cache: "npm"
- run: npm ci
- name: Run the TypeScript build
run: npx tsc
- name: Create server-package.json
run: cat package.json | grep -v electron > server-package.json
@@ -101,12 +105,12 @@ jobs:
tags: ${{ env.TEST_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Validate container run output
run: |
CONTAINER_ID=$(docker run -d --log-driver=journald --rm --name trilium_local ${{ env.TEST_TAG }})
echo "Container ID: $CONTAINER_ID"
- name: Wait for the healthchecks to pass
uses: stringbean/docker-healthcheck-action@v3
with:

View File

@@ -33,7 +33,7 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set IMAGE_NAME to lowercase
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV
- name: Set TEST_TAG to lowercase
@@ -47,16 +47,16 @@ jobs:
with:
node-version: 20
cache: "npm"
- name: Install npm dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run the TypeScript build
run: npx tsc
- name: Create server-package.json
run: cat package.json | grep -v electron > server-package.json
@@ -69,12 +69,12 @@ jobs:
tags: ${{ env.TEST_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Validate container run output
run: |
CONTAINER_ID=$(docker run -d --log-driver=journald --rm --network=host -e TRILIUM_PORT=8082 --volume ./integration-tests/db:/home/node/trilium-data --name trilium_local ${{ env.TEST_TAG }})
echo "Container ID: $CONTAINER_ID"
- name: Wait for the healthchecks to pass
uses: stringbean/docker-healthcheck-action@v3
with:
@@ -82,7 +82,7 @@ jobs:
wait-time: 50
require-status: running
require-healthy: true
- name: Run Playwright tests
run: TRILIUM_DOCKER=1 npx playwright test
- uses: actions/upload-artifact@v4
@@ -100,7 +100,20 @@ jobs:
build:
name: Build Docker images
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dockerfile: Dockerfile.alpine
platform: linux/amd64
image: ubuntu-latest
- dockerfile: Dockerfile
platform: linux/arm64
image: ubuntu-24.04-arm
- dockerfile: Dockerfile
platform: linux/arm/v7
image: ubuntu-24.04-arm
runs-on: ${{ matrix.image }}
needs:
- test_docker
permissions:
@@ -108,16 +121,6 @@ jobs:
packages: write
attestations: write
id-token: write
strategy:
fail-fast: false
matrix:
include:
- dockerfile: Dockerfile.alpine
platform: linux/amd64
- dockerfile: Dockerfile
platform: linux/arm64
- dockerfile: Dockerfile
platform: linux/arm/v7
steps:
- name: Prepare
run: |
@@ -144,13 +147,13 @@ jobs:
type=sha
flavor: |
latest=false
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up node & dependencies
uses: actions/setup-node@v4
@@ -169,14 +172,14 @@ jobs:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKERHUB_REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
@@ -186,13 +189,13 @@ jobs:
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
@@ -220,7 +223,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
@@ -237,14 +240,14 @@ jobs:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKERHUB_REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
@@ -255,7 +258,7 @@ jobs:
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
-t ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${REF_NAME} \
$(printf '${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
-t ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:${REF_NAME} \
$(printf '${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
@@ -267,25 +270,25 @@ jobs:
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
-t ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:stable \
$(printf '${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
-t ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:stable \
$(printf '${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
# Small delay to ensure stable tag is fully propagated
sleep 5
# Now update latest tags
docker buildx imagetools create \
-t ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:stable
docker buildx imagetools create \
-t ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:stable
fi
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}

View File

@@ -29,7 +29,7 @@ jobs:
extension: [deb, rpm, zip, flatpak]
- name: windows
image: windows-latest
extension: exe
extension: [exe, zip]
runs-on: ${{ matrix.os.image }}
steps:
- uses: actions/checkout@v4
@@ -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:
@@ -26,7 +26,7 @@ jobs:
extension: [deb, rpm, zip, flatpak]
- name: windows
image: windows-latest
extension: exe
extension: [exe, zip]
runs-on: ${{ matrix.os.image }}
steps:
- uses: actions/checkout@v4
@@ -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
@@ -75,6 +83,7 @@ jobs:
- name: Run the build
uses: ./.github/actions/build-server
with:
os: linux
arch: ${{ matrix.arch }}
- name: Publish release

View File

@@ -26,7 +26,7 @@ jobs:
extension: [deb, rpm, zip, flatpak]
- name: windows
image: windows-latest
extension: exe
extension: [exe, zip]
runs-on: ${{ matrix.os.image }}
steps:
- uses: actions/checkout@v4
@@ -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:
@@ -65,6 +74,7 @@ jobs:
- name: Run the build
uses: ./.github/actions/build-server
with:
os: linux
arch: ${{ matrix.arch }}
- name: Publish release

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

@@ -2,4 +2,5 @@
*.md
*.yml
libraries/*
docs/*
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";
/*
@@ -11,28 +11,30 @@ import fs from "fs";
*/
const options = {
definition: {
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).",
contact: {
name: "TriliumNext issue tracker",
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",
},
definition: {
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).",
contact: {
name: "TriliumNext issue tracker",
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"
}
}
},
},
apis: [
// Put individual files here to have them ordered first.
'./src/routes/api/setup.ts',
// all other files
'./src/routes/api/*.ts', './bin/generate-openapi.js'
],
apis: [
// Put individual files here to have them ordered first.
"./src/routes/api/setup.ts",
// all other files
"./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}`, {
headers: {
"x-csrf-token": csrfToken
}
})).toBeOK();
await expect(
await this.page.request.put(`${BASE_URL}/api/options/${key}/${value}`, {
headers: {
"x-csrf-token": csrfToken
}
})
).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,33 +17,39 @@ 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) => {
for (const resource of extraResourcesForPlatform) {
const baseName = path.basename(resource);
// Only move resources on non-macOS platforms
if (platform !== "darwin") {
for (const resource of extraResourcesForPlatform) {
const baseName = path.basename(resource);
const sourcePath = path.join(buildPath, "resources", baseName);
// prettier-ignore
const sourcePath = (platform === "darwin")
? path.join(buildPath, `${APP_NAME}.app`, "Contents", "Resources", baseName)
: path.join(buildPath, "resources", baseName);
// prettier-ignore
const destPath = (baseName !== "256x256.png")
? path.join(buildPath, baseName)
: path.join(buildPath, "icon.png");
// 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));
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.

3369
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.0-beta",
"version": "0.92.3-beta",
"license": "AGPL-3.0-only",
"main": "./dist/electron-main.js",
"author": {
@@ -26,41 +26,39 @@
"server:start-test": "npm run server:switch && rimraf ./data-test && cross-env TRILIUM_DATA_DIR=./data-test TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev TRILIUM_PORT=9999 nodemon src/main.ts",
"server:qstart": "npm run server:switch && npm run server:start",
"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",
"docs:build-backend": "rimraf ./docs/backend_api && typedoc ./docs/backend_api src/becca/entities/*.ts src/services/backend_script_api.ts src/services/sql.ts",
"docs:build-frontend": "rimraf ./docs/frontend_api && jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/basic_widget.js src/public/app/widgets/note_context_aware_widget.js src/public/app/widgets/right_panel_widget.js",
"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 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",
@@ -78,17 +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.7",
"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.1.0",
"cheerio": "1.0.0",
"chokidar": "4.0.3",
"cls-hooked": "4.2.2",
@@ -109,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",
@@ -118,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",
@@ -131,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",
@@ -153,30 +145,31 @@
"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",
"ws": "8.18.0",
"ws": "8.18.1",
"xml2js": "0.6.2",
"yauzl": "3.2.0"
},
"devDependencies": {
"@electron-forge/cli": "7.6.1",
"@electron-forge/maker-deb": "7.6.1",
"@electron-forge/maker-dmg": "7.6.1",
"@electron-forge/maker-flatpak": "7.6.1",
"@electron-forge/maker-rpm": "7.6.1",
"@electron-forge/maker-squirrel": "7.6.1",
"@electron-forge/maker-zip": "7.6.1",
"@electron-forge/plugin-auto-unpack-natives": "7.6.1",
"@electron-forge/cli": "7.7.0",
"@electron-forge/maker-deb": "7.7.0",
"@electron-forge/maker-dmg": "7.7.0",
"@electron-forge/maker-flatpak": "7.7.0",
"@electron-forge/maker-rpm": "7.7.0",
"@electron-forge/maker-squirrel": "7.7.0",
"@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",
@@ -194,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.4",
"@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",
@@ -207,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.5",
"@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.2",
"typedoc": "0.27.7",
"typescript": "5.7.3",
"vitest": "3.0.5",
"tsx": "4.19.3",
"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,68 +14,70 @@ const SERVER_URL = 'http://127.0.0.1:8082';
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
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. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* 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',
/* 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,
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. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* 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",
/* 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',
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry"
},
// {
// name: 'firefox',
// use: { ...devices['Desktop Firefox'] },
// },
/* Configure projects for major browsers */
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] }
}
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] },
// },
// {
// name: 'firefox',
// use: { ...devices['Desktop Firefox'] },
// },
/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] },
// },
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],
/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },
/* Run your local dev server before starting the tests */
webServer: !process.env.TRILIUM_DOCKER ? {
command: 'npm run test:integration-mem-db-dev',
url: SERVER_URL,
reuseExistingServer: !process.env.CI,
} : undefined,
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],
/* Run your local dev server before starting the tests */
webServer: !process.env.TRILIUM_DOCKER
? {
command: "npm run test:integration-mem-db-dev",
url: SERVER_URL,
reuseExistingServer: !process.env.CI
}
: undefined
});

View File

@@ -6,4 +6,4 @@ etapi.describeEtapi("app_info", () => {
expect(appInfo.clipperProtocolVersion).toEqual("1.0");
});
});
*/
*/

View File

@@ -7,4 +7,4 @@ etapi.describeEtapi("backup", () => {
expect(response.status).toEqual(204);
});
});
*/
*/

View File

@@ -23,4 +23,4 @@ etapi.describeEtapi("import", () => {
expect(content).toContain("test export content");
});
});
*/
*/

View File

@@ -100,4 +100,4 @@ etapi.describeEtapi("notes", () => {
expect(error.message).toEqual(`Note '${note.noteId}' not found.`);
});
});
*/
*/

View File

@@ -1,3 +1,35 @@
/**
* Reads the level of indentation of the first line and trims the identation for all the text by that amount.
*
* For example, for:
*
* ```json
* {
* "hello": "world"
* }
* ```
*
* it results in:
*
* ```json
* {
* "hello": "world"
* }
* ```
*
* This is meant to be used as a template string, where it allows the indentation of the template without affecting whitespace changes.
*
* @example const html = trimIndentation`\
* <h1>Heading 1</h1>
* <h2>Heading 2</h2>
* <h3>Heading 3</h3>
* <h4>Heading 4</h4>
* <h5>Heading 5</h5>
* <h6>Heading 6</h6>
* `;
* @param strings
* @returns
*/
export function trimIndentation(strings: TemplateStringsArray) {
const str = strings.toString();

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();

File diff suppressed because it is too large Load Diff

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="../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>

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.

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 515 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 397 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 KiB

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

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