You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-17 23:27:48 +02:00
Compare commits
456 Commits
android-v2
...
mac-binary
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
357277cda0 | ||
|
|
8c1568ae81 | ||
|
|
66e479d13d | ||
|
|
700c1410fa | ||
|
|
3873e15a21 | ||
|
|
72ec2d3b1e | ||
|
|
7eddbc7002 | ||
|
|
d593ed130e | ||
|
|
b2eabb3836 | ||
|
|
5e1c789926 | ||
|
|
4f552b396c | ||
|
|
132bcbd477 | ||
|
|
8f6192464b | ||
|
|
897addec4e | ||
|
|
f3eea43d24 | ||
|
|
8babaddbcb | ||
|
|
13cdaabb17 | ||
|
|
a94aa21088 | ||
|
|
6116bed4e3 | ||
|
|
fabd0b4dda | ||
|
|
6b72f86e7b | ||
|
|
02cf546124 | ||
|
|
eecb012d64 | ||
|
|
04e9b40769 | ||
|
|
efdbaeb397 | ||
|
|
46425b920c | ||
|
|
f5be43c2ac | ||
|
|
51e865c467 | ||
|
|
080541a2fe | ||
|
|
ac8b3ae0cc | ||
|
|
0b3919fd62 | ||
|
|
7dc638edf4 | ||
|
|
db69125e8f | ||
|
|
3b686194d8 | ||
|
|
ccabc778f6 | ||
|
|
5c2640f88f | ||
|
|
eca0f92dff | ||
|
|
260fa6c038 | ||
|
|
8ec6bc9138 | ||
|
|
93fa92369b | ||
|
|
56b9c9fbc9 | ||
|
|
bc6c5ab7a7 | ||
|
|
c68d196baa | ||
|
|
1826625e4f | ||
|
|
20b8fb2719 | ||
|
|
f813e71b29 | ||
|
|
02422a6e31 | ||
|
|
69a34e87f3 | ||
|
|
cbeaa16b61 | ||
|
|
05917ac142 | ||
|
|
897fd0f727 | ||
|
|
9edb402b18 | ||
|
|
36ae58ffe1 | ||
|
|
5ef8b86957 | ||
|
|
c7228cfcd6 | ||
|
|
7a791dbf98 | ||
|
|
a543588527 | ||
|
|
998ad142a6 | ||
|
|
b6a53f96f7 | ||
|
|
841a9c6e09 | ||
|
|
d25c078ef0 | ||
|
|
0c8de68b80 | ||
|
|
44d93d52d3 | ||
|
|
073bec9e8c | ||
|
|
e6a8c2bea5 | ||
|
|
81c316cd2c | ||
|
|
659c851960 | ||
|
|
572701d9a0 | ||
|
|
ff69ac17be | ||
|
|
b44945b3a0 | ||
|
|
2584224026 | ||
|
|
46136871bf | ||
|
|
66ef37bd4e | ||
|
|
9ddf75604d | ||
|
|
3ed7e1d7e8 | ||
|
|
b2b412105a | ||
|
|
60a3c4f65e | ||
|
|
9645414c17 | ||
|
|
af0136ef39 | ||
|
|
b76586c4fd | ||
|
|
376e4ebde0 | ||
|
|
1439b8787f | ||
|
|
b8854a99be | ||
|
|
6cf02173dc | ||
|
|
4d8a53d8c9 | ||
|
|
7f43718e1d | ||
|
|
690ce637b1 | ||
|
|
4d023e679e | ||
|
|
6e220a978f | ||
|
|
39757cd90e | ||
|
|
5ccbbea757 | ||
|
|
309222c082 | ||
|
|
50f5fe2c91 | ||
|
|
eacae83182 | ||
|
|
403d770b1d | ||
|
|
a481bf1b53 | ||
|
|
0d32570c9e | ||
|
|
f017e99b02 | ||
|
|
a89d64d435 | ||
|
|
3a27086534 | ||
|
|
413c1e41b5 | ||
|
|
8b879464b8 | ||
|
|
97c9bbc1fe | ||
|
|
e5bebef7b2 | ||
|
|
73752c4b3f | ||
|
|
dcf7c9838d | ||
|
|
f325e7694b | ||
|
|
75d204c9ca | ||
|
|
cf4008951d | ||
|
|
d67818d096 | ||
|
|
6aaea8ad4f | ||
|
|
de41278096 | ||
|
|
f01ab70907 | ||
|
|
bbdb221a67 | ||
|
|
7d053f8c79 | ||
|
|
fcad0bf3ca | ||
|
|
58f929f6b5 | ||
|
|
943198c56e | ||
|
|
2112ad4004 | ||
|
|
5995dc81f3 | ||
|
|
104e752634 | ||
|
|
fc335cd15d | ||
|
|
45923ba0d3 | ||
|
|
8fefa99d81 | ||
|
|
85d652cd67 | ||
|
|
88e41e9c7d | ||
|
|
26750488d0 | ||
|
|
a0f582b2b9 | ||
|
|
917b53bec2 | ||
|
|
e44a93422a | ||
|
|
e115ef4259 | ||
|
|
bcec699124 | ||
|
|
d23c728a1a | ||
|
|
0a2d507dec | ||
|
|
0c08617606 | ||
|
|
29fba45c33 | ||
|
|
1071a455b6 | ||
|
|
57e4b36fd7 | ||
|
|
f08fa92294 | ||
|
|
3a8d87d292 | ||
|
|
53302c9e90 | ||
|
|
28a24d8c03 | ||
|
|
3e52411bc4 | ||
|
|
1548ea18e1 | ||
|
|
f8cd1ba8e5 | ||
|
|
d18a4be31f | ||
|
|
c56f270ed6 | ||
|
|
2bca3d1032 | ||
|
|
9f81d69c5e | ||
|
|
815419260d | ||
|
|
6729a3d51f | ||
|
|
6d8ce280dd | ||
|
|
9e5b455065 | ||
|
|
09cbac3019 | ||
|
|
5354ad3934 | ||
|
|
7754048b80 | ||
|
|
ffeeff260f | ||
|
|
71ea74d273 | ||
|
|
3a744c79ae | ||
|
|
d9ba27a1ec | ||
|
|
0a3540049c | ||
|
|
ab50ca9bbd | ||
|
|
0bee793ab8 | ||
|
|
89fc5e19d9 | ||
|
|
6a3bf51084 | ||
|
|
df1e298c84 | ||
|
|
b9c706324b | ||
|
|
ab7e2de1d9 | ||
|
|
7ef8753b94 | ||
|
|
d48a5efa03 | ||
|
|
0804b62ffb | ||
|
|
37995b9ec7 | ||
|
|
7a3e6fde7f | ||
|
|
bd4291462e | ||
|
|
489d6778db | ||
|
|
538a1413d9 | ||
|
|
3c9b755045 | ||
|
|
fd7b345efa | ||
|
|
c96468149a | ||
|
|
d6d4897e1c | ||
|
|
e07e248fea | ||
|
|
b561460307 | ||
|
|
f6d1a27f51 | ||
|
|
80a1500634 | ||
|
|
bcb578c933 | ||
|
|
75ad454971 | ||
|
|
e90b7f2d81 | ||
|
|
ffca11ca8a | ||
|
|
bd98951d32 | ||
|
|
9106fb82f3 | ||
|
|
5c6e17bc89 | ||
|
|
538e9e9b4e | ||
|
|
d871b3c7d6 | ||
|
|
99c6c9b411 | ||
|
|
3eca4ada5a | ||
|
|
19431abc73 | ||
|
|
3e299f1ab9 | ||
|
|
42873d3829 | ||
|
|
4983327f90 | ||
|
|
fddbe6cf6c | ||
|
|
57f00c612d | ||
|
|
235288e903 | ||
|
|
38be744c3e | ||
|
|
2384ec8792 | ||
|
|
85f7caa0eb | ||
|
|
ad0f0414c4 | ||
|
|
437320f90c | ||
|
|
c1db7182ac | ||
|
|
aa4af69afc | ||
|
|
21a39af97b | ||
|
|
0812cc5944 | ||
|
|
1fb5d2c6c5 | ||
|
|
1b9901d232 | ||
|
|
f15d2793cc | ||
|
|
ad4d71dbe1 | ||
|
|
4bee6ffc90 | ||
|
|
01f63b3d97 | ||
|
|
b19b590efc | ||
|
|
6b7577f94d | ||
|
|
4d09b14522 | ||
|
|
9f1e95324d | ||
|
|
f98314346d | ||
|
|
fa659b615a | ||
|
|
e4aafa7edb | ||
|
|
811c40b074 | ||
|
|
405c528ef0 | ||
|
|
a176216374 | ||
|
|
8d0b090f66 | ||
|
|
337c5ed61c | ||
|
|
b32d39860b | ||
|
|
a091608f72 | ||
|
|
9686ee7833 | ||
|
|
3b55dcac65 | ||
|
|
d524d11d8a | ||
|
|
9c080ec631 | ||
|
|
da11476fd7 | ||
|
|
d157b9cfc7 | ||
|
|
bc8c61748a | ||
|
|
3ad727889b | ||
|
|
8df128bb7a | ||
|
|
5a4568f4db | ||
|
|
170295919a | ||
|
|
2262cbfdfd | ||
|
|
43e40bcf5a | ||
|
|
e60595f0de | ||
|
|
527a7c115d | ||
|
|
c22f910500 | ||
|
|
667b7969ff | ||
|
|
1bbf065142 | ||
|
|
606cad3c3a | ||
|
|
c9612dc8b8 | ||
|
|
6ee30e22a6 | ||
|
|
a6536e1ef9 | ||
|
|
92cf5abd08 | ||
|
|
d1e545ac2c | ||
|
|
ec6567c68d | ||
|
|
3b236307f7 | ||
|
|
14ac54bf3d | ||
|
|
e53b796523 | ||
|
|
9d189b2b34 | ||
|
|
84545cf26d | ||
|
|
c427a6d0a5 | ||
|
|
42dc6e1ea6 | ||
|
|
431b95ff7b | ||
|
|
041fb731a6 | ||
|
|
5289f80394 | ||
|
|
6c12ce0e04 | ||
|
|
46982c7d64 | ||
|
|
359448eb69 | ||
|
|
32bb256cca | ||
|
|
219585bbcf | ||
|
|
1a9dbcbd1d | ||
|
|
6a9848ebe7 | ||
|
|
9e73d3590b | ||
|
|
08c9a25182 | ||
|
|
5b9a45dc1d | ||
|
|
9dd2fb9674 | ||
|
|
234b5c8363 | ||
|
|
1dc7ec3701 | ||
|
|
72773caf58 | ||
|
|
094249d074 | ||
|
|
c324f17453 | ||
|
|
25a31b0689 | ||
|
|
f2995dd196 | ||
|
|
ca575162f7 | ||
|
|
f0ade02435 | ||
|
|
b13c02017a | ||
|
|
716c8c1ce4 | ||
|
|
30a49b84ad | ||
|
|
b8e4150bfd | ||
|
|
ed0edcb36c | ||
|
|
e93046e8e2 | ||
|
|
18a0ca0881 | ||
|
|
21dbc800d5 | ||
|
|
5c1eda3392 | ||
|
|
1139317788 | ||
|
|
a24ccb8da9 | ||
|
|
0aaa396315 | ||
|
|
f9dc19e1c4 | ||
|
|
1839724d7c | ||
|
|
a5aeb3a2f8 | ||
|
|
d5d57aa360 | ||
|
|
9aa5df7790 | ||
|
|
a7697465a8 | ||
|
|
aeb7e5ce47 | ||
|
|
42cef1e918 | ||
|
|
b832930512 | ||
|
|
057ac550bd | ||
|
|
3a14b76a61 | ||
|
|
e1a8c76598 | ||
|
|
b62e6552cd | ||
|
|
ca6e50e80c | ||
|
|
ad8947a85d | ||
|
|
fb562210b2 | ||
|
|
34940d1c4f | ||
|
|
7fa1459dc3 | ||
|
|
625689dbb1 | ||
|
|
dc976047d2 | ||
|
|
a014e830e7 | ||
|
|
1e828bfdca | ||
|
|
60309ec6a3 | ||
|
|
aabba090b1 | ||
|
|
6ae903ef4d | ||
|
|
dd86940c6b | ||
|
|
7d7b7ed6f3 | ||
|
|
8de904cd3c | ||
|
|
c706b8dd2f | ||
|
|
d55d4d42e5 | ||
|
|
bbfeffec69 | ||
|
|
3c471dc120 | ||
|
|
be0fa69b3b | ||
|
|
bf1bdf0951 | ||
|
|
a1a10a6c55 | ||
|
|
02e8307093 | ||
|
|
285a3a211e | ||
|
|
80cb1471fc | ||
|
|
a7a194f835 | ||
|
|
41a0b3359a | ||
|
|
1f70357d37 | ||
|
|
107f2e128e | ||
|
|
e1cd8d9b85 | ||
|
|
293f621e46 | ||
|
|
c5b551bbcb | ||
|
|
ac776eabc1 | ||
|
|
05c17fbfac | ||
|
|
6b9de394ca | ||
|
|
bef9a29581 | ||
|
|
1546aad7e9 | ||
|
|
fe47fef261 | ||
|
|
288f4ab43b | ||
|
|
294cbaea4d | ||
|
|
f5fc1f2f22 | ||
|
|
c90865c4d2 | ||
|
|
322641ccd6 | ||
|
|
2656666ed8 | ||
|
|
2d673902a4 | ||
|
|
631c41a1ff | ||
|
|
7841c99c02 | ||
|
|
ac75d8f6ac | ||
|
|
200ff617dc | ||
|
|
bbdc18f371 | ||
|
|
0d35b64f9a | ||
|
|
765c4482d6 | ||
|
|
0a0e31a37c | ||
|
|
0c1f4031b4 | ||
|
|
9ed022458b | ||
|
|
ba5f0bc6e3 | ||
|
|
793e8f6c0f | ||
|
|
6182ce521d | ||
|
|
544c50663a | ||
|
|
53aa9e2b42 | ||
|
|
884260189c | ||
|
|
2f9464f21f | ||
|
|
c6e993b04a | ||
|
|
89eb012b25 | ||
|
|
1e2aa4e2b5 | ||
|
|
0019bb8d6b | ||
|
|
e629a4d325 | ||
|
|
049c769d37 | ||
|
|
47aed8742a | ||
|
|
8aad67ccfe | ||
|
|
af7cbcbca7 | ||
|
|
88a91314af | ||
|
|
9873c2d756 | ||
|
|
46b68cf461 | ||
|
|
6b96b1f355 | ||
|
|
dc819700bb | ||
|
|
1d1d5fea06 | ||
|
|
c3afc0ede7 | ||
|
|
2092110a6e | ||
|
|
fc940e9a7c | ||
|
|
8718310dd0 | ||
|
|
1b527f2bbe | ||
|
|
4da217bc2f | ||
|
|
d3abd4ebf2 | ||
|
|
38851edf86 | ||
|
|
05efb765d6 | ||
|
|
28dc4a6abd | ||
|
|
2f7b56f96f | ||
|
|
fdaa3735fb | ||
|
|
7dfaea12f7 | ||
|
|
18199b27d9 | ||
|
|
a7c52082bb | ||
|
|
3b5357e0c1 | ||
|
|
10dd4e45ed | ||
|
|
1963835309 | ||
|
|
46ec0c1381 | ||
|
|
bb84ae4d68 | ||
|
|
b3ff53c0da | ||
|
|
acd7bfd9f5 | ||
|
|
1dff50d080 | ||
|
|
af40970d09 | ||
|
|
07535a494e | ||
|
|
907422cefa | ||
|
|
f643baea25 | ||
|
|
55a4f33982 | ||
|
|
df6700959a | ||
|
|
fde8235f3e | ||
|
|
f6ba56d966 | ||
|
|
4a5312823b | ||
|
|
31a27b0e1c | ||
|
|
984ad868e8 | ||
|
|
9b657eeda2 | ||
|
|
6f3ad4b3b0 | ||
|
|
56f06fae3c | ||
|
|
c22d884357 | ||
|
|
35dc22197d | ||
|
|
70d56ca0be | ||
|
|
bca09b9476 | ||
|
|
b82bf16505 | ||
|
|
2f254d81cd | ||
|
|
b14ce03e5b | ||
|
|
90b04cbd37 | ||
|
|
5ae866ea85 | ||
|
|
b450ab9f5a | ||
|
|
138bc8144b | ||
|
|
c9831833c4 | ||
|
|
2813f93c18 | ||
|
|
27bec674a0 | ||
|
|
ff79ca8781 | ||
|
|
34a1342db6 | ||
|
|
e252986b98 | ||
|
|
3537c3e5f9 | ||
|
|
fdc86f94c4 | ||
|
|
dc5dc94ed5 | ||
|
|
f7682d3da3 | ||
|
|
8e2975d23d | ||
|
|
ce85489166 | ||
|
|
13f5738090 | ||
|
|
cce2ae7401 | ||
|
|
c9b49a50c8 | ||
|
|
c419c43622 | ||
|
|
cc5ecfba2b | ||
|
|
a98d5feff6 | ||
|
|
7aa4feffd4 | ||
|
|
0b46a744f1 |
@@ -66,6 +66,7 @@ packages/lib/welcomeAssets.js
|
|||||||
packages/plugins/**/api
|
packages/plugins/**/api
|
||||||
packages/plugins/**/dist
|
packages/plugins/**/dist
|
||||||
packages/server/dist/
|
packages/server/dist/
|
||||||
|
packages/utils/dist/
|
||||||
packages/tools/node_modules
|
packages/tools/node_modules
|
||||||
packages/tools/PortableAppsLauncher
|
packages/tools/PortableAppsLauncher
|
||||||
packages/turndown-plugin-gfm/
|
packages/turndown-plugin-gfm/
|
||||||
@@ -79,6 +80,8 @@ packages/app-cli/app/LinkSelector.js
|
|||||||
packages/app-cli/app/base-command.js
|
packages/app-cli/app/base-command.js
|
||||||
packages/app-cli/app/command-done.test.js
|
packages/app-cli/app/command-done.test.js
|
||||||
packages/app-cli/app/command-e2ee.js
|
packages/app-cli/app/command-e2ee.js
|
||||||
|
packages/app-cli/app/command-mkbook.js
|
||||||
|
packages/app-cli/app/command-mkbook.test.js
|
||||||
packages/app-cli/app/command-settingschema.js
|
packages/app-cli/app/command-settingschema.js
|
||||||
packages/app-cli/app/command-sync.js
|
packages/app-cli/app/command-sync.js
|
||||||
packages/app-cli/app/command-testing.js
|
packages/app-cli/app/command-testing.js
|
||||||
@@ -142,7 +145,12 @@ packages/app-desktop/gui/EditFolderDialog/IconSelector.js
|
|||||||
packages/app-desktop/gui/EmojiBox.js
|
packages/app-desktop/gui/EmojiBox.js
|
||||||
packages/app-desktop/gui/EncryptionConfigScreen/EncryptionConfigScreen.js
|
packages/app-desktop/gui/EncryptionConfigScreen/EncryptionConfigScreen.js
|
||||||
packages/app-desktop/gui/ErrorBoundary.js
|
packages/app-desktop/gui/ErrorBoundary.js
|
||||||
|
packages/app-desktop/gui/ExtensionBadge.js
|
||||||
packages/app-desktop/gui/FolderIconBox.js
|
packages/app-desktop/gui/FolderIconBox.js
|
||||||
|
packages/app-desktop/gui/HelpButton.js
|
||||||
|
packages/app-desktop/gui/IconButton.js
|
||||||
|
packages/app-desktop/gui/ImportScreen.js
|
||||||
|
packages/app-desktop/gui/ItemList.js
|
||||||
packages/app-desktop/gui/KeymapConfig/KeymapConfigScreen.js
|
packages/app-desktop/gui/KeymapConfig/KeymapConfigScreen.js
|
||||||
packages/app-desktop/gui/KeymapConfig/ShortcutRecorder.js
|
packages/app-desktop/gui/KeymapConfig/ShortcutRecorder.js
|
||||||
packages/app-desktop/gui/KeymapConfig/styles/index.js
|
packages/app-desktop/gui/KeymapConfig/styles/index.js
|
||||||
@@ -172,6 +180,7 @@ packages/app-desktop/gui/MainScreen/commands/openTag.js
|
|||||||
packages/app-desktop/gui/MainScreen/commands/print.js
|
packages/app-desktop/gui/MainScreen/commands/print.js
|
||||||
packages/app-desktop/gui/MainScreen/commands/renameFolder.js
|
packages/app-desktop/gui/MainScreen/commands/renameFolder.js
|
||||||
packages/app-desktop/gui/MainScreen/commands/renameTag.js
|
packages/app-desktop/gui/MainScreen/commands/renameTag.js
|
||||||
|
packages/app-desktop/gui/MainScreen/commands/resetLayout.js
|
||||||
packages/app-desktop/gui/MainScreen/commands/revealResourceFile.js
|
packages/app-desktop/gui/MainScreen/commands/revealResourceFile.js
|
||||||
packages/app-desktop/gui/MainScreen/commands/search.js
|
packages/app-desktop/gui/MainScreen/commands/search.js
|
||||||
packages/app-desktop/gui/MainScreen/commands/setTags.js
|
packages/app-desktop/gui/MainScreen/commands/setTags.js
|
||||||
@@ -193,6 +202,7 @@ packages/app-desktop/gui/MainScreen/commands/toggleVisiblePanes.js
|
|||||||
packages/app-desktop/gui/MasterPasswordDialog/Dialog.js
|
packages/app-desktop/gui/MasterPasswordDialog/Dialog.js
|
||||||
packages/app-desktop/gui/MenuBar.js
|
packages/app-desktop/gui/MenuBar.js
|
||||||
packages/app-desktop/gui/MultiNoteActions.js
|
packages/app-desktop/gui/MultiNoteActions.js
|
||||||
|
packages/app-desktop/gui/Navigator.js
|
||||||
packages/app-desktop/gui/NoteContentPropertiesDialog.js
|
packages/app-desktop/gui/NoteContentPropertiesDialog.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/Editor.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/Editor.js
|
||||||
@@ -215,6 +225,7 @@ packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.js
|
|||||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/styles/index.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/styles/index.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/openEditDialog.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/openEditDialog.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/setupToolbarButtons.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/setupToolbarButtons.js
|
||||||
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/types.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useContextMenu.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useContextMenu.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteEditor.js
|
packages/app-desktop/gui/NoteEditor/NoteEditor.js
|
||||||
@@ -222,6 +233,7 @@ packages/app-desktop/gui/NoteEditor/NoteTitle/NoteTitleBar.js
|
|||||||
packages/app-desktop/gui/NoteEditor/commands/focusElementNoteBody.js
|
packages/app-desktop/gui/NoteEditor/commands/focusElementNoteBody.js
|
||||||
packages/app-desktop/gui/NoteEditor/commands/focusElementNoteTitle.js
|
packages/app-desktop/gui/NoteEditor/commands/focusElementNoteTitle.js
|
||||||
packages/app-desktop/gui/NoteEditor/commands/index.js
|
packages/app-desktop/gui/NoteEditor/commands/index.js
|
||||||
|
packages/app-desktop/gui/NoteEditor/commands/pasteAsText.js
|
||||||
packages/app-desktop/gui/NoteEditor/commands/showLocalSearch.js
|
packages/app-desktop/gui/NoteEditor/commands/showLocalSearch.js
|
||||||
packages/app-desktop/gui/NoteEditor/commands/showRevisions.js
|
packages/app-desktop/gui/NoteEditor/commands/showRevisions.js
|
||||||
packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.js
|
packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.js
|
||||||
@@ -252,6 +264,10 @@ packages/app-desktop/gui/NoteListControls/commands/focusSearch.js
|
|||||||
packages/app-desktop/gui/NoteListControls/commands/index.js
|
packages/app-desktop/gui/NoteListControls/commands/index.js
|
||||||
packages/app-desktop/gui/NoteListItem.js
|
packages/app-desktop/gui/NoteListItem.js
|
||||||
packages/app-desktop/gui/NoteListWrapper/NoteListWrapper.js
|
packages/app-desktop/gui/NoteListWrapper/NoteListWrapper.js
|
||||||
|
packages/app-desktop/gui/NotePropertiesDialog.js
|
||||||
|
packages/app-desktop/gui/NoteRevisionViewer.js
|
||||||
|
packages/app-desktop/gui/NoteSearchBar.js
|
||||||
|
packages/app-desktop/gui/NoteStatusBar.js
|
||||||
packages/app-desktop/gui/NoteTextViewer.js
|
packages/app-desktop/gui/NoteTextViewer.js
|
||||||
packages/app-desktop/gui/NoteToolbar/NoteToolbar.js
|
packages/app-desktop/gui/NoteToolbar/NoteToolbar.js
|
||||||
packages/app-desktop/gui/OneDriveLoginScreen.js
|
packages/app-desktop/gui/OneDriveLoginScreen.js
|
||||||
@@ -290,12 +306,14 @@ packages/app-desktop/gui/Sidebar/styles/index.js
|
|||||||
packages/app-desktop/gui/StatusScreen/StatusScreen.js
|
packages/app-desktop/gui/StatusScreen/StatusScreen.js
|
||||||
packages/app-desktop/gui/StyleSheets/StyleSheetContainer.js
|
packages/app-desktop/gui/StyleSheets/StyleSheetContainer.js
|
||||||
packages/app-desktop/gui/SyncWizard/Dialog.js
|
packages/app-desktop/gui/SyncWizard/Dialog.js
|
||||||
|
packages/app-desktop/gui/TagItem.js
|
||||||
packages/app-desktop/gui/TagList.js
|
packages/app-desktop/gui/TagList.js
|
||||||
packages/app-desktop/gui/ToggleEditorsButton/ToggleEditorsButton.js
|
packages/app-desktop/gui/ToggleEditorsButton/ToggleEditorsButton.js
|
||||||
packages/app-desktop/gui/ToggleEditorsButton/styles/index.js
|
packages/app-desktop/gui/ToggleEditorsButton/styles/index.js
|
||||||
packages/app-desktop/gui/ToolbarBase.js
|
packages/app-desktop/gui/ToolbarBase.js
|
||||||
packages/app-desktop/gui/ToolbarButton/ToolbarButton.js
|
packages/app-desktop/gui/ToolbarButton/ToolbarButton.js
|
||||||
packages/app-desktop/gui/ToolbarButton/styles/index.js
|
packages/app-desktop/gui/ToolbarButton/styles/index.js
|
||||||
|
packages/app-desktop/gui/ToolbarSpace.js
|
||||||
packages/app-desktop/gui/dialogs.js
|
packages/app-desktop/gui/dialogs.js
|
||||||
packages/app-desktop/gui/hooks/useEffectDebugger.js
|
packages/app-desktop/gui/hooks/useEffectDebugger.js
|
||||||
packages/app-desktop/gui/hooks/useImperativeHandlerDebugger.js
|
packages/app-desktop/gui/hooks/useImperativeHandlerDebugger.js
|
||||||
@@ -312,6 +330,7 @@ packages/app-desktop/gui/style/StyledTextInput.js
|
|||||||
packages/app-desktop/gui/utils/NoteListUtils.js
|
packages/app-desktop/gui/utils/NoteListUtils.js
|
||||||
packages/app-desktop/gui/utils/convertToScreenCoordinates.js
|
packages/app-desktop/gui/utils/convertToScreenCoordinates.js
|
||||||
packages/app-desktop/gui/utils/loadScript.js
|
packages/app-desktop/gui/utils/loadScript.js
|
||||||
|
packages/app-desktop/gulpfile.js
|
||||||
packages/app-desktop/plugins/GotoAnything.js
|
packages/app-desktop/plugins/GotoAnything.js
|
||||||
packages/app-desktop/services/bridge.js
|
packages/app-desktop/services/bridge.js
|
||||||
packages/app-desktop/services/commands/stateToWhenClauseContext.js
|
packages/app-desktop/services/commands/stateToWhenClauseContext.js
|
||||||
@@ -387,11 +406,13 @@ packages/app-mobile/components/SideMenu.js
|
|||||||
packages/app-mobile/components/TextInput.js
|
packages/app-mobile/components/TextInput.js
|
||||||
packages/app-mobile/components/app-nav.js
|
packages/app-mobile/components/app-nav.js
|
||||||
packages/app-mobile/components/biometrics/BiometricPopup.js
|
packages/app-mobile/components/biometrics/BiometricPopup.js
|
||||||
|
packages/app-mobile/components/biometrics/biometricAuthenticate.js
|
||||||
packages/app-mobile/components/biometrics/sensorInfo.js
|
packages/app-mobile/components/biometrics/sensorInfo.js
|
||||||
packages/app-mobile/components/getResponsiveValue.js
|
packages/app-mobile/components/getResponsiveValue.js
|
||||||
packages/app-mobile/components/getResponsiveValue.test.js
|
packages/app-mobile/components/getResponsiveValue.test.js
|
||||||
packages/app-mobile/components/screens/ConfigScreen.js
|
packages/app-mobile/components/screens/ConfigScreen.js
|
||||||
packages/app-mobile/components/screens/Note.js
|
packages/app-mobile/components/screens/Note.js
|
||||||
|
packages/app-mobile/components/screens/Notes.js
|
||||||
packages/app-mobile/components/screens/UpgradeSyncTargetScreen.js
|
packages/app-mobile/components/screens/UpgradeSyncTargetScreen.js
|
||||||
packages/app-mobile/components/screens/encryption-config.js
|
packages/app-mobile/components/screens/encryption-config.js
|
||||||
packages/app-mobile/components/screens/search.js
|
packages/app-mobile/components/screens/search.js
|
||||||
@@ -467,6 +488,7 @@ packages/lib/commands/index.js
|
|||||||
packages/lib/commands/openMasterPasswordDialog.js
|
packages/lib/commands/openMasterPasswordDialog.js
|
||||||
packages/lib/commands/synchronize.js
|
packages/lib/commands/synchronize.js
|
||||||
packages/lib/components/EncryptionConfigScreen/utils.js
|
packages/lib/components/EncryptionConfigScreen/utils.js
|
||||||
|
packages/lib/components/shared/note-screen-shared.js
|
||||||
packages/lib/database-driver-better-sqlite.js
|
packages/lib/database-driver-better-sqlite.js
|
||||||
packages/lib/database.js
|
packages/lib/database.js
|
||||||
packages/lib/debug/DebugService.js
|
packages/lib/debug/DebugService.js
|
||||||
@@ -496,6 +518,7 @@ packages/lib/markdownUtils.js
|
|||||||
packages/lib/markdownUtils.test.js
|
packages/lib/markdownUtils.test.js
|
||||||
packages/lib/markdownUtils2.test.js
|
packages/lib/markdownUtils2.test.js
|
||||||
packages/lib/markupLanguageUtils.js
|
packages/lib/markupLanguageUtils.js
|
||||||
|
packages/lib/migrations/42.js
|
||||||
packages/lib/models/Alarm.js
|
packages/lib/models/Alarm.js
|
||||||
packages/lib/models/BaseItem.js
|
packages/lib/models/BaseItem.js
|
||||||
packages/lib/models/Folder.js
|
packages/lib/models/Folder.js
|
||||||
@@ -742,8 +765,11 @@ packages/lib/themes/type.js
|
|||||||
packages/lib/time.js
|
packages/lib/time.js
|
||||||
packages/lib/utils/credentialFiles.js
|
packages/lib/utils/credentialFiles.js
|
||||||
packages/lib/utils/joplinCloud.js
|
packages/lib/utils/joplinCloud.js
|
||||||
|
packages/lib/utils/webDAVUtils.js
|
||||||
|
packages/lib/utils/webDAVUtils.test.js
|
||||||
packages/lib/uuid.js
|
packages/lib/uuid.js
|
||||||
packages/lib/versionInfo.js
|
packages/lib/versionInfo.js
|
||||||
|
packages/lib/versionInfo.test.js
|
||||||
packages/pdf-viewer/FullViewer.js
|
packages/pdf-viewer/FullViewer.js
|
||||||
packages/pdf-viewer/Page.js
|
packages/pdf-viewer/Page.js
|
||||||
packages/pdf-viewer/PdfDocument.js
|
packages/pdf-viewer/PdfDocument.js
|
||||||
@@ -784,6 +810,8 @@ packages/renderer/HtmlToHtml.js
|
|||||||
packages/renderer/InMemoryCache.js
|
packages/renderer/InMemoryCache.js
|
||||||
packages/renderer/MarkupToHtml.js
|
packages/renderer/MarkupToHtml.js
|
||||||
packages/renderer/MdToHtml.js
|
packages/renderer/MdToHtml.js
|
||||||
|
packages/renderer/MdToHtml/createEventHandlingAttrs.js
|
||||||
|
packages/renderer/MdToHtml/createEventHandlingAttrs.test.js
|
||||||
packages/renderer/MdToHtml/linkReplacement.js
|
packages/renderer/MdToHtml/linkReplacement.js
|
||||||
packages/renderer/MdToHtml/linkReplacement.test.js
|
packages/renderer/MdToHtml/linkReplacement.test.js
|
||||||
packages/renderer/MdToHtml/renderMedia.js
|
packages/renderer/MdToHtml/renderMedia.js
|
||||||
@@ -810,6 +838,7 @@ packages/renderer/index.js
|
|||||||
packages/renderer/noteStyle.js
|
packages/renderer/noteStyle.js
|
||||||
packages/renderer/pathUtils.js
|
packages/renderer/pathUtils.js
|
||||||
packages/renderer/utils.js
|
packages/renderer/utils.js
|
||||||
|
packages/tools/build-release-stats.js
|
||||||
packages/tools/buildServerDocker.js
|
packages/tools/buildServerDocker.js
|
||||||
packages/tools/buildServerDocker.test.js
|
packages/tools/buildServerDocker.test.js
|
||||||
packages/tools/bundleDefaultPlugins.js
|
packages/tools/bundleDefaultPlugins.js
|
||||||
@@ -820,6 +849,7 @@ packages/tools/convertThemesToCss.js
|
|||||||
packages/tools/generate-database-types.js
|
packages/tools/generate-database-types.js
|
||||||
packages/tools/generate-images.js
|
packages/tools/generate-images.js
|
||||||
packages/tools/git-changelog.js
|
packages/tools/git-changelog.js
|
||||||
|
packages/tools/git-changelog.test.js
|
||||||
packages/tools/licenseChecker.js
|
packages/tools/licenseChecker.js
|
||||||
packages/tools/release-android.js
|
packages/tools/release-android.js
|
||||||
packages/tools/release-cli.js
|
packages/tools/release-cli.js
|
||||||
@@ -835,6 +865,7 @@ packages/tools/update-readme-download.js
|
|||||||
packages/tools/update-readme-sponsors.js
|
packages/tools/update-readme-sponsors.js
|
||||||
packages/tools/updateMarkdownDoc.js
|
packages/tools/updateMarkdownDoc.js
|
||||||
packages/tools/utils/discourse.js
|
packages/tools/utils/discourse.js
|
||||||
|
packages/tools/utils/loadSponsors.js
|
||||||
packages/tools/utils/translation.js
|
packages/tools/utils/translation.js
|
||||||
packages/tools/website/build.js
|
packages/tools/website/build.js
|
||||||
packages/tools/website/buildTranslations.js
|
packages/tools/website/buildTranslations.js
|
||||||
|
|||||||
31
.eslintrc.js
31
.eslintrc.js
@@ -77,6 +77,7 @@ module.exports = {
|
|||||||
'no-array-constructor': ['error'],
|
'no-array-constructor': ['error'],
|
||||||
'radix': ['error'],
|
'radix': ['error'],
|
||||||
'eqeqeq': ['error', 'always'],
|
'eqeqeq': ['error', 'always'],
|
||||||
|
'no-console': ['error', { 'allow': ['warn', 'error'] }],
|
||||||
|
|
||||||
// Warn only for now because fixing everything would take too much
|
// Warn only for now because fixing everything would take too much
|
||||||
// refactoring, but new code should try to stick to it.
|
// refactoring, but new code should try to stick to it.
|
||||||
@@ -90,7 +91,12 @@ module.exports = {
|
|||||||
// Disable because of this: https://github.com/facebook/react/issues/16265
|
// Disable because of this: https://github.com/facebook/react/issues/16265
|
||||||
// "react-hooks/exhaustive-deps": "warn",
|
// "react-hooks/exhaustive-deps": "warn",
|
||||||
|
|
||||||
|
'jest/require-top-level-describe': ['error', { 'maxNumberOfTopLevelDescribes': 1 }],
|
||||||
|
'jest/no-identical-title': ['error'],
|
||||||
|
'jest/prefer-lowercase-title': ['error', { 'ignoreTopLevelDescribe': true }],
|
||||||
|
|
||||||
'promise/prefer-await-to-then': 'error',
|
'promise/prefer-await-to-then': 'error',
|
||||||
|
'no-unneeded-ternary': 'error',
|
||||||
|
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
// Formatting
|
// Formatting
|
||||||
@@ -135,6 +141,14 @@ module.exports = {
|
|||||||
'spaced-comment': ['error', 'always'],
|
'spaced-comment': ['error', 'always'],
|
||||||
'keyword-spacing': ['error', { 'before': true, 'after': true }],
|
'keyword-spacing': ['error', { 'before': true, 'after': true }],
|
||||||
'no-multi-spaces': ['error'],
|
'no-multi-spaces': ['error'],
|
||||||
|
|
||||||
|
// Regarding the keyword blacklist:
|
||||||
|
// - err: We generally avoid using too many abbreviations, so it should
|
||||||
|
// be "error", not "err"
|
||||||
|
// - notebook: In code, it should always be "folder" (not "notebook").
|
||||||
|
// In user-facing text, it should be "notebook".
|
||||||
|
'id-denylist': ['error', 'err', 'notebook', 'notebooks'],
|
||||||
|
'prefer-arrow-callback': ['error'],
|
||||||
},
|
},
|
||||||
'plugins': [
|
'plugins': [
|
||||||
'react',
|
'react',
|
||||||
@@ -145,8 +159,19 @@ module.exports = {
|
|||||||
// 'react-hooks',
|
// 'react-hooks',
|
||||||
'import',
|
'import',
|
||||||
'promise',
|
'promise',
|
||||||
|
'jest',
|
||||||
],
|
],
|
||||||
'overrides': [
|
'overrides': [
|
||||||
|
{
|
||||||
|
'files': [
|
||||||
|
'packages/tools/**',
|
||||||
|
'packages/app-mobile/tools/**',
|
||||||
|
'packages/app-desktop/tools/**',
|
||||||
|
],
|
||||||
|
'rules': {
|
||||||
|
'no-console': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
// enable the rule specifically for TypeScript files
|
// enable the rule specifically for TypeScript files
|
||||||
'files': ['*.ts', '*.tsx'],
|
'files': ['*.ts', '*.tsx'],
|
||||||
@@ -155,10 +180,9 @@ module.exports = {
|
|||||||
'project': './tsconfig.eslint.json',
|
'project': './tsconfig.eslint.json',
|
||||||
},
|
},
|
||||||
'rules': {
|
'rules': {
|
||||||
// Warn only because it would make it difficult to convert JS classes to TypeScript, unless we
|
'@typescript-eslint/explicit-member-accessibility': ['error'],
|
||||||
// make everything public which is not great. New code however should specify member accessibility.
|
|
||||||
'@typescript-eslint/explicit-member-accessibility': ['warn'],
|
|
||||||
'@typescript-eslint/type-annotation-spacing': ['error', { 'before': false, 'after': true }],
|
'@typescript-eslint/type-annotation-spacing': ['error', { 'before': false, 'after': true }],
|
||||||
|
'@typescript-eslint/no-inferrable-types': ['error', { 'ignoreParameters': true, 'ignoreProperties': true }],
|
||||||
'@typescript-eslint/comma-dangle': ['error', {
|
'@typescript-eslint/comma-dangle': ['error', {
|
||||||
'arrays': 'always-multiline',
|
'arrays': 'always-multiline',
|
||||||
'objects': 'always-multiline',
|
'objects': 'always-multiline',
|
||||||
@@ -169,6 +193,7 @@ module.exports = {
|
|||||||
'tuples': 'always-multiline',
|
'tuples': 'always-multiline',
|
||||||
'functions': 'never',
|
'functions': 'never',
|
||||||
}],
|
}],
|
||||||
|
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
|
||||||
'@typescript-eslint/semi': ['error', 'always'],
|
'@typescript-eslint/semi': ['error', 'always'],
|
||||||
'@typescript-eslint/member-delimiter-style': ['error', {
|
'@typescript-eslint/member-delimiter-style': ['error', {
|
||||||
'multiline': {
|
'multiline': {
|
||||||
|
|||||||
3
.github/scripts/run_ci.sh
vendored
3
.github/scripts/run_ci.sh
vendored
@@ -180,9 +180,6 @@ cd "$ROOT_DIR/packages/app-desktop"
|
|||||||
|
|
||||||
if [[ $GIT_TAG_NAME = v* ]]; then
|
if [[ $GIT_TAG_NAME = v* ]]; then
|
||||||
echo "Step: Building and publishing desktop application..."
|
echo "Step: Building and publishing desktop application..."
|
||||||
# cd "$ROOT_DIR/packages/tools"
|
|
||||||
# node bundleDefaultPlugins.js
|
|
||||||
cd "$ROOT_DIR/packages/app-desktop"
|
|
||||||
USE_HARD_LINKS=false yarn run dist
|
USE_HARD_LINKS=false yarn run dist
|
||||||
elif [[ $IS_LINUX = 1 ]] && [[ $GIT_TAG_NAME = $SERVER_TAG_PREFIX-* ]]; then
|
elif [[ $IS_LINUX = 1 ]] && [[ $GIT_TAG_NAME = $SERVER_TAG_PREFIX-* ]]; then
|
||||||
echo "Step: Building Docker Image..."
|
echo "Step: Building Docker Image..."
|
||||||
|
|||||||
2
.github/workflows/build-android.yml
vendored
2
.github/workflows/build-android.yml
vendored
@@ -6,6 +6,7 @@ on: [push, pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre_job:
|
pre_job:
|
||||||
|
if: github.repository == 'laurent22/joplin'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
@@ -16,6 +17,7 @@ jobs:
|
|||||||
concurrent_skipping: 'same_content_newer'
|
concurrent_skipping: 'same_content_newer'
|
||||||
|
|
||||||
BuildAndroidDebug:
|
BuildAndroidDebug:
|
||||||
|
if: github.repository == 'laurent22/joplin'
|
||||||
needs: pre_job
|
needs: pre_job
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: needs.pre_job.outputs.should_skip != 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
3
.github/workflows/cla.yml
vendored
3
.github/workflows/cla.yml
vendored
@@ -7,12 +7,13 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
CLAAssistant:
|
CLAAssistant:
|
||||||
|
if: github.repository == 'laurent22/joplin'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "CLA Assistant"
|
- name: "CLA Assistant"
|
||||||
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
|
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
|
||||||
# Beta Release
|
# Beta Release
|
||||||
uses: contributor-assistant/github-action@v2.2.1
|
uses: contributor-assistant/github-action@v2.3.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# the below token should have repo scope and must be manually added by you in the repository's secret
|
# the below token should have repo scope and must be manually added by you in the repository's secret
|
||||||
|
|||||||
1
.github/workflows/close-stale-issues.yml
vendored
1
.github/workflows/close-stale-issues.yml
vendored
@@ -6,6 +6,7 @@ permissions:
|
|||||||
issues: write
|
issues: write
|
||||||
jobs:
|
jobs:
|
||||||
ProcessStaleIssues:
|
ProcessStaleIssues:
|
||||||
|
if: github.repository == 'laurent22/joplin'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v4
|
||||||
|
|||||||
6
.github/workflows/github-actions-main.yml
vendored
6
.github/workflows/github-actions-main.yml
vendored
@@ -2,6 +2,7 @@ name: Joplin Continuous Integration
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
pre_job:
|
pre_job:
|
||||||
|
if: github.repository == 'laurent22/joplin'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
@@ -14,7 +15,7 @@ jobs:
|
|||||||
Main:
|
Main:
|
||||||
needs: pre_job
|
needs: pre_job
|
||||||
# We always process server or desktop release tags, because they also publish the release
|
# We always process server or desktop release tags, because they also publish the release
|
||||||
if: needs.pre_job.outputs.should_skip != 'true' || startsWith(github.ref, 'refs/tags/server-v') || startsWith(github.ref, 'refs/tags/v')
|
if: github.repository == 'laurent22/joplin' && (needs.pre_job.outputs.should_skip != 'true' || startsWith(github.ref, 'refs/tags/server-v') || startsWith(github.ref, 'refs/tags/v'))
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -92,6 +93,7 @@ jobs:
|
|||||||
APPLE_ASC_PROVIDER: ${{ secrets.APPLE_ASC_PROVIDER }}
|
APPLE_ASC_PROVIDER: ${{ secrets.APPLE_ASC_PROVIDER }}
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CSC_KEY_PASSWORD }}
|
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CSC_KEY_PASSWORD }}
|
||||||
CSC_LINK: ${{ secrets.APPLE_CSC_LINK }}
|
CSC_LINK: ${{ secrets.APPLE_CSC_LINK }}
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
@@ -129,7 +131,7 @@ jobs:
|
|||||||
|
|
||||||
ServerDockerImage:
|
ServerDockerImage:
|
||||||
needs: pre_job
|
needs: pre_job
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: github.repository == 'laurent22/joplin' && needs.pre_job.outputs.should_skip != 'true'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
30
.gitignore
vendored
30
.gitignore
vendored
@@ -67,6 +67,8 @@ packages/app-cli/app/LinkSelector.js
|
|||||||
packages/app-cli/app/base-command.js
|
packages/app-cli/app/base-command.js
|
||||||
packages/app-cli/app/command-done.test.js
|
packages/app-cli/app/command-done.test.js
|
||||||
packages/app-cli/app/command-e2ee.js
|
packages/app-cli/app/command-e2ee.js
|
||||||
|
packages/app-cli/app/command-mkbook.js
|
||||||
|
packages/app-cli/app/command-mkbook.test.js
|
||||||
packages/app-cli/app/command-settingschema.js
|
packages/app-cli/app/command-settingschema.js
|
||||||
packages/app-cli/app/command-sync.js
|
packages/app-cli/app/command-sync.js
|
||||||
packages/app-cli/app/command-testing.js
|
packages/app-cli/app/command-testing.js
|
||||||
@@ -130,7 +132,12 @@ packages/app-desktop/gui/EditFolderDialog/IconSelector.js
|
|||||||
packages/app-desktop/gui/EmojiBox.js
|
packages/app-desktop/gui/EmojiBox.js
|
||||||
packages/app-desktop/gui/EncryptionConfigScreen/EncryptionConfigScreen.js
|
packages/app-desktop/gui/EncryptionConfigScreen/EncryptionConfigScreen.js
|
||||||
packages/app-desktop/gui/ErrorBoundary.js
|
packages/app-desktop/gui/ErrorBoundary.js
|
||||||
|
packages/app-desktop/gui/ExtensionBadge.js
|
||||||
packages/app-desktop/gui/FolderIconBox.js
|
packages/app-desktop/gui/FolderIconBox.js
|
||||||
|
packages/app-desktop/gui/HelpButton.js
|
||||||
|
packages/app-desktop/gui/IconButton.js
|
||||||
|
packages/app-desktop/gui/ImportScreen.js
|
||||||
|
packages/app-desktop/gui/ItemList.js
|
||||||
packages/app-desktop/gui/KeymapConfig/KeymapConfigScreen.js
|
packages/app-desktop/gui/KeymapConfig/KeymapConfigScreen.js
|
||||||
packages/app-desktop/gui/KeymapConfig/ShortcutRecorder.js
|
packages/app-desktop/gui/KeymapConfig/ShortcutRecorder.js
|
||||||
packages/app-desktop/gui/KeymapConfig/styles/index.js
|
packages/app-desktop/gui/KeymapConfig/styles/index.js
|
||||||
@@ -160,6 +167,7 @@ packages/app-desktop/gui/MainScreen/commands/openTag.js
|
|||||||
packages/app-desktop/gui/MainScreen/commands/print.js
|
packages/app-desktop/gui/MainScreen/commands/print.js
|
||||||
packages/app-desktop/gui/MainScreen/commands/renameFolder.js
|
packages/app-desktop/gui/MainScreen/commands/renameFolder.js
|
||||||
packages/app-desktop/gui/MainScreen/commands/renameTag.js
|
packages/app-desktop/gui/MainScreen/commands/renameTag.js
|
||||||
|
packages/app-desktop/gui/MainScreen/commands/resetLayout.js
|
||||||
packages/app-desktop/gui/MainScreen/commands/revealResourceFile.js
|
packages/app-desktop/gui/MainScreen/commands/revealResourceFile.js
|
||||||
packages/app-desktop/gui/MainScreen/commands/search.js
|
packages/app-desktop/gui/MainScreen/commands/search.js
|
||||||
packages/app-desktop/gui/MainScreen/commands/setTags.js
|
packages/app-desktop/gui/MainScreen/commands/setTags.js
|
||||||
@@ -181,6 +189,7 @@ packages/app-desktop/gui/MainScreen/commands/toggleVisiblePanes.js
|
|||||||
packages/app-desktop/gui/MasterPasswordDialog/Dialog.js
|
packages/app-desktop/gui/MasterPasswordDialog/Dialog.js
|
||||||
packages/app-desktop/gui/MenuBar.js
|
packages/app-desktop/gui/MenuBar.js
|
||||||
packages/app-desktop/gui/MultiNoteActions.js
|
packages/app-desktop/gui/MultiNoteActions.js
|
||||||
|
packages/app-desktop/gui/Navigator.js
|
||||||
packages/app-desktop/gui/NoteContentPropertiesDialog.js
|
packages/app-desktop/gui/NoteContentPropertiesDialog.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/Editor.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/Editor.js
|
||||||
@@ -203,6 +212,7 @@ packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.js
|
|||||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/styles/index.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/styles/index.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/openEditDialog.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/openEditDialog.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/setupToolbarButtons.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/setupToolbarButtons.js
|
||||||
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/types.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useContextMenu.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useContextMenu.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
|
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
|
||||||
packages/app-desktop/gui/NoteEditor/NoteEditor.js
|
packages/app-desktop/gui/NoteEditor/NoteEditor.js
|
||||||
@@ -210,6 +220,7 @@ packages/app-desktop/gui/NoteEditor/NoteTitle/NoteTitleBar.js
|
|||||||
packages/app-desktop/gui/NoteEditor/commands/focusElementNoteBody.js
|
packages/app-desktop/gui/NoteEditor/commands/focusElementNoteBody.js
|
||||||
packages/app-desktop/gui/NoteEditor/commands/focusElementNoteTitle.js
|
packages/app-desktop/gui/NoteEditor/commands/focusElementNoteTitle.js
|
||||||
packages/app-desktop/gui/NoteEditor/commands/index.js
|
packages/app-desktop/gui/NoteEditor/commands/index.js
|
||||||
|
packages/app-desktop/gui/NoteEditor/commands/pasteAsText.js
|
||||||
packages/app-desktop/gui/NoteEditor/commands/showLocalSearch.js
|
packages/app-desktop/gui/NoteEditor/commands/showLocalSearch.js
|
||||||
packages/app-desktop/gui/NoteEditor/commands/showRevisions.js
|
packages/app-desktop/gui/NoteEditor/commands/showRevisions.js
|
||||||
packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.js
|
packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.js
|
||||||
@@ -240,6 +251,10 @@ packages/app-desktop/gui/NoteListControls/commands/focusSearch.js
|
|||||||
packages/app-desktop/gui/NoteListControls/commands/index.js
|
packages/app-desktop/gui/NoteListControls/commands/index.js
|
||||||
packages/app-desktop/gui/NoteListItem.js
|
packages/app-desktop/gui/NoteListItem.js
|
||||||
packages/app-desktop/gui/NoteListWrapper/NoteListWrapper.js
|
packages/app-desktop/gui/NoteListWrapper/NoteListWrapper.js
|
||||||
|
packages/app-desktop/gui/NotePropertiesDialog.js
|
||||||
|
packages/app-desktop/gui/NoteRevisionViewer.js
|
||||||
|
packages/app-desktop/gui/NoteSearchBar.js
|
||||||
|
packages/app-desktop/gui/NoteStatusBar.js
|
||||||
packages/app-desktop/gui/NoteTextViewer.js
|
packages/app-desktop/gui/NoteTextViewer.js
|
||||||
packages/app-desktop/gui/NoteToolbar/NoteToolbar.js
|
packages/app-desktop/gui/NoteToolbar/NoteToolbar.js
|
||||||
packages/app-desktop/gui/OneDriveLoginScreen.js
|
packages/app-desktop/gui/OneDriveLoginScreen.js
|
||||||
@@ -278,12 +293,14 @@ packages/app-desktop/gui/Sidebar/styles/index.js
|
|||||||
packages/app-desktop/gui/StatusScreen/StatusScreen.js
|
packages/app-desktop/gui/StatusScreen/StatusScreen.js
|
||||||
packages/app-desktop/gui/StyleSheets/StyleSheetContainer.js
|
packages/app-desktop/gui/StyleSheets/StyleSheetContainer.js
|
||||||
packages/app-desktop/gui/SyncWizard/Dialog.js
|
packages/app-desktop/gui/SyncWizard/Dialog.js
|
||||||
|
packages/app-desktop/gui/TagItem.js
|
||||||
packages/app-desktop/gui/TagList.js
|
packages/app-desktop/gui/TagList.js
|
||||||
packages/app-desktop/gui/ToggleEditorsButton/ToggleEditorsButton.js
|
packages/app-desktop/gui/ToggleEditorsButton/ToggleEditorsButton.js
|
||||||
packages/app-desktop/gui/ToggleEditorsButton/styles/index.js
|
packages/app-desktop/gui/ToggleEditorsButton/styles/index.js
|
||||||
packages/app-desktop/gui/ToolbarBase.js
|
packages/app-desktop/gui/ToolbarBase.js
|
||||||
packages/app-desktop/gui/ToolbarButton/ToolbarButton.js
|
packages/app-desktop/gui/ToolbarButton/ToolbarButton.js
|
||||||
packages/app-desktop/gui/ToolbarButton/styles/index.js
|
packages/app-desktop/gui/ToolbarButton/styles/index.js
|
||||||
|
packages/app-desktop/gui/ToolbarSpace.js
|
||||||
packages/app-desktop/gui/dialogs.js
|
packages/app-desktop/gui/dialogs.js
|
||||||
packages/app-desktop/gui/hooks/useEffectDebugger.js
|
packages/app-desktop/gui/hooks/useEffectDebugger.js
|
||||||
packages/app-desktop/gui/hooks/useImperativeHandlerDebugger.js
|
packages/app-desktop/gui/hooks/useImperativeHandlerDebugger.js
|
||||||
@@ -300,6 +317,7 @@ packages/app-desktop/gui/style/StyledTextInput.js
|
|||||||
packages/app-desktop/gui/utils/NoteListUtils.js
|
packages/app-desktop/gui/utils/NoteListUtils.js
|
||||||
packages/app-desktop/gui/utils/convertToScreenCoordinates.js
|
packages/app-desktop/gui/utils/convertToScreenCoordinates.js
|
||||||
packages/app-desktop/gui/utils/loadScript.js
|
packages/app-desktop/gui/utils/loadScript.js
|
||||||
|
packages/app-desktop/gulpfile.js
|
||||||
packages/app-desktop/plugins/GotoAnything.js
|
packages/app-desktop/plugins/GotoAnything.js
|
||||||
packages/app-desktop/services/bridge.js
|
packages/app-desktop/services/bridge.js
|
||||||
packages/app-desktop/services/commands/stateToWhenClauseContext.js
|
packages/app-desktop/services/commands/stateToWhenClauseContext.js
|
||||||
@@ -375,11 +393,13 @@ packages/app-mobile/components/SideMenu.js
|
|||||||
packages/app-mobile/components/TextInput.js
|
packages/app-mobile/components/TextInput.js
|
||||||
packages/app-mobile/components/app-nav.js
|
packages/app-mobile/components/app-nav.js
|
||||||
packages/app-mobile/components/biometrics/BiometricPopup.js
|
packages/app-mobile/components/biometrics/BiometricPopup.js
|
||||||
|
packages/app-mobile/components/biometrics/biometricAuthenticate.js
|
||||||
packages/app-mobile/components/biometrics/sensorInfo.js
|
packages/app-mobile/components/biometrics/sensorInfo.js
|
||||||
packages/app-mobile/components/getResponsiveValue.js
|
packages/app-mobile/components/getResponsiveValue.js
|
||||||
packages/app-mobile/components/getResponsiveValue.test.js
|
packages/app-mobile/components/getResponsiveValue.test.js
|
||||||
packages/app-mobile/components/screens/ConfigScreen.js
|
packages/app-mobile/components/screens/ConfigScreen.js
|
||||||
packages/app-mobile/components/screens/Note.js
|
packages/app-mobile/components/screens/Note.js
|
||||||
|
packages/app-mobile/components/screens/Notes.js
|
||||||
packages/app-mobile/components/screens/UpgradeSyncTargetScreen.js
|
packages/app-mobile/components/screens/UpgradeSyncTargetScreen.js
|
||||||
packages/app-mobile/components/screens/encryption-config.js
|
packages/app-mobile/components/screens/encryption-config.js
|
||||||
packages/app-mobile/components/screens/search.js
|
packages/app-mobile/components/screens/search.js
|
||||||
@@ -455,6 +475,7 @@ packages/lib/commands/index.js
|
|||||||
packages/lib/commands/openMasterPasswordDialog.js
|
packages/lib/commands/openMasterPasswordDialog.js
|
||||||
packages/lib/commands/synchronize.js
|
packages/lib/commands/synchronize.js
|
||||||
packages/lib/components/EncryptionConfigScreen/utils.js
|
packages/lib/components/EncryptionConfigScreen/utils.js
|
||||||
|
packages/lib/components/shared/note-screen-shared.js
|
||||||
packages/lib/database-driver-better-sqlite.js
|
packages/lib/database-driver-better-sqlite.js
|
||||||
packages/lib/database.js
|
packages/lib/database.js
|
||||||
packages/lib/debug/DebugService.js
|
packages/lib/debug/DebugService.js
|
||||||
@@ -484,6 +505,7 @@ packages/lib/markdownUtils.js
|
|||||||
packages/lib/markdownUtils.test.js
|
packages/lib/markdownUtils.test.js
|
||||||
packages/lib/markdownUtils2.test.js
|
packages/lib/markdownUtils2.test.js
|
||||||
packages/lib/markupLanguageUtils.js
|
packages/lib/markupLanguageUtils.js
|
||||||
|
packages/lib/migrations/42.js
|
||||||
packages/lib/models/Alarm.js
|
packages/lib/models/Alarm.js
|
||||||
packages/lib/models/BaseItem.js
|
packages/lib/models/BaseItem.js
|
||||||
packages/lib/models/Folder.js
|
packages/lib/models/Folder.js
|
||||||
@@ -730,8 +752,11 @@ packages/lib/themes/type.js
|
|||||||
packages/lib/time.js
|
packages/lib/time.js
|
||||||
packages/lib/utils/credentialFiles.js
|
packages/lib/utils/credentialFiles.js
|
||||||
packages/lib/utils/joplinCloud.js
|
packages/lib/utils/joplinCloud.js
|
||||||
|
packages/lib/utils/webDAVUtils.js
|
||||||
|
packages/lib/utils/webDAVUtils.test.js
|
||||||
packages/lib/uuid.js
|
packages/lib/uuid.js
|
||||||
packages/lib/versionInfo.js
|
packages/lib/versionInfo.js
|
||||||
|
packages/lib/versionInfo.test.js
|
||||||
packages/pdf-viewer/FullViewer.js
|
packages/pdf-viewer/FullViewer.js
|
||||||
packages/pdf-viewer/Page.js
|
packages/pdf-viewer/Page.js
|
||||||
packages/pdf-viewer/PdfDocument.js
|
packages/pdf-viewer/PdfDocument.js
|
||||||
@@ -772,6 +797,8 @@ packages/renderer/HtmlToHtml.js
|
|||||||
packages/renderer/InMemoryCache.js
|
packages/renderer/InMemoryCache.js
|
||||||
packages/renderer/MarkupToHtml.js
|
packages/renderer/MarkupToHtml.js
|
||||||
packages/renderer/MdToHtml.js
|
packages/renderer/MdToHtml.js
|
||||||
|
packages/renderer/MdToHtml/createEventHandlingAttrs.js
|
||||||
|
packages/renderer/MdToHtml/createEventHandlingAttrs.test.js
|
||||||
packages/renderer/MdToHtml/linkReplacement.js
|
packages/renderer/MdToHtml/linkReplacement.js
|
||||||
packages/renderer/MdToHtml/linkReplacement.test.js
|
packages/renderer/MdToHtml/linkReplacement.test.js
|
||||||
packages/renderer/MdToHtml/renderMedia.js
|
packages/renderer/MdToHtml/renderMedia.js
|
||||||
@@ -798,6 +825,7 @@ packages/renderer/index.js
|
|||||||
packages/renderer/noteStyle.js
|
packages/renderer/noteStyle.js
|
||||||
packages/renderer/pathUtils.js
|
packages/renderer/pathUtils.js
|
||||||
packages/renderer/utils.js
|
packages/renderer/utils.js
|
||||||
|
packages/tools/build-release-stats.js
|
||||||
packages/tools/buildServerDocker.js
|
packages/tools/buildServerDocker.js
|
||||||
packages/tools/buildServerDocker.test.js
|
packages/tools/buildServerDocker.test.js
|
||||||
packages/tools/bundleDefaultPlugins.js
|
packages/tools/bundleDefaultPlugins.js
|
||||||
@@ -808,6 +836,7 @@ packages/tools/convertThemesToCss.js
|
|||||||
packages/tools/generate-database-types.js
|
packages/tools/generate-database-types.js
|
||||||
packages/tools/generate-images.js
|
packages/tools/generate-images.js
|
||||||
packages/tools/git-changelog.js
|
packages/tools/git-changelog.js
|
||||||
|
packages/tools/git-changelog.test.js
|
||||||
packages/tools/licenseChecker.js
|
packages/tools/licenseChecker.js
|
||||||
packages/tools/release-android.js
|
packages/tools/release-android.js
|
||||||
packages/tools/release-cli.js
|
packages/tools/release-cli.js
|
||||||
@@ -823,6 +852,7 @@ packages/tools/update-readme-download.js
|
|||||||
packages/tools/update-readme-sponsors.js
|
packages/tools/update-readme-sponsors.js
|
||||||
packages/tools/updateMarkdownDoc.js
|
packages/tools/updateMarkdownDoc.js
|
||||||
packages/tools/utils/discourse.js
|
packages/tools/utils/discourse.js
|
||||||
|
packages/tools/utils/loadSponsors.js
|
||||||
packages/tools/utils/translation.js
|
packages/tools/utils/translation.js
|
||||||
packages/tools/website/build.js
|
packages/tools/website/build.js
|
||||||
packages/tools/website/buildTranslations.js
|
packages/tools/website/buildTranslations.js
|
||||||
|
|||||||
@@ -13,7 +13,9 @@
|
|||||||
"@joplin/turndown",
|
"@joplin/turndown",
|
||||||
"@joplin/turndown-plugin-gfm",
|
"@joplin/turndown-plugin-gfm",
|
||||||
"@joplin/tools",
|
"@joplin/tools",
|
||||||
"@joplin/react-native-saf-x"
|
"@joplin/react-native-saf-x",
|
||||||
|
"@joplin/react-native-alarm-notification",
|
||||||
|
"@joplin/utils"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
20
.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch
Normal file
20
.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
diff --git a/src/RNCamera.js b/src/RNCamera.js
|
||||||
|
index b7a271ad64771c0f654dbd5fe3c0d9e0d2e2c4ef..1182a40ace081a32fbaefe2bc4a499b79c2e7dac 100644
|
||||||
|
--- a/src/RNCamera.js
|
||||||
|
+++ b/src/RNCamera.js
|
||||||
|
@@ -5,7 +5,6 @@ import {
|
||||||
|
findNodeHandle,
|
||||||
|
Platform,
|
||||||
|
NativeModules,
|
||||||
|
- ViewPropTypes,
|
||||||
|
requireNativeComponent,
|
||||||
|
View,
|
||||||
|
ActivityIndicator,
|
||||||
|
@@ -14,6 +13,7 @@ import {
|
||||||
|
PermissionsAndroid,
|
||||||
|
} from 'react-native';
|
||||||
|
|
||||||
|
+import ViewPropTypes from 'deprecated-react-native-prop-types';
|
||||||
|
import type { FaceFeature } from './FaceDetector';
|
||||||
|
|
||||||
|
const Rationale = PropTypes.shape({
|
||||||
@@ -728,6 +728,16 @@ footer .bottom-links-row p {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
LARGE VIEW
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
@media (max-width: 1200px) {
|
||||||
|
#nav-section a {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
MEDIUM VIEW
|
MEDIUM VIEW
|
||||||
- Make menu bar elements smaller and closer to each others
|
- Make menu bar elements smaller and closer to each others
|
||||||
@@ -770,6 +780,7 @@ footer .bottom-links-row p {
|
|||||||
|
|
||||||
#menu-mobile .social-links .social-link-mastodon,
|
#menu-mobile .social-links .social-link-mastodon,
|
||||||
#menu-mobile .social-links .social-link-reddit,
|
#menu-mobile .social-links .social-link-reddit,
|
||||||
|
#menu-mobile .social-links .social-link-linkedin,
|
||||||
#menu-mobile .social-links .social-link-patreon {
|
#menu-mobile .social-links .social-link-patreon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -937,6 +948,41 @@ footer .bottom-links-row p {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
MORE NARROW VIEW
|
||||||
|
eg for Galaxy S9
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
@media (max-width: 580px) {
|
||||||
|
|
||||||
|
#nav-section .plans-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
MORE NARROW VIEW
|
||||||
|
eg for Galaxy S9
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
|
@media (max-width: 400px) {
|
||||||
|
|
||||||
|
#nav-section .navbar-mobile-content a.sponsor-button .sponsor-button-label {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#nav-section .navbar-mobile-content a.sponsor-button {
|
||||||
|
padding: 2px 6px;
|
||||||
|
margin-right: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#nav-section a {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
VERY NARROW VIEW
|
VERY NARROW VIEW
|
||||||
eg for Galaxy Fold
|
eg for Galaxy Fold
|
||||||
@@ -958,6 +1004,15 @@ footer .bottom-links-row p {
|
|||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.navbar-mobile-content a.sponsor-button {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#nav-section .button-link {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
Assets/WebsiteAssets/images/news/20230116-ga-raw-log-colored.png
Normal file
BIN
Assets/WebsiteAssets/images/news/20230116-ga-raw-log-colored.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 963 KiB |
BIN
Assets/WebsiteAssets/images/news/20230116-ga-raw-log.png
Normal file
BIN
Assets/WebsiteAssets/images/news/20230116-ga-raw-log.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 295 KiB |
BIN
Assets/WebsiteAssets/images/news/20230202-jdll.jpg
Normal file
BIN
Assets/WebsiteAssets/images/news/20230202-jdll.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 238 KiB |
@@ -1,4 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Joplin]]></title><description><![CDATA[Joplin, the open source note-taking application]]></description><link>https://joplinapp.org</link><generator>RSS for Node</generator><lastBuildDate>Wed, 21 Dec 2022 00:00:00 GMT</lastBuildDate><atom:link href="https://joplinapp.org/rss.xml" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Dec 2022 00:00:00 GMT</pubDate><item><title><![CDATA[Joplin is switching to the GNU Affero General Public License v3 (AGPL-3.0)]]></title><description><![CDATA[<p>As was <a href="https://discourse.joplinapp.org/t/rfc-switch-to-agpl-license-for-joplin-server/16529">discussed last year</a>, Joplin is switching to the GNU Affero General Public License v3 (AGPL-3.0) for the desktop, mobile and CLI applications, as well as the web clipper.</p>
|
<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Joplin]]></title><description><![CDATA[Joplin, the open source note-taking application]]></description><link>https://joplinapp.org</link><generator>RSS for Node</generator><lastBuildDate>Thu, 02 Mar 2023 00:00:00 GMT</lastBuildDate><atom:link href="https://joplinapp.org/rss.xml" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Mar 2023 00:00:00 GMT</pubDate><item><title><![CDATA[Joplin will participate in JdLL 2023!]]></title><description><![CDATA[<p>On 1 and 2 April 2023, we will have a stand for Joplin at the <a href="https://www.jdll.org/">Journées du Logiciel Libre</a> in Lyon, France. The JdLL has been taking place in Lyon for 24 years and is a popular open source conference in France. We had a stand in 2020 and 2021 but that was cancelled due to Covid, so this year is a first for Joplin!</p>
|
||||||
|
<p>Admission is free, so don't hesitate to come and meet us, exchange ideas and learn more about Joplin!</p>
|
||||||
|
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20230202-jdll.jpg" alt="Joplin at JdLL 2023"></p>
|
||||||
|
]]></description><link>https://joplinapp.org/news/20230302-jdll-2023/</link><guid isPermaLink="false">20230302-jdll-2023</guid><pubDate>Thu, 02 Mar 2023 00:00:00 GMT</pubDate><twitter-text></twitter-text></item><item><title><![CDATA[Introducing the "GitHub Actions Raw Log Viewer" extension for Chrome]]></title><description><![CDATA[<p>If you've ever used GitHub Actions, you will find that they provide by default a nice coloured output for the log. It looks good and it's even interactive! (You can click to collapse/expand blocks of text) But unfortunately it doesn't scale to large workflows, like we have for Joplin - the log can freeze and it will take forever to search for something. Indeed searching is done in "real time"... which mostly means it will freeze for a minute or two for each letter you type in the search box. Not great.</p>
|
||||||
|
<p>Thankfully GitHub provides an alternative access: the raw logs. This is much better because they will open as plain text, without any styling or JS magic, which means you can use the browser native search and it will be fast.</p>
|
||||||
|
<p>But now the problem is that raw logs look like this:</p>
|
||||||
|
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20230116-ga-raw-log.png" alt="Raw log without extension"></p>
|
||||||
|
<p>While it's not impossible to read, all colours that would display nicely in a terminal are gone and replaced by <a href="https://en.wikipedia.org/wiki/ANSI_escape_code">ANSI codes</a>. You can find what you need in there but it's not particularly easy.</p>
|
||||||
|
<p>This is where the new <strong>GitHub Action Raw Log Viewer</strong> extension for Chrome can help. It will parse your raw log and convert the ANSI codes to proper colours. This results in a much more readable rendering:</p>
|
||||||
|
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20230116-ga-raw-log-colored.png" alt="Raw log with extension"></p>
|
||||||
|
<p>The extension is fast even for very large logs and it's of course easy to search for text since it simply works with your browser built-in search.</p>
|
||||||
|
<p>The extension is open source, with the code available here: <a href="https://github.com/laurent22/github-actions-logs-extension">https://github.com/laurent22/github-actions-logs-extension</a></p>
|
||||||
|
<p>And to install it, follow this link:</p>
|
||||||
|
<p><a href="https://chrome.google.com/webstore/detail/github-action-raw-log-vie/lgejlnoopmcdglhfjblaeldbcfnmjddf"><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20230116-extension-get-it-now.png" alt="Download GitHub Action Raw Log Viewer extension"></a></p>
|
||||||
|
]]></description><link>https://joplinapp.org/news/20230116-github-actions-log-viewer/</link><guid isPermaLink="false">20230116-github-actions-log-viewer</guid><pubDate>Mon, 16 Jan 2023 00:00:00 GMT</pubDate><twitter-text>Introducing the "GitHub Action Raw Log Viewer" extension for Chrome</twitter-text></item><item><title><![CDATA[Joplin is switching to the GNU Affero General Public License v3 (AGPL-3.0)]]></title><description><![CDATA[<p>As was <a href="https://discourse.joplinapp.org/t/rfc-switch-to-agpl-license-for-joplin-server/16529">discussed last year</a>, Joplin is switching to the GNU Affero General Public License v3 (AGPL-3.0) for the desktop, mobile and CLI applications, as well as the web clipper.</p>
|
||||||
<p>Any open source or commercial fork of Joplin will have to license any changes they make under AGPL, and share these changes back with the community. This is the main reason we switch to this license. It allows us to continue releasing the project as open source while ensuring that those who benefit commercially (or not) from it share back their changes.</p>
|
<p>Any open source or commercial fork of Joplin will have to license any changes they make under AGPL, and share these changes back with the community. This is the main reason we switch to this license. It allows us to continue releasing the project as open source while ensuring that those who benefit commercially (or not) from it share back their changes.</p>
|
||||||
<h2>What is the GPL license?<a name="what-is-the-gpl-license" href="#what-is-the-gpl-license" class="heading-anchor">🔗</a></h2>
|
<h2>What is the GPL license?<a name="what-is-the-gpl-license" href="#what-is-the-gpl-license" class="heading-anchor">🔗</a></h2>
|
||||||
<p>The AGPL license is based on the GPL license. This is what tldr;Legal has to say about the GPL license:</p>
|
<p>The AGPL license is based on the GPL license. This is what tldr;Legal has to say about the GPL license:</p>
|
||||||
@@ -283,14 +297,4 @@
|
|||||||
<p>This release also includes about 30 various bug fixes and improvements.</p>
|
<p>This release also includes about 30 various bug fixes and improvements.</p>
|
||||||
<p>A notable one is a fix for GotoAnything, which recently wasn't working on first try.</p>
|
<p>A notable one is a fix for GotoAnything, which recently wasn't working on first try.</p>
|
||||||
<p>The plugin screen has also been improved so that search works even when GitHub is down or blocked, as it is in China in particular.</p>
|
<p>The plugin screen has also been improved so that search works even when GitHub is down or blocked, as it is in China in particular.</p>
|
||||||
]]></description><link>https://joplinapp.org/news/20210929-144036/</link><guid isPermaLink="false">20210929-144036</guid><pubDate>Wed, 29 Sep 2021 14:40:36 GMT</pubDate><twitter-text></twitter-text></item><item><title><![CDATA[Introducing recommended plugins in the next Joplin version]]></title><description><![CDATA[<p>A common request from new users is how to know which plugin is safe to install or not. In fact probably all of them are safe but as a new user that's not necessarily easy to know. So to help with this, the next version of Joplin will support recommended plugins - those will be plugins that meet our standards of quality and performance, and they will be indicated by a small crown tag inside the plugin box. Recommended plugins will also appear on top when searching.</p>
|
]]></description><link>https://joplinapp.org/news/20210929-144036/</link><guid isPermaLink="false">20210929-144036</guid><pubDate>Wed, 29 Sep 2021 14:40:36 GMT</pubDate><twitter-text></twitter-text></item></channel></rss>
|
||||||
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20210901-113415_0.png" alt=""></p>
|
|
||||||
<p>For now, since we don't have a review process, the recommended plugins are those developed by the Joplin team and frequent contributors, because we know those are safe to use.</p>
|
|
||||||
<p>Later we might have a review process and add more recommended plugins. That being said, in the meantime even if a plugin is not marked as recommended, there's a good chance it is still safe and have good performance too. Often you can search for it on the forum and if it's active with many users commenting, you're most likely good to go.</p>
|
|
||||||
<p>But if there's any doubt, the recommended tag is a good way to be sure.</p>
|
|
||||||
]]></description><link>https://joplinapp.org/news/20210901-113415/</link><guid isPermaLink="false">20210901-113415</guid><pubDate>Wed, 01 Sep 2021 11:34:15 GMT</pubDate><twitter-text></twitter-text></item><item><title><![CDATA[Joplin Cloud is officially production ready!]]></title><description><![CDATA[<p><a href="https://joplinapp.org/plans/">Joplin Cloud</a> has been out of beta for a few weeks now and since then it has been quietly running without any troubles. There is no known bugs and the service is running smoothly so it's now safe to say that it is production ready!</p>
|
|
||||||
<p>As a reminder, Joplin Cloud is meant to provide a more seamless Joplin experience - if you want to quickly get started, it's as easy as downloading the app and getting a Joplin Cloud account. Besides improved sync performance, that will give you the ability to collaborate on notebooks with others, as well as publishing and sharing notes.</p>
|
|
||||||
<p>Of course Joplin still supports other sync options such as Nextcloud, Dropbox and OneDrive or AWS S3. You can also self host using Joplin Server. The advantage of Joplin Cloud being that you don't need to maintain a server yourself - for a small fee you'll get that taken care of.</p>
|
|
||||||
<p>Additionally, subscribing to Joplin Cloud is a great way to support the project as a whole, including the open source applications. Such support is needed in the long term to provide bug and security fixes, add new features, and provide support.</p>
|
|
||||||
<p>At some level it is also an experiment, to see if such a service is financially viable and can allow me to work full time on the project. This is certainly something I would like, and perhaps Joplin Cloud combined with your donations will allow that.</p>
|
|
||||||
]]></description><link>https://joplinapp.org/news/20210831-154354/</link><guid isPermaLink="false">20210831-154354</guid><pubDate>Tue, 31 Aug 2021 15:43:54 GMT</pubDate><twitter-text></twitter-text></item></channel></rss>
|
|
||||||
@@ -24,7 +24,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-9 text-right d-block d-md-none navbar-mobile-content">
|
<div class="col-9 text-right d-block d-md-none navbar-mobile-content">
|
||||||
{{> twitterLink}}
|
{{> twitterLink}}
|
||||||
<a href="{{baseUrl}}/cn/" class="fw500">中文</a>
|
<a href="{{baseUrl}}/cn/" class="fw500 chinese-page-link">中文</a>
|
||||||
|
{{> joplinCloudButton}}
|
||||||
{{> supportButton}}
|
{{> supportButton}}
|
||||||
|
|
||||||
<span class="pointer"
|
<span class="pointer"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<a class="social-link-mastodon" href="https://mastodon.social/@joplinapp" title="Joplin Mastodon feed"><i class="fab fa-mastodon"></i></a>
|
<a class="social-link-mastodon" href="https://mastodon.social/@joplinapp" title="Joplin Mastodon feed"><i class="fab fa-mastodon"></i></a>
|
||||||
<a class="social-link-patreon" href="https://www.patreon.com/joplin" title="Joplin Patreon"><i class="fab fa-patreon"></i></a>
|
<a class="social-link-patreon" href="https://www.patreon.com/joplin" title="Joplin Patreon"><i class="fab fa-patreon"></i></a>
|
||||||
<a class="social-link-discord" href="https://discord.gg/VSj7AFHvpq" title="Joplin Discord chat"><i class="fab fa-discord"></i></a>
|
<a class="social-link-discord" href="https://discord.gg/VSj7AFHvpq" title="Joplin Discord chat"><i class="fab fa-discord"></i></a>
|
||||||
|
<a class="social-link-linkedin" href="https://www.linkedin.com/company/joplin" title="Joplin LinkedIn Feed"><i class="fab fa-linkedin"></i></a>
|
||||||
<a class="social-link-reddit" href="https://www.reddit.com/r/joplinapp/" title="Joplin Subreddit"><i class="fab fa-reddit"></i></a>
|
<a class="social-link-reddit" href="https://www.reddit.com/r/joplinapp/" title="Joplin Subreddit"><i class="fab fa-reddit"></i></a>
|
||||||
<a class="social-link-github" href="https://github.com/laurent22/joplin/" title="Joplin GitHub repository"><i class="fab fa-github"></i></a>
|
<a class="social-link-github" href="https://github.com/laurent22/joplin/" title="Joplin GitHub repository"><i class="fab fa-github"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<a href="https://twitter.com/joplinapp" title="Joplin Twitter feed" class="fw500"><i class="fab fa-twitter"></i></a>
|
<a href="https://twitter.com/joplinapp" title="Joplin Twitter feed" class="fw500 twitter-link"><i class="fab fa-twitter"></i></a>
|
||||||
@@ -130,7 +130,11 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
setupBetaHandling(urlQuery);
|
setupBetaHandling(urlQuery);
|
||||||
applyPeriod('yearly');
|
if (urlQuery.get('period') === 'monthly') {
|
||||||
|
// Nothing - this is the default
|
||||||
|
} else {
|
||||||
|
applyPeriod('yearly');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ COPY packages/fork-uslug ./packages/fork-uslug
|
|||||||
COPY packages/htmlpack ./packages/htmlpack
|
COPY packages/htmlpack ./packages/htmlpack
|
||||||
COPY packages/renderer ./packages/renderer
|
COPY packages/renderer ./packages/renderer
|
||||||
COPY packages/tools ./packages/tools
|
COPY packages/tools ./packages/tools
|
||||||
|
COPY packages/utils ./packages/utils
|
||||||
COPY packages/lib ./packages/lib
|
COPY packages/lib ./packages/lib
|
||||||
COPY packages/server ./packages/server
|
COPY packages/server ./packages/server
|
||||||
|
|
||||||
|
|||||||
89
README.md
89
README.md
@@ -64,7 +64,7 @@ A community maintained list of these distributions can be found here: [Unofficia
|
|||||||
# Sponsors
|
# Sponsors
|
||||||
|
|
||||||
<!-- SPONSORS-ORG -->
|
<!-- SPONSORS-ORG -->
|
||||||
<a href="https://seirei.ne.jp"><img title="Serei Network" width="256" src="https://joplinapp.org/images/sponsors/SeireiNetwork.png"/></a> <a href="https://usrigging.com/"><img title="U.S. Ringing Supply" width="256" src="https://joplinapp.org/images/sponsors/RingingSupply.svg"/></a> <a href="https://www.hosting.de/nextcloud/?mtm_campaign=managed-nextcloud&mtm_kwd=joplinapp&mtm_source=joplinapp-github&mtm_medium=banner"><img title="Hosting.de" width="256" src="https://joplinapp.org/images/sponsors/HostingDe.png"/></a> <a href="https://residence-greece.com/"><img title="Greece Golden Visa" width="256" src="https://joplinapp.org/images/sponsors/ResidenceGreece.jpg"/></a> <a href="https://grundstueckspreise.info/"><img title="SP Software GmbH" width="256" src="https://joplinapp.org/images/sponsors/Grundstueckspreise.png"/></a>
|
<a href="https://seirei.ne.jp"><img title="Serei Network" width="256" src="https://joplinapp.org/images/sponsors/SeireiNetwork.png"/></a> <a href="https://www.hosting.de/nextcloud/?mtm_campaign=managed-nextcloud&mtm_kwd=joplinapp&mtm_source=joplinapp-webseite&mtm_medium=banner"><img title="Hosting.de" width="256" src="https://joplinapp.org/images/sponsors/HostingDe.png"/></a> <a href="https://residence-greece.com/"><img title="Greece Golden Visa" width="256" src="https://joplinapp.org/images/sponsors/ResidenceGreece.jpg"/></a> <a href="https://grundstueckspreise.info/"><img title="SP Software GmbH" width="256" src="https://joplinapp.org/images/sponsors/Grundstueckspreise.png"/></a>
|
||||||
<!-- SPONSORS-ORG -->
|
<!-- SPONSORS-ORG -->
|
||||||
|
|
||||||
* * *
|
* * *
|
||||||
@@ -72,14 +72,11 @@ A community maintained list of these distributions can be found here: [Unofficia
|
|||||||
<!-- SPONSORS-GITHUB -->
|
<!-- SPONSORS-GITHUB -->
|
||||||
| | | | |
|
| | | | |
|
||||||
| :---: | :---: | :---: | :---: |
|
| :---: | :---: | :---: | :---: |
|
||||||
| <img width="50" src="https://avatars2.githubusercontent.com/u/215668?s=96&v=4"/></br>[avanderberg](https://github.com/avanderberg) | <img width="50" src="https://avatars2.githubusercontent.com/u/3061769?s=96&v=4"/></br>[c-nagy](https://github.com/c-nagy) | <img width="50" src="https://avatars2.githubusercontent.com/u/70780798?s=96&v=4"/></br>[cabottech](https://github.com/cabottech) | <img width="50" src="https://avatars2.githubusercontent.com/u/67130?s=96&v=4"/></br>[chr15m](https://github.com/chr15m) |
|
| <img width="50" src="https://avatars2.githubusercontent.com/u/215668?s=96&v=4"/></br>[avanderberg](https://github.com/avanderberg) | <img width="50" src="https://avatars2.githubusercontent.com/u/67130?s=96&v=4"/></br>[chr15m](https://github.com/chr15m) | <img width="50" src="https://avatars2.githubusercontent.com/u/2793530?s=96&v=4"/></br>[CyberXZT](https://github.com/CyberXZT) | <img width="50" src="https://avatars2.githubusercontent.com/u/1307332?s=96&v=4"/></br>[dbrandonjohnson](https://github.com/dbrandonjohnson) |
|
||||||
| <img width="50" src="https://avatars2.githubusercontent.com/u/4862947?s=96&v=4"/></br>[chrootlogin](https://github.com/chrootlogin) | <img width="50" src="https://avatars2.githubusercontent.com/u/82579431?s=96&v=4"/></br>[clmntsl](https://github.com/clmntsl) | <img width="50" src="https://avatars2.githubusercontent.com/u/808091?s=96&v=4"/></br>[cuongtransc](https://github.com/cuongtransc) | <img width="50" src="https://avatars2.githubusercontent.com/u/1307332?s=96&v=4"/></br>[dbrandonjohnson](https://github.com/dbrandonjohnson) |
|
| <img width="50" src="https://avatars2.githubusercontent.com/u/49439044?s=96&v=4"/></br>[fourstepper](https://github.com/fourstepper) | <img width="50" src="https://avatars2.githubusercontent.com/u/64712218?s=96&v=4"/></br>[Hegghammer](https://github.com/Hegghammer) | <img width="50" src="https://avatars2.githubusercontent.com/u/3266447?s=96&v=4"/></br>[iamwillbar](https://github.com/iamwillbar) | <img width="50" src="https://avatars2.githubusercontent.com/u/1310474?s=96&v=4"/></br>[jknowles](https://github.com/jknowles) |
|
||||||
| <img width="50" src="https://avatars2.githubusercontent.com/u/1439535?s=96&v=4"/></br>[fbloise](https://github.com/fbloise) | <img width="50" src="https://avatars2.githubusercontent.com/u/49439044?s=96&v=4"/></br>[fourstepper](https://github.com/fourstepper) | <img width="50" src="https://avatars2.githubusercontent.com/u/38898566?s=96&v=4"/></br>[h4sh5](https://github.com/h4sh5) | <img width="50" src="https://avatars2.githubusercontent.com/u/3266447?s=96&v=4"/></br>[iamwillbar](https://github.com/iamwillbar) |
|
| <img width="50" src="https://avatars2.githubusercontent.com/u/11947658?s=96&v=4"/></br>[KentBrockman](https://github.com/KentBrockman) | <img width="50" src="https://avatars2.githubusercontent.com/u/5588131?s=96&v=4"/></br>[kianenigma](https://github.com/kianenigma) | <img width="50" src="https://avatars2.githubusercontent.com/u/24908652?s=96&v=4"/></br>[konishi-t](https://github.com/konishi-t) | <img width="50" src="https://avatars2.githubusercontent.com/u/42319182?s=96&v=4"/></br>[marcdw1289](https://github.com/marcdw1289) |
|
||||||
| <img width="50" src="https://avatars2.githubusercontent.com/u/37297218?s=96&v=4"/></br>[Jesssullivan](https://github.com/Jesssullivan) | <img width="50" src="https://avatars2.githubusercontent.com/u/1310474?s=96&v=4"/></br>[jknowles](https://github.com/jknowles) | <img width="50" src="https://avatars2.githubusercontent.com/u/1248504?s=96&v=4"/></br>[joesfer](https://github.com/joesfer) | <img width="50" src="https://avatars2.githubusercontent.com/u/5588131?s=96&v=4"/></br>[kianenigma](https://github.com/kianenigma) |
|
| <img width="50" src="https://avatars2.githubusercontent.com/u/126279083?s=96&v=4"/></br>[matmoly](https://github.com/matmoly) | <img width="50" src="https://avatars2.githubusercontent.com/u/1788010?s=96&v=4"/></br>[maxtruxa](https://github.com/maxtruxa) | <img width="50" src="https://avatars2.githubusercontent.com/u/29300939?s=96&v=4"/></br>[mcejp](https://github.com/mcejp) | <img width="50" src="https://avatars2.githubusercontent.com/u/31054972?s=96&v=4"/></br>[saarantras](https://github.com/saarantras) |
|
||||||
| <img width="50" src="https://avatars2.githubusercontent.com/u/24908652?s=96&v=4"/></br>[konishi-t](https://github.com/konishi-t) | <img width="50" src="https://avatars2.githubusercontent.com/u/42319182?s=96&v=4"/></br>[marcdw1289](https://github.com/marcdw1289) | <img width="50" src="https://avatars2.githubusercontent.com/u/1788010?s=96&v=4"/></br>[maxtruxa](https://github.com/maxtruxa) | <img width="50" src="https://avatars2.githubusercontent.com/u/29300939?s=96&v=4"/></br>[mcejp](https://github.com/mcejp) |
|
| <img width="50" src="https://avatars2.githubusercontent.com/u/327998?s=96&v=4"/></br>[sif](https://github.com/sif) | <img width="50" src="https://avatars2.githubusercontent.com/u/765564?s=96&v=4"/></br>[taskcruncher](https://github.com/taskcruncher) | <img width="50" src="https://avatars2.githubusercontent.com/u/333944?s=96&v=4"/></br>[tateisu](https://github.com/tateisu) | |
|
||||||
| <img width="50" src="https://avatars2.githubusercontent.com/u/1168659?s=96&v=4"/></br>[nicholashead](https://github.com/nicholashead) | <img width="50" src="https://avatars2.githubusercontent.com/u/5782817?s=96&v=4"/></br>[piccobit](https://github.com/piccobit) | <img width="50" src="https://avatars2.githubusercontent.com/u/77214738?s=96&v=4"/></br>[Polymathic-Company](https://github.com/Polymathic-Company) | <img width="50" src="https://avatars2.githubusercontent.com/u/47742?s=96&v=4"/></br>[ravenscroftj](https://github.com/ravenscroftj) |
|
|
||||||
| <img width="50" src="https://avatars2.githubusercontent.com/u/327998?s=96&v=4"/></br>[sif](https://github.com/sif) | <img width="50" src="https://avatars2.githubusercontent.com/u/54626606?s=96&v=4"/></br>[skyrunner15](https://github.com/skyrunner15) | <img width="50" src="https://avatars2.githubusercontent.com/u/765564?s=96&v=4"/></br>[taskcruncher](https://github.com/taskcruncher) | <img width="50" src="https://avatars2.githubusercontent.com/u/73081837?s=96&v=4"/></br>[thismarty](https://github.com/thismarty) |
|
|
||||||
| <img width="50" src="https://avatars2.githubusercontent.com/u/15859362?s=96&v=4"/></br>[thomasbroussard](https://github.com/thomasbroussard) | | | |
|
|
||||||
<!-- SPONSORS-GITHUB -->
|
<!-- SPONSORS-GITHUB -->
|
||||||
|
|
||||||
<!-- TOC -->
|
<!-- TOC -->
|
||||||
@@ -129,6 +126,7 @@ A community maintained list of these distributions can be found here: [Unofficia
|
|||||||
- [Writing a technical spec](https://github.com/laurent22/joplin/blob/dev/readme/technical_spec.md)
|
- [Writing a technical spec](https://github.com/laurent22/joplin/blob/dev/readme/technical_spec.md)
|
||||||
- [Desktop application styling](https://github.com/laurent22/joplin/blob/dev/readme/spec/desktop_styling.md)
|
- [Desktop application styling](https://github.com/laurent22/joplin/blob/dev/readme/spec/desktop_styling.md)
|
||||||
- [Note History spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/history.md)
|
- [Note History spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/history.md)
|
||||||
|
- [Synchronisation spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/sync.md)
|
||||||
- [Sync Lock spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/sync_lock.md)
|
- [Sync Lock spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/sync_lock.md)
|
||||||
- [Synchronous Scroll spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/sync_scroll.md)
|
- [Synchronous Scroll spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/sync_scroll.md)
|
||||||
- [Plugin Architecture spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/plugins.md)
|
- [Plugin Architecture spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/plugins.md)
|
||||||
@@ -505,6 +503,7 @@ Name | Description
|
|||||||
[Mastodon feed](https://mastodon.social/@joplinapp) | Follow us on Mastodon
|
[Mastodon feed](https://mastodon.social/@joplinapp) | Follow us on Mastodon
|
||||||
[Patreon page](https://www.patreon.com/joplin) |The latest news are often posted there
|
[Patreon page](https://www.patreon.com/joplin) |The latest news are often posted there
|
||||||
[Discord server](https://discord.gg/VSj7AFHvpq) | Our chat server
|
[Discord server](https://discord.gg/VSj7AFHvpq) | Our chat server
|
||||||
|
[LinkedIn](https://www.linkedin.com/company/joplin) | Our LinkedIn page
|
||||||
[Sub-reddit](https://www.reddit.com/r/joplinapp/) | Also a good place to get help
|
[Sub-reddit](https://www.reddit.com/r/joplinapp/) | Also a good place to get help
|
||||||
|
|
||||||
# Contributing
|
# Contributing
|
||||||
@@ -530,47 +529,47 @@ Current translations:
|
|||||||
<!-- LOCALE-TABLE-AUTO-GENERATED -->
|
<!-- LOCALE-TABLE-AUTO-GENERATED -->
|
||||||
| Language | Po File | Last translator | Percent done
|
| Language | Po File | Last translator | Percent done
|
||||||
---|---|---|---|---
|
---|---|---|---|---
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/arableague.png" width="16px"/> | Arabic | [ar](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ar.po) | [Whaell O](mailto:Whaell@protonmail.com) | 82%
|
<img src="https://joplinapp.org/images/flags/country-4x3/arableague.png" width="16px"/> | Arabic | [ar](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ar.po) | [Whaell O](mailto:Whaell@protonmail.com) | 80%
|
||||||
<img src="https://joplinapp.org/images/flags/es/basque_country.png" width="16px"/> | Basque | [eu](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/eu.po) | juan.abasolo@ehu.eus | 23%
|
<img src="https://joplinapp.org/images/flags/es/basque_country.png" width="16px"/> | Basque | [eu](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/eu.po) | juan.abasolo@ehu.eus | 23%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/ba.png" width="16px"/> | Bosnian (Bosna i Hercegovina) | [bs_BA](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/bs_BA.po) | [Derviš T.](mailto:dervis.t@pm.me) | 59%
|
<img src="https://joplinapp.org/images/flags/country-4x3/ba.png" width="16px"/> | Bosnian (Bosna i Hercegovina) | [bs_BA](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/bs_BA.po) | [Derviš T.](mailto:dervis.t@pm.me) | 58%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/bg.png" width="16px"/> | Bulgarian (България) | [bg_BG](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/bg_BG.po) | | 46%
|
<img src="https://joplinapp.org/images/flags/country-4x3/bg.png" width="16px"/> | Bulgarian (България) | [bg_BG](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/bg_BG.po) | | 45%
|
||||||
<img src="https://joplinapp.org/images/flags/es/catalonia.png" width="16px"/> | Catalan | [ca](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ca.po) | [Xavi Ivars](mailto:xavi.ivars@gmail.com) | 92%
|
<img src="https://joplinapp.org/images/flags/es/catalonia.png" width="16px"/> | Catalan | [ca](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ca.po) | [Xavi Ivars](mailto:xavi.ivars@gmail.com) | 89%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/hr.png" width="16px"/> | Croatian (Hrvatska) | [hr_HR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/hr_HR.po) | [Milo Ivir](mailto:mail@milotype.de) | 92%
|
<img src="https://joplinapp.org/images/flags/country-4x3/hr.png" width="16px"/> | Croatian (Hrvatska) | [hr_HR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/hr_HR.po) | [Milo Ivir](mailto:mail@milotype.de) | 89%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/cz.png" width="16px"/> | Czech (Česká republika) | [cs_CZ](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/cs_CZ.po) | [Michal Stanke](mailto:michal@stanke.cz) | 79%
|
<img src="https://joplinapp.org/images/flags/country-4x3/cz.png" width="16px"/> | Czech (Česká republika) | [cs_CZ](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/cs_CZ.po) | [Michal Stanke](mailto:michal@stanke.cz) | 77%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/dk.png" width="16px"/> | Dansk (Danmark) | [da_DK](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/da_DK.po) | ERYpTION | 99%
|
<img src="https://joplinapp.org/images/flags/country-4x3/dk.png" width="16px"/> | Dansk (Danmark) | [da_DK](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/da_DK.po) | ERYpTION | 99%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/de.png" width="16px"/> | Deutsch (Deutschland) | [de_DE](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/de_DE.po) | [MrKanister](mailto:pueblos_spatulas@aleeas.com) | 99%
|
<img src="https://joplinapp.org/images/flags/country-4x3/de.png" width="16px"/> | Deutsch (Deutschland) | [de_DE](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/de_DE.po) | [MrKanister](mailto:pueblos_spatulas@aleeas.com) | 99%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/ee.png" width="16px"/> | Eesti Keel (Eesti) | [et_EE](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/et_EE.po) | | 45%
|
<img src="https://joplinapp.org/images/flags/country-4x3/ee.png" width="16px"/> | Eesti Keel (Eesti) | [et_EE](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/et_EE.po) | | 44%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/gb.png" width="16px"/> | English (United Kingdom) | [en_GB](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/en_GB.po) | | 100%
|
<img src="https://joplinapp.org/images/flags/country-4x3/gb.png" width="16px"/> | English (United Kingdom) | [en_GB](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/en_GB.po) | | 100%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/us.png" width="16px"/> | English (United States of America) | [en_US](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/en_US.po) | | 100%
|
<img src="https://joplinapp.org/images/flags/country-4x3/us.png" width="16px"/> | English (United States of America) | [en_US](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/en_US.po) | | 100%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/es.png" width="16px"/> | Español (España) | [es_ES](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/es_ES.po) | [Francisco Mora](mailto:francisco.m.collao@gmail.com) | 91%
|
<img src="https://joplinapp.org/images/flags/country-4x3/es.png" width="16px"/> | Español (España) | [es_ES](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/es_ES.po) | [Francisco Villaverde](mailto:teko.gr@gmail.com) | 99%
|
||||||
<img src="https://joplinapp.org/images/flags/esperanto.png" width="16px"/> | Esperanto | [eo](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/eo.po) | Marton Paulo | 26%
|
<img src="https://joplinapp.org/images/flags/esperanto.png" width="16px"/> | Esperanto | [eo](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/eo.po) | Marton Paulo | 25%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/fi.png" width="16px"/> | Finnish (Suomi) | [fi_FI](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/fi_FI.po) | mrkaato0 | 98%
|
<img src="https://joplinapp.org/images/flags/country-4x3/fi.png" width="16px"/> | Finnish (Suomi) | [fi_FI](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/fi_FI.po) | mrkaato0 | 95%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/fr.png" width="16px"/> | Français (France) | [fr_FR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/fr_FR.po) | Laurent Cozic | 98%
|
<img src="https://joplinapp.org/images/flags/country-4x3/fr.png" width="16px"/> | Français (France) | [fr_FR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/fr_FR.po) | Laurent Cozic | 99%
|
||||||
<img src="https://joplinapp.org/images/flags/es/galicia.png" width="16px"/> | Galician (España) | [gl_ES](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/gl_ES.po) | [Marcos Lans](mailto:marcoslansgarza@gmail.com) | 30%
|
<img src="https://joplinapp.org/images/flags/es/galicia.png" width="16px"/> | Galician (España) | [gl_ES](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/gl_ES.po) | [Marcos Lans](mailto:marcoslansgarza@gmail.com) | 29%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/id.png" width="16px"/> | Indonesian (Indonesia) | [id_ID](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/id_ID.po) | [Wisnu Adi Santoso](mailto:waditos@gmail.com) | 92%
|
<img src="https://joplinapp.org/images/flags/country-4x3/id.png" width="16px"/> | Indonesian (Indonesia) | [id_ID](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/id_ID.po) | [Wisnu Adi Santoso](mailto:waditos@gmail.com) | 89%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/it.png" width="16px"/> | Italiano (Italia) | [it_IT](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/it_IT.po) | [Albano Battistella](mailto:albano_battistella@hotmail.com) | 80%
|
<img src="https://joplinapp.org/images/flags/country-4x3/it.png" width="16px"/> | Italiano (Italia) | [it_IT](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/it_IT.po) | [Manuel Tassi](mailto:mannivuwiki@gmail.com) | 81%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/hu.png" width="16px"/> | Magyar (Magyarország) | [hu_HU](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/hu_HU.po) | [Magyari Balázs](mailto:balmag@gmail.com) | 80%
|
<img src="https://joplinapp.org/images/flags/country-4x3/hu.png" width="16px"/> | Magyar (Magyarország) | [hu_HU](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/hu_HU.po) | [Magyari Balázs](mailto:balmag@gmail.com) | 78%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/be.png" width="16px"/> | Nederlands (België, Belgique, Belgien) | [nl_BE](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/nl_BE.po) | | 81%
|
<img src="https://joplinapp.org/images/flags/country-4x3/be.png" width="16px"/> | Nederlands (België, Belgique, Belgien) | [nl_BE](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/nl_BE.po) | | 79%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/nl.png" width="16px"/> | Nederlands (Nederland) | [nl_NL](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/nl_NL.po) | [MHolkamp](mailto:mholkamp@users.noreply.github.com) | 91%
|
<img src="https://joplinapp.org/images/flags/country-4x3/nl.png" width="16px"/> | Nederlands (Nederland) | [nl_NL](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/nl_NL.po) | [MHolkamp](mailto:mholkamp@users.noreply.github.com) | 88%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/no.png" width="16px"/> | Norwegian (Norge, Noreg) | [nb_NO](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/nb_NO.po) | [Mats Estensen](mailto:code@mxe.no) | 91%
|
<img src="https://joplinapp.org/images/flags/country-4x3/no.png" width="16px"/> | Norwegian (Norge, Noreg) | [nb_NO](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/nb_NO.po) | [Mats Estensen](mailto:code@mxe.no) | 88%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/ir.png" width="16px"/> | Persian | [fa](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/fa.po) | [Kourosh Firoozbakht](mailto:kourox@protonmail.com) | 57%
|
<img src="https://joplinapp.org/images/flags/country-4x3/ir.png" width="16px"/> | Persian | [fa](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/fa.po) | [Kourosh Firoozbakht](mailto:kourox@protonmail.com) | 55%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/pl.png" width="16px"/> | Polski (Polska) | [pl_PL](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/pl_PL.po) | [X3NO](mailto:X3NO@disroot.org) | 92%
|
<img src="https://joplinapp.org/images/flags/country-4x3/pl.png" width="16px"/> | Polski (Polska) | [pl_PL](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/pl_PL.po) | [X3NO](mailto:X3NO@disroot.org) | 91%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/br.png" width="16px"/> | Português (Brasil) | [pt_BR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/pt_BR.po) | [Renato Nunes Bastos](mailto:rnbastos@gmail.com) | 91%
|
<img src="https://joplinapp.org/images/flags/country-4x3/br.png" width="16px"/> | Português (Brasil) | [pt_BR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/pt_BR.po) | [Renato Nunes Bastos](mailto:rnbastos@gmail.com) | 88%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/pt.png" width="16px"/> | Português (Portugal) | [pt_PT](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/pt_PT.po) | [Diogo Caveiro](mailto:dcaveiro@yahoo.com) | 75%
|
<img src="https://joplinapp.org/images/flags/country-4x3/pt.png" width="16px"/> | Português (Portugal) | [pt_PT](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/pt_PT.po) | [Diogo Caveiro](mailto:dcaveiro@yahoo.com) | 73%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/ro.png" width="16px"/> | Română | [ro](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ro.po) | [Cristi Duluta](mailto:cristi.duluta@gmail.com) | 52%
|
<img src="https://joplinapp.org/images/flags/country-4x3/ro.png" width="16px"/> | Română | [ro](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ro.po) | [Cristi Duluta](mailto:cristi.duluta@gmail.com) | 51%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/si.png" width="16px"/> | Slovenian (Slovenija) | [sl_SI](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/sl_SI.po) | [Martin Korelič](mailto:martin.korelic@protonmail.com) | 83%
|
<img src="https://joplinapp.org/images/flags/country-4x3/si.png" width="16px"/> | Slovenian (Slovenija) | [sl_SI](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/sl_SI.po) | [Martin Korelič](mailto:martin.korelic@protonmail.com) | 80%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/se.png" width="16px"/> | Svenska | [sv](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/sv.po) | [Jonatan Nyberg](mailto:jonatan@autistici.org) | 99%
|
<img src="https://joplinapp.org/images/flags/country-4x3/se.png" width="16px"/> | Svenska | [sv](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/sv.po) | [Jonatan Nyberg](mailto:jonatan@autistici.org) | 96%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/th.png" width="16px"/> | Thai (ประเทศไทย) | [th_TH](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/th_TH.po) | | 38%
|
<img src="https://joplinapp.org/images/flags/country-4x3/th.png" width="16px"/> | Thai (ประเทศไทย) | [th_TH](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/th_TH.po) | | 36%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/vn.png" width="16px"/> | Tiếng Việt | [vi](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/vi.po) | | 80%
|
<img src="https://joplinapp.org/images/flags/country-4x3/vn.png" width="16px"/> | Tiếng Việt | [vi](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/vi.po) | | 78%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/tr.png" width="16px"/> | Türkçe (Türkiye) | [tr_TR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/tr_TR.po) | [Arda Kılıçdağı](mailto:arda@kilicdagi.com) | 92%
|
<img src="https://joplinapp.org/images/flags/country-4x3/tr.png" width="16px"/> | Türkçe (Türkiye) | [tr_TR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/tr_TR.po) | [Arda Kılıçdağı](mailto:arda@kilicdagi.com) | 89%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/ua.png" width="16px"/> | Ukrainian (Україна) | [uk_UA](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/uk_UA.po) | [Vyacheslav Andreykiv](mailto:vandreykiv@gmail.com) | 75%
|
<img src="https://joplinapp.org/images/flags/country-4x3/ua.png" width="16px"/> | Ukrainian (Україна) | [uk_UA](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/uk_UA.po) | [Vyacheslav Andreykiv](mailto:vandreykiv@gmail.com) | 72%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/gr.png" width="16px"/> | Ελληνικά (Ελλάδα) | [el_GR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/el_GR.po) | [Harris Arvanitis](mailto:xaris@tuta.io) | 91%
|
<img src="https://joplinapp.org/images/flags/country-4x3/gr.png" width="16px"/> | Ελληνικά (Ελλάδα) | [el_GR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/el_GR.po) | [Harris Arvanitis](mailto:xaris@tuta.io) | 88%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/ru.png" width="16px"/> | Русский (Россия) | [ru_RU](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ru_RU.po) | [Sergey Segeda](mailto:thesermanarm@gmail.com) | 83%
|
<img src="https://joplinapp.org/images/flags/country-4x3/ru.png" width="16px"/> | Русский (Россия) | [ru_RU](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ru_RU.po) | [Dmitriy Q](mailto:krotesk@mail.ru) | 99%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/rs.png" width="16px"/> | српски језик (Србија) | [sr_RS](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/sr_RS.po) | | 67%
|
<img src="https://joplinapp.org/images/flags/country-4x3/rs.png" width="16px"/> | српски језик (Србија) | [sr_RS](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/sr_RS.po) | | 65%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/cn.png" width="16px"/> | 中文 (简体) | [zh_CN](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/zh_CN.po) | [KaneGreen](mailto:737445366KG@Gmail.com) | 97%
|
<img src="https://joplinapp.org/images/flags/country-4x3/cn.png" width="16px"/> | 中文 (简体) | [zh_CN](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/zh_CN.po) | [wh201906](mailto:wh201906@yandex.com) | 97%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/tw.png" width="16px"/> | 中文 (繁體) | [zh_TW](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/zh_TW.po) | [Kevin Hsu](mailto:kevin.hsu.hws@gmail.com) | 92%
|
<img src="https://joplinapp.org/images/flags/country-4x3/tw.png" width="16px"/> | 中文 (繁體) | [zh_TW](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/zh_TW.po) | [Kevin Hsu](mailto:kevin.hsu.hws@gmail.com) | 89%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/jp.png" width="16px"/> | 日本語 (日本) | [ja_JP](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ja_JP.po) | [genneko](mailto:genneko217@gmail.com) | 92%
|
<img src="https://joplinapp.org/images/flags/country-4x3/jp.png" width="16px"/> | 日本語 (日本) | [ja_JP](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ja_JP.po) | [genneko](mailto:genneko217@gmail.com) | 89%
|
||||||
<img src="https://joplinapp.org/images/flags/country-4x3/kr.png" width="16px"/> | 한국어 | [ko](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ko.po) | [Ji-Hyeon Gim](mailto:potatogim@potatogim.net) | 92%
|
<img src="https://joplinapp.org/images/flags/country-4x3/kr.png" width="16px"/> | 한국어 | [ko](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/ko.po) | [Ji-Hyeon Gim](mailto:potatogim@potatogim.net) | 89%
|
||||||
<!-- LOCALE-TABLE-AUTO-GENERATED -->
|
<!-- LOCALE-TABLE-AUTO-GENERATED -->
|
||||||
|
|
||||||
# Contributors
|
# Contributors
|
||||||
|
|||||||
53
gulpfile.js
53
gulpfile.js
@@ -1,23 +1,52 @@
|
|||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const utils = require('./packages/tools/gulp/utils');
|
const execa = require('execa');
|
||||||
|
const { stdout } = require('process');
|
||||||
|
|
||||||
|
const execCommand = async (executableName, args, options = null) => {
|
||||||
|
options = {
|
||||||
|
showInput: true,
|
||||||
|
showStdout: true,
|
||||||
|
showStderr: true,
|
||||||
|
quiet: false,
|
||||||
|
...options,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (options.quiet) {
|
||||||
|
options.showInput = false;
|
||||||
|
options.showStdout = false;
|
||||||
|
options.showStderr = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.showInput) {
|
||||||
|
stdout.write(`> ${executableName} ${args.join(' ')}\n`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const promise = execa(executableName, args);
|
||||||
|
if (options.showStdout && promise.stdout) promise.stdout.pipe(process.stdout);
|
||||||
|
if (options.showStderr && promise.stderr) promise.stderr.pipe(process.stderr);
|
||||||
|
const result = await promise;
|
||||||
|
return result.stdout.trim();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const tasks = {
|
const tasks = {
|
||||||
updateIgnoredTypeScriptBuild: require('./packages/tools/gulp/tasks/updateIgnoredTypeScriptBuild'),
|
|
||||||
buildCommandIndex: require('./packages/tools/gulp/tasks/buildCommandIndex'),
|
|
||||||
completePublishAll: {
|
completePublishAll: {
|
||||||
fn: async () => {
|
fn: async () => {
|
||||||
|
await execCommand('git', ['add', '-A']);
|
||||||
await utils.execCommandVerbose('git', ['add', '-A']);
|
await execCommand('git', ['commit', '-m', 'Releasing sub-packages']);
|
||||||
await utils.execCommandVerbose('git', ['commit', '-m', 'Releasing sub-packages']);
|
|
||||||
|
|
||||||
// Lerna does some unnecessary auth check that doesn't work with
|
// Lerna does some unnecessary auth check that doesn't work with
|
||||||
// automation tokens, thus the --no-verify-access. Automation token
|
// automation tokens, thus the --no-verify-access. Automation token
|
||||||
// is still used for access when publishing even with this flag
|
// is still used for access when publishing even with this flag
|
||||||
// (publishing would fail otherwise).
|
// (publishing would fail otherwise).
|
||||||
// https://github.com/lerna/lerna/issues/2788
|
// https://github.com/lerna/lerna/issues/2788
|
||||||
await utils.execCommandVerbose('lerna', ['publish', 'from-package', '-y', '--no-verify-access']);
|
await execCommand('lerna', ['publish', 'from-package', '-y', '--no-verify-access']);
|
||||||
|
|
||||||
await utils.execCommandVerbose('git', ['push']);
|
await execCommand('yarn', ['install']);
|
||||||
|
await execCommand('git', ['add', '-A']);
|
||||||
|
await execCommand('git', ['commit', '-m', 'Lock file']);
|
||||||
|
|
||||||
|
await execCommand('git', ['push']);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
@@ -30,12 +59,14 @@ const tasks = {
|
|||||||
// faster, especially when having to rebuild after adding a
|
// faster, especially when having to rebuild after adding a
|
||||||
// dependency.
|
// dependency.
|
||||||
if (process.env.BUILD_SEQUENCIAL === '1') {
|
if (process.env.BUILD_SEQUENCIAL === '1') {
|
||||||
await utils.execCommandVerbose('yarn', ['run', 'buildSequential']);
|
await execCommand('yarn', ['run', 'buildSequential']);
|
||||||
} else {
|
} else {
|
||||||
await utils.execCommandVerbose('yarn', ['run', 'buildParallel']);
|
await execCommand('yarn', ['run', 'buildParallel']);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
utils.registerGulpTasks(gulp, tasks);
|
for (const taskName in tasks) {
|
||||||
|
gulp.task(taskName, tasks[taskName].fn);
|
||||||
|
}
|
||||||
|
|||||||
@@ -317,6 +317,9 @@
|
|||||||
"packages/app-tools/github_oauth_token.txt": true,
|
"packages/app-tools/github_oauth_token.txt": true,
|
||||||
"packages/generator-joplin/generators/app/templates/api/": true,
|
"packages/generator-joplin/generators/app/templates/api/": true,
|
||||||
"packages/htmlpack/dist/": true,
|
"packages/htmlpack/dist/": true,
|
||||||
|
"packages/react-native-alarm-notification/android/build": true,
|
||||||
|
"packages/react-native-saf-x/android/build": true,
|
||||||
|
"packages/react-native-saf-x/android/wrapper": true,
|
||||||
"packages/renderer/**/.vscode/": true,
|
"packages/renderer/**/.vscode/": true,
|
||||||
"packages/renderer/**/copyLib.bat": true,
|
"packages/renderer/**/copyLib.bat": true,
|
||||||
"packages/renderer/**/node_modules/": true,
|
"packages/renderer/**/node_modules/": true,
|
||||||
@@ -326,6 +329,7 @@
|
|||||||
"packages/renderer/MdToHtml/rules/sanitize_html.js": true,
|
"packages/renderer/MdToHtml/rules/sanitize_html.js": true,
|
||||||
"packages/server/db-*.sqlite": true,
|
"packages/server/db-*.sqlite": true,
|
||||||
"packages/server/dist/": true,
|
"packages/server/dist/": true,
|
||||||
|
"packages/utils/dist/": true,
|
||||||
"packages/server/temp": true,
|
"packages/server/temp": true,
|
||||||
"packages/server/test.pid": true,
|
"packages/server/test.pid": true,
|
||||||
"phpunit.xml": true,
|
"phpunit.xml": true,
|
||||||
|
|||||||
32
package.json
32
package.json
@@ -13,9 +13,9 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 --topological run build && yarn run tsc",
|
"buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 --topological run build && yarn run tsc",
|
||||||
"buildSequential": "yarn workspaces foreach --verbose --interlaced --topological run build && yarn run tsc",
|
"buildSequential": "yarn run tsc && yarn workspaces foreach --verbose --interlaced --topological-dev run build",
|
||||||
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
|
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
|
||||||
"buildCommandIndex": "gulp buildCommandIndex",
|
"buildCommandIndex": "node packages/tools/gulp/tasks/buildCommandIndexRun.js",
|
||||||
"buildPluginDoc": "typedoc --name 'Joplin Plugin API Documentation' --mode file -theme './Assets/PluginDocTheme/' --readme './Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out ../joplin-website/docs/api/references/plugin_api packages/lib/services/plugins/api/",
|
"buildPluginDoc": "typedoc --name 'Joplin Plugin API Documentation' --mode file -theme './Assets/PluginDocTheme/' --readme './Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out ../joplin-website/docs/api/references/plugin_api packages/lib/services/plugins/api/",
|
||||||
"updateMarkdownDoc": "node ./packages/tools/updateMarkdownDoc",
|
"updateMarkdownDoc": "node ./packages/tools/updateMarkdownDoc",
|
||||||
"updateNews": "node ./packages/tools/website/updateNews",
|
"updateNews": "node ./packages/tools/website/updateNews",
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
"test-ci": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 2 run test-ci",
|
"test-ci": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 2 run test-ci",
|
||||||
"test": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 2 run test",
|
"test": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 2 run test",
|
||||||
"tsc": "yarn workspaces foreach --parallel --verbose --interlaced run tsc",
|
"tsc": "yarn workspaces foreach --parallel --verbose --interlaced run tsc",
|
||||||
"updateIgnored": "gulp updateIgnoredTypeScriptBuild",
|
"updateIgnored": "node packages/tools/gulp/tasks/updateIgnoredTypeScriptBuildRun.js",
|
||||||
"updatePluginTypes": "./packages/generator-joplin/updateTypes.sh",
|
"updatePluginTypes": "./packages/generator-joplin/updateTypes.sh",
|
||||||
"watch": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 999 run watch",
|
"watch": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 999 run watch",
|
||||||
"watchWebsite": "nodemon --verbose --watch Assets/WebsiteAssets --watch packages/tools/website --watch packages/tools/website/utils --ext md,ts,js,mustache,css,tsx,gif,png,svg --exec \"node packages/tools/website/build.js && http-server --port 8077 ../joplin-website/docs -a localhost\""
|
"watchWebsite": "nodemon --verbose --watch Assets/WebsiteAssets --watch packages/tools/website --watch packages/tools/website/utils --ext md,ts,js,mustache,css,tsx,gif,png,svg --exec \"node packages/tools/website/build.js && http-server --port 8077 ../joplin-website/docs -a localhost\""
|
||||||
@@ -64,22 +64,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@joplin/utils": "~2.11",
|
||||||
"@seiyab/eslint-plugin-react-hooks": "4.5.1-beta.0",
|
"@seiyab/eslint-plugin-react-hooks": "4.5.1-beta.0",
|
||||||
"@typescript-eslint/eslint-plugin": "5.48.0",
|
"@typescript-eslint/eslint-plugin": "5.48.2",
|
||||||
"@typescript-eslint/parser": "5.48.0",
|
"@typescript-eslint/parser": "5.48.2",
|
||||||
"cspell": "5.21.2",
|
"cspell": "5.21.2",
|
||||||
"eslint": "8.31.0",
|
"eslint": "8.31.0",
|
||||||
"eslint-interactive": "10.3.0",
|
"eslint-interactive": "10.3.0",
|
||||||
"eslint-plugin-import": "2.26.0",
|
"eslint-plugin-import": "2.27.4",
|
||||||
|
"eslint-plugin-jest": "27.2.1",
|
||||||
"eslint-plugin-promise": "6.1.1",
|
"eslint-plugin-promise": "6.1.1",
|
||||||
"eslint-plugin-react": "7.31.11",
|
"eslint-plugin-react": "7.32.0",
|
||||||
"fs-extra": "11.1.0",
|
"execa": "5.1.1",
|
||||||
"glob": "8.0.3",
|
"fs-extra": "11.1.1",
|
||||||
|
"glob": "8.1.0",
|
||||||
"gulp": "4.0.2",
|
"gulp": "4.0.2",
|
||||||
"husky": "3.1.0",
|
"husky": "3.1.0",
|
||||||
"lerna": "3.22.1",
|
"lerna": "3.22.1",
|
||||||
"lint-staged": "13.1.0",
|
"lint-staged": "13.2.0",
|
||||||
"madge": "5.0.1",
|
"madge": "6.0.0",
|
||||||
"npm-package-json-lint": "6.4.0",
|
"npm-package-json-lint": "6.4.0",
|
||||||
"typedoc": "0.17.8",
|
"typedoc": "0.17.8",
|
||||||
"typescript": "4.9.4"
|
"typescript": "4.9.4"
|
||||||
@@ -88,7 +91,10 @@
|
|||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"http-server": "14.1.1",
|
"http-server": "14.1.1",
|
||||||
"node-gyp": "9.3.1",
|
"node-gyp": "9.3.1",
|
||||||
"nodemon": "2.0.20"
|
"nodemon": "2.0.22"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@3.3.1"
|
"packageManager": "yarn@3.3.1",
|
||||||
|
"resolutions": {
|
||||||
|
"react-native-camera@4.2.1": "patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ interface LinkStoreEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class LinkSelector {
|
class LinkSelector {
|
||||||
noteId_: string;
|
private noteId_: string;
|
||||||
scrollTop_: number;
|
private scrollTop_: number;
|
||||||
renderedText_: string;
|
private renderedText_: string;
|
||||||
currentLinkIndex_: number;
|
private currentLinkIndex_: number;
|
||||||
linkStore_: LinkStoreEntry[];
|
private linkStore_: LinkStoreEntry[];
|
||||||
linkRegex_: RegExp;
|
private linkRegex_: RegExp;
|
||||||
|
|
||||||
constructor() {
|
public constructor() {
|
||||||
this.noteId_ = null;
|
this.noteId_ = null;
|
||||||
this.scrollTop_ = null; // used so 'o' won't open unhighlighted link after scrolling
|
this.scrollTop_ = null; // used so 'o' won't open unhighlighted link after scrolling
|
||||||
this.renderedText_ = null;
|
this.renderedText_ = null;
|
||||||
@@ -22,22 +22,22 @@ class LinkSelector {
|
|||||||
this.linkRegex_ = /http:\/\/[0-9.]+:[0-9]+\/[0-9]+/g;
|
this.linkRegex_ = /http:\/\/[0-9.]+:[0-9]+\/[0-9]+/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
get link(): string | null {
|
public get link(): string | null {
|
||||||
if (this.currentLinkIndex_ === null) return null;
|
if (this.currentLinkIndex_ === null) return null;
|
||||||
return this.linkStore_[this.currentLinkIndex_].link;
|
return this.linkStore_[this.currentLinkIndex_].link;
|
||||||
}
|
}
|
||||||
|
|
||||||
get noteX(): number | null {
|
public get noteX(): number | null {
|
||||||
if (this.currentLinkIndex_ === null) return null;
|
if (this.currentLinkIndex_ === null) return null;
|
||||||
return this.linkStore_[this.currentLinkIndex_].noteX;
|
return this.linkStore_[this.currentLinkIndex_].noteX;
|
||||||
}
|
}
|
||||||
|
|
||||||
get noteY(): number | null {
|
public get noteY(): number | null {
|
||||||
if (this.currentLinkIndex_ === null) return null;
|
if (this.currentLinkIndex_ === null) return null;
|
||||||
return this.linkStore_[this.currentLinkIndex_].noteY;
|
return this.linkStore_[this.currentLinkIndex_].noteY;
|
||||||
}
|
}
|
||||||
|
|
||||||
findLinks(renderedText: string): LinkStoreEntry[] {
|
public findLinks(renderedText: string): LinkStoreEntry[] {
|
||||||
const newLinkStore: LinkStoreEntry[] = [];
|
const newLinkStore: LinkStoreEntry[] = [];
|
||||||
const lines: string[] = renderedText.split('\n');
|
const lines: string[] = renderedText.split('\n');
|
||||||
for (let i = 0; i < lines.length; i++) {
|
for (let i = 0; i < lines.length; i++) {
|
||||||
@@ -56,19 +56,19 @@ class LinkSelector {
|
|||||||
return newLinkStore;
|
return newLinkStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateText(renderedText: string): void {
|
public updateText(renderedText: string): void {
|
||||||
this.currentLinkIndex_ = null;
|
this.currentLinkIndex_ = null;
|
||||||
this.renderedText_ = renderedText;
|
this.renderedText_ = renderedText;
|
||||||
this.linkStore_ = this.findLinks(this.renderedText_);
|
this.linkStore_ = this.findLinks(this.renderedText_);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateNote(textWidget: any): void {
|
public updateNote(textWidget: any): void {
|
||||||
this.noteId_ = textWidget.noteId;
|
this.noteId_ = textWidget.noteId;
|
||||||
this.scrollTop_ = textWidget.scrollTop_;
|
this.scrollTop_ = textWidget.scrollTop_;
|
||||||
this.updateText(textWidget.renderedText_);
|
this.updateText(textWidget.renderedText_);
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollWidget(textWidget: any): void {
|
public scrollWidget(textWidget: any): void {
|
||||||
if (this.currentLinkIndex_ === null) return;
|
if (this.currentLinkIndex_ === null) return;
|
||||||
|
|
||||||
const noteY = this.linkStore_[this.currentLinkIndex_].noteY;
|
const noteY = this.linkStore_[this.currentLinkIndex_].noteY;
|
||||||
@@ -93,7 +93,7 @@ class LinkSelector {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
changeLink(textWidget: any, offset: number): void | null {
|
public changeLink(textWidget: any, offset: number): void | null {
|
||||||
if (textWidget.noteId !== this.noteId_) {
|
if (textWidget.noteId !== this.noteId_) {
|
||||||
this.updateNote(textWidget);
|
this.updateNote(textWidget);
|
||||||
this.changeLink(textWidget, offset);
|
this.changeLink(textWidget, offset);
|
||||||
@@ -123,7 +123,7 @@ class LinkSelector {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
openLink(textWidget: any): void {
|
public openLink(textWidget: any): void {
|
||||||
if (textWidget.noteId !== this.noteId_) return;
|
if (textWidget.noteId !== this.noteId_) return;
|
||||||
if (textWidget.renderedText_ !== this.renderedText_) return;
|
if (textWidget.renderedText_ !== this.renderedText_) return;
|
||||||
if (textWidget.scrollTop_ !== this.scrollTop_) return;
|
if (textWidget.scrollTop_ !== this.scrollTop_) return;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const Resource = require('@joplin/lib/models/Resource').default;
|
|||||||
const Setting = require('@joplin/lib/models/Setting').default;
|
const Setting = require('@joplin/lib/models/Setting').default;
|
||||||
const reducer = require('@joplin/lib/reducer').default;
|
const reducer = require('@joplin/lib/reducer').default;
|
||||||
const { defaultState } = require('@joplin/lib/reducer');
|
const { defaultState } = require('@joplin/lib/reducer');
|
||||||
const { splitCommandString } = require('@joplin/lib/string-utils.js');
|
const { splitCommandString } = require('@joplin/utils');
|
||||||
const { reg } = require('@joplin/lib/registry.js');
|
const { reg } = require('@joplin/lib/registry.js');
|
||||||
const { _ } = require('@joplin/lib/locale');
|
const { _ } = require('@joplin/lib/locale');
|
||||||
const shim = require('@joplin/lib/shim').default;
|
const shim = require('@joplin/lib/shim').default;
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ const Tag = require('@joplin/lib/models/Tag').default;
|
|||||||
const Setting = require('@joplin/lib/models/Setting').default;
|
const Setting = require('@joplin/lib/models/Setting').default;
|
||||||
const { reg } = require('@joplin/lib/registry.js');
|
const { reg } = require('@joplin/lib/registry.js');
|
||||||
const { fileExtension } = require('@joplin/lib/path-utils');
|
const { fileExtension } = require('@joplin/lib/path-utils');
|
||||||
const { splitCommandString, splitCommandBatch } = require('@joplin/lib/string-utils');
|
const { splitCommandString } = require('@joplin/utils');
|
||||||
|
const { splitCommandBatch } = require('@joplin/lib/string-utils');
|
||||||
const { _ } = require('@joplin/lib/locale');
|
const { _ } = require('@joplin/lib/locale');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const { cliUtils } = require('./cli-utils.js');
|
const { cliUtils } = require('./cli-utils.js');
|
||||||
@@ -246,6 +247,7 @@ class Application extends BaseApplication {
|
|||||||
showConsole: () => {},
|
showConsole: () => {},
|
||||||
maximizeConsole: () => {},
|
maximizeConsole: () => {},
|
||||||
stdout: text => {
|
stdout: text => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info(text);
|
console.info(text);
|
||||||
},
|
},
|
||||||
fullScreen: () => {},
|
fullScreen: () => {},
|
||||||
@@ -407,6 +409,7 @@ class Application extends BaseApplication {
|
|||||||
if (this.showStackTraces_) {
|
if (this.showStackTraces_) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} else {
|
} else {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info(error.message);
|
console.info(error.message);
|
||||||
}
|
}
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|||||||
@@ -125,14 +125,14 @@ async function handleAutocompletionPromise(line) {
|
|||||||
}
|
}
|
||||||
function handleAutocompletion(str, callback) {
|
function handleAutocompletion(str, callback) {
|
||||||
// eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied
|
// eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied
|
||||||
handleAutocompletionPromise(str).then(function(res) {
|
handleAutocompletionPromise(str).then((res) => {
|
||||||
callback(undefined, res);
|
callback(undefined, res);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function toCommandLine(args) {
|
function toCommandLine(args) {
|
||||||
if (Array.isArray(args)) {
|
if (Array.isArray(args)) {
|
||||||
return args
|
return args
|
||||||
.map(function(a) {
|
.map((a) => {
|
||||||
if (a.indexOf('"') !== -1 || a.indexOf(' ') !== -1) {
|
if (a.indexOf('"') !== -1 || a.indexOf(' ') !== -1) {
|
||||||
return `'${a}'`;
|
return `'${a}'`;
|
||||||
} else if (a.indexOf('\'') !== -1) {
|
} else if (a.indexOf('\'') !== -1) {
|
||||||
|
|||||||
@@ -1,97 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const locale_1 = require("@joplin/lib/locale");
|
|
||||||
const registry_js_1 = require("@joplin/lib/registry.js");
|
|
||||||
class BaseCommand {
|
|
||||||
constructor() {
|
|
||||||
this.stdout_ = null;
|
|
||||||
this.prompt_ = null;
|
|
||||||
}
|
|
||||||
usage() {
|
|
||||||
throw new Error('Usage not defined');
|
|
||||||
}
|
|
||||||
encryptionCheck(item) {
|
|
||||||
if (item && item.encryption_applied)
|
|
||||||
throw new Error((0, locale_1._)('Cannot change encrypted item'));
|
|
||||||
}
|
|
||||||
description() {
|
|
||||||
throw new Error('Description not defined');
|
|
||||||
}
|
|
||||||
action(_args) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
throw new Error('Action not defined');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
compatibleUis() {
|
|
||||||
return ['cli', 'gui'];
|
|
||||||
}
|
|
||||||
supportsUi(ui) {
|
|
||||||
return this.compatibleUis().indexOf(ui) >= 0;
|
|
||||||
}
|
|
||||||
options() {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
hidden() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
enabled() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
cancellable() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
cancel() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () { });
|
|
||||||
}
|
|
||||||
name() {
|
|
||||||
const r = this.usage().split(' ');
|
|
||||||
return r[0];
|
|
||||||
}
|
|
||||||
setDispatcher(fn) {
|
|
||||||
this.dispatcher_ = fn;
|
|
||||||
}
|
|
||||||
dispatch(action) {
|
|
||||||
if (!this.dispatcher_)
|
|
||||||
throw new Error('Dispatcher not defined');
|
|
||||||
return this.dispatcher_(action);
|
|
||||||
}
|
|
||||||
setStdout(fn) {
|
|
||||||
this.stdout_ = fn;
|
|
||||||
}
|
|
||||||
stdout(text) {
|
|
||||||
if (this.stdout_)
|
|
||||||
this.stdout_(text);
|
|
||||||
}
|
|
||||||
setPrompt(fn) {
|
|
||||||
this.prompt_ = fn;
|
|
||||||
}
|
|
||||||
prompt(message, options = null) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
if (!this.prompt_)
|
|
||||||
throw new Error('Prompt is undefined');
|
|
||||||
return yield this.prompt_(message, options);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
metadata() {
|
|
||||||
return {
|
|
||||||
name: this.name(),
|
|
||||||
usage: this.usage(),
|
|
||||||
options: this.options(),
|
|
||||||
hidden: this.hidden(),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
logger() {
|
|
||||||
return registry_js_1.reg.logger();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.default = BaseCommand;
|
|
||||||
//# sourceMappingURL=base-command.js.map
|
|
||||||
@@ -7,80 +7,80 @@ export default class BaseCommand {
|
|||||||
protected prompt_: any = null;
|
protected prompt_: any = null;
|
||||||
protected dispatcher_: any;
|
protected dispatcher_: any;
|
||||||
|
|
||||||
usage(): string {
|
public usage(): string {
|
||||||
throw new Error('Usage not defined');
|
throw new Error('Usage not defined');
|
||||||
}
|
}
|
||||||
|
|
||||||
encryptionCheck(item: any) {
|
public encryptionCheck(item: any) {
|
||||||
if (item && item.encryption_applied) throw new Error(_('Cannot change encrypted item'));
|
if (item && item.encryption_applied) throw new Error(_('Cannot change encrypted item'));
|
||||||
}
|
}
|
||||||
|
|
||||||
description() {
|
public description() {
|
||||||
throw new Error('Description not defined');
|
throw new Error('Description not defined');
|
||||||
}
|
}
|
||||||
|
|
||||||
async action(_args: any) {
|
public async action(_args: any) {
|
||||||
throw new Error('Action not defined');
|
throw new Error('Action not defined');
|
||||||
}
|
}
|
||||||
|
|
||||||
compatibleUis() {
|
public compatibleUis() {
|
||||||
return ['cli', 'gui'];
|
return ['cli', 'gui'];
|
||||||
}
|
}
|
||||||
|
|
||||||
supportsUi(ui: string) {
|
public supportsUi(ui: string) {
|
||||||
return this.compatibleUis().indexOf(ui) >= 0;
|
return this.compatibleUis().indexOf(ui) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
options(): any[] {
|
public options(): any[] {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
hidden() {
|
public hidden() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
enabled() {
|
public enabled() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cancellable() {
|
public cancellable() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async cancel() {}
|
public async cancel() {}
|
||||||
|
|
||||||
name() {
|
public name() {
|
||||||
const r = this.usage().split(' ');
|
const r = this.usage().split(' ');
|
||||||
return r[0];
|
return r[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
setDispatcher(fn: Function) {
|
public setDispatcher(fn: Function) {
|
||||||
this.dispatcher_ = fn;
|
this.dispatcher_ = fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch(action: any) {
|
public dispatch(action: any) {
|
||||||
if (!this.dispatcher_) throw new Error('Dispatcher not defined');
|
if (!this.dispatcher_) throw new Error('Dispatcher not defined');
|
||||||
return this.dispatcher_(action);
|
return this.dispatcher_(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
setStdout(fn: Function) {
|
public setStdout(fn: Function) {
|
||||||
this.stdout_ = fn;
|
this.stdout_ = fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
stdout(text: string) {
|
public stdout(text: string) {
|
||||||
if (this.stdout_) this.stdout_(text);
|
if (this.stdout_) this.stdout_(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
setPrompt(fn: Function) {
|
public setPrompt(fn: Function) {
|
||||||
this.prompt_ = fn;
|
this.prompt_ = fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
async prompt(message: string, options: any = null) {
|
public async prompt(message: string, options: any = null) {
|
||||||
if (!this.prompt_) throw new Error('Prompt is undefined');
|
if (!this.prompt_) throw new Error('Prompt is undefined');
|
||||||
return await this.prompt_(message, options);
|
return await this.prompt_(message, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
metadata() {
|
public metadata() {
|
||||||
return {
|
return {
|
||||||
name: this.name(),
|
name: this.name(),
|
||||||
usage: this.usage(),
|
usage: this.usage(),
|
||||||
@@ -89,7 +89,7 @@ export default class BaseCommand {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
logger() {
|
public logger() {
|
||||||
return reg.logger();
|
return reg.logger();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ async function main() {
|
|||||||
const commandsText = commandBlocks.join('\n\n');
|
const commandsText = commandBlocks.join('\n\n');
|
||||||
const footerText = getFooter();
|
const footerText = getFooter();
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info(`${headerText}\n\n` + 'USAGE' + `\n\n${commandsText}\n\n${footerText}`);
|
console.info(`${headerText}\n\n` + 'USAGE' + `\n\n${commandsText}\n\n${footerText}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const Logger = require('@joplin/lib/Logger').default;
|
const Logger = require('@joplin/lib/Logger').default;
|
||||||
const { dirname } = require('@joplin/lib/path-utils');
|
const { dirname } = require('@joplin/lib/path-utils');
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ cliUtils.makeCommandArgs = function(cmd, argv) {
|
|||||||
const options = cmd.options();
|
const options = cmd.options();
|
||||||
const booleanFlags = [];
|
const booleanFlags = [];
|
||||||
const aliases = {};
|
const aliases = {};
|
||||||
|
const flagSpecs = [];
|
||||||
for (let i = 0; i < options.length; i++) {
|
for (let i = 0; i < options.length; i++) {
|
||||||
if (options[i].length !== 2) throw new Error(`Invalid options: ${options[i]}`);
|
if (options[i].length !== 2) throw new Error(`Invalid options: ${options[i]}`);
|
||||||
let flags = options[i][0];
|
let flags = options[i][0];
|
||||||
@@ -96,6 +97,8 @@ cliUtils.makeCommandArgs = function(cmd, argv) {
|
|||||||
if (flags.short && flags.long) {
|
if (flags.short && flags.long) {
|
||||||
aliases[flags.long] = [flags.short];
|
aliases[flags.long] = [flags.short];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flagSpecs.push(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
const args = yargParser(argv, {
|
const args = yargParser(argv, {
|
||||||
@@ -121,6 +124,19 @@ cliUtils.makeCommandArgs = function(cmd, argv) {
|
|||||||
argOptions[key] = args[key];
|
argOptions[key] = args[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const [key, value] of Object.entries(argOptions)) {
|
||||||
|
const flagSpec = flagSpecs.find(s => {
|
||||||
|
return s.short === key || s.long === key;
|
||||||
|
});
|
||||||
|
if (flagSpec?.arg?.required) {
|
||||||
|
// If a flag is required, and no value is provided for it, Yargs
|
||||||
|
// sets the value to `true`.
|
||||||
|
if (value === true) {
|
||||||
|
throw new Error(_('Missing required flag value: %s', `-${flagSpec.short} <${flagSpec.arg.name}>`));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
output.options = argOptions;
|
output.options = argOptions;
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ class Command extends BaseCommand {
|
|||||||
let settingsObj;
|
let settingsObj;
|
||||||
try {
|
try {
|
||||||
settingsObj = JSON.parse(json);
|
settingsObj = JSON.parse(json);
|
||||||
} catch (err) {
|
} catch (error) {
|
||||||
isSettled = true;
|
isSettled = true;
|
||||||
return reject(new Error(`Invalid JSON passed to config --import: \n${err.message}.`));
|
return reject(new Error(`Invalid JSON passed to config --import: \n${error.message}.`));
|
||||||
}
|
}
|
||||||
if (settingsObj) {
|
if (settingsObj) {
|
||||||
Object.entries(settingsObj)
|
Object.entries(settingsObj)
|
||||||
|
|||||||
@@ -12,15 +12,15 @@ const imageType = require('image-type');
|
|||||||
const readChunk = require('read-chunk');
|
const readChunk = require('read-chunk');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
public usage() {
|
||||||
return 'e2ee <command> [path]';
|
return 'e2ee <command> [path]';
|
||||||
}
|
}
|
||||||
|
|
||||||
description() {
|
public description() {
|
||||||
return _('Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, `status`, `decrypt-file`, and `target-status`.'); // `generate-ppk`
|
return _('Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, `status`, `decrypt-file`, and `target-status`.'); // `generate-ppk`
|
||||||
}
|
}
|
||||||
|
|
||||||
options() {
|
public options() {
|
||||||
return [
|
return [
|
||||||
// This is here mostly for testing - shouldn't be used
|
// This is here mostly for testing - shouldn't be used
|
||||||
['-p, --password <password>', 'Use this password as master password (For security reasons, it is not recommended to use this option).'],
|
['-p, --password <password>', 'Use this password as master password (For security reasons, it is not recommended to use this option).'],
|
||||||
@@ -30,7 +30,7 @@ class Command extends BaseCommand {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
async action(args: any) {
|
public async action(args: any) {
|
||||||
const options = args.options;
|
const options = args.options;
|
||||||
|
|
||||||
const askForMasterKey = async (error: any) => {
|
const askForMasterKey = async (error: any) => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const BaseCommand = require('./base-command').default;
|
const BaseCommand = require('./base-command').default;
|
||||||
const { splitCommandString } = require('@joplin/lib/string-utils.js');
|
const { splitCommandString } = require('@joplin/utils');
|
||||||
const uuid = require('@joplin/lib/uuid').default;
|
const uuid = require('@joplin/lib/uuid').default;
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('@joplin/lib/locale');
|
const { _ } = require('@joplin/lib/locale');
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
const BaseCommand = require('./base-command').default;
|
|
||||||
const { app } = require('./app.js');
|
|
||||||
const { _ } = require('@joplin/lib/locale');
|
|
||||||
const Folder = require('@joplin/lib/models/Folder').default;
|
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
|
||||||
usage() {
|
|
||||||
return 'mkbook <new-notebook>';
|
|
||||||
}
|
|
||||||
|
|
||||||
description() {
|
|
||||||
return _('Creates a new notebook.');
|
|
||||||
}
|
|
||||||
|
|
||||||
async action(args) {
|
|
||||||
const folder = await Folder.save({ title: args['new-notebook'] }, { userSideValidation: true });
|
|
||||||
app().switchCurrentFolder(folder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = Command;
|
|
||||||
50
packages/app-cli/app/command-mkbook.test.ts
Normal file
50
packages/app-cli/app/command-mkbook.test.ts
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
import { setupDatabaseAndSynchronizer, switchClient } from '@joplin/lib/testing/test-utils';
|
||||||
|
import { setupCommandForTesting, setupApplication } from './utils/testUtils';
|
||||||
|
import Folder from '@joplin/lib/models/Folder';
|
||||||
|
const Command = require('./command-mkbook');
|
||||||
|
|
||||||
|
|
||||||
|
describe('command-mkbook', () => {
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await setupDatabaseAndSynchronizer(1);
|
||||||
|
await switchClient(1);
|
||||||
|
await setupApplication();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
it('should create a subfolder in first folder', async () => {
|
||||||
|
const command = setupCommandForTesting(Command);
|
||||||
|
await command.action({ 'new-notebook': 'folder1', options: {} });
|
||||||
|
await command.action({ 'new-notebook': 'folder1_1', options: { parent: 'folder1' } });
|
||||||
|
|
||||||
|
const folder1 = await Folder.loadByTitle('folder1');
|
||||||
|
const folder1_1 = await Folder.loadByTitle('folder1_1');
|
||||||
|
|
||||||
|
expect(folder1.title).toBe('folder1');
|
||||||
|
expect(folder1_1.parent_id).toBe(folder1.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not be possible to create a subfolder without an argument.', async () => {
|
||||||
|
const command = setupCommandForTesting(Command);
|
||||||
|
await command.action({ 'new-notebook': 'folder2', options: {} });
|
||||||
|
await expect(command.action({ 'new-notebook': 'folder2_1', options: { parent: true } })).rejects.toThrowError();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not be possible to create subfolder in ambiguous destination folder', async () => {
|
||||||
|
const command = setupCommandForTesting(Command);
|
||||||
|
await command.action({ 'new-notebook': 'folder3', options: {} });
|
||||||
|
await command.action({ 'new-notebook': 'folder3', options: {} }); // ambiguous folder
|
||||||
|
await expect(command.action({ 'new-notebook': 'folder3_1', options: { parent: 'folder3' } })).rejects.toThrowError();
|
||||||
|
|
||||||
|
// check if duplicate entries have been created.
|
||||||
|
const folderAll = await Folder.all();
|
||||||
|
const folders3 = folderAll.filter(x => x.title === 'folder3');
|
||||||
|
expect(folders3.length).toBe(2);
|
||||||
|
|
||||||
|
// check if something has been created in one of the duplicate entries.
|
||||||
|
expect(await Folder.childrenIds(folders3[0].id)).toEqual([]);
|
||||||
|
expect(await Folder.childrenIds(folders3[1].id)).toEqual([]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
65
packages/app-cli/app/command-mkbook.ts
Normal file
65
packages/app-cli/app/command-mkbook.ts
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
const BaseCommand = require('./base-command').default;
|
||||||
|
const { app } = require('./app.js');
|
||||||
|
import { _ } from '@joplin/lib/locale';
|
||||||
|
import BaseModel from '@joplin/lib/BaseModel';
|
||||||
|
import Folder from '@joplin/lib/models/Folder';
|
||||||
|
import { FolderEntity } from '@joplin/lib/services/database/types';
|
||||||
|
|
||||||
|
class Command extends BaseCommand {
|
||||||
|
public usage() {
|
||||||
|
return 'mkbook <new-notebook>';
|
||||||
|
}
|
||||||
|
|
||||||
|
public description() {
|
||||||
|
return _('Creates a new notebook.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public options() {
|
||||||
|
return [
|
||||||
|
['-p, --parent <parent-notebook>', _('Create a new notebook under a parent notebook.')],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// validDestinationFolder check for presents and ambiguous folders
|
||||||
|
public async validDestinationFolder(targetFolder: string) {
|
||||||
|
|
||||||
|
const destinationFolder = await app().loadItem(BaseModel.TYPE_FOLDER, targetFolder);
|
||||||
|
if (!destinationFolder) {
|
||||||
|
throw new Error(_('Cannot find: "%s"', targetFolder));
|
||||||
|
}
|
||||||
|
|
||||||
|
const destinationDups = await Folder.search({ titlePattern: targetFolder, limit: 2 });
|
||||||
|
if (destinationDups.length > 1) {
|
||||||
|
throw new Error(_('Ambiguous notebook "%s". Please use short notebook id instead - press "ti" to see the short notebook id', targetFolder));
|
||||||
|
}
|
||||||
|
|
||||||
|
return destinationFolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async saveAndSwitchFolder(newFolder: FolderEntity) {
|
||||||
|
|
||||||
|
const folder = await Folder.save(newFolder, { userSideValidation: true });
|
||||||
|
app().switchCurrentFolder(folder);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async action(args: any) {
|
||||||
|
const targetFolder = args.options.parent;
|
||||||
|
|
||||||
|
const newFolder: FolderEntity = {
|
||||||
|
title: args['new-notebook'],
|
||||||
|
};
|
||||||
|
|
||||||
|
if (targetFolder) {
|
||||||
|
|
||||||
|
const destinationFolder = await this.validDestinationFolder(targetFolder);
|
||||||
|
newFolder.parent_id = destinationFolder.id;
|
||||||
|
await this.saveAndSwitchFolder(newFolder);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
await this.saveAndSwitchFolder(newFolder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Command;
|
||||||
@@ -23,19 +23,19 @@ function settingTypeToSchemaType(type: SettingItemType): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
public usage() {
|
||||||
return 'settingschema <file>';
|
return 'settingschema <file>';
|
||||||
}
|
}
|
||||||
|
|
||||||
description() {
|
public description() {
|
||||||
return 'Build the setting schema file';
|
return 'Build the setting schema file';
|
||||||
}
|
}
|
||||||
|
|
||||||
enabled() {
|
public enabled() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async action(args: any) {
|
public async action(args: any) {
|
||||||
const schema: Record<string, any> = {
|
const schema: Record<string, any> = {
|
||||||
title: 'JSON schema for Joplin setting files',
|
title: 'JSON schema for Joplin setting files',
|
||||||
'$id': Setting.schemaUrl,
|
'$id': Setting.schemaUrl,
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ import { appTypeToLockType } from '@joplin/lib/services/synchronizer/LockHandler
|
|||||||
const BaseCommand = require('./base-command').default;
|
const BaseCommand = require('./base-command').default;
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { OneDriveApiNodeUtils } = require('@joplin/lib/onedrive-api-node-utils.js');
|
const { OneDriveApiNodeUtils } = require('@joplin/lib/onedrive-api-node-utils.js');
|
||||||
const { reg } = require('@joplin/lib/registry.js');
|
import { reg } from '@joplin/lib/registry';
|
||||||
const { cliUtils } = require('./cli-utils.js');
|
const { cliUtils } = require('./cli-utils.js');
|
||||||
const md5 = require('md5');
|
const md5 = require('md5');
|
||||||
const locker = require('proper-lockfile');
|
import * as locker from 'proper-lockfile';
|
||||||
const fs = require('fs-extra');
|
import { pathExists, writeFile } from 'fs-extra';
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
|
|
||||||
@@ -21,15 +21,15 @@ class Command extends BaseCommand {
|
|||||||
private releaseLockFn_: Function = null;
|
private releaseLockFn_: Function = null;
|
||||||
private oneDriveApiUtils_: any = null;
|
private oneDriveApiUtils_: any = null;
|
||||||
|
|
||||||
usage() {
|
public usage() {
|
||||||
return 'sync';
|
return 'sync';
|
||||||
}
|
}
|
||||||
|
|
||||||
description() {
|
public description() {
|
||||||
return _('Synchronises with remote storage.');
|
return _('Synchronises with remote storage.');
|
||||||
}
|
}
|
||||||
|
|
||||||
options() {
|
public options() {
|
||||||
return [
|
return [
|
||||||
['--target <target>', _('Sync to provided target (defaults to sync.target config value)')],
|
['--target <target>', _('Sync to provided target (defaults to sync.target config value)')],
|
||||||
['--upgrade', _('Upgrade the sync target to the latest version.')],
|
['--upgrade', _('Upgrade the sync target to the latest version.')],
|
||||||
@@ -37,24 +37,15 @@ class Command extends BaseCommand {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
static async lockFile(filePath: string): Promise<Function> {
|
private static async lockFile(filePath: string) {
|
||||||
return locker.lock(filePath, { stale: 1000 * 60 * 5 });
|
return locker.lock(filePath, { stale: 1000 * 60 * 5 });
|
||||||
}
|
}
|
||||||
|
|
||||||
static isLocked(filePath: string) {
|
private static async isLocked(filePath: string) {
|
||||||
return new Promise((resolve, reject) => {
|
return locker.check(filePath);
|
||||||
locker.check(filePath, (error: any, isLocked: boolean) => {
|
|
||||||
if (error) {
|
|
||||||
reject(error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
resolve(isLocked);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async doAuth() {
|
public async doAuth() {
|
||||||
const syncTarget = reg.syncTarget(this.syncTargetId_);
|
const syncTarget = reg.syncTarget(this.syncTargetId_);
|
||||||
const syncTargetMd = SyncTargetRegistry.idToMetadata(this.syncTargetId_);
|
const syncTargetMd = SyncTargetRegistry.idToMetadata(this.syncTargetId_);
|
||||||
|
|
||||||
@@ -98,23 +89,23 @@ class Command extends BaseCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cancelAuth() {
|
public cancelAuth() {
|
||||||
if (this.oneDriveApiUtils_) {
|
if (this.oneDriveApiUtils_) {
|
||||||
this.oneDriveApiUtils_.cancelOAuthDance();
|
this.oneDriveApiUtils_.cancelOAuthDance();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
doingAuth() {
|
public doingAuth() {
|
||||||
return !!this.oneDriveApiUtils_;
|
return !!this.oneDriveApiUtils_;
|
||||||
}
|
}
|
||||||
|
|
||||||
async action(args: any) {
|
public async action(args: any) {
|
||||||
this.releaseLockFn_ = null;
|
this.releaseLockFn_ = null;
|
||||||
|
|
||||||
// Lock is unique per profile/database
|
// Lock is unique per profile/database
|
||||||
const lockFilePath = `${require('os').tmpdir()}/synclock_${md5(escape(Setting.value('profileDir')))}`; // https://github.com/pvorb/node-md5/issues/41
|
const lockFilePath = `${require('os').tmpdir()}/synclock_${md5(escape(Setting.value('profileDir')))}`; // https://github.com/pvorb/node-md5/issues/41
|
||||||
if (!(await fs.pathExists(lockFilePath))) await fs.writeFile(lockFilePath, 'synclock');
|
if (!(await pathExists(lockFilePath))) await writeFile(lockFilePath, 'synclock');
|
||||||
|
|
||||||
const useLock = args.options.useLock !== 0;
|
const useLock = args.options.useLock !== 0;
|
||||||
|
|
||||||
@@ -247,7 +238,7 @@ class Command extends BaseCommand {
|
|||||||
cleanUp();
|
cleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
async cancel() {
|
public async cancel() {
|
||||||
if (this.doingAuth()) {
|
if (this.doingAuth()) {
|
||||||
this.cancelAuth();
|
this.cancelAuth();
|
||||||
return;
|
return;
|
||||||
@@ -272,7 +263,7 @@ class Command extends BaseCommand {
|
|||||||
this.syncTargetId_ = null;
|
this.syncTargetId_ = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
cancellable() {
|
public cancellable() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,19 +18,19 @@ function itemCount(args: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
public usage() {
|
||||||
return 'testing <command> [arg0]';
|
return 'testing <command> [arg0]';
|
||||||
}
|
}
|
||||||
|
|
||||||
description() {
|
public description() {
|
||||||
return 'testing';
|
return 'testing';
|
||||||
}
|
}
|
||||||
|
|
||||||
enabled() {
|
public enabled() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
options(): any[] {
|
public options(): any[] {
|
||||||
return [
|
return [
|
||||||
['--folder-count <count>', 'Folders to create'],
|
['--folder-count <count>', 'Folders to create'],
|
||||||
['--note-count <count>', 'Notes to create'],
|
['--note-count <count>', 'Notes to create'],
|
||||||
@@ -40,7 +40,7 @@ class Command extends BaseCommand {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
async action(args: any) {
|
public async action(args: any) {
|
||||||
const { command, options } = args;
|
const { command, options } = args;
|
||||||
|
|
||||||
if (command === 'populate') {
|
if (command === 'populate') {
|
||||||
@@ -118,6 +118,7 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info(await api.exec('GET', 'api/items/root:/testing:'));
|
console.info(await api.exec('GET', 'api/items/root:/testing:'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async action() {
|
async action() {
|
||||||
this.stdout(versionInfo(require('./package.json')).message);
|
this.stdout(versionInfo(require('./package.json'), {}).message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const stripAnsi = require('strip-ansi');
|
|||||||
const { handleAutocompletion } = require('../autocompletion.js');
|
const { handleAutocompletion } = require('../autocompletion.js');
|
||||||
|
|
||||||
export default class StatusBarWidget extends BaseWidget {
|
export default class StatusBarWidget extends BaseWidget {
|
||||||
constructor() {
|
public constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.promptState_ = null;
|
this.promptState_ = null;
|
||||||
@@ -14,20 +14,20 @@ export default class StatusBarWidget extends BaseWidget {
|
|||||||
this.items_ = [];
|
this.items_ = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
get name() {
|
public get name() {
|
||||||
return 'statusBar';
|
return 'statusBar';
|
||||||
}
|
}
|
||||||
|
|
||||||
get canHaveFocus() {
|
public get canHaveFocus() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
setItemAt(index: number, text: string) {
|
public setItemAt(index: number, text: string) {
|
||||||
this.items_[index] = stripAnsi(text).trim();
|
this.items_[index] = stripAnsi(text).trim();
|
||||||
this.invalidate();
|
this.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
async prompt(initialText = '', promptString: any = null, options: any = null) {
|
public async prompt(initialText = '', promptString: any = null, options: any = null) {
|
||||||
if (this.promptState_) throw new Error('Another prompt already active');
|
if (this.promptState_) throw new Error('Another prompt already active');
|
||||||
if (promptString === null) promptString = ':';
|
if (promptString === null) promptString = ':';
|
||||||
if (options === null) options = {};
|
if (options === null) options = {};
|
||||||
@@ -53,15 +53,15 @@ export default class StatusBarWidget extends BaseWidget {
|
|||||||
return this.promptState_.promise;
|
return this.promptState_.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
get promptActive() {
|
public get promptActive() {
|
||||||
return !!this.promptState_;
|
return !!this.promptState_;
|
||||||
}
|
}
|
||||||
|
|
||||||
get history() {
|
public get history() {
|
||||||
return this.history_;
|
return this.history_;
|
||||||
}
|
}
|
||||||
|
|
||||||
resetCursor() {
|
public resetCursor() {
|
||||||
if (!this.promptActive) return;
|
if (!this.promptActive) return;
|
||||||
if (!this.inputEventEmitter_) return;
|
if (!this.inputEventEmitter_) return;
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ export default class StatusBarWidget extends BaseWidget {
|
|||||||
this.term.moveTo(this.absoluteInnerX + termutils.textLength(this.promptState_.promptString) + this.inputEventEmitter_.getInput().length, this.absoluteInnerY);
|
this.term.moveTo(this.absoluteInnerX + termutils.textLength(this.promptState_.promptString) + this.inputEventEmitter_.getInput().length, this.absoluteInnerY);
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
public render() {
|
||||||
super.render();
|
super.render();
|
||||||
|
|
||||||
const doSaveCursor = !this.promptActive;
|
const doSaveCursor = !this.promptActive;
|
||||||
|
|||||||
@@ -75,14 +75,14 @@ if (process.platform === 'win32') {
|
|||||||
output: process.stdout,
|
output: process.stdout,
|
||||||
});
|
});
|
||||||
|
|
||||||
rl.on('SIGINT', function() {
|
rl.on('SIGINT', () => {
|
||||||
process.emit('SIGINT');
|
process.emit('SIGINT');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
process.stdout.on('error', function(err) {
|
process.stdout.on('error', (error) => {
|
||||||
// https://stackoverflow.com/questions/12329816/error-write-epipe-when-piping-node-output-to-head#15884508
|
// https://stackoverflow.com/questions/12329816/error-write-epipe-when-piping-node-output-to-head#15884508
|
||||||
if (err.code === 'EPIPE') {
|
if (error.code === 'EPIPE') {
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ function createConsoleWrapper(pluginId: string) {
|
|||||||
const wrapper: any = {};
|
const wrapper: any = {};
|
||||||
|
|
||||||
for (const n in console) {
|
for (const n in console) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
if (!console.hasOwnProperty(n)) continue;
|
if (!console.hasOwnProperty(n)) continue;
|
||||||
wrapper[n] = (...args: any[]) => {
|
wrapper[n] = (...args: any[]) => {
|
||||||
const newArgs = args.slice();
|
const newArgs = args.slice();
|
||||||
@@ -34,7 +35,7 @@ export default class PluginRunner extends BasePluginRunner {
|
|||||||
private eventHandlers_: EventHandlers = {};
|
private eventHandlers_: EventHandlers = {};
|
||||||
private activeSandboxCalls_: any = {};
|
private activeSandboxCalls_: any = {};
|
||||||
|
|
||||||
constructor() {
|
public constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.eventHandler = this.eventHandler.bind(this);
|
this.eventHandler = this.eventHandler.bind(this);
|
||||||
@@ -63,7 +64,7 @@ export default class PluginRunner extends BasePluginRunner {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(plugin: Plugin, sandbox: Global): Promise<void> {
|
public async run(plugin: Plugin, sandbox: Global): Promise<void> {
|
||||||
return new Promise((resolve: Function, reject: Function) => {
|
return new Promise((resolve: Function, reject: Function) => {
|
||||||
const onStarted = () => {
|
const onStarted = () => {
|
||||||
plugin.off('started', onStarted);
|
plugin.off('started', onStarted);
|
||||||
|
|||||||
@@ -30,34 +30,36 @@
|
|||||||
2019,
|
2019,
|
||||||
2020,
|
2020,
|
||||||
2021,
|
2021,
|
||||||
2022
|
2022,
|
||||||
|
2023
|
||||||
],
|
],
|
||||||
"owner": "Laurent Cozic"
|
"owner": "Laurent Cozic"
|
||||||
},
|
},
|
||||||
"version": "2.10.0",
|
"version": "2.11.0",
|
||||||
"bin": "./main.js",
|
"bin": "./main.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@joplin/lib": "~2.10",
|
"@joplin/lib": "~2.11",
|
||||||
"@joplin/renderer": "~2.10",
|
"@joplin/renderer": "~2.11",
|
||||||
|
"@joplin/utils": "~2.11",
|
||||||
"aws-sdk": "2.1290.0",
|
"aws-sdk": "2.1290.0",
|
||||||
"chalk": "4.1.2",
|
"chalk": "4.1.2",
|
||||||
"compare-version": "0.1.2",
|
"compare-version": "0.1.2",
|
||||||
"fs-extra": "11.1.0",
|
"fs-extra": "11.1.1",
|
||||||
"html-entities": "1.4.0",
|
"html-entities": "1.4.0",
|
||||||
"image-type": "3.1.0",
|
"image-type": "3.1.0",
|
||||||
"keytar": "7.9.0",
|
"keytar": "7.9.0",
|
||||||
"md5": "2.3.0",
|
"md5": "2.3.0",
|
||||||
"node-rsa": "1.1.1",
|
"node-rsa": "1.1.1",
|
||||||
"open": "8.4.0",
|
"open": "8.4.2",
|
||||||
"proper-lockfile": "4.1.2",
|
"proper-lockfile": "4.1.2",
|
||||||
"read-chunk": "2.1.0",
|
"read-chunk": "2.1.0",
|
||||||
"server-destroy": "1.0.1",
|
"server-destroy": "1.0.1",
|
||||||
"sharp": "0.31.3",
|
"sharp": "0.31.3",
|
||||||
"sprintf-js": "1.1.2",
|
"sprintf-js": "1.1.2",
|
||||||
"sqlite3": "5.1.4",
|
"sqlite3": "5.1.6",
|
||||||
"string-padding": "1.0.2",
|
"string-padding": "1.0.2",
|
||||||
"strip-ansi": "6.0.1",
|
"strip-ansi": "6.0.1",
|
||||||
"tcp-port-used": "1.0.2",
|
"tcp-port-used": "1.0.2",
|
||||||
@@ -68,12 +70,13 @@
|
|||||||
"yargs-parser": "21.1.1"
|
"yargs-parser": "21.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@joplin/tools": "~2.10",
|
"@joplin/tools": "~2.11",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/jest": "29.2.5",
|
"@types/jest": "29.2.6",
|
||||||
"@types/node": "18.11.18",
|
"@types/node": "18.11.18",
|
||||||
|
"@types/proper-lockfile": "^4.1.2",
|
||||||
"gulp": "4.0.2",
|
"gulp": "4.0.2",
|
||||||
"jest": "29.3.1",
|
"jest": "29.4.3",
|
||||||
"temp": "0.9.4",
|
"temp": "0.9.4",
|
||||||
"typescript": "4.9.4"
|
"typescript": "4.9.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const shim = require('@joplin/lib/shim').default;
|
|||||||
const HtmlToHtml = require('@joplin/renderer/HtmlToHtml').default;
|
const HtmlToHtml = require('@joplin/renderer/HtmlToHtml').default;
|
||||||
const { enexXmlToMd } = require('@joplin/lib/import-enex-md-gen.js');
|
const { enexXmlToMd } = require('@joplin/lib/import-enex-md-gen.js');
|
||||||
|
|
||||||
describe('HtmlToHtml', function() {
|
describe('HtmlToHtml', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await setupDatabaseAndSynchronizer(1);
|
await setupDatabaseAndSynchronizer(1);
|
||||||
@@ -49,6 +49,7 @@ describe('HtmlToHtml', function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (actualHtml !== expectedHtml) {
|
if (actualHtml !== expectedHtml) {
|
||||||
|
/* eslint-disable no-console */
|
||||||
console.info('');
|
console.info('');
|
||||||
console.info(`Error converting file: ${htmlSourceFilename}`);
|
console.info(`Error converting file: ${htmlSourceFilename}`);
|
||||||
console.info('--------------------------------- Got:');
|
console.info('--------------------------------- Got:');
|
||||||
@@ -59,6 +60,7 @@ describe('HtmlToHtml', function() {
|
|||||||
console.info(expectedHtml.split('\n'));
|
console.info(expectedHtml.split('\n'));
|
||||||
console.info('--------------------------------------------');
|
console.info('--------------------------------------------');
|
||||||
console.info('');
|
console.info('');
|
||||||
|
/* eslint-enable */
|
||||||
|
|
||||||
expect(false).toBe(true);
|
expect(false).toBe(true);
|
||||||
// return;
|
// return;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ const os = require('os');
|
|||||||
const { filename } = require('@joplin/lib/path-utils');
|
const { filename } = require('@joplin/lib/path-utils');
|
||||||
import HtmlToMd from '@joplin/lib/HtmlToMd';
|
import HtmlToMd from '@joplin/lib/HtmlToMd';
|
||||||
|
|
||||||
describe('HtmlToMd', function() {
|
describe('HtmlToMd', () => {
|
||||||
|
|
||||||
it('should convert from Html to Markdown', (async () => {
|
it('should convert from Html to Markdown', (async () => {
|
||||||
const basePath = `${__dirname}/html_to_md`;
|
const basePath = `${__dirname}/html_to_md`;
|
||||||
@@ -57,6 +57,7 @@ describe('HtmlToMd', function() {
|
|||||||
result.push('--------------------------------------------');
|
result.push('--------------------------------------------');
|
||||||
result.push('');
|
result.push('');
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info(result.join('\n'));
|
console.info(result.join('\n'));
|
||||||
|
|
||||||
// console.info('');
|
// console.info('');
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
const MarkupToHtml = require('@joplin/renderer/MarkupToHtml').default;
|
const MarkupToHtml = require('@joplin/renderer/MarkupToHtml').default;
|
||||||
|
|
||||||
describe('MarkupToHtml', function() {
|
describe('MarkupToHtml', () => {
|
||||||
|
|
||||||
it('should strip markup', (async () => {
|
it('should strip markup', (async () => {
|
||||||
const service = new MarkupToHtml();
|
const service = new MarkupToHtml();
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function newTestMdToHtml(options: any = null) {
|
|||||||
return new MdToHtml(options);
|
return new MdToHtml(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('MdToHtml', function() {
|
describe('MdToHtml', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await setupDatabaseAndSynchronizer(1);
|
await setupDatabaseAndSynchronizer(1);
|
||||||
@@ -72,6 +72,7 @@ describe('MdToHtml', function() {
|
|||||||
'',
|
'',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info(msg.join('\n'));
|
console.info(msg.join('\n'));
|
||||||
|
|
||||||
expect(false).toBe(true);
|
expect(false).toBe(true);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const goToNote = (testApp, note) => {
|
|||||||
testApp.dispatch({ type: 'NOTE_SELECT', id: note.id });
|
testApp.dispatch({ type: 'NOTE_SELECT', id: note.id });
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('feature_NoteHistory', function() {
|
describe('feature_NoteHistory', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
testApp = new TestApp();
|
testApp = new TestApp();
|
||||||
await testApp.start(['--no-welcome']);
|
await testApp.start(['--no-welcome']);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const time = require('@joplin/lib/time').default;
|
|||||||
|
|
||||||
let testApp = null;
|
let testApp = null;
|
||||||
|
|
||||||
describe('integration_NoteList', function() {
|
describe('integration_NoteList', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
testApp = new TestApp();
|
testApp = new TestApp();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const { ALL_NOTES_FILTER_ID } = require('@joplin/lib/reserved-ids.js');
|
|||||||
|
|
||||||
let testApp = null;
|
let testApp = null;
|
||||||
|
|
||||||
describe('integration_ShowAllNotes', function() {
|
describe('integration_ShowAllNotes', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
testApp = new TestApp();
|
testApp = new TestApp();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const time = require('@joplin/lib/time').default;
|
|||||||
|
|
||||||
let testApp = null;
|
let testApp = null;
|
||||||
|
|
||||||
describe('integration_TagList', function() {
|
describe('integration_TagList', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
testApp = new TestApp();
|
testApp = new TestApp();
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* eslint-disable jest/require-top-level-describe */
|
||||||
|
|
||||||
import KeychainService from '@joplin/lib/services/keychain/KeychainService';
|
import KeychainService from '@joplin/lib/services/keychain/KeychainService';
|
||||||
import shim from '@joplin/lib/shim';
|
import shim from '@joplin/lib/shim';
|
||||||
import Setting from '@joplin/lib/models/Setting';
|
import Setting from '@joplin/lib/models/Setting';
|
||||||
@@ -11,7 +13,7 @@ function describeIfCompatible(name: string, fn: any, elseFn: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
describeIfCompatible('services_KeychainService', function() {
|
describeIfCompatible('services_KeychainService', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await setupDatabaseAndSynchronizer(1, { keychainEnabled: true });
|
await setupDatabaseAndSynchronizer(1, { keychainEnabled: true });
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ function newPluginService(appVersion: string = '1.4') {
|
|||||||
return service;
|
return service;
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('services_PluginService', function() {
|
describe('services_PluginService', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await setupDatabaseAndSynchronizer(1);
|
await setupDatabaseAndSynchronizer(1);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ async function newRepoApi(): Promise<RepositoryApi> {
|
|||||||
return repo;
|
return repo;
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('services_plugins_RepositoryApi', function() {
|
describe('services_plugins_RepositoryApi', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await setupDatabaseAndSynchronizer(1);
|
await setupDatabaseAndSynchronizer(1);
|
||||||
@@ -47,9 +47,11 @@ describe('services_plugins_RepositoryApi', function() {
|
|||||||
|
|
||||||
it('should tell if a plugin can be updated', (async () => {
|
it('should tell if a plugin can be updated', (async () => {
|
||||||
const api = await newRepoApi();
|
const api = await newRepoApi();
|
||||||
expect(await api.pluginCanBeUpdated('org.joplinapp.plugins.ToggleSidebars', '1.0.0')).toBe(true);
|
|
||||||
expect(await api.pluginCanBeUpdated('org.joplinapp.plugins.ToggleSidebars', '1.0.2')).toBe(false);
|
expect(await api.pluginCanBeUpdated('org.joplinapp.plugins.ToggleSidebars', '1.0.0', '3.0.0')).toBe(true);
|
||||||
expect(await api.pluginCanBeUpdated('does.not.exist', '1.0.0')).toBe(false);
|
expect(await api.pluginCanBeUpdated('org.joplinapp.plugins.ToggleSidebars', '1.0.0', '1.0.0')).toBe(false);
|
||||||
|
expect(await api.pluginCanBeUpdated('org.joplinapp.plugins.ToggleSidebars', '1.0.2', '3.0.0')).toBe(false);
|
||||||
|
expect(await api.pluginCanBeUpdated('does.not.exist', '1.0.0', '3.0.0')).toBe(false);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function newPluginService(appVersion: string = '1.4') {
|
|||||||
return service;
|
return service;
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('defaultPluginsUtils', function() {
|
describe('defaultPluginsUtils', () => {
|
||||||
|
|
||||||
const pluginsId = ['joplin.plugin.ambrt.backlinksToNote', 'org.joplinapp.plugins.ToggleSidebars'];
|
const pluginsId = ['joplin.plugin.ambrt.backlinksToNote', 'org.joplinapp.plugins.ToggleSidebars'];
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
const sandboxProxy = require('@joplin/lib/services/plugins/sandboxProxy');
|
const sandboxProxy = require('@joplin/lib/services/plugins/sandboxProxy');
|
||||||
import { setupDatabaseAndSynchronizer, switchClient } from '@joplin/lib/testing/test-utils';
|
import { setupDatabaseAndSynchronizer, switchClient } from '@joplin/lib/testing/test-utils';
|
||||||
|
|
||||||
describe('services_plugins_sandboxProxy', function() {
|
describe('services_plugins_sandboxProxy', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await setupDatabaseAndSynchronizer(1);
|
await setupDatabaseAndSynchronizer(1);
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
// This script can be used to simulate a running production environment, by
|
// This script can be used to simulate a running production environment, by
|
||||||
// having multiple users in parallel changing notes and synchronising.
|
// having multiple users in parallel changing notes and synchronising.
|
||||||
//
|
//
|
||||||
@@ -17,7 +19,7 @@
|
|||||||
|
|
||||||
import * as fs from 'fs-extra';
|
import * as fs from 'fs-extra';
|
||||||
import { homedir } from 'os';
|
import { homedir } from 'os';
|
||||||
import { execCommand2 } from '@joplin/tools/tool-utils';
|
import { execCommand } from '@joplin/utils';
|
||||||
import { chdir } from 'process';
|
import { chdir } from 'process';
|
||||||
|
|
||||||
const minUserNum = 1;
|
const minUserNum = 1;
|
||||||
@@ -64,7 +66,7 @@ const processUser = async (userNum: number) => {
|
|||||||
|
|
||||||
await chdir(cliDir);
|
await chdir(cliDir);
|
||||||
|
|
||||||
await execCommand2(['yarn', 'run', 'start-no-build', '--', '--profile', profileDir, 'batch', commandFile]);
|
await execCommand(['yarn', 'run', 'start-no-build', '--', '--profile', profileDir, 'batch', commandFile]);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Could not process user ${userNum}:`, error);
|
console.error(`Could not process user ${userNum}:`, error);
|
||||||
} finally {
|
} finally {
|
||||||
@@ -88,7 +90,7 @@ const main = async () => {
|
|||||||
|
|
||||||
// Build the app once before starting, because we'll use start-no-build to
|
// Build the app once before starting, because we'll use start-no-build to
|
||||||
// run the scripts (faster)
|
// run the scripts (faster)
|
||||||
await execCommand2(['yarn', 'run', 'build']);
|
await execCommand(['yarn', 'run', 'build']);
|
||||||
|
|
||||||
const focusUserNum = 0;
|
const focusUserNum = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ async function browserGetZoom(tabId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
browser_.runtime.onInstalled.addListener(function() {
|
browser_.runtime.onInstalled.addListener(() => {
|
||||||
if (window.joplinEnv() === 'dev') {
|
if (window.joplinEnv() === 'dev') {
|
||||||
browser_.browserAction.setIcon({
|
browser_.browserAction.setIcon({
|
||||||
path: 'icons/32-dev.png',
|
path: 'icons/32-dev.png',
|
||||||
@@ -165,7 +165,7 @@ async function sendClipMessage(clipType) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
browser_.commands.onCommand.addListener(function(command) {
|
browser_.commands.onCommand.addListener((command) => {
|
||||||
// We could enumerate these twice, but since we're in here first,
|
// We could enumerate these twice, but since we're in here first,
|
||||||
// why not save ourselves the trouble with this convention
|
// why not save ourselves the trouble with this convention
|
||||||
if (command.startsWith('clip')) {
|
if (command.startsWith('clip')) {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
if (window.jopext_hasRun) return;
|
if (window.jopext_hasRun) return;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Joplin Web Clipper [DEV]",
|
"name": "Joplin Web Clipper [DEV]",
|
||||||
"version": "2.10.0",
|
"version": "2.11.2",
|
||||||
"description": "Capture and save web pages and screenshots from your browser to Joplin.",
|
"description": "Capture and save web pages and screenshots from your browser to Joplin.",
|
||||||
"homepage_url": "https://joplinapp.org",
|
"homepage_url": "https://joplinapp.org",
|
||||||
"content_security_policy": "script-src 'self'; object-src 'self'",
|
"content_security_policy": "script-src 'self'; object-src 'self'",
|
||||||
|
|||||||
@@ -126,4 +126,4 @@
|
|||||||
"react-app"
|
"react-app"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
// Do this as the first thing so that any code reading it knows the right env.
|
// Do this as the first thing so that any code reading it knows the right env.
|
||||||
process.env.BABEL_ENV = 'development';
|
process.env.BABEL_ENV = 'development';
|
||||||
process.env.NODE_ENV = 'development';
|
process.env.NODE_ENV = 'development';
|
||||||
@@ -104,9 +106,9 @@ checkBrowsers(paths.appPath, isInteractive)
|
|||||||
);
|
);
|
||||||
const devServer = new WebpackDevServer(compiler, serverConfig);
|
const devServer = new WebpackDevServer(compiler, serverConfig);
|
||||||
// Launch WebpackDevServer.
|
// Launch WebpackDevServer.
|
||||||
devServer.listen(port, HOST, err => {
|
devServer.listen(port, HOST, error => {
|
||||||
if (err) {
|
if (error) {
|
||||||
return console.log(err);
|
return console.log(error);
|
||||||
}
|
}
|
||||||
if (isInteractive) {
|
if (isInteractive) {
|
||||||
clearConsole();
|
clearConsole();
|
||||||
@@ -128,16 +130,16 @@ checkBrowsers(paths.appPath, isInteractive)
|
|||||||
openBrowser(urls.localUrlForBrowser);
|
openBrowser(urls.localUrlForBrowser);
|
||||||
});
|
});
|
||||||
|
|
||||||
['SIGINT', 'SIGTERM'].forEach(function(sig) {
|
['SIGINT', 'SIGTERM'].forEach((sig) => {
|
||||||
process.on(sig, function() {
|
process.on(sig, () => {
|
||||||
devServer.close();
|
devServer.close();
|
||||||
process.exit();
|
process.exit();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(error => {
|
||||||
if (err && err.message) {
|
if (error && error.message) {
|
||||||
console.log(err.message);
|
console.log(error.message);
|
||||||
}
|
}
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
const { randomClipperPort } = require('./randomClipperPort');
|
const { randomClipperPort } = require('./randomClipperPort');
|
||||||
|
|
||||||
function msleep(ms) {
|
function msleep(ms) {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
@@ -114,7 +116,13 @@ async function main() {
|
|||||||
|
|
||||||
console.info('Popup: Creating React app...');
|
console.info('Popup: Creating React app...');
|
||||||
|
|
||||||
ReactDOM.render(<Provider store={store}><App /></Provider>, document.getElementById('root'));
|
ReactDOM.render(
|
||||||
|
<div style = {{ maxHeight: screen.height * 0.65, overflowY: 'scroll' }}>
|
||||||
|
<Provider store={store}>
|
||||||
|
<App />
|
||||||
|
</Provider>
|
||||||
|
</div>,
|
||||||
|
document.getElementById('root'));
|
||||||
}
|
}
|
||||||
|
|
||||||
main().catch((error) => {
|
main().catch((error) => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { PluginMessage } from './services/plugins/PluginRunner';
|
|||||||
import shim from '@joplin/lib/shim';
|
import shim from '@joplin/lib/shim';
|
||||||
import { isCallbackUrl } from '@joplin/lib/callbackUrlUtils';
|
import { isCallbackUrl } from '@joplin/lib/callbackUrlUtils';
|
||||||
|
|
||||||
const { BrowserWindow, Tray, screen } = require('electron');
|
import { BrowserWindow, Tray, screen } from 'electron';
|
||||||
const url = require('url');
|
const url = require('url');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { dirname } = require('@joplin/lib/path-utils');
|
const { dirname } = require('@joplin/lib/path-utils');
|
||||||
@@ -25,7 +25,7 @@ export default class ElectronAppWrapper {
|
|||||||
private env_: string;
|
private env_: string;
|
||||||
private isDebugMode_: boolean;
|
private isDebugMode_: boolean;
|
||||||
private profilePath_: string;
|
private profilePath_: string;
|
||||||
private win_: any = null;
|
private win_: BrowserWindow = null;
|
||||||
private willQuitApp_: boolean = false;
|
private willQuitApp_: boolean = false;
|
||||||
private tray_: any = null;
|
private tray_: any = null;
|
||||||
private buildDir_: string = null;
|
private buildDir_: string = null;
|
||||||
@@ -33,7 +33,7 @@ export default class ElectronAppWrapper {
|
|||||||
private pluginWindows_: PluginWindows = {};
|
private pluginWindows_: PluginWindows = {};
|
||||||
private initialCallbackUrl_: string = null;
|
private initialCallbackUrl_: string = null;
|
||||||
|
|
||||||
constructor(electronApp: any, env: string, profilePath: string, isDebugMode: boolean, initialCallbackUrl: string) {
|
public constructor(electronApp: any, env: string, profilePath: string, isDebugMode: boolean, initialCallbackUrl: string) {
|
||||||
this.electronApp_ = electronApp;
|
this.electronApp_ = electronApp;
|
||||||
this.env_ = env;
|
this.env_ = env;
|
||||||
this.isDebugMode_ = isDebugMode;
|
this.isDebugMode_ = isDebugMode;
|
||||||
@@ -41,31 +41,31 @@ export default class ElectronAppWrapper {
|
|||||||
this.initialCallbackUrl_ = initialCallbackUrl;
|
this.initialCallbackUrl_ = initialCallbackUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
electronApp() {
|
public electronApp() {
|
||||||
return this.electronApp_;
|
return this.electronApp_;
|
||||||
}
|
}
|
||||||
|
|
||||||
setLogger(v: Logger) {
|
public setLogger(v: Logger) {
|
||||||
this.logger_ = v;
|
this.logger_ = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger() {
|
public logger() {
|
||||||
return this.logger_;
|
return this.logger_;
|
||||||
}
|
}
|
||||||
|
|
||||||
window() {
|
public window() {
|
||||||
return this.win_;
|
return this.win_;
|
||||||
}
|
}
|
||||||
|
|
||||||
env() {
|
public env() {
|
||||||
return this.env_;
|
return this.env_;
|
||||||
}
|
}
|
||||||
|
|
||||||
initialCallbackUrl() {
|
public initialCallbackUrl() {
|
||||||
return this.initialCallbackUrl_;
|
return this.initialCallbackUrl_;
|
||||||
}
|
}
|
||||||
|
|
||||||
createWindow() {
|
public createWindow() {
|
||||||
// Set to true to view errors if the application does not start
|
// Set to true to view errors if the application does not start
|
||||||
const debugEarlyBugs = this.env_ === 'dev' || this.isDebugMode_;
|
const debugEarlyBugs = this.env_ === 'dev' || this.isDebugMode_;
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ export default class ElectronAppWrapper {
|
|||||||
this.win_.setPosition(primaryDisplayWidth / 2 - windowWidth, primaryDisplayHeight / 2 - windowHeight);
|
this.win_.setPosition(primaryDisplayWidth / 2 - windowWidth, primaryDisplayHeight / 2 - windowHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.win_.loadURL(url.format({
|
void this.win_.loadURL(url.format({
|
||||||
pathname: path.join(__dirname, 'index.html'),
|
pathname: path.join(__dirname, 'index.html'),
|
||||||
protocol: 'file:',
|
protocol: 'file:',
|
||||||
slashes: true,
|
slashes: true,
|
||||||
@@ -236,11 +236,11 @@ export default class ElectronAppWrapper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
registerPluginWindow(pluginId: string, window: any) {
|
public registerPluginWindow(pluginId: string, window: any) {
|
||||||
this.pluginWindows_[pluginId] = window;
|
this.pluginWindows_[pluginId] = window;
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitForElectronAppReady() {
|
public async waitForElectronAppReady() {
|
||||||
if (this.electronApp().isReady()) return Promise.resolve();
|
if (this.electronApp().isReady()) return Promise.resolve();
|
||||||
|
|
||||||
return new Promise<void>((resolve) => {
|
return new Promise<void>((resolve) => {
|
||||||
@@ -253,25 +253,25 @@ export default class ElectronAppWrapper {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
quit() {
|
public quit() {
|
||||||
this.electronApp_.quit();
|
this.electronApp_.quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(errorCode = 0) {
|
public exit(errorCode = 0) {
|
||||||
this.electronApp_.exit(errorCode);
|
this.electronApp_.exit(errorCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
trayShown() {
|
public trayShown() {
|
||||||
return !!this.tray_;
|
return !!this.tray_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method is used in macOS only to hide the whole app (and not just the main window)
|
// This method is used in macOS only to hide the whole app (and not just the main window)
|
||||||
// including the menu bar. This follows the macOS way of hiding an app.
|
// including the menu bar. This follows the macOS way of hiding an app.
|
||||||
hide() {
|
public hide() {
|
||||||
this.electronApp_.hide();
|
this.electronApp_.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
buildDir() {
|
public buildDir() {
|
||||||
if (this.buildDir_) return this.buildDir_;
|
if (this.buildDir_) return this.buildDir_;
|
||||||
let dir = `${__dirname}/build`;
|
let dir = `${__dirname}/build`;
|
||||||
if (!fs.pathExistsSync(dir)) {
|
if (!fs.pathExistsSync(dir)) {
|
||||||
@@ -283,7 +283,7 @@ export default class ElectronAppWrapper {
|
|||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
trayIconFilename_() {
|
private trayIconFilename_() {
|
||||||
let output = '';
|
let output = '';
|
||||||
|
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
@@ -298,7 +298,7 @@ export default class ElectronAppWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Note: this must be called only after the "ready" event of the app has been dispatched
|
// Note: this must be called only after the "ready" event of the app has been dispatched
|
||||||
createTray(contextMenu: any) {
|
public createTray(contextMenu: any) {
|
||||||
try {
|
try {
|
||||||
this.tray_ = new Tray(`${this.buildDir()}/icons/${this.trayIconFilename_()}`);
|
this.tray_ = new Tray(`${this.buildDir()}/icons/${this.trayIconFilename_()}`);
|
||||||
this.tray_.setToolTip(this.electronApp_.name);
|
this.tray_.setToolTip(this.electronApp_.name);
|
||||||
@@ -312,13 +312,13 @@ export default class ElectronAppWrapper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
destroyTray() {
|
public destroyTray() {
|
||||||
if (!this.tray_) return;
|
if (!this.tray_) return;
|
||||||
this.tray_.destroy();
|
this.tray_.destroy();
|
||||||
this.tray_ = null;
|
this.tray_ = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
ensureSingleInstance() {
|
public ensureSingleInstance() {
|
||||||
if (this.env_ === 'dev') return false;
|
if (this.env_ === 'dev') return false;
|
||||||
|
|
||||||
const gotTheLock = this.electronApp_.requestSingleInstanceLock();
|
const gotTheLock = this.electronApp_.requestSingleInstanceLock();
|
||||||
@@ -347,7 +347,7 @@ export default class ElectronAppWrapper {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async start() {
|
public async start() {
|
||||||
// Since we are doing other async things before creating the window, we might miss
|
// Since we are doing other async things before creating the window, we might miss
|
||||||
// the "ready" event. So we use the function below to make sure that the app is ready.
|
// the "ready" event. So we use the function below to make sure that the app is ready.
|
||||||
await this.waitForElectronAppReady();
|
await this.waitForElectronAppReady();
|
||||||
@@ -375,7 +375,7 @@ export default class ElectronAppWrapper {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async openCallbackUrl(url: string) {
|
public async openCallbackUrl(url: string) {
|
||||||
this.win_.webContents.send('asynchronous-message', 'openCallbackUrl', {
|
this.win_.webContents.send('asynchronous-message', 'openCallbackUrl', {
|
||||||
url: url,
|
url: url,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ export default class InteropServiceHelper {
|
|||||||
const service = InteropService.instance();
|
const service = InteropService.instance();
|
||||||
|
|
||||||
const result = await service.export(fullExportOptions);
|
const result = await service.export(fullExportOptions);
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info('Export HTML result: ', result);
|
console.info('Export HTML result: ', result);
|
||||||
return tempFile;
|
return tempFile;
|
||||||
}
|
}
|
||||||
@@ -190,6 +191,7 @@ export default class InteropServiceHelper {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await service.export(exportOptions);
|
const result = await service.export(exportOptions);
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info('Export result: ', result);
|
console.info('Export result: ', result);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { AppState } from './app.reducer';
|
import { AppState } from './app.reducer';
|
||||||
import appReducer, { createAppDefaultState } from './app.reducer';
|
import appReducer, { createAppDefaultState } from './app.reducer';
|
||||||
|
|
||||||
describe('app.reducer', function() {
|
describe('app.reducer', () => {
|
||||||
|
|
||||||
it('DIALOG_OPEN', async () => {
|
it('should handle DIALOG_OPEN', async () => {
|
||||||
const state: AppState = createAppDefaultState({}, {});
|
const state: AppState = createAppDefaultState({}, {});
|
||||||
|
|
||||||
let newState = appReducer(state, {
|
let newState = appReducer(state, {
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export interface AppState extends State {
|
|||||||
watchedResources: any;
|
watchedResources: any;
|
||||||
mainLayout: LayoutItem;
|
mainLayout: LayoutItem;
|
||||||
dialogs: AppStateDialog[];
|
dialogs: AppStateDialog[];
|
||||||
|
isResettingLayout: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createAppDefaultState(windowContentSize: any, resourceEditWatcherDefaultState: any): AppState {
|
export function createAppDefaultState(windowContentSize: any, resourceEditWatcherDefaultState: any): AppState {
|
||||||
@@ -60,6 +61,7 @@ export function createAppDefaultState(windowContentSize: any, resourceEditWatche
|
|||||||
mainLayout: null,
|
mainLayout: null,
|
||||||
startupPluginsLoaded: false,
|
startupPluginsLoaded: false,
|
||||||
dialogs: [],
|
dialogs: [],
|
||||||
|
isResettingLayout: false,
|
||||||
...resourceEditWatcherDefaultState,
|
...resourceEditWatcherDefaultState,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -308,7 +310,15 @@ export default function(state: AppState, action: any) {
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case 'RESET_LAYOUT':
|
||||||
|
newState = {
|
||||||
|
...state,
|
||||||
|
isResettingLayout: action.value,
|
||||||
|
};
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
error.message = `In reducer: ${error.message} Action: ${JSON.stringify(action)}`;
|
error.message = `In reducer: ${error.message} Action: ${JSON.stringify(action)}`;
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export class Bridge {
|
|||||||
private electronWrapper_: ElectronAppWrapper;
|
private electronWrapper_: ElectronAppWrapper;
|
||||||
private lastSelectedPaths_: LastSelectedPath;
|
private lastSelectedPaths_: LastSelectedPath;
|
||||||
|
|
||||||
constructor(electronWrapper: ElectronAppWrapper) {
|
public constructor(electronWrapper: ElectronAppWrapper) {
|
||||||
this.electronWrapper_ = electronWrapper;
|
this.electronWrapper_ = electronWrapper;
|
||||||
this.lastSelectedPaths_ = {
|
this.lastSelectedPaths_ = {
|
||||||
file: null,
|
file: null,
|
||||||
@@ -29,11 +29,11 @@ export class Bridge {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
electronApp() {
|
public electronApp() {
|
||||||
return this.electronWrapper_;
|
return this.electronWrapper_;
|
||||||
}
|
}
|
||||||
|
|
||||||
electronIsDev() {
|
public electronIsDev() {
|
||||||
return !this.electronApp().electronApp().isPackaged;
|
return !this.electronApp().electronApp().isPackaged;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,11 +60,11 @@ export class Bridge {
|
|||||||
return `${__dirname}/vendor`;
|
return `${__dirname}/vendor`;
|
||||||
}
|
}
|
||||||
|
|
||||||
env() {
|
public env() {
|
||||||
return this.electronWrapper_.env();
|
return this.electronWrapper_.env();
|
||||||
}
|
}
|
||||||
|
|
||||||
processArgv() {
|
public processArgv() {
|
||||||
return process.argv;
|
return process.argv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,44 +114,44 @@ export class Bridge {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
window() {
|
public window() {
|
||||||
return this.electronWrapper_.window();
|
return this.electronWrapper_.window();
|
||||||
}
|
}
|
||||||
|
|
||||||
showItemInFolder(fullPath: string) {
|
public showItemInFolder(fullPath: string) {
|
||||||
return require('electron').shell.showItemInFolder(toSystemSlashes(fullPath));
|
return require('electron').shell.showItemInFolder(toSystemSlashes(fullPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
newBrowserWindow(options: any) {
|
public newBrowserWindow(options: any) {
|
||||||
return new BrowserWindow(options);
|
return new BrowserWindow(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
windowContentSize() {
|
public windowContentSize() {
|
||||||
if (!this.window()) return { width: 0, height: 0 };
|
if (!this.window()) return { width: 0, height: 0 };
|
||||||
const s = this.window().getContentSize();
|
const s = this.window().getContentSize();
|
||||||
return { width: s[0], height: s[1] };
|
return { width: s[0], height: s[1] };
|
||||||
}
|
}
|
||||||
|
|
||||||
windowSize() {
|
public windowSize() {
|
||||||
if (!this.window()) return { width: 0, height: 0 };
|
if (!this.window()) return { width: 0, height: 0 };
|
||||||
const s = this.window().getSize();
|
const s = this.window().getSize();
|
||||||
return { width: s[0], height: s[1] };
|
return { width: s[0], height: s[1] };
|
||||||
}
|
}
|
||||||
|
|
||||||
windowSetSize(width: number, height: number) {
|
public windowSetSize(width: number, height: number) {
|
||||||
if (!this.window()) return;
|
if (!this.window()) return;
|
||||||
return this.window().setSize(width, height);
|
return this.window().setSize(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
openDevTools() {
|
public openDevTools() {
|
||||||
return this.window().webContents.openDevTools();
|
return this.window().webContents.openDevTools();
|
||||||
}
|
}
|
||||||
|
|
||||||
closeDevTools() {
|
public closeDevTools() {
|
||||||
return this.window().webContents.closeDevTools();
|
return this.window().webContents.closeDevTools();
|
||||||
}
|
}
|
||||||
|
|
||||||
async showSaveDialog(options: any) {
|
public async showSaveDialog(options: any) {
|
||||||
const { dialog } = require('electron');
|
const { dialog } = require('electron');
|
||||||
if (!options) options = {};
|
if (!options) options = {};
|
||||||
if (!('defaultPath' in options) && this.lastSelectedPaths_.file) options.defaultPath = this.lastSelectedPaths_.file;
|
if (!('defaultPath' in options) && this.lastSelectedPaths_.file) options.defaultPath = this.lastSelectedPaths_.file;
|
||||||
@@ -162,7 +162,7 @@ export class Bridge {
|
|||||||
return filePath;
|
return filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
async showOpenDialog(options: OpenDialogOptions = null) {
|
public async showOpenDialog(options: OpenDialogOptions = null) {
|
||||||
const { dialog } = require('electron');
|
const { dialog } = require('electron');
|
||||||
if (!options) options = {};
|
if (!options) options = {};
|
||||||
let fileType = 'file';
|
let fileType = 'file';
|
||||||
@@ -177,13 +177,13 @@ export class Bridge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't use this directly - call one of the showXxxxxxxMessageBox() instead
|
// Don't use this directly - call one of the showXxxxxxxMessageBox() instead
|
||||||
showMessageBox_(window: any, options: any): number {
|
private showMessageBox_(window: any, options: any): number {
|
||||||
const { dialog } = require('electron');
|
const { dialog } = require('electron');
|
||||||
if (!window) window = this.window();
|
if (!window) window = this.window();
|
||||||
return dialog.showMessageBoxSync(window, options);
|
return dialog.showMessageBoxSync(window, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
showErrorMessageBox(message: string) {
|
public showErrorMessageBox(message: string) {
|
||||||
return this.showMessageBox_(this.window(), {
|
return this.showMessageBox_(this.window(), {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: message,
|
message: message,
|
||||||
@@ -191,7 +191,7 @@ export class Bridge {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
showConfirmMessageBox(message: string, options: any = null) {
|
public showConfirmMessageBox(message: string, options: any = null) {
|
||||||
options = {
|
options = {
|
||||||
buttons: [_('OK'), _('Cancel')],
|
buttons: [_('OK'), _('Cancel')],
|
||||||
...options,
|
...options,
|
||||||
@@ -208,7 +208,7 @@ export class Bridge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* returns the index of the clicked button */
|
/* returns the index of the clicked button */
|
||||||
showMessageBox(message: string, options: any = null) {
|
public showMessageBox(message: string, options: any = null) {
|
||||||
if (options === null) options = {};
|
if (options === null) options = {};
|
||||||
|
|
||||||
const result = this.showMessageBox_(this.window(), Object.assign({}, {
|
const result = this.showMessageBox_(this.window(), Object.assign({}, {
|
||||||
@@ -220,7 +220,7 @@ export class Bridge {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
showInfoMessageBox(message: string, options: any = {}) {
|
public showInfoMessageBox(message: string, options: any = {}) {
|
||||||
const result = this.showMessageBox_(this.window(), Object.assign({}, {
|
const result = this.showMessageBox_(this.window(), Object.assign({}, {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: message,
|
message: message,
|
||||||
@@ -229,35 +229,35 @@ export class Bridge {
|
|||||||
return result === 0;
|
return result === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
setLocale(locale: string) {
|
public setLocale(locale: string) {
|
||||||
setLocale(locale);
|
setLocale(locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
get Menu() {
|
public get Menu() {
|
||||||
return require('electron').Menu;
|
return require('electron').Menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
get MenuItem() {
|
public get MenuItem() {
|
||||||
return require('electron').MenuItem;
|
return require('electron').MenuItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
openExternal(url: string) {
|
public openExternal(url: string) {
|
||||||
return require('electron').shell.openExternal(url);
|
return require('electron').shell.openExternal(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
async openItem(fullPath: string) {
|
public async openItem(fullPath: string) {
|
||||||
return require('electron').shell.openPath(toSystemSlashes(fullPath));
|
return require('electron').shell.openPath(toSystemSlashes(fullPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
screen() {
|
public screen() {
|
||||||
return require('electron').screen;
|
return require('electron').screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldUseDarkColors() {
|
public shouldUseDarkColors() {
|
||||||
return nativeTheme.shouldUseDarkColors;
|
return nativeTheme.shouldUseDarkColors;
|
||||||
}
|
}
|
||||||
|
|
||||||
addEventListener(name: string, fn: Function) {
|
public addEventListener(name: string, fn: Function) {
|
||||||
if (name === 'nativeThemeUpdated') {
|
if (name === 'nativeThemeUpdated') {
|
||||||
nativeTheme.on('updated', fn);
|
nativeTheme.on('updated', fn);
|
||||||
} else {
|
} else {
|
||||||
@@ -265,7 +265,7 @@ export class Bridge {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
restart(linuxSafeRestart = true) {
|
public restart(linuxSafeRestart = true) {
|
||||||
// Note that in this case we are not sending the "appClose" event
|
// Note that in this case we are not sending the "appClose" event
|
||||||
// to notify services and component that the app is about to close
|
// to notify services and component that the app is about to close
|
||||||
// but for the current use-case it's not really needed.
|
// but for the current use-case it's not really needed.
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { clipboard } = require('electron');
|
const { clipboard } = require('electron');
|
||||||
const ExtensionBadge = require('./ExtensionBadge.min');
|
import ExtensionBadge from './ExtensionBadge';
|
||||||
import bridge from '../services/bridge';
|
|
||||||
import { themeStyle } from '@joplin/lib/theme';
|
import { themeStyle } from '@joplin/lib/theme';
|
||||||
import { _ } from '@joplin/lib/locale';
|
import { _ } from '@joplin/lib/locale';
|
||||||
import ClipperServer from '@joplin/lib/ClipperServer';
|
import ClipperServer from '@joplin/lib/ClipperServer';
|
||||||
@@ -11,37 +10,29 @@ import EncryptionService from '@joplin/lib/services/e2ee/EncryptionService';
|
|||||||
import { AppState } from '../app.reducer';
|
import { AppState } from '../app.reducer';
|
||||||
|
|
||||||
class ClipperConfigScreenComponent extends React.Component {
|
class ClipperConfigScreenComponent extends React.Component {
|
||||||
constructor() {
|
public constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.copyToken_click = this.copyToken_click.bind(this);
|
this.copyToken_click = this.copyToken_click.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
disableClipperServer_click() {
|
private disableClipperServer_click() {
|
||||||
Setting.setValue('clipperServer.autoStart', false);
|
Setting.setValue('clipperServer.autoStart', false);
|
||||||
void ClipperServer.instance().stop();
|
void ClipperServer.instance().stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
enableClipperServer_click() {
|
private enableClipperServer_click() {
|
||||||
Setting.setValue('clipperServer.autoStart', true);
|
Setting.setValue('clipperServer.autoStart', true);
|
||||||
void ClipperServer.instance().start();
|
void ClipperServer.instance().start();
|
||||||
}
|
}
|
||||||
|
|
||||||
chromeButton_click() {
|
private copyToken_click() {
|
||||||
void bridge().openExternal('https://chrome.google.com/webstore/detail/joplin-web-clipper/alofnhikmmkdbbbgpnglcpdollgjjfek');
|
|
||||||
}
|
|
||||||
|
|
||||||
firefoxButton_click() {
|
|
||||||
void bridge().openExternal('https://addons.mozilla.org/en-US/firefox/addon/joplin-web-clipper/');
|
|
||||||
}
|
|
||||||
|
|
||||||
copyToken_click() {
|
|
||||||
clipboard.writeText(this.props.apiToken);
|
clipboard.writeText(this.props.apiToken);
|
||||||
|
|
||||||
alert(_('Token has been copied to the clipboard!'));
|
alert(_('Token has been copied to the clipboard!'));
|
||||||
}
|
}
|
||||||
|
|
||||||
renewToken_click() {
|
private renewToken_click() {
|
||||||
if (confirm(_('Are you sure you want to renew the authorisation token?'))) {
|
if (confirm(_('Are you sure you want to renew the authorisation token?'))) {
|
||||||
void EncryptionService.instance()
|
void EncryptionService.instance()
|
||||||
.generateApiToken()
|
.generateApiToken()
|
||||||
@@ -52,7 +43,7 @@ class ClipperConfigScreenComponent extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
public render() {
|
||||||
const theme = themeStyle(this.props.themeId);
|
const theme = themeStyle(this.props.themeId);
|
||||||
|
|
||||||
const containerStyle = Object.assign({}, theme.containerStyle, {
|
const containerStyle = Object.assign({}, theme.containerStyle, {
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ const settingKeyToControl: any = {
|
|||||||
|
|
||||||
class ConfigScreenComponent extends React.Component<any, any> {
|
class ConfigScreenComponent extends React.Component<any, any> {
|
||||||
|
|
||||||
rowStyle_: any = null;
|
private rowStyle_: any = null;
|
||||||
|
|
||||||
constructor(props: any) {
|
public constructor(props: any) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
shared.init(this, reg);
|
shared.init(this, reg);
|
||||||
@@ -55,15 +55,15 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
|||||||
this.handleSettingButton = this.handleSettingButton.bind(this);
|
this.handleSettingButton = this.handleSettingButton.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkSyncConfig_() {
|
private async checkSyncConfig_() {
|
||||||
await shared.checkSyncConfig(this, this.state.settings);
|
await shared.checkSyncConfig(this, this.state.settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillMount() {
|
public UNSAFE_componentWillMount() {
|
||||||
this.setState({ settings: this.props.settings });
|
this.setState({ settings: this.props.settings });
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
public componentDidMount() {
|
||||||
if (this.props.defaultSection) {
|
if (this.props.defaultSection) {
|
||||||
this.setState({ selectedSectionName: this.props.defaultSection }, () => {
|
this.setState({ selectedSectionName: this.props.defaultSection }, () => {
|
||||||
this.switchSection(this.props.defaultSection);
|
this.switchSection(this.props.defaultSection);
|
||||||
@@ -93,7 +93,7 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sectionByName(name: string) {
|
public sectionByName(name: string) {
|
||||||
const sections = shared.settingsSections({ device: 'desktop', settings: this.state.settings });
|
const sections = shared.settingsSections({ device: 'desktop', settings: this.state.settings });
|
||||||
for (const section of sections) {
|
for (const section of sections) {
|
||||||
if (section.name === name) return section;
|
if (section.name === name) return section;
|
||||||
@@ -102,7 +102,7 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
|||||||
throw new Error(`Invalid section name: ${name}`);
|
throw new Error(`Invalid section name: ${name}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
screenFromName(screenName: string) {
|
public screenFromName(screenName: string) {
|
||||||
if (screenName === 'encryption') return <EncryptionConfigScreen/>;
|
if (screenName === 'encryption') return <EncryptionConfigScreen/>;
|
||||||
if (screenName === 'server') return <ClipperConfigScreen themeId={this.props.themeId}/>;
|
if (screenName === 'server') return <ClipperConfigScreen themeId={this.props.themeId}/>;
|
||||||
if (screenName === 'keymap') return <KeymapConfigScreen themeId={this.props.themeId}/>;
|
if (screenName === 'keymap') return <KeymapConfigScreen themeId={this.props.themeId}/>;
|
||||||
@@ -110,7 +110,7 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
|||||||
throw new Error(`Invalid screen name: ${screenName}`);
|
throw new Error(`Invalid screen name: ${screenName}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
switchSection(name: string) {
|
public switchSection(name: string) {
|
||||||
const section = this.sectionByName(name);
|
const section = this.sectionByName(name);
|
||||||
let screenName = '';
|
let screenName = '';
|
||||||
if (section.isScreen) {
|
if (section.isScreen) {
|
||||||
@@ -125,11 +125,11 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
|||||||
this.setState({ selectedSectionName: section.name, screenName: screenName });
|
this.setState({ selectedSectionName: section.name, screenName: screenName });
|
||||||
}
|
}
|
||||||
|
|
||||||
sidebar_selectionChange(event: any) {
|
private sidebar_selectionChange(event: any) {
|
||||||
this.switchSection(event.section.name);
|
this.switchSection(event.section.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderSectionDescription(section: any) {
|
public renderSectionDescription(section: any) {
|
||||||
const description = Setting.sectionDescription(section.name);
|
const description = Setting.sectionDescription(section.name);
|
||||||
if (!description) return null;
|
if (!description) return null;
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
sectionToComponent(key: string, section: any, settings: any, selected: boolean) {
|
public sectionToComponent(key: string, section: any, settings: any, selected: boolean) {
|
||||||
const theme = themeStyle(this.props.themeId);
|
const theme = themeStyle(this.props.themeId);
|
||||||
|
|
||||||
const createSettingComponents = (advanced: boolean) => {
|
const createSettingComponents = (advanced: boolean) => {
|
||||||
@@ -284,7 +284,7 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
|||||||
return description ? <div style={this.descriptionStyle(themeId)}>{description}</div> : null;
|
return description ? <div style={this.descriptionStyle(themeId)}>{description}</div> : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
settingToComponent(key: string, value: any) {
|
public settingToComponent(key: string, value: any) {
|
||||||
const theme = themeStyle(this.props.themeId);
|
const theme = themeStyle(this.props.themeId);
|
||||||
|
|
||||||
const output: any = null;
|
const output: any = null;
|
||||||
@@ -453,6 +453,12 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
|||||||
inputStyle.marginBottom = subLabel.marginBottom;
|
inputStyle.marginBottom = subLabel.marginBottom;
|
||||||
|
|
||||||
const splitCmd = (cmdString: string) => {
|
const splitCmd = (cmdString: string) => {
|
||||||
|
// Normally not necessary but certain plugins found a way to
|
||||||
|
// set the set the value to "undefined", leading to a crash.
|
||||||
|
// This is now fixed at the model level but to be sure we
|
||||||
|
// check here too, to handle any already existing data.
|
||||||
|
// https://github.com/laurent22/joplin/issues/7621
|
||||||
|
if (!cmdString) cmdString = '';
|
||||||
const path = pathUtils.extractExecutablePath(cmdString);
|
const path = pathUtils.extractExecutablePath(cmdString);
|
||||||
const args = cmdString.substr(path.length + 1);
|
const args = cmdString.substr(path.length + 1);
|
||||||
return [pathUtils.unquotePath(path), args];
|
return [pathUtils.unquotePath(path), args];
|
||||||
@@ -651,26 +657,26 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async onApplyClick() {
|
public async onApplyClick() {
|
||||||
shared.saveSettings(this);
|
shared.saveSettings(this);
|
||||||
await this.checkNeedRestart();
|
await this.checkNeedRestart();
|
||||||
}
|
}
|
||||||
|
|
||||||
async onSaveClick() {
|
public async onSaveClick() {
|
||||||
shared.saveSettings(this);
|
shared.saveSettings(this);
|
||||||
await this.checkNeedRestart();
|
await this.checkNeedRestart();
|
||||||
this.props.dispatch({ type: 'NAV_BACK' });
|
this.props.dispatch({ type: 'NAV_BACK' });
|
||||||
}
|
}
|
||||||
|
|
||||||
onCancelClick() {
|
public onCancelClick() {
|
||||||
this.props.dispatch({ type: 'NAV_BACK' });
|
this.props.dispatch({ type: 'NAV_BACK' });
|
||||||
}
|
}
|
||||||
|
|
||||||
hasChanges() {
|
public hasChanges() {
|
||||||
return !!this.state.changedSettingKeys.length;
|
return !!this.state.changedSettingKeys.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
public render() {
|
||||||
const theme = themeStyle(this.props.themeId);
|
const theme = themeStyle(this.props.themeId);
|
||||||
|
|
||||||
const style = Object.assign({},
|
const style = Object.assign({},
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export interface PluginItem {
|
|||||||
hasBeenUpdated: boolean;
|
hasBeenUpdated: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CellRoot = styled.div<{isCompatible: boolean}>`
|
const CellRoot = styled.div<{ isCompatible: boolean }>`
|
||||||
display: flex;
|
display: flex;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: ${props => props.theme.backgroundColor};
|
background-color: ${props => props.theme.backgroundColor};
|
||||||
@@ -104,7 +104,7 @@ const DevModeLabel = styled.div`
|
|||||||
color: ${props => props.theme.color};
|
color: ${props => props.theme.color};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledNameAndVersion = styled.div<{mb: any}>`
|
const StyledNameAndVersion = styled.div<{ mb: any }>`
|
||||||
font-family: ${props => props.theme.fontFamily};
|
font-family: ${props => props.theme.fontFamily};
|
||||||
color: ${props => props.theme.color};
|
color: ${props => props.theme.color};
|
||||||
font-size: ${props => props.theme.fontSize}px;
|
font-size: ${props => props.theme.fontSize}px;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const { space } = require('styled-system');
|
|||||||
|
|
||||||
const logger = Logger.create('PluginState');
|
const logger = Logger.create('PluginState');
|
||||||
|
|
||||||
const maxWidth: number = 320;
|
const maxWidth = 320;
|
||||||
|
|
||||||
const Root = styled.div`
|
const Root = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -143,7 +143,7 @@ export default function(props: Props) {
|
|||||||
let cancelled = false;
|
let cancelled = false;
|
||||||
|
|
||||||
async function fetchPluginIds() {
|
async function fetchPluginIds() {
|
||||||
const pluginIds = await repoApi().canBeUpdatedPlugins(pluginItems.map(p => p.manifest));
|
const pluginIds = await repoApi().canBeUpdatedPlugins(pluginItems.map(p => p.manifest), pluginService.appVersion);
|
||||||
if (cancelled) return;
|
if (cancelled) return;
|
||||||
const conv: Record<string, boolean> = {};
|
const conv: Record<string, boolean> = {};
|
||||||
pluginIds.forEach(id => conv[id] = true);
|
pluginIds.forEach(id => conv[id] = true);
|
||||||
@@ -155,7 +155,7 @@ export default function(props: Props) {
|
|||||||
return () => {
|
return () => {
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
};
|
};
|
||||||
}, [manifestsLoaded, pluginItems]);
|
}, [manifestsLoaded, pluginItems, pluginService.appVersion]);
|
||||||
|
|
||||||
const onDelete = useCallback(async (event: ItemEvent) => {
|
const onDelete = useCallback(async (event: ItemEvent) => {
|
||||||
const item = event.item;
|
const item = event.item;
|
||||||
@@ -225,7 +225,7 @@ export default function(props: Props) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const menu = bridge().Menu.buildFromTemplate(template);
|
const menu = bridge().Menu.buildFromTemplate(template);
|
||||||
menu.popup(bridge().window());
|
menu.popup({ window: bridge().window() });
|
||||||
}, [onInstall, onBrowsePlugins]);
|
}, [onInstall, onBrowsePlugins]);
|
||||||
|
|
||||||
const onSearchQueryChange = useCallback((event: OnChangeEvent) => {
|
const onSearchQueryChange = useCallback((event: OnChangeEvent) => {
|
||||||
|
|||||||
@@ -13,19 +13,19 @@ interface Props {
|
|||||||
|
|
||||||
class DropboxLoginScreenComponent extends React.Component<any, any> {
|
class DropboxLoginScreenComponent extends React.Component<any, any> {
|
||||||
|
|
||||||
shared_: any;
|
private shared_: any;
|
||||||
|
|
||||||
constructor(props: Props) {
|
public constructor(props: Props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.shared_ = new Shared(this, (msg: string) => bridge().showInfoMessageBox(msg), (msg: string) => bridge().showErrorMessageBox(msg));
|
this.shared_ = new Shared(this, (msg: string) => bridge().showInfoMessageBox(msg), (msg: string) => bridge().showErrorMessageBox(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillMount() {
|
public UNSAFE_componentWillMount() {
|
||||||
this.shared_.refreshUrl();
|
this.shared_.refreshUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
public render() {
|
||||||
const style = this.props.style;
|
const style = this.props.style;
|
||||||
const theme = themeStyle(this.props.themeId);
|
const theme = themeStyle(this.props.themeId);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import versionInfo from '@joplin/lib/versionInfo';
|
import versionInfo from '@joplin/lib/versionInfo';
|
||||||
import PluginService from '@joplin/lib/services/plugins/PluginService';
|
import PluginService, { Plugins } from '@joplin/lib/services/plugins/PluginService';
|
||||||
import Setting from '@joplin/lib/models/Setting';
|
import Setting from '@joplin/lib/models/Setting';
|
||||||
import restart from '../services/restart';
|
import restart from '../services/restart';
|
||||||
const packageInfo = require('../packageInfo.js');
|
const packageInfo = require('../packageInfo.js');
|
||||||
@@ -21,6 +21,7 @@ interface State {
|
|||||||
error: Error;
|
error: Error;
|
||||||
errorInfo: ErrorInfo;
|
errorInfo: ErrorInfo;
|
||||||
pluginInfos: PluginInfo[];
|
pluginInfos: PluginInfo[];
|
||||||
|
plugins: Plugins;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -29,14 +30,16 @@ interface Props {
|
|||||||
|
|
||||||
export default class ErrorBoundary extends React.Component<Props, State> {
|
export default class ErrorBoundary extends React.Component<Props, State> {
|
||||||
|
|
||||||
public state: State = { error: null, errorInfo: null, pluginInfos: [] };
|
public state: State = { error: null, errorInfo: null, pluginInfos: [], plugins: {} };
|
||||||
|
|
||||||
componentDidCatch(error: any, errorInfo: ErrorInfo) {
|
public componentDidCatch(error: any, errorInfo: ErrorInfo) {
|
||||||
if (typeof error === 'string') error = { message: error };
|
if (typeof error === 'string') error = { message: error };
|
||||||
|
|
||||||
const pluginInfos: PluginInfo[] = [];
|
const pluginInfos: PluginInfo[] = [];
|
||||||
|
let plugins: Plugins = {};
|
||||||
try {
|
try {
|
||||||
const service = PluginService.instance();
|
const service = PluginService.instance();
|
||||||
|
plugins = service.plugins;
|
||||||
const pluginSettings = service.unserializePluginSettings(Setting.value('plugins.states'));
|
const pluginSettings = service.unserializePluginSettings(Setting.value('plugins.states'));
|
||||||
for (const pluginId in pluginSettings) {
|
for (const pluginId in pluginSettings) {
|
||||||
const plugin = PluginService.instance().pluginById(pluginId);
|
const plugin = PluginService.instance().pluginById(pluginId);
|
||||||
@@ -52,10 +55,10 @@ export default class ErrorBoundary extends React.Component<Props, State> {
|
|||||||
console.error('Could not get plugin info:', error);
|
console.error('Could not get plugin info:', error);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({ error, errorInfo, pluginInfos });
|
this.setState({ error, errorInfo, pluginInfos, plugins });
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
public componentDidMount() {
|
||||||
const onAppClose = () => {
|
const onAppClose = () => {
|
||||||
ipcRenderer.send('asynchronous-message', 'appCloseReply', {
|
ipcRenderer.send('asynchronous-message', 'appCloseReply', {
|
||||||
canClose: true,
|
canClose: true,
|
||||||
@@ -65,12 +68,12 @@ export default class ErrorBoundary extends React.Component<Props, State> {
|
|||||||
ipcRenderer.on('appClose', onAppClose);
|
ipcRenderer.on('appClose', onAppClose);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderMessage() {
|
public renderMessage() {
|
||||||
const message = this.props.message || 'Joplin encountered a fatal error and could not continue.';
|
const message = this.props.message || 'Joplin encountered a fatal error and could not continue.';
|
||||||
return <p>{message}</p>;
|
return <p>{message}</p>;
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
public render() {
|
||||||
if (this.state.error) {
|
if (this.state.error) {
|
||||||
const safeMode_click = async () => {
|
const safeMode_click = async () => {
|
||||||
Setting.setValue('isSafeMode', true);
|
Setting.setValue('isSafeMode', true);
|
||||||
@@ -91,7 +94,7 @@ export default class ErrorBoundary extends React.Component<Props, State> {
|
|||||||
output.push(
|
output.push(
|
||||||
<section key="versionInfo">
|
<section key="versionInfo">
|
||||||
<h2>Version info</h2>
|
<h2>Version info</h2>
|
||||||
<pre>{versionInfo(packageInfo).message}</pre>
|
<pre>{versionInfo(packageInfo, this.state.plugins).message}</pre>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
const React = require('react');
|
|
||||||
const bridge = require('@electron/remote').require('./bridge').default;
|
|
||||||
const styleSelector = require('./style/ExtensionBadge');
|
|
||||||
const { _ } = require('@joplin/lib/locale');
|
|
||||||
|
|
||||||
function platformAssets(type) {
|
|
||||||
if (type === 'firefox') {
|
|
||||||
return {
|
|
||||||
logoImage: `${bridge().buildDir()}/images/firefox-logo.svg`,
|
|
||||||
locationLabel: _('Firefox Extension'),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'chrome') {
|
|
||||||
return {
|
|
||||||
logoImage: `${bridge().buildDir()}/images/chrome-logo.svg`,
|
|
||||||
locationLabel: _('Chrome Web Store'),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Error(`Invalid type:${type}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function ExtensionBadge(props) {
|
|
||||||
const style = styleSelector(null, props);
|
|
||||||
const assets = platformAssets(props.type);
|
|
||||||
|
|
||||||
const onClick = () => {
|
|
||||||
bridge().openExternal(props.url);
|
|
||||||
};
|
|
||||||
|
|
||||||
const rootStyle = props.style ? Object.assign({}, style.root, props.style) : style.root;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<a style={rootStyle} onClick={onClick} href="#">
|
|
||||||
<img style={style.logo} src={assets.logoImage}/>
|
|
||||||
<div style={style.labelGroup} >
|
|
||||||
<div>{_('Get it now:')}</div>
|
|
||||||
<div style={style.locationLabel}>{assets.locationLabel}</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = ExtensionBadge;
|
|
||||||
98
packages/app-desktop/gui/ExtensionBadge.tsx
Normal file
98
packages/app-desktop/gui/ExtensionBadge.tsx
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
import bridge from '../services/bridge';
|
||||||
|
import { _ } from '@joplin/lib/locale';
|
||||||
|
import { themeStyle } from '@joplin/lib/theme';
|
||||||
|
const { createSelector } = require('reselect');
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
themeId: number;
|
||||||
|
type: string;
|
||||||
|
url: string;
|
||||||
|
style?: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
const themeSelector = (_state: any, props: any) => themeStyle(props.themeId);
|
||||||
|
|
||||||
|
const styleSelector = createSelector(
|
||||||
|
themeSelector,
|
||||||
|
(theme: any) => {
|
||||||
|
const output = {
|
||||||
|
root: {
|
||||||
|
width: 220,
|
||||||
|
height: 60,
|
||||||
|
borderRadius: 4,
|
||||||
|
border: '1px solid',
|
||||||
|
borderColor: theme.dividerColor,
|
||||||
|
backgroundColor: theme.backgroundColor,
|
||||||
|
paddingLeft: 14,
|
||||||
|
paddingRight: 14,
|
||||||
|
paddingTop: 8,
|
||||||
|
paddingBottom: 8,
|
||||||
|
boxSizing: 'border-box',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'row',
|
||||||
|
boxShadow: '0px 1px 1px rgba(0,0,0,0.3)',
|
||||||
|
},
|
||||||
|
logo: {
|
||||||
|
width: 42,
|
||||||
|
height: 42,
|
||||||
|
},
|
||||||
|
labelGroup: {
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
justifyContent: 'center',
|
||||||
|
marginLeft: 14,
|
||||||
|
fontFamily: theme.fontFamily,
|
||||||
|
color: theme.color,
|
||||||
|
fontSize: theme.fontSize,
|
||||||
|
},
|
||||||
|
locationLabel: {
|
||||||
|
fontSize: theme.fontSize * 1.2,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
function platformAssets(type: string) {
|
||||||
|
if (type === 'firefox') {
|
||||||
|
return {
|
||||||
|
logoImage: `${bridge().buildDir()}/images/firefox-logo.svg`,
|
||||||
|
locationLabel: _('Firefox Extension'),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type === 'chrome') {
|
||||||
|
return {
|
||||||
|
logoImage: `${bridge().buildDir()}/images/chrome-logo.svg`,
|
||||||
|
locationLabel: _('Chrome Web Store'),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Error(`Invalid type:${type}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ExtensionBadge(props: Props) {
|
||||||
|
const style = styleSelector(null, props);
|
||||||
|
const assets = platformAssets(props.type);
|
||||||
|
|
||||||
|
const onClick = () => {
|
||||||
|
void bridge().openExternal(props.url);
|
||||||
|
};
|
||||||
|
|
||||||
|
const rootStyle = props.style ? Object.assign({}, style.root, props.style) : style.root;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<a style={rootStyle} onClick={onClick} href="#">
|
||||||
|
<img style={style.logo} src={assets.logoImage}/>
|
||||||
|
<div style={style.labelGroup} >
|
||||||
|
<div>{_('Get it now:')}</div>
|
||||||
|
<div style={style.locationLabel}>{assets.locationLabel}</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ExtensionBadge;
|
||||||
@@ -1,23 +1,31 @@
|
|||||||
const React = require('react');
|
import * as React from 'react';
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { themeStyle } = require('@joplin/lib/theme');
|
import { themeStyle } from '@joplin/lib/theme';
|
||||||
|
import { AppState } from '../app.reducer';
|
||||||
|
|
||||||
class HelpButtonComponent extends React.Component {
|
interface Props {
|
||||||
constructor() {
|
tip: string;
|
||||||
super();
|
onClick: Function;
|
||||||
|
themeId: number;
|
||||||
|
style: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
class HelpButtonComponent extends React.Component<Props> {
|
||||||
|
public constructor(props: Props) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
this.onClick = this.onClick.bind(this);
|
this.onClick = this.onClick.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
onClick() {
|
public onClick() {
|
||||||
if (this.props.onClick) this.props.onClick();
|
if (this.props.onClick) this.props.onClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
public render() {
|
||||||
const theme = themeStyle(this.props.themeId);
|
const theme = themeStyle(this.props.themeId);
|
||||||
const style = Object.assign({}, this.props.style, { color: theme.color, textDecoration: 'none' });
|
const style = Object.assign({}, this.props.style, { color: theme.color, textDecoration: 'none' });
|
||||||
const helpIconStyle = { flex: 0, width: 16, height: 16, marginLeft: 10 };
|
const helpIconStyle = { flex: 0, width: 16, height: 16, marginLeft: 10 };
|
||||||
const extraProps = {};
|
const extraProps: any = {};
|
||||||
if (this.props.tip) extraProps['data-tip'] = this.props.tip;
|
if (this.props.tip) extraProps['data-tip'] = this.props.tip;
|
||||||
return (
|
return (
|
||||||
<a href="#" style={style} onClick={this.onClick} {...extraProps}>
|
<a href="#" style={style} onClick={this.onClick} {...extraProps}>
|
||||||
@@ -27,7 +35,7 @@ class HelpButtonComponent extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state: AppState) => {
|
||||||
return {
|
return {
|
||||||
themeId: state.settings.theme,
|
themeId: state.settings.theme,
|
||||||
};
|
};
|
||||||
@@ -35,4 +43,4 @@ const mapStateToProps = state => {
|
|||||||
|
|
||||||
const HelpButton = connect(mapStateToProps)(HelpButtonComponent);
|
const HelpButton = connect(mapStateToProps)(HelpButtonComponent);
|
||||||
|
|
||||||
module.exports = HelpButton;
|
export default HelpButton;
|
||||||
@@ -1,8 +1,15 @@
|
|||||||
const React = require('react');
|
import * as React from 'react';
|
||||||
const { themeStyle } = require('@joplin/lib/theme');
|
import { themeStyle } from '@joplin/lib/theme';
|
||||||
|
|
||||||
class IconButton extends React.Component {
|
interface Props {
|
||||||
render() {
|
themeId: number;
|
||||||
|
style: any;
|
||||||
|
iconName: string;
|
||||||
|
onClick: Function;
|
||||||
|
}
|
||||||
|
|
||||||
|
class IconButton extends React.Component<Props> {
|
||||||
|
public render() {
|
||||||
const style = this.props.style;
|
const style = this.props.style;
|
||||||
const theme = themeStyle(this.props.themeId);
|
const theme = themeStyle(this.props.themeId);
|
||||||
const iconStyle = {
|
const iconStyle = {
|
||||||
@@ -42,4 +49,4 @@ class IconButton extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { IconButton };
|
export default IconButton;
|
||||||
@@ -1,13 +1,30 @@
|
|||||||
const React = require('react');
|
import * as React from 'react';
|
||||||
|
import Folder from '@joplin/lib/models/Folder';
|
||||||
|
import { themeStyle } from '@joplin/lib/theme';
|
||||||
|
import { _ } from '@joplin/lib/locale';
|
||||||
|
import { filename, basename } from '@joplin/lib/path-utils';
|
||||||
|
import importEnex from '@joplin/lib/import-enex';
|
||||||
|
import { AppState } from '../app.reducer';
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const Folder = require('@joplin/lib/models/Folder').default;
|
|
||||||
const { themeStyle } = require('@joplin/lib/theme');
|
|
||||||
const { _ } = require('@joplin/lib/locale');
|
|
||||||
const { filename, basename } = require('@joplin/lib/path-utils');
|
|
||||||
const importEnex = require('@joplin/lib/import-enex').default;
|
|
||||||
|
|
||||||
class ImportScreenComponent extends React.Component {
|
interface Props {
|
||||||
UNSAFE_componentWillMount() {
|
filePath: string;
|
||||||
|
themeId: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Message {
|
||||||
|
key: string;
|
||||||
|
text: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface State {
|
||||||
|
filePath: string;
|
||||||
|
doImport: boolean;
|
||||||
|
messages: Message[];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ImportScreenComponent extends React.Component<Props, State> {
|
||||||
|
public UNSAFE_componentWillMount() {
|
||||||
this.setState({
|
this.setState({
|
||||||
doImport: true,
|
doImport: true,
|
||||||
filePath: this.props.filePath,
|
filePath: this.props.filePath,
|
||||||
@@ -15,7 +32,7 @@ class ImportScreenComponent extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(newProps) {
|
public UNSAFE_componentWillReceiveProps(newProps: Props) {
|
||||||
if (newProps.filePath) {
|
if (newProps.filePath) {
|
||||||
this.setState(
|
this.setState(
|
||||||
{
|
{
|
||||||
@@ -24,19 +41,19 @@ class ImportScreenComponent extends React.Component {
|
|||||||
messages: [],
|
messages: [],
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.doImport();
|
void this.doImport();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
public componentDidMount() {
|
||||||
if (this.state.filePath && this.state.doImport) {
|
if (this.state.filePath && this.state.doImport) {
|
||||||
this.doImport();
|
void this.doImport();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addMessage(key, text) {
|
public addMessage(key: string, text: string) {
|
||||||
const messages = this.state.messages.slice();
|
const messages = this.state.messages.slice();
|
||||||
|
|
||||||
messages.push({ key: key, text: text });
|
messages.push({ key: key, text: text });
|
||||||
@@ -44,7 +61,7 @@ class ImportScreenComponent extends React.Component {
|
|||||||
this.setState({ messages: messages });
|
this.setState({ messages: messages });
|
||||||
}
|
}
|
||||||
|
|
||||||
uniqueMessages() {
|
public uniqueMessages() {
|
||||||
const output = [];
|
const output = [];
|
||||||
const messages = this.state.messages.slice();
|
const messages = this.state.messages.slice();
|
||||||
const foundKeys = [];
|
const foundKeys = [];
|
||||||
@@ -57,7 +74,7 @@ class ImportScreenComponent extends React.Component {
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
async doImport() {
|
public async doImport() {
|
||||||
const filePath = this.props.filePath;
|
const filePath = this.props.filePath;
|
||||||
const folderTitle = await Folder.findUniqueItemTitle(filename(filePath));
|
const folderTitle = await Folder.findUniqueItemTitle(filename(filePath));
|
||||||
|
|
||||||
@@ -66,7 +83,7 @@ class ImportScreenComponent extends React.Component {
|
|||||||
let lastProgress = '';
|
let lastProgress = '';
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
onProgress: progressState => {
|
onProgress: (progressState: any) => {
|
||||||
const line = [];
|
const line = [];
|
||||||
line.push(_('Found: %d.', progressState.loaded));
|
line.push(_('Found: %d.', progressState.loaded));
|
||||||
line.push(_('Created: %d.', progressState.created));
|
line.push(_('Created: %d.', progressState.created));
|
||||||
@@ -77,7 +94,7 @@ class ImportScreenComponent extends React.Component {
|
|||||||
lastProgress = line.join(' ');
|
lastProgress = line.join(' ');
|
||||||
this.addMessage('progress', lastProgress);
|
this.addMessage('progress', lastProgress);
|
||||||
},
|
},
|
||||||
onError: error => {
|
onError: (error: any) => {
|
||||||
// Don't display the error directly because most of the time it doesn't matter
|
// Don't display the error directly because most of the time it doesn't matter
|
||||||
// (eg. for weird broken HTML, but the note is still imported)
|
// (eg. for weird broken HTML, but the note is still imported)
|
||||||
console.warn('When importing ENEX file', error);
|
console.warn('When importing ENEX file', error);
|
||||||
@@ -92,7 +109,7 @@ class ImportScreenComponent extends React.Component {
|
|||||||
this.setState({ doImport: false });
|
this.setState({ doImport: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
public render() {
|
||||||
const theme = themeStyle(this.props.themeId);
|
const theme = themeStyle(this.props.themeId);
|
||||||
const messages = this.uniqueMessages();
|
const messages = this.uniqueMessages();
|
||||||
|
|
||||||
@@ -116,7 +133,7 @@ class ImportScreenComponent extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state: AppState) => {
|
||||||
return {
|
return {
|
||||||
themeId: state.settings.theme,
|
themeId: state.settings.theme,
|
||||||
};
|
};
|
||||||
@@ -124,4 +141,5 @@ const mapStateToProps = state => {
|
|||||||
|
|
||||||
const ImportScreen = connect(mapStateToProps)(ImportScreenComponent);
|
const ImportScreen = connect(mapStateToProps)(ImportScreenComponent);
|
||||||
|
|
||||||
module.exports = { ImportScreen };
|
export default ImportScreen;
|
||||||
|
|
||||||
@@ -1,8 +1,31 @@
|
|||||||
const React = require('react');
|
import * as React from 'react';
|
||||||
|
import Logger from '@joplin/lib/Logger';
|
||||||
|
|
||||||
class ItemList extends React.Component {
|
const logger = Logger.create('ItemList');
|
||||||
constructor() {
|
|
||||||
super();
|
interface Props {
|
||||||
|
style: any;
|
||||||
|
itemHeight: number;
|
||||||
|
items: any[];
|
||||||
|
disabled?: boolean;
|
||||||
|
onKeyDown?: Function;
|
||||||
|
itemRenderer: Function;
|
||||||
|
className?: string;
|
||||||
|
onNoteDrop?: Function;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface State {
|
||||||
|
topItemIndex: number;
|
||||||
|
bottomItemIndex: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ItemList extends React.Component<Props, State> {
|
||||||
|
|
||||||
|
private scrollTop_: number;
|
||||||
|
private listRef: any;
|
||||||
|
|
||||||
|
public constructor(props: Props) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
this.scrollTop_ = 0;
|
this.scrollTop_ = 0;
|
||||||
|
|
||||||
@@ -10,14 +33,15 @@ class ItemList extends React.Component {
|
|||||||
|
|
||||||
this.onScroll = this.onScroll.bind(this);
|
this.onScroll = this.onScroll.bind(this);
|
||||||
this.onKeyDown = this.onKeyDown.bind(this);
|
this.onKeyDown = this.onKeyDown.bind(this);
|
||||||
|
this.onDrop = this.onDrop.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
visibleItemCount(props) {
|
public visibleItemCount(props: Props = undefined) {
|
||||||
if (typeof props === 'undefined') props = this.props;
|
if (typeof props === 'undefined') props = this.props;
|
||||||
return Math.ceil(props.style.height / props.itemHeight);
|
return Math.ceil(props.style.height / props.itemHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateStateItemIndexes(props) {
|
public updateStateItemIndexes(props: Props = undefined) {
|
||||||
if (typeof props === 'undefined') props = this.props;
|
if (typeof props === 'undefined') props = this.props;
|
||||||
|
|
||||||
const topItemIndex = Math.floor(this.scrollTop_ / props.itemHeight);
|
const topItemIndex = Math.floor(this.scrollTop_ / props.itemHeight);
|
||||||
@@ -26,38 +50,66 @@ class ItemList extends React.Component {
|
|||||||
let bottomItemIndex = topItemIndex + (visibleItemCount - 1);
|
let bottomItemIndex = topItemIndex + (visibleItemCount - 1);
|
||||||
if (bottomItemIndex >= props.items.length) bottomItemIndex = props.items.length - 1;
|
if (bottomItemIndex >= props.items.length) bottomItemIndex = props.items.length - 1;
|
||||||
|
|
||||||
|
// EDGE CASE:
|
||||||
|
// ref: https://github.com/laurent22/joplin/issues/4124
|
||||||
|
// when the note list is hidden, visibleItemCount is negative, and scroll top is positive when a note is selected
|
||||||
|
if (visibleItemCount < 0 && this.scrollTop_ > 0) {
|
||||||
|
logger.warn('Resetting scrollTop to 0. visibleItemCount is negative, scrollTop is positive.');
|
||||||
|
// we will reset the scroll top so that there is no blank space at the top of note list
|
||||||
|
this.scrollTop_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
topItemIndex: topItemIndex,
|
topItemIndex: topItemIndex,
|
||||||
bottomItemIndex: bottomItemIndex,
|
bottomItemIndex: bottomItemIndex,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
offsetTop() {
|
public offsetTop() {
|
||||||
return this.listRef.current ? this.listRef.current.offsetTop : 0;
|
return this.listRef.current ? this.listRef.current.offsetTop : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
offsetScroll() {
|
public offsetScroll() {
|
||||||
return this.scrollTop_;
|
return this.scrollTop_;
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillMount() {
|
public UNSAFE_componentWillMount() {
|
||||||
this.updateStateItemIndexes();
|
this.updateStateItemIndexes();
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(newProps) {
|
public UNSAFE_componentWillReceiveProps(newProps: Props) {
|
||||||
this.updateStateItemIndexes(newProps);
|
this.updateStateItemIndexes(newProps);
|
||||||
}
|
}
|
||||||
|
|
||||||
onScroll(event) {
|
public componentDidUpdate(): void {
|
||||||
|
// EDGE CASE
|
||||||
|
// scroll top is not updated when item list visibility is toggled
|
||||||
|
// if the user was at the bottom of the item list before hiding, blank spaces are added at the bottom of the item list
|
||||||
|
if (this.offsetScroll() !== this.listRef.current?.scrollTop) {
|
||||||
|
logger.warn(`scrollTop mismatch. Updating scrollTop with current listRef scrollTop(${this.listRef.current.scrollTop})`);
|
||||||
|
// update scroll postion once if there is a mismatch in scroll position after showing item list
|
||||||
|
this.onScroll({
|
||||||
|
target: {
|
||||||
|
scrollTop: this.listRef.current.scrollTop,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public onScroll(event: any) {
|
||||||
this.scrollTop_ = event.target.scrollTop;
|
this.scrollTop_ = event.target.scrollTop;
|
||||||
this.updateStateItemIndexes();
|
this.updateStateItemIndexes();
|
||||||
}
|
}
|
||||||
|
|
||||||
onKeyDown(event) {
|
public onKeyDown(event: any) {
|
||||||
if (this.props.onKeyDown) this.props.onKeyDown(event);
|
if (this.props.onKeyDown) this.props.onKeyDown(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
makeItemIndexVisible(itemIndex) {
|
public onDrop(event: any) {
|
||||||
|
if (this.props.onNoteDrop) this.props.onNoteDrop(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
public makeItemIndexVisible(itemIndex: number) {
|
||||||
const top = Math.min(this.props.items.length - 1, this.state.topItemIndex);
|
const top = Math.min(this.props.items.length - 1, this.state.topItemIndex);
|
||||||
const bottom = Math.max(0, this.state.bottomItemIndex);
|
const bottom = Math.max(0, this.state.bottomItemIndex);
|
||||||
|
|
||||||
@@ -94,7 +146,7 @@ class ItemList extends React.Component {
|
|||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
render() {
|
public render() {
|
||||||
const items = this.props.items;
|
const items = this.props.items;
|
||||||
const style = Object.assign({}, this.props.style, {
|
const style = Object.assign({}, this.props.style, {
|
||||||
overflowX: 'hidden',
|
overflowX: 'hidden',
|
||||||
@@ -105,7 +157,7 @@ class ItemList extends React.Component {
|
|||||||
|
|
||||||
if (!this.props.itemHeight) throw new Error('itemHeight is required');
|
if (!this.props.itemHeight) throw new Error('itemHeight is required');
|
||||||
|
|
||||||
const blankItem = function(key, height) {
|
const blankItem = function(key: string, height: number) {
|
||||||
return <div key={key} style={{ height: height }}></div>;
|
return <div key={key} style={{ height: height }}></div>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -122,11 +174,11 @@ class ItemList extends React.Component {
|
|||||||
if (this.props.className) classes.push(this.props.className);
|
if (this.props.className) classes.push(this.props.className);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={this.listRef} className={classes.join(' ')} style={style} onScroll={this.onScroll} onKeyDown={this.onKeyDown}>
|
<div ref={this.listRef} className={classes.join(' ')} style={style} onScroll={this.onScroll} onKeyDown={this.onKeyDown} onDrop={this.onDrop}>
|
||||||
{itemComps}
|
{itemComps}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { ItemList };
|
export default ItemList;
|
||||||
@@ -61,8 +61,8 @@ export const KeymapConfigScreen = ({ themeId }: KeymapConfigScreenProps) => {
|
|||||||
try {
|
try {
|
||||||
const keymapFile = await shim.fsDriver().readFile(actualFilePath, 'utf-8');
|
const keymapFile = await shim.fsDriver().readFile(actualFilePath, 'utf-8');
|
||||||
overrideKeymapItems(JSON.parse(keymapFile));
|
overrideKeymapItems(JSON.parse(keymapFile));
|
||||||
} catch (err) {
|
} catch (error) {
|
||||||
bridge().showErrorMessageBox(_('Error: %s', err.message));
|
bridge().showErrorMessageBox(_('Error: %s', error.message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -77,8 +77,8 @@ export const KeymapConfigScreen = ({ themeId }: KeymapConfigScreenProps) => {
|
|||||||
try {
|
try {
|
||||||
// KeymapService is already synchronized with the in-state keymap
|
// KeymapService is already synchronized with the in-state keymap
|
||||||
await keymapService.saveCustomKeymap(filePath);
|
await keymapService.saveCustomKeymap(filePath);
|
||||||
} catch (err) {
|
} catch (error) {
|
||||||
bridge().showErrorMessageBox(err.message);
|
bridge().showerrororMessageBox(error.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -62,11 +62,11 @@ const useKeymap = (): [
|
|||||||
// Then, update the state with the data from KeymapService
|
// Then, update the state with the data from KeymapService
|
||||||
// Side-effect: Changes will also be saved to the disk
|
// Side-effect: Changes will also be saved to the disk
|
||||||
setKeymapItems(keymapService.getKeymapItems());
|
setKeymapItems(keymapService.getKeymapItems());
|
||||||
} catch (err) {
|
} catch (error) {
|
||||||
// oldKeymapItems includes even the unchanged keymap items
|
// oldKeymapItems includes even the unchanged keymap items
|
||||||
// However, it is not an issue because the logic accounts for such scenarios
|
// However, it is not an issue because the logic accounts for such scenarios
|
||||||
keymapService.overrideKeymap(oldKeymapItems);
|
keymapService.overrideKeymap(oldKeymapItems);
|
||||||
throw err;
|
throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,8 +80,8 @@ const useKeymap = (): [
|
|||||||
keymapService.overrideKeymap(keymapItems);
|
keymapService.overrideKeymap(keymapItems);
|
||||||
await keymapService.saveCustomKeymap();
|
await keymapService.saveCustomKeymap();
|
||||||
setKeymapError(null);
|
setKeymapError(null);
|
||||||
} catch (err) {
|
} catch (error) {
|
||||||
const error = new Error(`Could not save file: ${err.message}`);
|
error.message = `Could not save file: ${error.message}`;
|
||||||
setKeymapError(error);
|
setKeymapError(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import invitationRespond from '../../services/share/invitationRespond';
|
|||||||
import restart from '../../services/restart';
|
import restart from '../../services/restart';
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
import PromptDialog from '../PromptDialog';
|
import PromptDialog from '../PromptDialog';
|
||||||
const NotePropertiesDialog = require('../NotePropertiesDialog.min.js');
|
import NotePropertiesDialog from '../NotePropertiesDialog';
|
||||||
const PluginManager = require('@joplin/lib/services/PluginManager');
|
const PluginManager = require('@joplin/lib/services/PluginManager');
|
||||||
const ipcRenderer = require('electron').ipcRenderer;
|
const ipcRenderer = require('electron').ipcRenderer;
|
||||||
|
|
||||||
@@ -78,6 +78,7 @@ interface Props {
|
|||||||
isSafeMode: boolean;
|
isSafeMode: boolean;
|
||||||
needApiAuth: boolean;
|
needApiAuth: boolean;
|
||||||
processingShareInvitationResponse: boolean;
|
processingShareInvitationResponse: boolean;
|
||||||
|
isResettingLayout: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ShareFolderDialogOptions {
|
interface ShareFolderDialogOptions {
|
||||||
@@ -122,7 +123,7 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
private styles_: any;
|
private styles_: any;
|
||||||
private promptOnClose_: Function;
|
private promptOnClose_: Function;
|
||||||
|
|
||||||
constructor(props: Props) {
|
public constructor(props: Props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
@@ -172,7 +173,6 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private openCallbackUrl(url: string) {
|
private openCallbackUrl(url: string) {
|
||||||
console.log(`openUrl ${url}`);
|
|
||||||
const { command, params } = parseCallbackUrl(url);
|
const { command, params } = parseCallbackUrl(url);
|
||||||
void CommandService.instance().execute(command.toString(), params.id);
|
void CommandService.instance().execute(command.toString(), params.id);
|
||||||
}
|
}
|
||||||
@@ -250,11 +250,11 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
return this.updateLayoutPluginViews(output, plugins);
|
return this.updateLayoutPluginViews(output, plugins);
|
||||||
}
|
}
|
||||||
|
|
||||||
window_resize() {
|
private window_resize() {
|
||||||
this.updateRootLayoutSize();
|
this.updateRootLayoutSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
setupAppCloseHandling() {
|
public setupAppCloseHandling() {
|
||||||
this.waitForNotesSavedIID_ = null;
|
this.waitForNotesSavedIID_ = null;
|
||||||
|
|
||||||
// This event is dispached from the main process when the app is about
|
// This event is dispached from the main process when the app is about
|
||||||
@@ -289,11 +289,11 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
notePropertiesDialog_close() {
|
private notePropertiesDialog_close() {
|
||||||
this.setState({ notePropertiesDialogOptions: {} });
|
this.setState({ notePropertiesDialogOptions: {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
noteContentPropertiesDialog_close() {
|
private noteContentPropertiesDialog_close() {
|
||||||
this.setState({ noteContentPropertiesDialogOptions: {} });
|
this.setState({ noteContentPropertiesDialogOptions: {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,14 +305,14 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
this.setState({ shareFolderDialogOptions: { visible: false, folderId: '' } });
|
this.setState({ shareFolderDialogOptions: { visible: false, folderId: '' } });
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMainLayout(layout: LayoutItem) {
|
public updateMainLayout(layout: LayoutItem) {
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'MAIN_LAYOUT_SET',
|
type: 'MAIN_LAYOUT_SET',
|
||||||
value: layout,
|
value: layout,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateRootLayoutSize() {
|
public updateRootLayoutSize() {
|
||||||
this.updateMainLayout(produce(this.props.mainLayout, (draft: any) => {
|
this.updateMainLayout(produce(this.props.mainLayout, (draft: any) => {
|
||||||
const s = this.rootLayoutSize();
|
const s = this.rootLayoutSize();
|
||||||
draft.width = s.width;
|
draft.width = s.width;
|
||||||
@@ -320,7 +320,7 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps: Props, prevState: State) {
|
public componentDidUpdate(prevProps: Props, prevState: State) {
|
||||||
if (prevProps.style.width !== this.props.style.width ||
|
if (prevProps.style.width !== this.props.style.width ||
|
||||||
prevProps.style.height !== this.props.style.height ||
|
prevProps.style.height !== this.props.style.height ||
|
||||||
this.messageBoxVisible(prevProps) !== this.messageBoxVisible(this.props)
|
this.messageBoxVisible(prevProps) !== this.messageBoxVisible(this.props)
|
||||||
@@ -372,35 +372,46 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
name: 'promptDialog',
|
name: 'promptDialog',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.props.isResettingLayout) {
|
||||||
|
Setting.setValue('ui.layout', null);
|
||||||
|
this.updateMainLayout(this.buildLayout(this.props.plugins));
|
||||||
|
this.props.dispatch({
|
||||||
|
type: 'RESET_LAYOUT',
|
||||||
|
value: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
layoutModeListenerKeyDown(event: any) {
|
public layoutModeListenerKeyDown(event: any) {
|
||||||
if (event.key !== 'Escape') return;
|
if (event.key !== 'Escape') return;
|
||||||
if (!this.props.layoutMoveMode) return;
|
if (!this.props.layoutMoveMode) return;
|
||||||
void CommandService.instance().execute('toggleLayoutMoveMode');
|
void CommandService.instance().execute('toggleLayoutMoveMode');
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
public componentDidMount() {
|
||||||
window.addEventListener('keydown', this.layoutModeListenerKeyDown);
|
window.addEventListener('keydown', this.layoutModeListenerKeyDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
public componentWillUnmount() {
|
||||||
this.unregisterCommands();
|
this.unregisterCommands();
|
||||||
|
|
||||||
window.removeEventListener('resize', this.window_resize);
|
window.removeEventListener('resize', this.window_resize);
|
||||||
window.removeEventListener('keydown', this.layoutModeListenerKeyDown);
|
window.removeEventListener('keydown', this.layoutModeListenerKeyDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitForNoteToSaved(noteId: string) {
|
public async waitForNoteToSaved(noteId: string) {
|
||||||
while (noteId && this.props.editorNoteStatuses[noteId] === 'saving') {
|
while (noteId && this.props.editorNoteStatuses[noteId] === 'saving') {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info('Waiting for note to be saved...', this.props.editorNoteStatuses);
|
console.info('Waiting for note to be saved...', this.props.editorNoteStatuses);
|
||||||
await time.msleep(100);
|
await time.msleep(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async printTo_(target: string, options: any) {
|
public async printTo_(target: string, options: any) {
|
||||||
// Concurrent print calls are disallowed to avoid incorrect settings being restored upon completion
|
// Concurrent print calls are disallowed to avoid incorrect settings being restored upon completion
|
||||||
if (this.isPrinting_) {
|
if (this.isPrinting_) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info(`Printing ${options.path} to ${target} disallowed, already printing.`);
|
console.info(`Printing ${options.path} to ${target} disallowed, already printing.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -438,23 +449,23 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
this.isPrinting_ = false;
|
this.isPrinting_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
rootLayoutSize() {
|
public rootLayoutSize() {
|
||||||
return {
|
return {
|
||||||
width: window.innerWidth,
|
width: window.innerWidth,
|
||||||
height: this.rowHeight(),
|
height: this.rowHeight(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
rowHeight() {
|
public rowHeight() {
|
||||||
if (!this.props) return 0;
|
if (!this.props) return 0;
|
||||||
return this.props.style.height - (this.messageBoxVisible() ? this.messageBoxHeight() : 0);
|
return this.props.style.height - (this.messageBoxVisible() ? this.messageBoxHeight() : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
messageBoxHeight() {
|
public messageBoxHeight() {
|
||||||
return 50;
|
return 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
styles(themeId: number, width: number, height: number, messageBoxVisible: boolean) {
|
public styles(themeId: number, width: number, height: number, messageBoxVisible: boolean) {
|
||||||
const styleKey = [themeId, width, height, messageBoxVisible].join('_');
|
const styleKey = [themeId, width, height, messageBoxVisible].join('_');
|
||||||
if (styleKey === this.styleKey_) return this.styles_;
|
if (styleKey === this.styleKey_) return this.styles_;
|
||||||
|
|
||||||
@@ -528,7 +539,7 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderNotification(theme: any, styles: any) {
|
public renderNotification(theme: any, styles: any) {
|
||||||
if (!this.messageBoxVisible()) return null;
|
if (!this.messageBoxVisible()) return null;
|
||||||
|
|
||||||
const onViewStatusScreen = () => {
|
const onViewStatusScreen = () => {
|
||||||
@@ -647,33 +658,33 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
messageBoxVisible(props: Props = null) {
|
public messageBoxVisible(props: Props = null) {
|
||||||
if (!props) props = this.props;
|
if (!props) props = this.props;
|
||||||
return props.hasDisabledSyncItems || props.showMissingMasterKeyMessage || props.showNeedUpgradingMasterKeyMessage || props.showShouldReencryptMessage || props.hasDisabledEncryptionItems || this.props.shouldUpgradeSyncTarget || props.isSafeMode || this.showShareInvitationNotification(props) || this.props.needApiAuth || this.props.showInstallTemplatesPlugin;
|
return props.hasDisabledSyncItems || props.showMissingMasterKeyMessage || props.showNeedUpgradingMasterKeyMessage || props.showShouldReencryptMessage || props.hasDisabledEncryptionItems || this.props.shouldUpgradeSyncTarget || props.isSafeMode || this.showShareInvitationNotification(props) || this.props.needApiAuth || this.props.showInstallTemplatesPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
registerCommands() {
|
public registerCommands() {
|
||||||
for (const command of commands) {
|
for (const command of commands) {
|
||||||
CommandService.instance().registerRuntime(command.declaration.name, command.runtime(this));
|
CommandService.instance().registerRuntime(command.declaration.name, command.runtime(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unregisterCommands() {
|
public unregisterCommands() {
|
||||||
for (const command of commands) {
|
for (const command of commands) {
|
||||||
CommandService.instance().unregisterRuntime(command.declaration.name);
|
CommandService.instance().unregisterRuntime(command.declaration.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resizableLayout_resize(event: any) {
|
private resizableLayout_resize(event: any) {
|
||||||
this.updateMainLayout(event.layout);
|
this.updateMainLayout(event.layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
resizableLayout_moveButtonClick(event: MoveButtonClickEvent) {
|
private resizableLayout_moveButtonClick(event: MoveButtonClickEvent) {
|
||||||
const newLayout = move(this.props.mainLayout, event.itemKey, event.direction);
|
const newLayout = move(this.props.mainLayout, event.itemKey, event.direction);
|
||||||
this.updateMainLayout(newLayout);
|
this.updateMainLayout(newLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
resizableLayout_renderItem(key: string, event: any) {
|
private resizableLayout_renderItem(key: string, event: any) {
|
||||||
// Key should never be undefined but somehow it can happen, also not
|
// Key should never be undefined but somehow it can happen, also not
|
||||||
// clear how. For now in this case render nothing so that the app
|
// clear how. For now in this case render nothing so that the app
|
||||||
// doesn't crash.
|
// doesn't crash.
|
||||||
@@ -759,7 +770,7 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renderPluginDialogs() {
|
public renderPluginDialogs() {
|
||||||
const output = [];
|
const output = [];
|
||||||
const infos = pluginUtils.viewInfosByType(this.props.plugins, 'webview');
|
const infos = pluginUtils.viewInfosByType(this.props.plugins, 'webview');
|
||||||
|
|
||||||
@@ -790,7 +801,7 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
public render() {
|
||||||
const theme = themeStyle(this.props.themeId);
|
const theme = themeStyle(this.props.themeId);
|
||||||
const style = Object.assign(
|
const style = Object.assign(
|
||||||
{
|
{
|
||||||
@@ -879,6 +890,7 @@ const mapStateToProps = (state: AppState) => {
|
|||||||
isSafeMode: state.settings.isSafeMode,
|
isSafeMode: state.settings.isSafeMode,
|
||||||
needApiAuth: state.needApiAuth,
|
needApiAuth: state.needApiAuth,
|
||||||
showInstallTemplatesPlugin: state.hasLegacyTemplates && !state.pluginService.plugins['joplin.plugin.templates'],
|
showInstallTemplatesPlugin: state.hasLegacyTemplates && !state.pluginService.plugins['joplin.plugin.templates'],
|
||||||
|
isResettingLayout: state.isResettingLayout,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import * as openTag from './openTag';
|
|||||||
import * as print from './print';
|
import * as print from './print';
|
||||||
import * as renameFolder from './renameFolder';
|
import * as renameFolder from './renameFolder';
|
||||||
import * as renameTag from './renameTag';
|
import * as renameTag from './renameTag';
|
||||||
|
import * as resetLayout from './resetLayout';
|
||||||
import * as revealResourceFile from './revealResourceFile';
|
import * as revealResourceFile from './revealResourceFile';
|
||||||
import * as search from './search';
|
import * as search from './search';
|
||||||
import * as setTags from './setTags';
|
import * as setTags from './setTags';
|
||||||
@@ -61,6 +62,7 @@ const index:any[] = [
|
|||||||
print,
|
print,
|
||||||
renameFolder,
|
renameFolder,
|
||||||
renameTag,
|
renameTag,
|
||||||
|
resetLayout,
|
||||||
revealResourceFile,
|
revealResourceFile,
|
||||||
search,
|
search,
|
||||||
setTags,
|
setTags,
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ export const runtime = (): CommandRuntime => {
|
|||||||
const resource = await Resource.load(resourceId);
|
const resource = await Resource.load(resourceId);
|
||||||
if (!resource) throw new Error(`No such resource: ${resourceId}`);
|
if (!resource) throw new Error(`No such resource: ${resourceId}`);
|
||||||
if (resource.mime !== 'application/pdf') throw new Error(`Not a PDF: ${resource.mime}`);
|
if (resource.mime !== 'application/pdf') throw new Error(`Not a PDF: ${resource.mime}`);
|
||||||
console.log('Opening PDF', resource);
|
|
||||||
context.dispatch({
|
context.dispatch({
|
||||||
type: 'DIALOG_OPEN',
|
type: 'DIALOG_OPEN',
|
||||||
name: 'pdfViewer',
|
name: 'pdfViewer',
|
||||||
|
|||||||
25
packages/app-desktop/gui/MainScreen/commands/resetLayout.ts
Normal file
25
packages/app-desktop/gui/MainScreen/commands/resetLayout.ts
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||||
|
import { _ } from '@joplin/lib/locale';
|
||||||
|
import dialogs from '../../dialogs';
|
||||||
|
|
||||||
|
export const declaration: CommandDeclaration = {
|
||||||
|
name: 'resetLayout',
|
||||||
|
label: () => _('Reset application layout'),
|
||||||
|
};
|
||||||
|
|
||||||
|
export const runtime = (): CommandRuntime => {
|
||||||
|
return {
|
||||||
|
execute: async (context: CommandContext) => {
|
||||||
|
|
||||||
|
const message = _('Are you sure you want to return to the default layout? The current layout configuration will be lost.');
|
||||||
|
const isConfirmed = await dialogs.confirm(message);
|
||||||
|
|
||||||
|
if (!isConfirmed) return;
|
||||||
|
|
||||||
|
context.dispatch({
|
||||||
|
type: 'RESET_LAYOUT',
|
||||||
|
value: true,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -20,7 +20,7 @@ export const runtime = (): CommandRuntime => {
|
|||||||
|
|
||||||
const menuItems = SpellCheckerService.instance().spellCheckerConfigMenuItems(selectedLanguages, useSpellChecker);
|
const menuItems = SpellCheckerService.instance().spellCheckerConfigMenuItems(selectedLanguages, useSpellChecker);
|
||||||
const menu = Menu.buildFromTemplate(menuItems as any);
|
const menu = Menu.buildFromTemplate(menuItems as any);
|
||||||
menu.popup(bridge().window());
|
menu.popup({ window: bridge().window() });
|
||||||
},
|
},
|
||||||
|
|
||||||
mapStateToTitle(state: AppState): string {
|
mapStateToTitle(state: AppState): string {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import checkForUpdates from '../checkForUpdates';
|
|||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
import { reg } from '@joplin/lib/registry';
|
import { reg } from '@joplin/lib/registry';
|
||||||
import { ProfileConfig } from '@joplin/lib/services/profileConfig/types';
|
import { ProfileConfig } from '@joplin/lib/services/profileConfig/types';
|
||||||
|
import PluginService, { PluginSettings } from '@joplin/lib/services/plugins/PluginService';
|
||||||
const packageInfo = require('../packageInfo.js');
|
const packageInfo = require('../packageInfo.js');
|
||||||
const { clipboard } = require('electron');
|
const { clipboard } = require('electron');
|
||||||
const Menu = bridge().Menu;
|
const Menu = bridge().Menu;
|
||||||
@@ -127,6 +128,7 @@ interface Props {
|
|||||||
customCss: string;
|
customCss: string;
|
||||||
locale: string;
|
locale: string;
|
||||||
profileConfig: ProfileConfig;
|
profileConfig: ProfileConfig;
|
||||||
|
pluginSettings: PluginSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
const commandNames: string[] = menuCommandNames();
|
const commandNames: string[] = menuCommandNames();
|
||||||
@@ -270,6 +272,7 @@ function useMenu(props: Props) {
|
|||||||
const service = InteropService.instance();
|
const service = InteropService.instance();
|
||||||
try {
|
try {
|
||||||
const result = await service.import(importOptions);
|
const result = await service.import(importOptions);
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.info('Import result: ', result);
|
console.info('Import result: ', result);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
bridge().showErrorMessageBox(error.message);
|
bridge().showErrorMessageBox(error.message);
|
||||||
@@ -485,7 +488,7 @@ function useMenu(props: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _showAbout() {
|
function _showAbout() {
|
||||||
const v = versionInfo(packageInfo);
|
const v = versionInfo(packageInfo, PluginService.instance().enabledPlugins(props.pluginSettings));
|
||||||
|
|
||||||
const copyToClipboard = bridge().showMessageBox(v.message, {
|
const copyToClipboard = bridge().showMessageBox(v.message, {
|
||||||
icon: `${bridge().electronApp().buildDir()}/icons/128x128.png`,
|
icon: `${bridge().electronApp().buildDir()}/icons/128x128.png`,
|
||||||
@@ -509,14 +512,14 @@ function useMenu(props: Props) {
|
|||||||
// Issue: https://github.com/laurent22/joplin/issues/934
|
// Issue: https://github.com/laurent22/joplin/issues/934
|
||||||
submenu: [{
|
submenu: [{
|
||||||
label: _('About Joplin'),
|
label: _('About Joplin'),
|
||||||
visible: shim.isMac() ? true : false,
|
visible: !!shim.isMac(),
|
||||||
click: () => _showAbout(),
|
click: () => _showAbout(),
|
||||||
}, {
|
}, {
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
visible: shim.isMac() ? true : false,
|
visible: !!shim.isMac(),
|
||||||
}, {
|
}, {
|
||||||
label: _('Preferences...'),
|
label: _('Preferences...'),
|
||||||
visible: shim.isMac() ? true : false,
|
visible: !!shim.isMac(),
|
||||||
accelerator: shim.isMac() && keymapService.getAccelerator('config'),
|
accelerator: shim.isMac() && keymapService.getAccelerator('config'),
|
||||||
click: () => {
|
click: () => {
|
||||||
props.dispatch({
|
props.dispatch({
|
||||||
@@ -526,11 +529,11 @@ function useMenu(props: Props) {
|
|||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
label: _('Check for updates...'),
|
label: _('Check for updates...'),
|
||||||
visible: shim.isMac() ? true : false,
|
visible: !!shim.isMac(),
|
||||||
click: () => _checkForUpdates(),
|
click: () => _checkForUpdates(),
|
||||||
}, {
|
}, {
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
visible: shim.isMac() ? true : false,
|
visible: !!shim.isMac(),
|
||||||
},
|
},
|
||||||
shim.isMac() ? noItem : newNoteItem,
|
shim.isMac() ? noItem : newNoteItem,
|
||||||
shim.isMac() ? noItem : newTodoItem,
|
shim.isMac() ? noItem : newTodoItem,
|
||||||
@@ -538,14 +541,14 @@ function useMenu(props: Props) {
|
|||||||
shim.isMac() ? noItem : newSubFolderItem,
|
shim.isMac() ? noItem : newSubFolderItem,
|
||||||
{
|
{
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
visible: shim.isMac() ? false : true,
|
visible: !shim.isMac(),
|
||||||
}, {
|
}, {
|
||||||
label: _('Import'),
|
label: _('Import'),
|
||||||
visible: shim.isMac() ? false : true,
|
visible: !shim.isMac(),
|
||||||
submenu: importItems,
|
submenu: importItems,
|
||||||
}, {
|
}, {
|
||||||
label: _('Export all'),
|
label: _('Export all'),
|
||||||
visible: shim.isMac() ? false : true,
|
visible: !shim.isMac(),
|
||||||
submenu: exportItems,
|
submenu: exportItems,
|
||||||
}, {
|
}, {
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
@@ -583,7 +586,7 @@ function useMenu(props: Props) {
|
|||||||
|
|
||||||
const rootMenuFileMacOs = {
|
const rootMenuFileMacOs = {
|
||||||
label: _('&File'),
|
label: _('&File'),
|
||||||
visible: shim.isMac() ? true : false,
|
visible: !!shim.isMac(),
|
||||||
submenu: [
|
submenu: [
|
||||||
newNoteItem,
|
newNoteItem,
|
||||||
newTodoItem,
|
newTodoItem,
|
||||||
@@ -632,6 +635,7 @@ function useMenu(props: Props) {
|
|||||||
menuItemDic.textCopy,
|
menuItemDic.textCopy,
|
||||||
menuItemDic.textCut,
|
menuItemDic.textCut,
|
||||||
menuItemDic.textPaste,
|
menuItemDic.textPaste,
|
||||||
|
menuItemDic.pasteAsText,
|
||||||
menuItemDic.textSelectAll,
|
menuItemDic.textSelectAll,
|
||||||
separator(),
|
separator(),
|
||||||
// Using the generic "undo"/"redo" roles mean the menu
|
// Using the generic "undo"/"redo" roles mean the menu
|
||||||
@@ -671,6 +675,7 @@ function useMenu(props: Props) {
|
|||||||
label: _('&View'),
|
label: _('&View'),
|
||||||
submenu: [
|
submenu: [
|
||||||
menuItemDic.toggleLayoutMoveMode,
|
menuItemDic.toggleLayoutMoveMode,
|
||||||
|
menuItemDic.resetLayout,
|
||||||
separator(),
|
separator(),
|
||||||
menuItemDic.toggleSideBar,
|
menuItemDic.toggleSideBar,
|
||||||
menuItemDic.toggleNoteList,
|
menuItemDic.toggleNoteList,
|
||||||
@@ -783,12 +788,15 @@ function useMenu(props: Props) {
|
|||||||
}, {
|
}, {
|
||||||
label: _('Joplin Forum'),
|
label: _('Joplin Forum'),
|
||||||
click() { void bridge().openExternal('https://discourse.joplinapp.org'); },
|
click() { void bridge().openExternal('https://discourse.joplinapp.org'); },
|
||||||
|
}, {
|
||||||
|
label: _('Join us on Twitter'),
|
||||||
|
click() { void bridge().openExternal('https://twitter.com/joplinapp'); },
|
||||||
}, {
|
}, {
|
||||||
label: _('Make a donation'),
|
label: _('Make a donation'),
|
||||||
click() { void bridge().openExternal('https://joplinapp.org/donate/'); },
|
click() { void bridge().openExternal('https://joplinapp.org/donate/'); },
|
||||||
}, {
|
}, {
|
||||||
label: _('Check for updates...'),
|
label: _('Check for updates...'),
|
||||||
visible: shim.isMac() ? false : true,
|
visible: !shim.isMac(),
|
||||||
click: () => _checkForUpdates(),
|
click: () => _checkForUpdates(),
|
||||||
},
|
},
|
||||||
separator(),
|
separator(),
|
||||||
@@ -810,10 +818,10 @@ function useMenu(props: Props) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
visible: shim.isMac() ? false : true,
|
visible: !shim.isMac(),
|
||||||
}, {
|
}, {
|
||||||
label: _('About Joplin'),
|
label: _('About Joplin'),
|
||||||
visible: shim.isMac() ? false : true,
|
visible: !shim.isMac(),
|
||||||
click: () => _showAbout(),
|
click: () => _showAbout(),
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
@@ -923,6 +931,7 @@ function useMenu(props: Props) {
|
|||||||
props['spellChecker.languages'],
|
props['spellChecker.languages'],
|
||||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||||
props['spellChecker.enabled'],
|
props['spellChecker.enabled'],
|
||||||
|
props.pluginSettings,
|
||||||
props.customCss,
|
props.customCss,
|
||||||
props.locale,
|
props.locale,
|
||||||
props.profileConfig,
|
props.profileConfig,
|
||||||
@@ -978,6 +987,7 @@ const mapStateToProps = (state: AppState) => {
|
|||||||
['folders.sortOrder.field']: state.settings['folders.sortOrder.field'],
|
['folders.sortOrder.field']: state.settings['folders.sortOrder.field'],
|
||||||
['notes.sortOrder.reverse']: state.settings['notes.sortOrder.reverse'],
|
['notes.sortOrder.reverse']: state.settings['notes.sortOrder.reverse'],
|
||||||
['folders.sortOrder.reverse']: state.settings['folders.sortOrder.reverse'],
|
['folders.sortOrder.reverse']: state.settings['folders.sortOrder.reverse'],
|
||||||
|
pluginSettings: state.settings['plugins.states'],
|
||||||
showNoteCounts: state.settings.showNoteCounts,
|
showNoteCounts: state.settings.showNoteCounts,
|
||||||
uncompletedTodosOnTop: state.settings.uncompletedTodosOnTop,
|
uncompletedTodosOnTop: state.settings.uncompletedTodosOnTop,
|
||||||
showCompletedTodos: state.settings.showCompletedTodos,
|
showCompletedTodos: state.settings.showCompletedTodos,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default function MultiNoteActions(props: MultiNoteActionsProps) {
|
|||||||
|
|
||||||
const multiNotesButton_click = (item: any) => {
|
const multiNotesButton_click = (item: any) => {
|
||||||
if (item.submenu) {
|
if (item.submenu) {
|
||||||
item.submenu.popup(bridge().window());
|
item.submenu.popup({ window: bridge().window() });
|
||||||
} else {
|
} else {
|
||||||
item.click();
|
item.click();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const Component = React.Component;
|
|
||||||
const Setting = require('@joplin/lib/models/Setting').default;
|
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
|
import Setting from '@joplin/lib/models/Setting';
|
||||||
|
import { AppState } from '../app.reducer';
|
||||||
const bridge = require('@electron/remote').require('./bridge').default;
|
const bridge = require('@electron/remote').require('./bridge').default;
|
||||||
|
|
||||||
class NavigatorComponent extends Component {
|
interface Props {
|
||||||
UNSAFE_componentWillReceiveProps(newProps) {
|
route: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
class NavigatorComponent extends React.Component<Props> {
|
||||||
|
public UNSAFE_componentWillReceiveProps(newProps: Props) {
|
||||||
if (newProps.route) {
|
if (newProps.route) {
|
||||||
const screenInfo = this.props.screens[newProps.route.routeName];
|
const screenInfo = this.props.screens[newProps.route.routeName];
|
||||||
const devMarker = Setting.value('env') === 'dev' ? ` (DEV - ${Setting.value('profileDir')})` : '';
|
const devMarker = Setting.value('env') === 'dev' ? ` (DEV - ${Setting.value('profileDir')})` : '';
|
||||||
@@ -17,7 +21,7 @@ class NavigatorComponent extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateWindowTitle(title) {
|
public updateWindowTitle(title: string) {
|
||||||
try {
|
try {
|
||||||
if (bridge().window()) bridge().window().setTitle(title);
|
if (bridge().window()) bridge().window().setTitle(title);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -25,7 +29,7 @@ class NavigatorComponent extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
public render() {
|
||||||
if (!this.props.route) throw new Error('Route must not be null');
|
if (!this.props.route) throw new Error('Route must not be null');
|
||||||
|
|
||||||
const route = this.props.route;
|
const route = this.props.route;
|
||||||
@@ -46,10 +50,10 @@ class NavigatorComponent extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const Navigator = connect(state => {
|
const Navigator = connect((state: AppState) => {
|
||||||
return {
|
return {
|
||||||
route: state.route,
|
route: state.route,
|
||||||
};
|
};
|
||||||
})(NavigatorComponent);
|
})(NavigatorComponent);
|
||||||
|
|
||||||
module.exports = { Navigator };
|
export default Navigator;
|
||||||
@@ -31,7 +31,8 @@ import dialogs from '../../../dialogs';
|
|||||||
import convertToScreenCoordinates from '../../../utils/convertToScreenCoordinates';
|
import convertToScreenCoordinates from '../../../utils/convertToScreenCoordinates';
|
||||||
import { MarkupToHtml } from '@joplin/renderer';
|
import { MarkupToHtml } from '@joplin/renderer';
|
||||||
const { clipboard } = require('electron');
|
const { clipboard } = require('electron');
|
||||||
const shared = require('@joplin/lib/components/shared/note-screen-shared.js');
|
const debounce = require('debounce');
|
||||||
|
import shared from '@joplin/lib/components/shared/note-screen-shared';
|
||||||
const Menu = bridge().Menu;
|
const Menu = bridge().Menu;
|
||||||
const MenuItem = bridge().MenuItem;
|
const MenuItem = bridge().MenuItem;
|
||||||
import { reg } from '@joplin/lib/registry';
|
import { reg } from '@joplin/lib/registry';
|
||||||
@@ -275,11 +276,22 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
const editorCutText = useCallback(() => {
|
const editorCutText = useCallback(() => {
|
||||||
if (editorRef.current) {
|
if (editorRef.current) {
|
||||||
const selections = editorRef.current.getSelections();
|
const selections = editorRef.current.getSelections();
|
||||||
if (selections.length > 0) {
|
if (selections.length > 0 && selections[0]) {
|
||||||
clipboard.writeText(selections[0]);
|
clipboard.writeText(selections[0]);
|
||||||
// Easy way to wipe out just the first selection
|
// Easy way to wipe out just the first selection
|
||||||
selections[0] = '';
|
selections[0] = '';
|
||||||
editorRef.current.replaceSelections(selections);
|
editorRef.current.replaceSelections(selections);
|
||||||
|
} else {
|
||||||
|
const cursor = editorRef.current.getCursor();
|
||||||
|
const line = editorRef.current.getLine(cursor.line);
|
||||||
|
clipboard.writeText(`${line}\n`);
|
||||||
|
const startLine = editorRef.current.getCursor('head');
|
||||||
|
startLine.ch = 0;
|
||||||
|
const endLine = {
|
||||||
|
line: startLine.line + 1,
|
||||||
|
ch: 0,
|
||||||
|
};
|
||||||
|
editorRef.current.replaceRange('', startLine, endLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
@@ -287,8 +299,17 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
const editorCopyText = useCallback(() => {
|
const editorCopyText = useCallback(() => {
|
||||||
if (editorRef.current) {
|
if (editorRef.current) {
|
||||||
const selections = editorRef.current.getSelections();
|
const selections = editorRef.current.getSelections();
|
||||||
if (selections.length > 0) {
|
|
||||||
|
|
||||||
|
// Handle the case when there is a selection - copy the selection to the clipboard
|
||||||
|
// When there is no selection, the selection array contains an empty string.
|
||||||
|
if (selections.length > 0 && selections[0]) {
|
||||||
clipboard.writeText(selections[0]);
|
clipboard.writeText(selections[0]);
|
||||||
|
} else {
|
||||||
|
// This is the case when there is no selection - copy the current line to the clipboard
|
||||||
|
const cursor = editorRef.current.getCursor();
|
||||||
|
const line = editorRef.current.getLine(cursor.line);
|
||||||
|
clipboard.writeText(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
@@ -342,7 +363,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
let cancelled = false;
|
let cancelled = false;
|
||||||
|
|
||||||
async function loadScripts() {
|
async function loadScripts() {
|
||||||
const scriptsToLoad: {src: string; id: string; loaded: boolean}[] = [
|
const scriptsToLoad: { src: string; id: string; loaded: boolean }[] = [
|
||||||
{
|
{
|
||||||
src: `${bridge().vendorDir()}/lib/codemirror/addon/dialog/dialog.css`,
|
src: `${bridge().vendorDir()}/lib/codemirror/addon/dialog/dialog.css`,
|
||||||
id: 'codemirrorDialogStyle',
|
id: 'codemirrorDialogStyle',
|
||||||
@@ -404,7 +425,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
const maxWidthCss = props.contentMaxWidth ? `
|
const maxWidthCss = props.contentMaxWidth ? `
|
||||||
margin-right: auto !important;
|
margin-right: auto !important;
|
||||||
margin-left: auto !important;
|
margin-left: auto !important;
|
||||||
max-width: ${props.contentMaxWidth}px !important;
|
max-width: ${props.contentMaxWidth}px !important;
|
||||||
` : '';
|
` : '';
|
||||||
|
|
||||||
const element = document.createElement('style');
|
const element = document.createElement('style');
|
||||||
@@ -621,7 +642,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
contentMaxWidth: props.contentMaxWidth,
|
contentMaxWidth: props.contentMaxWidth,
|
||||||
mapsToLine: true,
|
mapsToLine: true,
|
||||||
// Always using useCustomPdfViewer for now, we can add a new setting for it in future if we need to.
|
// Always using useCustomPdfViewer for now, we can add a new setting for it in future if we need to.
|
||||||
useCustomPdfViewer: true,
|
useCustomPdfViewer: props.useCustomPdfViewer,
|
||||||
noteId: props.noteId,
|
noteId: props.noteId,
|
||||||
vendorDir: bridge().vendorDir(),
|
vendorDir: bridge().vendorDir(),
|
||||||
}));
|
}));
|
||||||
@@ -673,7 +694,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
}, [renderedBody, webviewReady]);
|
}, [renderedBody, webviewReady]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!props.searchMarkers) return;
|
if (!props.searchMarkers) return () => {};
|
||||||
|
|
||||||
// If there is a currently active search, it's important to re-search the text as the user
|
// If there is a currently active search, it's important to re-search the text as the user
|
||||||
// types. However this is slow for performance so we ONLY want it to happen when there is
|
// types. However this is slow for performance so we ONLY want it to happen when there is
|
||||||
@@ -688,11 +709,19 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
webviewRef.current.send('setMarkers', props.searchMarkers.keywords, props.searchMarkers.options);
|
webviewRef.current.send('setMarkers', props.searchMarkers.keywords, props.searchMarkers.options);
|
||||||
|
|
||||||
if (editorRef.current) {
|
if (editorRef.current) {
|
||||||
const matches = editorRef.current.setMarkers(props.searchMarkers.keywords, props.searchMarkers.options);
|
// Fixes https://github.com/laurent22/joplin/issues/7565
|
||||||
|
const debouncedMarkers = debounce(() => {
|
||||||
|
const matches = editorRef.current.setMarkers(props.searchMarkers.keywords, props.searchMarkers.options);
|
||||||
|
|
||||||
props.setLocalSearchResultCount(matches);
|
props.setLocalSearchResultCount(matches);
|
||||||
|
}, 50);
|
||||||
|
debouncedMarkers();
|
||||||
|
return () => {
|
||||||
|
debouncedMarkers.clear();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return () => {};
|
||||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||||
}, [props.searchMarkers, previousSearchMarkers, props.setLocalSearchResultCount, props.content, previousContent, renderedBody, previousRenderedBody, renderedBody]);
|
}, [props.searchMarkers, previousSearchMarkers, props.setLocalSearchResultCount, props.content, previousContent, renderedBody, previousRenderedBody, renderedBody]);
|
||||||
|
|
||||||
@@ -851,7 +880,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
|
|
||||||
function renderEditor() {
|
function renderEditor() {
|
||||||
|
|
||||||
const matchBracesOptions = Setting.value('editor.autoMatchingBraces') ? { override: true, pairs: '<>()[]{}\'\'""‘’“”()《》「」『』【】〔〕〖〗〘〙〚〛' } : false;
|
const matchBracesOptions = Setting.value('editor.autoMatchingBraces') ? { override: true, pairs: '``()[]{}\'\'""‘’“”()《》「」『』【】〔〕〖〗〘〙〚〛' } : false;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={cellEditorStyle}>
|
<div style={cellEditorStyle}>
|
||||||
@@ -882,6 +911,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
<div style={cellViewerStyle}>
|
<div style={cellViewerStyle}>
|
||||||
<NoteTextViewer
|
<NoteTextViewer
|
||||||
ref={webviewRef}
|
ref={webviewRef}
|
||||||
|
themeId={props.themeId}
|
||||||
viewerStyle={styles.viewer}
|
viewerStyle={styles.viewer}
|
||||||
onIpcMessage={webview_ipcMessage}
|
onIpcMessage={webview_ipcMessage}
|
||||||
onDomReady={webview_domReady}
|
onDomReady={webview_domReady}
|
||||||
@@ -908,4 +938,3 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default forwardRef(CodeMirror);
|
export default forwardRef(CodeMirror);
|
||||||
|
|
||||||
|
|||||||
@@ -128,8 +128,18 @@ export default function useEditorSearch(CodeMirror: any) {
|
|||||||
// We only want to scroll the first keyword into view in the case of a multi keyword search
|
// We only want to scroll the first keyword into view in the case of a multi keyword search
|
||||||
const scrollTo = i === 0 && (previousKeywordValue !== keyword.value || previousIndex !== options.selectedIndex || options.searchTimestamp !== previousSearchTimestamp);
|
const scrollTo = i === 0 && (previousKeywordValue !== keyword.value || previousIndex !== options.selectedIndex || options.searchTimestamp !== previousSearchTimestamp);
|
||||||
|
|
||||||
const match = highlightSearch(this, searchTerm, options.selectedIndex, scrollTo, !!options.withSelection);
|
try {
|
||||||
if (match) marks.push(match);
|
const match = highlightSearch(this, searchTerm, options.selectedIndex, scrollTo, !!options.withSelection);
|
||||||
|
if (match) marks.push(match);
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SyntaxError') {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
// An error of 'Regular expression too large' might occour in the markJs library
|
||||||
|
// when the input is really big, this catch is here to avoid the application crashing
|
||||||
|
// https://github.com/laurent22/joplin/issues/7634
|
||||||
|
console.error('Error while trying to highlight words from search: ', error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setMarkers(marks);
|
setMarkers(marks);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Helper commands added to the the CodeMirror instance
|
// Helper commands added to the the CodeMirror instance
|
||||||
export default function useJoplinCommands(CodeMirror: any) {
|
export default function useJoplinCommands(CodeMirror: any) {
|
||||||
|
|
||||||
CodeMirror.defineExtension('commandExists', function(name: string) {
|
CodeMirror.defineExtension('commandExists', (name: string) => {
|
||||||
return !!CodeMirror.commands[name];
|
return !!CodeMirror.commands[name];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export default function useKeymap(CodeMirror: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CodeMirror.defineExtension('supportsCommand', function(cmd: EditorCommand) {
|
CodeMirror.defineExtension('supportsCommand', (cmd: EditorCommand) => {
|
||||||
return isEditorCommand(cmd.name) && editorCommandToCodeMirror(cmd.name) in CodeMirror.commands;
|
return isEditorCommand(cmd.name) && editorCommandToCodeMirror(cmd.name) in CodeMirror.commands;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user