1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-23 23:33:01 +02:00

Compare commits

...

128 Commits

Author SHA1 Message Date
Hubert
c88e147343 Merge remote-tracking branch 'origin/dev' into issue-8408 2023-07-25 11:38:36 -03:00
Hubert
078425c047 Undo changes in .ignore files 2023-07-25 11:35:57 -03:00
Laurent Cozic
c50181f0a6 Tools: Fixed updateIgnored so that it works consistently across platforms 2023-07-25 14:51:37 +01:00
renovate[bot]
778f317f9f Update dependency gettext-parser to v7.0.1 (#8547)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-24 13:46:00 +00:00
Hubert
0b928a3883 Fixes from review. 2023-07-24 10:08:01 -03:00
renovate[bot]
0394694a91 Update dependency gettext-parser to v7 (#8546)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-24 12:25:13 +01:00
renovate[bot]
fec853735b Update dependency react-redux to v8.1.1 (#8539)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-24 01:54:42 +00:00
renovate[bot]
087b206982 Update dependency react-native-localize to v3.0.2 (#8538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-23 21:19:16 +00:00
renovate[bot]
3bd04aeaf4 Update dependency react-native-gesture-handler to v2.12.0 (#8540)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-23 17:59:46 +01:00
Laurent Cozic
74e81eb6f3 lock file 2023-07-23 17:14:20 +01:00
Laurent Cozic
3cb8fd035f Desktop release v2.12.9 2023-07-23 17:07:22 +01:00
Henry Heino
0a96c3d56b Mobile: Fixes #8425: Fix frequent crashing on Android 12 ARM (#8516) 2023-07-23 16:01:32 +01:00
Henry Heino
2d16151fa8 Desktop: Fixes #8520: Fix Rich Text theme not matching the system theme after several global theme changes (#8521) 2023-07-23 16:00:30 +01:00
Henry Heino
93c5f6c9d3 Desktop: Rich text editor: Disable spellcheck in inline code blocks (#8532) 2023-07-23 15:59:51 +01:00
Henry Heino
e47985c101 Desktop: Fixes #8530: Rich text editor: Use fewer &nbsp;s in markdown while still preserving initial paragraph indentation (#8529) 2023-07-23 15:59:24 +01:00
Laurent Cozic
1c1d20f82c Chore: Desktop: Update for share permissions (#8528) 2023-07-23 15:57:55 +01:00
renovate[bot]
880304c2fb Update dependency react-redux to v8.1.0 (#8537)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-23 11:28:33 +01:00
renovate[bot]
bd3d5f213e Update dependency node-gyp to v9.4.0 (#8536)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-23 11:28:02 +01:00
Hubert
90b95cd888 Update the icon's documentation to only allow PNG icons. 2023-07-22 19:45:43 -03:00
Hubert
849b124040 Merge remote-tracking branch 'origin/dev' into issue-8408 2023-07-22 19:37:19 -03:00
Hubert
bbfc7295f6 Updates from review. 2023-07-22 17:52:20 -03:00
github-actions[bot]
0d6f4c9361 @xbdmHQ has signed the CLA in laurent22/joplin#8531 2023-07-22 14:55:50 +00:00
Laurent Cozic
c49b53cb4b Tools: Trying to fix flaky test 2023-07-22 15:32:09 +01:00
Laurent Cozic
da177d3025 Tools: Do not bail when failing server tests 2023-07-22 11:56:41 +01:00
Laurent Cozic
6d184fb47c CI: Trying to fix random test failures 2023-07-22 11:19:57 +01:00
Laurent Cozic
3691662da2 Chore: Better messages in runForTesting 2023-07-22 11:19:55 +01:00
Henry Heino
776b6d8f12 Desktop: Fixes #8504: Support plugin toolbar icons in the Rich Text editor toolbar (#8519) 2023-07-21 20:49:49 +01:00
renovate[bot]
82c33c4f0c Update dependency jsdom to v22.1.0 (#8526)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-21 20:46:38 +01:00
renovate[bot]
ab77f0e0f4 Update dependency jsdom to v22 (#8524)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-21 18:23:31 +01:00
renovate[bot]
df3c60e43f Update dependency dayjs to v1.11.9 (#8522)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-21 08:11:54 +00:00
renovate[bot]
9aafdd2d10 Update dependency react-native-device-info to v10.6.1 (#8514)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-20 15:17:58 +00:00
Laurent Cozic
1fe01dc0ce lock file 2023-07-19 13:21:09 +01:00
Marph
f0b5ec3e3a Desktop: Fixes #8382: add "insert*before" buttons for tables in the rich text editor (#8393) 2023-07-19 13:11:27 +01:00
Henry Heino
955f724d36 Desktop: Sanitize rendered output in safe mode (#8507) 2023-07-19 13:09:03 +01:00
renovate[bot]
6cf0ed6166 Update dependency @react-native-community/netinfo to v9.3.11 (#8508)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-19 10:05:53 +00:00
renovate[bot]
1bcaf9d167 Update dependency sass to v1.63.6 (#8505)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-18 22:12:59 +00:00
pedr
06b2ba9d75 Desktop, mobile: Add support for Joplin Cloud email to note functionality (#8460) 2023-07-18 20:15:45 +01:00
Laurent Cozic
85079ad213 CI: Prevent random failures when running encodeAssets 2023-07-18 19:31:08 +01:00
Laurent Cozic
b9225d1daa CI: Fix random failure of Joplin Server test 2023-07-18 18:43:50 +01:00
Laurent Cozic
c88b6b608a Desktop: Enable share permission handling for Joplin Cloud 2023-07-18 18:31:57 +01:00
Laurent Cozic
56cd782175 Tools: Set yarn checksumBehavior option 2023-07-18 17:27:45 +01:00
Henry Heino
6ce8865719 Mobile: Add JEX export (#8428) 2023-07-18 14:58:06 +01:00
Henry Heino
ac66332a4e Desktop: Fixes #8430: Make HTML <br/> tags convert to markdown compatible with the softbreaks setting (#8469) 2023-07-18 14:48:26 +01:00
Henry Heino
c70afe3478 All: Resolves #8466: WebDAV: Show a more descriptive error message when the password is empty (#8477) 2023-07-18 14:47:25 +01:00
Henry Heino
3c2f193714 Mobile: Fixes #8211: Do not log data shared with the app (#8495) 2023-07-18 14:46:43 +01:00
renovate[bot]
bb9e970f8f Update dependency sass to v1.63.2 (#8497)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-18 14:46:25 +01:00
Henry Heino
9c8fbe831f Mobile: Resolves #8490: Add option to autodetect theme (#8498) 2023-07-18 14:46:11 +01:00
renovate[bot]
4e1ee87269 Update dependency ts-loader to v9.4.4 (#8503)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-18 13:26:04 +00:00
Hubert
03d487e0c1 Fixes from review. 2023-07-18 08:30:32 -03:00
renovate[bot]
9a32472522 Update dependency lint-staged to v13.2.3 (#8502)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-18 11:15:06 +00:00
Hubert
5d40937200 Merge remote-tracking branch 'origin/dev' into issue-8408 2023-07-17 21:08:08 -03:00
Hubert
ad2945df15 Adding support for icons in the manifest.json. 2023-07-17 21:06:21 -03:00
renovate[bot]
1ecd6883d5 Update dependency react-native-gesture-handler to v2.11.0 (#8496)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 17:59:20 +01:00
Henry Heino
f89c6523e4 Chore: Fix failing CodeMirror test (#8494) 2023-07-17 17:12:35 +01:00
Joplin Bot
5c7b48fce1 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-07-17 12:21:46 +00:00
Henry Heino
1e2e8ed099 Desktop: Fixes #8448: Merge changes from upstream turndown project (#8468) 2023-07-17 12:19:34 +01:00
Henry Heino
4d7399973e Desktop: Security: Close root electron window before unload: Prevent top-level redirection (#8478) 2023-07-17 12:13:01 +01:00
Henry Heino
2f8275be8c Mobile: Fixes #8381: Show warning if some items could not be decrypted (#8481) 2023-07-17 12:12:42 +01:00
Laurent Cozic
58e5b83648 Doc: Add sponsor 2023-07-17 11:36:21 +01:00
renovate[bot]
49e3f01a0a Update dependency pg to v8.11.1 (#8492)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-16 18:29:15 +00:00
Laurent Cozic
f64305e858 Desktop release v2.12.8 2023-07-16 17:56:40 +01:00
Laurent Cozic
0470a3168c Chore: cleanup 2023-07-16 17:48:13 +01:00
Laurent Cozic
77482a0c95 All: Add support for share permissions (#8491) 2023-07-16 17:42:42 +01:00
Joplin Bot
b5193e1174 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-07-16 12:19:18 +00:00
Laurent Cozic
1d709a3b5c Tools: Check for files that should have been ignored on pre-commit 2023-07-16 11:52:42 +01:00
Laurent Cozic
cc4e69bf92 gitignore 2023-07-16 11:31:52 +01:00
renovate[bot]
4cf6d12704 Update dependency react-native-localize to v3.0.1 (#8484)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-15 12:34:58 +00:00
Henry Heino
7c52c3e9a8 Desktop: Security: Disallow map and area tags (#8479) 2023-07-15 11:56:12 +01:00
Laurent Cozic
68ffdc5c0f Server: By default, sort user deletion in descending order 2023-07-15 11:52:35 +01:00
cajhin
8d32cc794e Doc: Update conflict.md - how to resolve conflicts (#8470) 2023-07-15 11:46:30 +01:00
Joplin Bot
8d3f60ed1f Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-07-14 18:17:39 +00:00
Henry Heino
05395781cc Chore: Mobile: Fixes #8456: Upgrade react-native-reanimated (#8457)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-07-14 14:42:36 +01:00
Hubert
33ba934937 All: Resolves #5521: Rotating log files (#8376)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-07-14 14:24:25 +01:00
renovate[bot]
f4019dbcd3 Update dependency madge to v6.1.0 (#8475)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-14 10:06:55 +01:00
Joplin Bot
ffc40b2797 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-07-13 18:18:29 +00:00
Laurent Cozic
7a780e3087 CI: Disable signing macOS app on non-release commits 2023-07-13 19:10:04 +01:00
github-actions[bot]
712efe357e @cajhin has signed the CLA in laurent22/joplin#8470 2023-07-13 17:55:37 +00:00
Laurent Cozic
49638774f0 CI: Only generate DMG for ARM64 version 2023-07-13 13:47:18 +01:00
Laurent Cozic
04f8e96297 Desktop release v2.12.7 2023-07-13 13:09:13 +01:00
Laurent Cozic
4116f3d55b Chore: Desktop: Fixed building of M1 release 2023-07-13 13:08:55 +01:00
Laurent Cozic
99d99b9d85 Desktop release v2.12.6 2023-07-13 11:37:14 +01:00
Noah Nash
16b7969f78 Desktop: Fixes #6052: Create ARM64 function for cross-compile support (#8452)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-07-13 11:29:15 +01:00
Laurent Cozic
15ae42be1d Server v2.12.1 2023-07-13 11:24:23 +01:00
renovate[bot]
0f1412fb46 Update dependency tap to v16.3.7 (#8463)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 01:52:57 +00:00
Joplin Bot
450f18dfbf Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-07-12 18:17:10 +00:00
renovate[bot]
e703c70b70 Update dependency css-loader to v6.8.1 (#8426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-12 19:02:23 +01:00
renovate[bot]
ee4b79129f Update dependency react-native-drawer-layout to v3.2.1 (#8458)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-12 17:11:37 +00:00
Laurent Cozic
42e4c9ff89 typo 2023-07-12 16:57:36 +01:00
Henry Heino
a354feb626 Desktop: Resolves #8258: Upgrade to Electron 25 (#8451) 2023-07-12 16:00:30 +01:00
Laurent Cozic
c0fe29ec82 CI: Fixed M1 config 2023-07-12 15:44:14 +01:00
Laurent Cozic
7c4b12200b Desktop release v2.12.5 2023-07-12 15:18:53 +01:00
Laurent Cozic
1abfb1cb0e Desktop: Fixed macOS version check so that it does not return the ARM64 version 2023-07-12 15:18:05 +01:00
Laurent Cozic
9ae4401564 Doc: Fix brand guideline colours 2023-07-12 14:45:44 +01:00
Henry Heino
d95d6733a1 Chore: Refactor InteropService to not use dynamic imports (#8454) 2023-07-12 10:30:38 +01:00
github-actions[bot]
93e4004033 @noah-nash has signed the CLA in laurent22/joplin#8452 2023-07-11 23:36:51 +00:00
Joplin Bot
baabd1cbbd Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-07-11 18:19:11 +00:00
Laurent Cozic
dbb7df138e Doc: Remove 32-bit Android release, and fixed readme auto-update 2023-07-11 18:37:43 +01:00
Laurent Cozic
0690f7354f lock files 2023-07-11 17:09:40 +01:00
Laurent Cozic
004d2a1d9e Desktop: Quickly synchronise immediately after changing a note 2023-07-11 14:00:29 +01:00
Laurent Cozic
733c2dc878 Doc: Add release notes 2.11 2023-07-11 13:51:48 +01:00
Rob Moffat
0071a05a6c Desktop, CLI: Allow importing Evernote task lists (#8440) 2023-07-11 13:39:49 +01:00
renovate[bot]
7e53a41a30 Update dependency react-native-safe-area-context to v4.5.5 (#8450)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-11 10:57:10 +00:00
Laurent Cozic
32db9c814b Chore: Fix M1 CI 2023-07-11 09:58:05 +01:00
Laurent Cozic
0d44234452 Update build-macos-m1.yml 2023-07-11 09:55:46 +01:00
qx100
d55caad8d6 Updated Simplified Chinese translation (#8437) 2023-07-10 12:04:41 +01:00
Henry Heino
1691180790 Desktop: Fixes #6822: Fix extra lines added to KaTeX source when toggling the rich text editor (#8442) 2023-07-10 12:03:52 +01:00
Henry Heino
7ef591f3a8 Desktop: Fixes #8256: Don't start window minimized in GNOME (#8441) 2023-07-10 11:59:09 +01:00
github-actions[bot]
383e9d4e46 @robmoffat has signed the CLA in laurent22/joplin#8440 2023-07-10 08:52:35 +00:00
renovate[bot]
d2b64f9af0 Update dependency standard to v17.1.0 (#8439)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-09 17:54:54 +01:00
renovate[bot]
da192e718e Update dependency react-native-reanimated to v3.2.0 (#8438)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-09 15:49:34 +01:00
github-actions[bot]
cc4e65cee4 @laurent22 has signed the CLA in laurent22/joplin#8437 2023-07-09 13:17:03 +00:00
Laurent Cozic
4c5837b85b Desktop: Prevent app from crashing when changing screens
Ref: https://github.com/laurent22/joplin/issues/6052#issuecomment-1627528277
2023-07-09 14:12:41 +01:00
Laurent Cozic
ecd79ef7e4 CI: Do no publish M1 app on pull requests 2023-07-09 11:20:21 +01:00
Laurent Cozic
a6f22bb7a9 Doc: Fixed Android APK links 2023-07-09 10:44:23 +01:00
Joplin Bot
cde7b4d4f6 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-07-08 00:46:25 +00:00
Laurent Cozic
dabcd3d946 Desktop release v2.12.4 2023-07-07 16:16:01 +01:00
Laurent Cozic
a547ff1ca5 Desktop: Resolves #6052: Build macOS app as Universal binary 2023-07-07 16:02:59 +01:00
Joplin Bot
f12984b38e Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-07-07 12:20:36 +00:00
Laurent Cozic
6962db7b2f Desktop release v2.12.3 2023-07-07 10:11:57 +01:00
Laurent Cozic
050d9fa794 Desktop: Resolves #6052: Build macOS app as Universal binary 2023-07-07 10:11:29 +01:00
Joplin Bot
9c71523546 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-07-07 00:50:37 +00:00
renovate[bot]
10eebad566 Update dependency react-native-gesture-handler to v2.10.2 (#8424)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-07 00:33:13 +00:00
renovate[bot]
5405b05792 Update dependency react-native-gesture-handler to v2.10.1 (#8422)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-06 23:09:56 +01:00
Laurent Cozic
bb47b1ec8d Desktop release v2.12.2 2023-07-06 23:01:58 +01:00
Laurent Cozic
32043caabf CI: Trying to build macOS M1 version 2023-07-06 23:01:42 +01:00
Laurent Cozic
a58d1d040c Desktop release v2.12.1 2023-07-06 21:58:48 +01:00
Laurent Cozic
2e7996152e Desktop: Resolves #6052: Build macOS app as Universal binary (#8423) 2023-07-06 21:58:22 +01:00
Laurent Cozic
d5e583aba3 Doc: Fixed brand guidelines 2023-07-06 21:23:51 +01:00
222 changed files with 9537 additions and 2741 deletions

View File

@@ -82,8 +82,8 @@ packages/app-cli/app/LinkSelector.js
packages/app-cli/app/base-command.js
packages/app-cli/app/command-done.test.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-mkbook.js
packages/app-cli/app/command-settingschema.js
packages/app-cli/app/command-sync.js
packages/app-cli/app/command-testing.js
@@ -92,6 +92,7 @@ packages/app-cli/app/services/plugins/PluginRunner.js
packages/app-cli/app/setupCommand.js
packages/app-cli/app/utils/testUtils.js
packages/app-cli/tests/HtmlToMd.js
packages/app-cli/tests/MarkupToHtml.js
packages/app-cli/tests/MdToHtml.js
packages/app-cli/tests/services/keychain/KeychainService.js
packages/app-cli/tests/services/plugins/PluginService.js
@@ -105,9 +106,9 @@ packages/app-cli/tests/testUtils.js
packages/app-cli/tools/populateDatabase.js
packages/app-desktop/ElectronAppWrapper.js
packages/app-desktop/InteropServiceHelper.js
packages/app-desktop/app.js
packages/app-desktop/app.reducer.js
packages/app-desktop/app.reducer.test.js
packages/app-desktop/app.reducer.js
packages/app-desktop/app.js
packages/app-desktop/bridge.js
packages/app-desktop/checkForUpdates.js
packages/app-desktop/commands/copyDevCommand.js
@@ -135,13 +136,14 @@ packages/app-desktop/gui/ConfigScreen/Sidebar.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginBox.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginsStates.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/SearchPlugins.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/useOnInstallHandler.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/useOnInstallHandler.test.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/useOnInstallHandler.js
packages/app-desktop/gui/Dialog.js
packages/app-desktop/gui/DialogButtonRow.js
packages/app-desktop/gui/DialogButtonRow/useKeyboardHandler.js
packages/app-desktop/gui/DialogTitle.js
packages/app-desktop/gui/DropboxLoginScreen.js
packages/app-desktop/gui/Dropdown/Dropdown.js
packages/app-desktop/gui/EditFolderDialog/Dialog.js
packages/app-desktop/gui/EditFolderDialog/IconSelector.js
packages/app-desktop/gui/EmojiBox.js
@@ -153,6 +155,7 @@ 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/JoplinCloudConfigScreen.js
packages/app-desktop/gui/KeymapConfig/KeymapConfigScreen.js
packages/app-desktop/gui/KeymapConfig/ShortcutRecorder.js
packages/app-desktop/gui/KeymapConfig/styles/index.js
@@ -162,6 +165,9 @@ packages/app-desktop/gui/KeymapConfig/utils/useKeymap.js
packages/app-desktop/gui/MainScreen/MainScreen.js
packages/app-desktop/gui/MainScreen/commands/addProfile.js
packages/app-desktop/gui/MainScreen/commands/commandPalette.js
packages/app-desktop/gui/MainScreen/commands/deleteFolder.js
packages/app-desktop/gui/MainScreen/commands/deleteNote.js
packages/app-desktop/gui/MainScreen/commands/duplicateNote.js
packages/app-desktop/gui/MainScreen/commands/editAlarm.js
packages/app-desktop/gui/MainScreen/commands/exportPdf.js
packages/app-desktop/gui/MainScreen/commands/gotoAnything.js
@@ -196,6 +202,7 @@ packages/app-desktop/gui/MainScreen/commands/showSpellCheckerMenu.js
packages/app-desktop/gui/MainScreen/commands/toggleEditors.js
packages/app-desktop/gui/MainScreen/commands/toggleLayoutMoveMode.js
packages/app-desktop/gui/MainScreen/commands/toggleNoteList.js
packages/app-desktop/gui/MainScreen/commands/toggleNoteType.js
packages/app-desktop/gui/MainScreen/commands/toggleNotesSortOrderField.js
packages/app-desktop/gui/MainScreen/commands/toggleNotesSortOrderReverse.js
packages/app-desktop/gui/MainScreen/commands/togglePerFolderSortOrder.js
@@ -212,8 +219,8 @@ packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/Toolbar.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/styles/index.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/index.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/types.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.test.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useEditorSearch.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useExternalPlugins.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useJoplinCommands.js
@@ -241,8 +248,8 @@ packages/app-desktop/gui/NoteEditor/commands/showLocalSearch.js
packages/app-desktop/gui/NoteEditor/commands/showRevisions.js
packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.js
packages/app-desktop/gui/NoteEditor/styles/index.js
packages/app-desktop/gui/NoteEditor/utils/clipboardUtils.js
packages/app-desktop/gui/NoteEditor/utils/clipboardUtils.test.js
packages/app-desktop/gui/NoteEditor/utils/clipboardUtils.js
packages/app-desktop/gui/NoteEditor/utils/contextMenu.js
packages/app-desktop/gui/NoteEditor/utils/contextMenuUtils.js
packages/app-desktop/gui/NoteEditor/utils/index.js
@@ -283,17 +290,17 @@ packages/app-desktop/gui/ResizableLayout/utils/findItemByKey.js
packages/app-desktop/gui/ResizableLayout/utils/isTempContainer.js
packages/app-desktop/gui/ResizableLayout/utils/iterateItems.js
packages/app-desktop/gui/ResizableLayout/utils/layoutItemProp.js
packages/app-desktop/gui/ResizableLayout/utils/movements.js
packages/app-desktop/gui/ResizableLayout/utils/movements.test.js
packages/app-desktop/gui/ResizableLayout/utils/persist.js
packages/app-desktop/gui/ResizableLayout/utils/movements.js
packages/app-desktop/gui/ResizableLayout/utils/persist.test.js
packages/app-desktop/gui/ResizableLayout/utils/persist.js
packages/app-desktop/gui/ResizableLayout/utils/removeItem.js
packages/app-desktop/gui/ResizableLayout/utils/removeKeylessItems.js
packages/app-desktop/gui/ResizableLayout/utils/setLayoutItemProps.js
packages/app-desktop/gui/ResizableLayout/utils/style.js
packages/app-desktop/gui/ResizableLayout/utils/types.js
packages/app-desktop/gui/ResizableLayout/utils/useLayoutItemSizes.js
packages/app-desktop/gui/ResizableLayout/utils/useLayoutItemSizes.test.js
packages/app-desktop/gui/ResizableLayout/utils/useLayoutItemSizes.js
packages/app-desktop/gui/ResizableLayout/utils/useWindowResizeEvent.js
packages/app-desktop/gui/ResizableLayout/utils/validateLayout.js
packages/app-desktop/gui/ResourceScreen.js
@@ -352,12 +359,14 @@ packages/app-desktop/services/plugins/hooks/useViewIsReady.js
packages/app-desktop/services/plugins/hooks/useWebviewToPluginMessages.js
packages/app-desktop/services/restart.js
packages/app-desktop/services/share/invitationRespond.js
packages/app-desktop/services/sortOrder/PerFolderSortOrderService.js
packages/app-desktop/services/sortOrder/PerFolderSortOrderService.test.js
packages/app-desktop/services/sortOrder/notesSortOrderUtils.js
packages/app-desktop/services/sortOrder/PerFolderSortOrderService.js
packages/app-desktop/services/sortOrder/notesSortOrderUtils.test.js
packages/app-desktop/services/sortOrder/notesSortOrderUtils.js
packages/app-desktop/services/spellChecker/SpellCheckerServiceDriverNative.js
packages/app-desktop/tools/notarizeMacApp.js
packages/app-desktop/utils/checkForUpdatesUtils.test.js
packages/app-desktop/utils/checkForUpdatesUtils.js
packages/app-desktop/utils/markupLanguageUtils.js
packages/app-mobile/PluginAssetsLoader.js
packages/app-mobile/components/ActionButton.js
@@ -367,21 +376,22 @@ packages/app-mobile/components/CustomButton.js
packages/app-mobile/components/Dropdown.js
packages/app-mobile/components/ExtendedWebView.js
packages/app-mobile/components/FolderPicker.js
packages/app-mobile/components/Modal.js
packages/app-mobile/components/NoteBodyViewer/NoteBodyViewer.js
packages/app-mobile/components/NoteBodyViewer/hooks/useOnMessage.js
packages/app-mobile/components/NoteBodyViewer/hooks/useOnResourceLongPress.js
packages/app-mobile/components/NoteBodyViewer/hooks/useSource.js
packages/app-mobile/components/NoteEditor/CodeMirror/CodeMirror.js
packages/app-mobile/components/NoteEditor/CodeMirror/CodeMirror.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/CodeMirror.js
packages/app-mobile/components/NoteEditor/CodeMirror/decoratorExtension.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownCommands.bulletedVsChecklist.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownCommands.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownCommands.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownCommands.toggleList.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownMathParser.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownCommands.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownMathParser.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownReformatter.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownMathParser.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownReformatter.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownReformatter.js
packages/app-mobile/components/NoteEditor/CodeMirror/syntaxHighlightingLanguages.js
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/createEditor.js
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/forceFullParse.js
@@ -412,9 +422,14 @@ packages/app-mobile/components/app-nav.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/getResponsiveValue.js
packages/app-mobile/components/getResponsiveValue.test.js
packages/app-mobile/components/screens/ConfigScreen.js
packages/app-mobile/components/getResponsiveValue.js
packages/app-mobile/components/screens/ConfigScreen/ConfigScreen.js
packages/app-mobile/components/screens/ConfigScreen/ConfigScreenButton.js
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/NoteExportButton.test.js
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/NoteExportButton.js
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/exportAllFolders.js
packages/app-mobile/components/screens/ConfigScreen/configScreenStyles.js
packages/app-mobile/components/screens/Note.js
packages/app-mobile/components/screens/Notes.js
packages/app-mobile/components/screens/UpgradeSyncTargetScreen.js
@@ -435,6 +450,7 @@ packages/app-mobile/tools/buildInjectedJs.js
packages/app-mobile/utils/ShareExtension.js
packages/app-mobile/utils/ShareUtils.js
packages/app-mobile/utils/TlsUtils.js
packages/app-mobile/utils/autodetectTheme.js
packages/app-mobile/utils/checkPermissions.js
packages/app-mobile/utils/createRootStyle.js
packages/app-mobile/utils/debounce.js
@@ -443,19 +459,19 @@ packages/app-mobile/utils/setupNotifications.js
packages/app-mobile/utils/shareHandler.js
packages/app-mobile/utils/types.js
packages/fork-htmlparser2/src/CollectingHandler.js
packages/fork-htmlparser2/src/FeedHandler.js
packages/fork-htmlparser2/src/FeedHandler.spec.js
packages/fork-htmlparser2/src/FeedHandler.js
packages/fork-htmlparser2/src/MultiplexHandler.js
packages/fork-htmlparser2/src/Parser.js
packages/fork-htmlparser2/src/Parser.spec.js
packages/fork-htmlparser2/src/Parser.js
packages/fork-htmlparser2/src/Tokenizer.js
packages/fork-htmlparser2/src/WritableStream.js
packages/fork-htmlparser2/src/WritableStream.spec.js
packages/fork-htmlparser2/src/WritableStream.js
packages/fork-htmlparser2/src/__fixtures__/test-helper.js
packages/fork-htmlparser2/src/__tests__/events.js
packages/fork-htmlparser2/src/__tests__/stream.js
packages/fork-htmlparser2/src/index.js
packages/fork-htmlparser2/src/index.spec.js
packages/fork-htmlparser2/src/index.js
packages/generator-joplin/generators/app/templates/api/index.js
packages/generator-joplin/generators/app/templates/api/types.js
packages/generator-joplin/generators/app/templates/api_index.js
@@ -468,17 +484,19 @@ packages/lib/BaseModel.js
packages/lib/BaseSyncTarget.js
packages/lib/ClipperServer.js
packages/lib/CssUtils.js
packages/lib/EventDispatcher.js
packages/lib/EventDispatcher.test.js
packages/lib/EventDispatcher.js
packages/lib/HtmlToMd.js
packages/lib/InMemoryCache.js
packages/lib/InMemoryCache.test.js
packages/lib/InMemoryCache.js
packages/lib/JoplinDatabase.js
packages/lib/JoplinError.js
packages/lib/JoplinServerApi.js
packages/lib/Logger.js
packages/lib/ObjectUtils.js
packages/lib/PoorManIntervals.js
packages/lib/RotatingLogs.test.js
packages/lib/RotatingLogs.js
packages/lib/SyncTargetJoplinCloud.js
packages/lib/SyncTargetJoplinServer.js
packages/lib/SyncTargetNone.js
@@ -488,8 +506,8 @@ packages/lib/Synchronizer.js
packages/lib/TaskQueue.js
packages/lib/WelcomeUtils.js
packages/lib/array.js
packages/lib/callbackUrlUtils.js
packages/lib/callbackUrlUtils.test.js
packages/lib/callbackUrlUtils.js
packages/lib/commands/historyBackward.js
packages/lib/commands/historyForward.js
packages/lib/commands/index.js
@@ -497,12 +515,14 @@ packages/lib/commands/openMasterPasswordDialog.js
packages/lib/commands/synchronize.js
packages/lib/components/EncryptionConfigScreen/utils.js
packages/lib/components/shared/note-screen-shared.js
packages/lib/components/shared/reduxSharedMiddleware.js
packages/lib/database-driver-better-sqlite.js
packages/lib/database.js
packages/lib/debug/DebugService.js
packages/lib/dom.js
packages/lib/dummy.test.js
packages/lib/errorUtils.js
packages/lib/errors.js
packages/lib/eventManager.js
packages/lib/file-api-driver-joplinServer.js
packages/lib/file-api-driver-memory.js
@@ -515,41 +535,41 @@ packages/lib/geolocation-node.js
packages/lib/hooks/useAsyncEffect.js
packages/lib/hooks/useElementSize.js
packages/lib/hooks/useEventListener.js
packages/lib/htmlUtils.js
packages/lib/htmlUtils.test.js
packages/lib/htmlUtils.js
packages/lib/htmlUtils2.test.js
packages/lib/import-enex-md-gen.js
packages/lib/import-enex-md-gen.test.js
packages/lib/import-enex-md-gen.js
packages/lib/import-enex.js
packages/lib/locale.js
packages/lib/locale.test.js
packages/lib/markdownUtils.js
packages/lib/locale.js
packages/lib/markdownUtils.test.js
packages/lib/markdownUtils.js
packages/lib/markdownUtils2.test.js
packages/lib/markupLanguageUtils.js
packages/lib/migrations/42.js
packages/lib/models/Alarm.js
packages/lib/models/BaseItem.js
packages/lib/models/Folder.js
packages/lib/models/Folder.sharing.test.js
packages/lib/models/Folder.test.js
packages/lib/models/ItemChange.js
packages/lib/models/Folder.js
packages/lib/models/ItemChange.test.js
packages/lib/models/MasterKey.js
packages/lib/models/ItemChange.js
packages/lib/models/MasterKey.test.js
packages/lib/models/MasterKey.js
packages/lib/models/Migration.js
packages/lib/models/Note.js
packages/lib/models/Note.test.js
packages/lib/models/Note.js
packages/lib/models/NoteResource.js
packages/lib/models/NoteTag.js
packages/lib/models/Resource.js
packages/lib/models/Resource.test.js
packages/lib/models/Resource.js
packages/lib/models/ResourceLocalState.js
packages/lib/models/Revision.js
packages/lib/models/Revision.test.js
packages/lib/models/Revision.js
packages/lib/models/Search.js
packages/lib/models/Setting.js
packages/lib/models/Setting.test.js
packages/lib/models/Setting.js
packages/lib/models/SmartFilter.js
packages/lib/models/Tag.js
packages/lib/models/dateTimeFormats.test.js
@@ -557,21 +577,22 @@ packages/lib/models/settings/FileHandler.js
packages/lib/models/utils/itemCanBeEncrypted.js
packages/lib/models/utils/paginatedFeed.js
packages/lib/models/utils/paginationToSql.js
packages/lib/models/utils/readOnly.js
packages/lib/models/utils/types.js
packages/lib/models/utils/userData.js
packages/lib/models/utils/userData.test.js
packages/lib/models/utils/userData.js
packages/lib/net-utils.js
packages/lib/ntp.js
packages/lib/onedrive-api.js
packages/lib/path-utils.js
packages/lib/reducer.js
packages/lib/registry.js
packages/lib/registry.test.js
packages/lib/registry.js
packages/lib/services/AlarmService.js
packages/lib/services/AlarmServiceDriverNode.js
packages/lib/services/BaseService.js
packages/lib/services/CommandService.js
packages/lib/services/CommandService.test.js
packages/lib/services/CommandService.js
packages/lib/services/DecryptionWorker.js
packages/lib/services/ExternalEditWatcher.js
packages/lib/services/ExternalEditWatcher/utils.js
@@ -587,14 +608,14 @@ packages/lib/services/ReportService.js
packages/lib/services/ResourceEditWatcher/index.js
packages/lib/services/ResourceEditWatcher/reducer.js
packages/lib/services/ResourceFetcher.js
packages/lib/services/ResourceService.js
packages/lib/services/ResourceService.test.js
packages/lib/services/RevisionService.js
packages/lib/services/ResourceService.js
packages/lib/services/RevisionService.test.js
packages/lib/services/RevisionService.js
packages/lib/services/SettingUtils.js
packages/lib/services/UndoRedoService.js
packages/lib/services/WhenClause.js
packages/lib/services/WhenClause.test.js
packages/lib/services/WhenClause.js
packages/lib/services/commands/MenuUtils.js
packages/lib/services/commands/ToolbarButtonUtils.js
packages/lib/services/commands/commandsToMarkdownTable.js
@@ -605,38 +626,40 @@ packages/lib/services/commands/stateToWhenClauseContext.js
packages/lib/services/contextkey/contextkey.js
packages/lib/services/database/types.js
packages/lib/services/debug/populateDatabase.js
packages/lib/services/e2ee/EncryptionService.js
packages/lib/services/e2ee/EncryptionService.test.js
packages/lib/services/e2ee/EncryptionService.js
packages/lib/services/e2ee/RSA.node.js
packages/lib/services/e2ee/ppk.js
packages/lib/services/e2ee/ppk.test.js
packages/lib/services/e2ee/ppk.js
packages/lib/services/e2ee/ppkTestUtils.js
packages/lib/services/e2ee/types.js
packages/lib/services/e2ee/utils.js
packages/lib/services/e2ee/utils.test.js
packages/lib/services/interop/InteropService.js
packages/lib/services/e2ee/utils.js
packages/lib/services/interop/InteropService.test.js
packages/lib/services/interop/InteropService.js
packages/lib/services/interop/InteropService_Exporter_Base.js
packages/lib/services/interop/InteropService_Exporter_Custom.js
packages/lib/services/interop/InteropService_Exporter_Html.js
packages/lib/services/interop/InteropService_Exporter_Html.test.js
packages/lib/services/interop/InteropService_Exporter_Html.js
packages/lib/services/interop/InteropService_Exporter_Jex.js
packages/lib/services/interop/InteropService_Exporter_Md.js
packages/lib/services/interop/InteropService_Exporter_Md.test.js
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.js
packages/lib/services/interop/InteropService_Exporter_Md.js
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.test.js
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.js
packages/lib/services/interop/InteropService_Exporter_Raw.js
packages/lib/services/interop/InteropService_Importer_Base.js
packages/lib/services/interop/InteropService_Importer_Custom.js
packages/lib/services/interop/InteropService_Importer_EnexToHtml.js
packages/lib/services/interop/InteropService_Importer_EnexToMd.js
packages/lib/services/interop/InteropService_Importer_Jex.js
packages/lib/services/interop/InteropService_Importer_Md.js
packages/lib/services/interop/InteropService_Importer_Md.test.js
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.js
packages/lib/services/interop/InteropService_Importer_Md.js
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.test.js
packages/lib/services/interop/InteropService_Importer_Raw.js
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.js
packages/lib/services/interop/InteropService_Importer_Raw.test.js
packages/lib/services/interop/InteropService_Importer_Raw.js
packages/lib/services/interop/Module.test.js
packages/lib/services/interop/Module.js
packages/lib/services/interop/types.js
packages/lib/services/joplinServer/personalizedUserContentBaseUrl.js
packages/lib/services/keychain/KeychainService.js
@@ -683,23 +706,23 @@ packages/lib/services/plugins/utils/makeListener.js
packages/lib/services/plugins/utils/manifestFromObject.js
packages/lib/services/plugins/utils/mapEventHandlersToIds.js
packages/lib/services/plugins/utils/types.js
packages/lib/services/plugins/utils/validatePluginId.js
packages/lib/services/plugins/utils/validatePluginId.test.js
packages/lib/services/plugins/utils/validatePluginVersion.js
packages/lib/services/plugins/utils/validatePluginId.js
packages/lib/services/plugins/utils/validatePluginVersion.test.js
packages/lib/services/profileConfig/index.js
packages/lib/services/plugins/utils/validatePluginVersion.js
packages/lib/services/profileConfig/index.test.js
packages/lib/services/profileConfig/index.js
packages/lib/services/profileConfig/initProfile.js
packages/lib/services/profileConfig/mergeGlobalAndLocalSettings.js
packages/lib/services/profileConfig/splitGlobalAndLocalSettings.js
packages/lib/services/profileConfig/types.js
packages/lib/services/rest/Api.js
packages/lib/services/rest/Api.test.js
packages/lib/services/rest/Api.js
packages/lib/services/rest/ApiResponse.js
packages/lib/services/rest/actionApi.desktop.js
packages/lib/services/rest/routes/auth.js
packages/lib/services/rest/routes/events.js
packages/lib/services/rest/routes/events.test.js
packages/lib/services/rest/routes/events.js
packages/lib/services/rest/routes/folders.js
packages/lib/services/rest/routes/master_keys.js
packages/lib/services/rest/routes/notes.js
@@ -717,26 +740,26 @@ packages/lib/services/rest/utils/readonlyProperties.js
packages/lib/services/rest/utils/requestFields.js
packages/lib/services/rest/utils/requestPaginationOptions.js
packages/lib/services/searchengine/SearchEngine.js
packages/lib/services/searchengine/SearchEngineUtils.js
packages/lib/services/searchengine/SearchEngineUtils.test.js
packages/lib/services/searchengine/SearchEngineUtils.js
packages/lib/services/searchengine/SearchFilter.test.js
packages/lib/services/searchengine/filterParser.js
packages/lib/services/searchengine/filterParser.test.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/filterParser.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.test.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/queryBuilder.js
packages/lib/services/share/ShareService.js
packages/lib/services/share/ShareService.test.js
packages/lib/services/share/ShareService.js
packages/lib/services/share/reducer.js
packages/lib/services/spellChecker/SpellCheckerService.js
packages/lib/services/spellChecker/SpellCheckerServiceDriverBase.js
packages/lib/services/style/cssToTheme.js
packages/lib/services/style/cssToTheme.test.js
packages/lib/services/style/cssToTheme.js
packages/lib/services/style/loadCssToTheme.js
packages/lib/services/style/themeToCss.js
packages/lib/services/style/themeToCss.test.js
packages/lib/services/synchronizer/ItemUploader.js
packages/lib/services/style/themeToCss.js
packages/lib/services/synchronizer/ItemUploader.test.js
packages/lib/services/synchronizer/ItemUploader.js
packages/lib/services/synchronizer/LockHandler.js
packages/lib/services/synchronizer/MigrationHandler.js
packages/lib/services/synchronizer/Synchronizer.basics.test.js
@@ -753,12 +776,15 @@ packages/lib/services/synchronizer/migrations/1.js
packages/lib/services/synchronizer/migrations/2.js
packages/lib/services/synchronizer/migrations/3.js
packages/lib/services/synchronizer/syncDebugLog.js
packages/lib/services/synchronizer/syncInfoUtils.js
packages/lib/services/synchronizer/syncInfoUtils.test.js
packages/lib/services/synchronizer/syncInfoUtils.js
packages/lib/services/synchronizer/synchronizer_LockHandler.test.js
packages/lib/services/synchronizer/synchronizer_MigrationHandler.test.js
packages/lib/services/synchronizer/tools.js
packages/lib/services/synchronizer/utils/handleConflictAction.js
packages/lib/services/synchronizer/utils/handleSyncStartupOperation.js
packages/lib/services/synchronizer/utils/resourceRemotePath.js
packages/lib/services/synchronizer/utils/syncDeleteStep.js
packages/lib/services/synchronizer/utils/types.js
packages/lib/shim.js
packages/lib/testing/syncTargetUtils.js
@@ -777,11 +803,12 @@ packages/lib/themes/type.js
packages/lib/time.js
packages/lib/utils/credentialFiles.js
packages/lib/utils/joplinCloud.js
packages/lib/utils/webDAVUtils.js
packages/lib/utils/userFetcher.js
packages/lib/utils/webDAVUtils.test.js
packages/lib/utils/webDAVUtils.js
packages/lib/uuid.js
packages/lib/versionInfo.js
packages/lib/versionInfo.test.js
packages/lib/versionInfo.js
packages/pdf-viewer/FullViewer.js
packages/pdf-viewer/Page.js
packages/pdf-viewer/PdfDocument.js
@@ -802,17 +829,17 @@ packages/pdf-viewer/ui/IconButtons.js
packages/pdf-viewer/ui/ZoomControls.js
packages/plugin-repo-cli/commands/updateRelease.js
packages/plugin-repo-cli/index.js
packages/plugin-repo-cli/lib/checkIfPluginCanBeAdded.js
packages/plugin-repo-cli/lib/checkIfPluginCanBeAdded.test.js
packages/plugin-repo-cli/lib/errorsHaveChanged.js
packages/plugin-repo-cli/lib/checkIfPluginCanBeAdded.js
packages/plugin-repo-cli/lib/errorsHaveChanged.test.js
packages/plugin-repo-cli/lib/gitCompareUrl.js
packages/plugin-repo-cli/lib/errorsHaveChanged.js
packages/plugin-repo-cli/lib/gitCompareUrl.test.js
packages/plugin-repo-cli/lib/overrideUtils.js
packages/plugin-repo-cli/lib/gitCompareUrl.js
packages/plugin-repo-cli/lib/overrideUtils.test.js
packages/plugin-repo-cli/lib/overrideUtils.js
packages/plugin-repo-cli/lib/types.js
packages/plugin-repo-cli/lib/updateReadme.js
packages/plugin-repo-cli/lib/updateReadme.test.js
packages/plugin-repo-cli/lib/updateReadme.js
packages/plugin-repo-cli/lib/utils.js
packages/plugins/ToggleSidebars/api/index.js
packages/plugins/ToggleSidebars/api/types.js
@@ -822,10 +849,10 @@ packages/renderer/HtmlToHtml.js
packages/renderer/InMemoryCache.js
packages/renderer/MarkupToHtml.js
packages/renderer/MdToHtml.js
packages/renderer/MdToHtml/createEventHandlingAttrs.js
packages/renderer/MdToHtml/createEventHandlingAttrs.test.js
packages/renderer/MdToHtml/linkReplacement.js
packages/renderer/MdToHtml/createEventHandlingAttrs.js
packages/renderer/MdToHtml/linkReplacement.test.js
packages/renderer/MdToHtml/linkReplacement.js
packages/renderer/MdToHtml/renderMedia.js
packages/renderer/MdToHtml/rules/checkbox.js
packages/renderer/MdToHtml/rules/code_inline.js
@@ -844,25 +871,26 @@ packages/renderer/MdToHtml/setupLinkify.js
packages/renderer/MdToHtml/validateLinks.js
packages/renderer/headerAnchor.js
packages/renderer/highlight.js
packages/renderer/htmlUtils.js
packages/renderer/htmlUtils.test.js
packages/renderer/htmlUtils.js
packages/renderer/index.js
packages/renderer/noteStyle.js
packages/renderer/pathUtils.js
packages/renderer/utils.js
packages/tools/build-release-stats.js
packages/tools/build-welcome.js
packages/tools/buildServerDocker.js
packages/tools/buildServerDocker.test.js
packages/tools/bundleDefaultPlugins.js
packages/tools/buildServerDocker.js
packages/tools/bundleDefaultPlugins.test.js
packages/tools/checkLibPaths.js
packages/tools/bundleDefaultPlugins.js
packages/tools/checkIgnoredFiles.js
packages/tools/checkLibPaths.test.js
packages/tools/checkLibPaths.js
packages/tools/convertThemesToCss.js
packages/tools/generate-database-types.js
packages/tools/generate-images.js
packages/tools/git-changelog.js
packages/tools/git-changelog.test.js
packages/tools/git-changelog.js
packages/tools/licenseChecker.js
packages/tools/release-android.js
packages/tools/release-cli.js
@@ -874,6 +902,7 @@ packages/tools/setupNewRelease.js
packages/tools/spellcheck.js
packages/tools/tagServerLatest.js
packages/tools/tool-utils.js
packages/tools/update-readme-download.test.js
packages/tools/update-readme-download.js
packages/tools/update-readme-sponsors.js
packages/tools/updateMarkdownDoc.js
@@ -884,14 +913,14 @@ packages/tools/website/build.js
packages/tools/website/buildTranslations.js
packages/tools/website/updateDownloadPage.js
packages/tools/website/updateNews.js
packages/tools/website/utils/applyTranslations.js
packages/tools/website/utils/applyTranslations.test.js
packages/tools/website/utils/convertLinksToLocale.js
packages/tools/website/utils/applyTranslations.js
packages/tools/website/utils/convertLinksToLocale.test.js
packages/tools/website/utils/convertLinksToLocale.js
packages/tools/website/utils/frontMatter.js
packages/tools/website/utils/news.js
packages/tools/website/utils/openGraph.js
packages/tools/website/utils/openGraph.test.js
packages/tools/website/utils/openGraph.js
packages/tools/website/utils/parser.js
packages/tools/website/utils/pressCarousel.js
packages/tools/website/utils/processTranslations.js

View File

@@ -153,6 +153,24 @@ if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
fi
fi
# =============================================================================
# Check .gitignore and .eslintignore files - they should be updated when
# new TypeScript files are added by running `yarn run updateIgnored`.
# See coding_style.md
# =============================================================================
if [ "$IS_PULL_REQUEST" == "1" ]; then
if [ "$IS_LINUX" == "1" ]; then
echo "Step: Checking for files that should have been ignored..."
node packages/tools/checkIgnoredFiles.js
testResult=$?
if [ $testResult -ne 0 ]; then
exit $testResult
fi
fi
fi
# =============================================================================
# Find out if we should run the build or not. Electron-builder gets stuck when
# building PRs so we disable it in this case. The Linux build should provide
@@ -194,7 +212,12 @@ if [[ $GIT_TAG_NAME = v* ]]; then
# It can be removed once we upgrade to electron-builder@23, however we
# cannot currently do this due to this error:
# https://github.com/laurent22/joplin/issues/8149
PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn run dist
#
# electron-builder@24, however, still expects the python binary to be named
# "python" and seems to no longer respect the PYTHON_PATH environment variable.
# We work around this by aliasing python.
alias python=$(which python3)
USE_HARD_LINKS=false yarn run dist
else
USE_HARD_LINKS=false yarn run dist
fi
@@ -207,7 +230,15 @@ else
if [ "$IS_MACOS" == "1" ]; then
# See above why we need to specify Python
PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn run dist --publish=never
alias python=$(which python3)
# We also want to disable signing the app in this case, because
# it randomly fails and we don't even need it
# https://www.electron.build/code-signing#how-to-disable-code-signing-during-the-build-process-on-macos
export CSC_IDENTITY_AUTO_DISCOVERY=false
npm pkg set 'build.mac.identity'=null --json
USE_HARD_LINKS=false yarn run dist --publish=never
else
USE_HARD_LINKS=false yarn run dist --publish=never
fi

69
.github/workflows/build-macos-m1.yml vendored Normal file
View File

@@ -0,0 +1,69 @@
name: Build macOS M1
on: [push, pull_request]
jobs:
pre_job:
if: github.repository == 'laurent22/joplin'
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'same_content_newer'
Main:
needs: pre_job
# We always process desktop release tags, because they also publish the release
if: github.repository == 'laurent22/joplin' && (needs.pre_job.outputs.should_skip != 'true' || startsWith(github.ref, 'refs/tags/v'))
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: olegtarasov/get-tag@v2.1
- uses: actions/setup-node@v2
with:
# We need to pin the version to 18.15, because 18.16+ fails with this error:
# https://github.com/facebook/react-native/issues/36440
node-version: '18.15.0'
- name: Install Yarn
run: |
# https://yarnpkg.com/getting-started/install
corepack enable
- name: Build macOS M1 app
env:
APPLE_ASC_PROVIDER: ${{ secrets.APPLE_ASC_PROVIDER }}
APPLE_ID: ${{ secrets.APPLE_ID }}
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_LINK: ${{ secrets.APPLE_CSC_LINK }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
IS_CONTINUOUS_INTEGRATION: 1
BUILD_SEQUENCIAL: 1
run: |
export npm_config_arch=arm64
export npm_config_target_arch=arm64
yarn install
cd packages/app-desktop
npm pkg set 'build.mac.artifactName'='${productName}-${version}-${arch}.${ext}'
npm pkg set 'build.mac.target.target'='dmg'
npm pkg set 'build.mac.target.arch[0]'='arm64'
if [[ $GIT_TAG_NAME = v* ]]; then
echo "Building and publishing desktop application..."
PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn run dist --mac --arm64
else
echo "Building but *not* publishing desktop application..."
# We also want to disable signing the app in this case, because
# it doesn't work and we don't need it.
# https://www.electron.build/code-signing#how-to-disable-code-signing-during-the-build-process-on-macos
export CSC_IDENTITY_AUTO_DISCOVERY=false
npm pkg set 'build.mac.identity'=null --json
PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn run dist --publish=never
fi

View File

@@ -183,7 +183,7 @@ jobs:
docker run -p 22300:22300 joplin/server:0.0.0-beta node dist/app.js --env dev &
# Wait for server to start
sleep 10
sleep 30
# Check if status code is correct
# if the actual_status DOES NOT include the expected_status

190
.gitignore vendored
View File

@@ -67,8 +67,8 @@ packages/app-cli/app/LinkSelector.js
packages/app-cli/app/base-command.js
packages/app-cli/app/command-done.test.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-mkbook.js
packages/app-cli/app/command-settingschema.js
packages/app-cli/app/command-sync.js
packages/app-cli/app/command-testing.js
@@ -77,6 +77,7 @@ packages/app-cli/app/services/plugins/PluginRunner.js
packages/app-cli/app/setupCommand.js
packages/app-cli/app/utils/testUtils.js
packages/app-cli/tests/HtmlToMd.js
packages/app-cli/tests/MarkupToHtml.js
packages/app-cli/tests/MdToHtml.js
packages/app-cli/tests/services/keychain/KeychainService.js
packages/app-cli/tests/services/plugins/PluginService.js
@@ -90,9 +91,9 @@ packages/app-cli/tests/testUtils.js
packages/app-cli/tools/populateDatabase.js
packages/app-desktop/ElectronAppWrapper.js
packages/app-desktop/InteropServiceHelper.js
packages/app-desktop/app.js
packages/app-desktop/app.reducer.js
packages/app-desktop/app.reducer.test.js
packages/app-desktop/app.reducer.js
packages/app-desktop/app.js
packages/app-desktop/bridge.js
packages/app-desktop/checkForUpdates.js
packages/app-desktop/commands/copyDevCommand.js
@@ -120,13 +121,14 @@ packages/app-desktop/gui/ConfigScreen/Sidebar.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginBox.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginsStates.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/SearchPlugins.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/useOnInstallHandler.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/useOnInstallHandler.test.js
packages/app-desktop/gui/ConfigScreen/controls/plugins/useOnInstallHandler.js
packages/app-desktop/gui/Dialog.js
packages/app-desktop/gui/DialogButtonRow.js
packages/app-desktop/gui/DialogButtonRow/useKeyboardHandler.js
packages/app-desktop/gui/DialogTitle.js
packages/app-desktop/gui/DropboxLoginScreen.js
packages/app-desktop/gui/Dropdown/Dropdown.js
packages/app-desktop/gui/EditFolderDialog/Dialog.js
packages/app-desktop/gui/EditFolderDialog/IconSelector.js
packages/app-desktop/gui/EmojiBox.js
@@ -138,6 +140,7 @@ 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/JoplinCloudConfigScreen.js
packages/app-desktop/gui/KeymapConfig/KeymapConfigScreen.js
packages/app-desktop/gui/KeymapConfig/ShortcutRecorder.js
packages/app-desktop/gui/KeymapConfig/styles/index.js
@@ -147,6 +150,9 @@ packages/app-desktop/gui/KeymapConfig/utils/useKeymap.js
packages/app-desktop/gui/MainScreen/MainScreen.js
packages/app-desktop/gui/MainScreen/commands/addProfile.js
packages/app-desktop/gui/MainScreen/commands/commandPalette.js
packages/app-desktop/gui/MainScreen/commands/deleteFolder.js
packages/app-desktop/gui/MainScreen/commands/deleteNote.js
packages/app-desktop/gui/MainScreen/commands/duplicateNote.js
packages/app-desktop/gui/MainScreen/commands/editAlarm.js
packages/app-desktop/gui/MainScreen/commands/exportPdf.js
packages/app-desktop/gui/MainScreen/commands/gotoAnything.js
@@ -181,6 +187,7 @@ packages/app-desktop/gui/MainScreen/commands/showSpellCheckerMenu.js
packages/app-desktop/gui/MainScreen/commands/toggleEditors.js
packages/app-desktop/gui/MainScreen/commands/toggleLayoutMoveMode.js
packages/app-desktop/gui/MainScreen/commands/toggleNoteList.js
packages/app-desktop/gui/MainScreen/commands/toggleNoteType.js
packages/app-desktop/gui/MainScreen/commands/toggleNotesSortOrderField.js
packages/app-desktop/gui/MainScreen/commands/toggleNotesSortOrderReverse.js
packages/app-desktop/gui/MainScreen/commands/togglePerFolderSortOrder.js
@@ -197,8 +204,8 @@ packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/Toolbar.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/styles/index.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/index.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/types.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.test.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useEditorSearch.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useExternalPlugins.js
packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils/useJoplinCommands.js
@@ -226,8 +233,8 @@ packages/app-desktop/gui/NoteEditor/commands/showLocalSearch.js
packages/app-desktop/gui/NoteEditor/commands/showRevisions.js
packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.js
packages/app-desktop/gui/NoteEditor/styles/index.js
packages/app-desktop/gui/NoteEditor/utils/clipboardUtils.js
packages/app-desktop/gui/NoteEditor/utils/clipboardUtils.test.js
packages/app-desktop/gui/NoteEditor/utils/clipboardUtils.js
packages/app-desktop/gui/NoteEditor/utils/contextMenu.js
packages/app-desktop/gui/NoteEditor/utils/contextMenuUtils.js
packages/app-desktop/gui/NoteEditor/utils/index.js
@@ -268,17 +275,17 @@ packages/app-desktop/gui/ResizableLayout/utils/findItemByKey.js
packages/app-desktop/gui/ResizableLayout/utils/isTempContainer.js
packages/app-desktop/gui/ResizableLayout/utils/iterateItems.js
packages/app-desktop/gui/ResizableLayout/utils/layoutItemProp.js
packages/app-desktop/gui/ResizableLayout/utils/movements.js
packages/app-desktop/gui/ResizableLayout/utils/movements.test.js
packages/app-desktop/gui/ResizableLayout/utils/persist.js
packages/app-desktop/gui/ResizableLayout/utils/movements.js
packages/app-desktop/gui/ResizableLayout/utils/persist.test.js
packages/app-desktop/gui/ResizableLayout/utils/persist.js
packages/app-desktop/gui/ResizableLayout/utils/removeItem.js
packages/app-desktop/gui/ResizableLayout/utils/removeKeylessItems.js
packages/app-desktop/gui/ResizableLayout/utils/setLayoutItemProps.js
packages/app-desktop/gui/ResizableLayout/utils/style.js
packages/app-desktop/gui/ResizableLayout/utils/types.js
packages/app-desktop/gui/ResizableLayout/utils/useLayoutItemSizes.js
packages/app-desktop/gui/ResizableLayout/utils/useLayoutItemSizes.test.js
packages/app-desktop/gui/ResizableLayout/utils/useLayoutItemSizes.js
packages/app-desktop/gui/ResizableLayout/utils/useWindowResizeEvent.js
packages/app-desktop/gui/ResizableLayout/utils/validateLayout.js
packages/app-desktop/gui/ResourceScreen.js
@@ -337,12 +344,14 @@ packages/app-desktop/services/plugins/hooks/useViewIsReady.js
packages/app-desktop/services/plugins/hooks/useWebviewToPluginMessages.js
packages/app-desktop/services/restart.js
packages/app-desktop/services/share/invitationRespond.js
packages/app-desktop/services/sortOrder/PerFolderSortOrderService.js
packages/app-desktop/services/sortOrder/PerFolderSortOrderService.test.js
packages/app-desktop/services/sortOrder/notesSortOrderUtils.js
packages/app-desktop/services/sortOrder/PerFolderSortOrderService.js
packages/app-desktop/services/sortOrder/notesSortOrderUtils.test.js
packages/app-desktop/services/sortOrder/notesSortOrderUtils.js
packages/app-desktop/services/spellChecker/SpellCheckerServiceDriverNative.js
packages/app-desktop/tools/notarizeMacApp.js
packages/app-desktop/utils/checkForUpdatesUtils.test.js
packages/app-desktop/utils/checkForUpdatesUtils.js
packages/app-desktop/utils/markupLanguageUtils.js
packages/app-mobile/PluginAssetsLoader.js
packages/app-mobile/components/ActionButton.js
@@ -357,17 +366,17 @@ packages/app-mobile/components/NoteBodyViewer/NoteBodyViewer.js
packages/app-mobile/components/NoteBodyViewer/hooks/useOnMessage.js
packages/app-mobile/components/NoteBodyViewer/hooks/useOnResourceLongPress.js
packages/app-mobile/components/NoteBodyViewer/hooks/useSource.js
packages/app-mobile/components/NoteEditor/CodeMirror/CodeMirror.js
packages/app-mobile/components/NoteEditor/CodeMirror/CodeMirror.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/CodeMirror.js
packages/app-mobile/components/NoteEditor/CodeMirror/decoratorExtension.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownCommands.bulletedVsChecklist.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownCommands.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownCommands.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownCommands.toggleList.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownMathParser.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownCommands.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownMathParser.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownReformatter.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownMathParser.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownReformatter.test.js
packages/app-mobile/components/NoteEditor/CodeMirror/markdownReformatter.js
packages/app-mobile/components/NoteEditor/CodeMirror/syntaxHighlightingLanguages.js
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/createEditor.js
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/forceFullParse.js
@@ -398,9 +407,14 @@ packages/app-mobile/components/app-nav.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/getResponsiveValue.js
packages/app-mobile/components/getResponsiveValue.test.js
packages/app-mobile/components/screens/ConfigScreen.js
packages/app-mobile/components/getResponsiveValue.js
packages/app-mobile/components/screens/ConfigScreen/ConfigScreen.js
packages/app-mobile/components/screens/ConfigScreen/ConfigScreenButton.js
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/NoteExportButton.test.js
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/NoteExportButton.js
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/exportAllFolders.js
packages/app-mobile/components/screens/ConfigScreen/configScreenStyles.js
packages/app-mobile/components/screens/Note.js
packages/app-mobile/components/screens/Notes.js
packages/app-mobile/components/screens/UpgradeSyncTargetScreen.js
@@ -421,6 +435,7 @@ packages/app-mobile/tools/buildInjectedJs.js
packages/app-mobile/utils/ShareExtension.js
packages/app-mobile/utils/ShareUtils.js
packages/app-mobile/utils/TlsUtils.js
packages/app-mobile/utils/autodetectTheme.js
packages/app-mobile/utils/checkPermissions.js
packages/app-mobile/utils/createRootStyle.js
packages/app-mobile/utils/debounce.js
@@ -429,19 +444,19 @@ packages/app-mobile/utils/setupNotifications.js
packages/app-mobile/utils/shareHandler.js
packages/app-mobile/utils/types.js
packages/fork-htmlparser2/src/CollectingHandler.js
packages/fork-htmlparser2/src/FeedHandler.js
packages/fork-htmlparser2/src/FeedHandler.spec.js
packages/fork-htmlparser2/src/FeedHandler.js
packages/fork-htmlparser2/src/MultiplexHandler.js
packages/fork-htmlparser2/src/Parser.js
packages/fork-htmlparser2/src/Parser.spec.js
packages/fork-htmlparser2/src/Parser.js
packages/fork-htmlparser2/src/Tokenizer.js
packages/fork-htmlparser2/src/WritableStream.js
packages/fork-htmlparser2/src/WritableStream.spec.js
packages/fork-htmlparser2/src/WritableStream.js
packages/fork-htmlparser2/src/__fixtures__/test-helper.js
packages/fork-htmlparser2/src/__tests__/events.js
packages/fork-htmlparser2/src/__tests__/stream.js
packages/fork-htmlparser2/src/index.js
packages/fork-htmlparser2/src/index.spec.js
packages/fork-htmlparser2/src/index.js
packages/generator-joplin/generators/app/templates/api/index.js
packages/generator-joplin/generators/app/templates/api/types.js
packages/generator-joplin/generators/app/templates/api_index.js
@@ -454,17 +469,19 @@ packages/lib/BaseModel.js
packages/lib/BaseSyncTarget.js
packages/lib/ClipperServer.js
packages/lib/CssUtils.js
packages/lib/EventDispatcher.js
packages/lib/EventDispatcher.test.js
packages/lib/EventDispatcher.js
packages/lib/HtmlToMd.js
packages/lib/InMemoryCache.js
packages/lib/InMemoryCache.test.js
packages/lib/InMemoryCache.js
packages/lib/JoplinDatabase.js
packages/lib/JoplinError.js
packages/lib/JoplinServerApi.js
packages/lib/Logger.js
packages/lib/ObjectUtils.js
packages/lib/PoorManIntervals.js
packages/lib/RotatingLogs.test.js
packages/lib/RotatingLogs.js
packages/lib/SyncTargetJoplinCloud.js
packages/lib/SyncTargetJoplinServer.js
packages/lib/SyncTargetNone.js
@@ -474,8 +491,8 @@ packages/lib/Synchronizer.js
packages/lib/TaskQueue.js
packages/lib/WelcomeUtils.js
packages/lib/array.js
packages/lib/callbackUrlUtils.js
packages/lib/callbackUrlUtils.test.js
packages/lib/callbackUrlUtils.js
packages/lib/commands/historyBackward.js
packages/lib/commands/historyForward.js
packages/lib/commands/index.js
@@ -483,12 +500,14 @@ packages/lib/commands/openMasterPasswordDialog.js
packages/lib/commands/synchronize.js
packages/lib/components/EncryptionConfigScreen/utils.js
packages/lib/components/shared/note-screen-shared.js
packages/lib/components/shared/reduxSharedMiddleware.js
packages/lib/database-driver-better-sqlite.js
packages/lib/database.js
packages/lib/debug/DebugService.js
packages/lib/dom.js
packages/lib/dummy.test.js
packages/lib/errorUtils.js
packages/lib/errors.js
packages/lib/eventManager.js
packages/lib/file-api-driver-joplinServer.js
packages/lib/file-api-driver-memory.js
@@ -501,41 +520,41 @@ packages/lib/geolocation-node.js
packages/lib/hooks/useAsyncEffect.js
packages/lib/hooks/useElementSize.js
packages/lib/hooks/useEventListener.js
packages/lib/htmlUtils.js
packages/lib/htmlUtils.test.js
packages/lib/htmlUtils.js
packages/lib/htmlUtils2.test.js
packages/lib/import-enex-md-gen.js
packages/lib/import-enex-md-gen.test.js
packages/lib/import-enex-md-gen.js
packages/lib/import-enex.js
packages/lib/locale.js
packages/lib/locale.test.js
packages/lib/markdownUtils.js
packages/lib/locale.js
packages/lib/markdownUtils.test.js
packages/lib/markdownUtils.js
packages/lib/markdownUtils2.test.js
packages/lib/markupLanguageUtils.js
packages/lib/migrations/42.js
packages/lib/models/Alarm.js
packages/lib/models/BaseItem.js
packages/lib/models/Folder.js
packages/lib/models/Folder.sharing.test.js
packages/lib/models/Folder.test.js
packages/lib/models/ItemChange.js
packages/lib/models/Folder.js
packages/lib/models/ItemChange.test.js
packages/lib/models/MasterKey.js
packages/lib/models/ItemChange.js
packages/lib/models/MasterKey.test.js
packages/lib/models/MasterKey.js
packages/lib/models/Migration.js
packages/lib/models/Note.js
packages/lib/models/Note.test.js
packages/lib/models/Note.js
packages/lib/models/NoteResource.js
packages/lib/models/NoteTag.js
packages/lib/models/Resource.js
packages/lib/models/Resource.test.js
packages/lib/models/Resource.js
packages/lib/models/ResourceLocalState.js
packages/lib/models/Revision.js
packages/lib/models/Revision.test.js
packages/lib/models/Revision.js
packages/lib/models/Search.js
packages/lib/models/Setting.js
packages/lib/models/Setting.test.js
packages/lib/models/Setting.js
packages/lib/models/SmartFilter.js
packages/lib/models/Tag.js
packages/lib/models/dateTimeFormats.test.js
@@ -543,21 +562,22 @@ packages/lib/models/settings/FileHandler.js
packages/lib/models/utils/itemCanBeEncrypted.js
packages/lib/models/utils/paginatedFeed.js
packages/lib/models/utils/paginationToSql.js
packages/lib/models/utils/readOnly.js
packages/lib/models/utils/types.js
packages/lib/models/utils/userData.js
packages/lib/models/utils/userData.test.js
packages/lib/models/utils/userData.js
packages/lib/net-utils.js
packages/lib/ntp.js
packages/lib/onedrive-api.js
packages/lib/path-utils.js
packages/lib/reducer.js
packages/lib/registry.js
packages/lib/registry.test.js
packages/lib/registry.js
packages/lib/services/AlarmService.js
packages/lib/services/AlarmServiceDriverNode.js
packages/lib/services/BaseService.js
packages/lib/services/CommandService.js
packages/lib/services/CommandService.test.js
packages/lib/services/CommandService.js
packages/lib/services/DecryptionWorker.js
packages/lib/services/ExternalEditWatcher.js
packages/lib/services/ExternalEditWatcher/utils.js
@@ -573,14 +593,14 @@ packages/lib/services/ReportService.js
packages/lib/services/ResourceEditWatcher/index.js
packages/lib/services/ResourceEditWatcher/reducer.js
packages/lib/services/ResourceFetcher.js
packages/lib/services/ResourceService.js
packages/lib/services/ResourceService.test.js
packages/lib/services/RevisionService.js
packages/lib/services/ResourceService.js
packages/lib/services/RevisionService.test.js
packages/lib/services/RevisionService.js
packages/lib/services/SettingUtils.js
packages/lib/services/UndoRedoService.js
packages/lib/services/WhenClause.js
packages/lib/services/WhenClause.test.js
packages/lib/services/WhenClause.js
packages/lib/services/commands/MenuUtils.js
packages/lib/services/commands/ToolbarButtonUtils.js
packages/lib/services/commands/commandsToMarkdownTable.js
@@ -591,38 +611,40 @@ packages/lib/services/commands/stateToWhenClauseContext.js
packages/lib/services/contextkey/contextkey.js
packages/lib/services/database/types.js
packages/lib/services/debug/populateDatabase.js
packages/lib/services/e2ee/EncryptionService.js
packages/lib/services/e2ee/EncryptionService.test.js
packages/lib/services/e2ee/EncryptionService.js
packages/lib/services/e2ee/RSA.node.js
packages/lib/services/e2ee/ppk.js
packages/lib/services/e2ee/ppk.test.js
packages/lib/services/e2ee/ppk.js
packages/lib/services/e2ee/ppkTestUtils.js
packages/lib/services/e2ee/types.js
packages/lib/services/e2ee/utils.js
packages/lib/services/e2ee/utils.test.js
packages/lib/services/interop/InteropService.js
packages/lib/services/e2ee/utils.js
packages/lib/services/interop/InteropService.test.js
packages/lib/services/interop/InteropService.js
packages/lib/services/interop/InteropService_Exporter_Base.js
packages/lib/services/interop/InteropService_Exporter_Custom.js
packages/lib/services/interop/InteropService_Exporter_Html.js
packages/lib/services/interop/InteropService_Exporter_Html.test.js
packages/lib/services/interop/InteropService_Exporter_Html.js
packages/lib/services/interop/InteropService_Exporter_Jex.js
packages/lib/services/interop/InteropService_Exporter_Md.js
packages/lib/services/interop/InteropService_Exporter_Md.test.js
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.js
packages/lib/services/interop/InteropService_Exporter_Md.js
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.test.js
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.js
packages/lib/services/interop/InteropService_Exporter_Raw.js
packages/lib/services/interop/InteropService_Importer_Base.js
packages/lib/services/interop/InteropService_Importer_Custom.js
packages/lib/services/interop/InteropService_Importer_EnexToHtml.js
packages/lib/services/interop/InteropService_Importer_EnexToMd.js
packages/lib/services/interop/InteropService_Importer_Jex.js
packages/lib/services/interop/InteropService_Importer_Md.js
packages/lib/services/interop/InteropService_Importer_Md.test.js
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.js
packages/lib/services/interop/InteropService_Importer_Md.js
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.test.js
packages/lib/services/interop/InteropService_Importer_Raw.js
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.js
packages/lib/services/interop/InteropService_Importer_Raw.test.js
packages/lib/services/interop/InteropService_Importer_Raw.js
packages/lib/services/interop/Module.test.js
packages/lib/services/interop/Module.js
packages/lib/services/interop/types.js
packages/lib/services/joplinServer/personalizedUserContentBaseUrl.js
packages/lib/services/keychain/KeychainService.js
@@ -669,23 +691,23 @@ packages/lib/services/plugins/utils/makeListener.js
packages/lib/services/plugins/utils/manifestFromObject.js
packages/lib/services/plugins/utils/mapEventHandlersToIds.js
packages/lib/services/plugins/utils/types.js
packages/lib/services/plugins/utils/validatePluginId.js
packages/lib/services/plugins/utils/validatePluginId.test.js
packages/lib/services/plugins/utils/validatePluginVersion.js
packages/lib/services/plugins/utils/validatePluginId.js
packages/lib/services/plugins/utils/validatePluginVersion.test.js
packages/lib/services/profileConfig/index.js
packages/lib/services/plugins/utils/validatePluginVersion.js
packages/lib/services/profileConfig/index.test.js
packages/lib/services/profileConfig/index.js
packages/lib/services/profileConfig/initProfile.js
packages/lib/services/profileConfig/mergeGlobalAndLocalSettings.js
packages/lib/services/profileConfig/splitGlobalAndLocalSettings.js
packages/lib/services/profileConfig/types.js
packages/lib/services/rest/Api.js
packages/lib/services/rest/Api.test.js
packages/lib/services/rest/Api.js
packages/lib/services/rest/ApiResponse.js
packages/lib/services/rest/actionApi.desktop.js
packages/lib/services/rest/routes/auth.js
packages/lib/services/rest/routes/events.js
packages/lib/services/rest/routes/events.test.js
packages/lib/services/rest/routes/events.js
packages/lib/services/rest/routes/folders.js
packages/lib/services/rest/routes/master_keys.js
packages/lib/services/rest/routes/notes.js
@@ -703,26 +725,26 @@ packages/lib/services/rest/utils/readonlyProperties.js
packages/lib/services/rest/utils/requestFields.js
packages/lib/services/rest/utils/requestPaginationOptions.js
packages/lib/services/searchengine/SearchEngine.js
packages/lib/services/searchengine/SearchEngineUtils.js
packages/lib/services/searchengine/SearchEngineUtils.test.js
packages/lib/services/searchengine/SearchEngineUtils.js
packages/lib/services/searchengine/SearchFilter.test.js
packages/lib/services/searchengine/filterParser.js
packages/lib/services/searchengine/filterParser.test.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/filterParser.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.test.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/queryBuilder.js
packages/lib/services/share/ShareService.js
packages/lib/services/share/ShareService.test.js
packages/lib/services/share/ShareService.js
packages/lib/services/share/reducer.js
packages/lib/services/spellChecker/SpellCheckerService.js
packages/lib/services/spellChecker/SpellCheckerServiceDriverBase.js
packages/lib/services/style/cssToTheme.js
packages/lib/services/style/cssToTheme.test.js
packages/lib/services/style/cssToTheme.js
packages/lib/services/style/loadCssToTheme.js
packages/lib/services/style/themeToCss.js
packages/lib/services/style/themeToCss.test.js
packages/lib/services/synchronizer/ItemUploader.js
packages/lib/services/style/themeToCss.js
packages/lib/services/synchronizer/ItemUploader.test.js
packages/lib/services/synchronizer/ItemUploader.js
packages/lib/services/synchronizer/LockHandler.js
packages/lib/services/synchronizer/MigrationHandler.js
packages/lib/services/synchronizer/Synchronizer.basics.test.js
@@ -739,12 +761,15 @@ packages/lib/services/synchronizer/migrations/1.js
packages/lib/services/synchronizer/migrations/2.js
packages/lib/services/synchronizer/migrations/3.js
packages/lib/services/synchronizer/syncDebugLog.js
packages/lib/services/synchronizer/syncInfoUtils.js
packages/lib/services/synchronizer/syncInfoUtils.test.js
packages/lib/services/synchronizer/syncInfoUtils.js
packages/lib/services/synchronizer/synchronizer_LockHandler.test.js
packages/lib/services/synchronizer/synchronizer_MigrationHandler.test.js
packages/lib/services/synchronizer/tools.js
packages/lib/services/synchronizer/utils/handleConflictAction.js
packages/lib/services/synchronizer/utils/handleSyncStartupOperation.js
packages/lib/services/synchronizer/utils/resourceRemotePath.js
packages/lib/services/synchronizer/utils/syncDeleteStep.js
packages/lib/services/synchronizer/utils/types.js
packages/lib/shim.js
packages/lib/testing/syncTargetUtils.js
@@ -763,11 +788,12 @@ packages/lib/themes/type.js
packages/lib/time.js
packages/lib/utils/credentialFiles.js
packages/lib/utils/joplinCloud.js
packages/lib/utils/webDAVUtils.js
packages/lib/utils/userFetcher.js
packages/lib/utils/webDAVUtils.test.js
packages/lib/utils/webDAVUtils.js
packages/lib/uuid.js
packages/lib/versionInfo.js
packages/lib/versionInfo.test.js
packages/lib/versionInfo.js
packages/pdf-viewer/FullViewer.js
packages/pdf-viewer/Page.js
packages/pdf-viewer/PdfDocument.js
@@ -788,17 +814,17 @@ packages/pdf-viewer/ui/IconButtons.js
packages/pdf-viewer/ui/ZoomControls.js
packages/plugin-repo-cli/commands/updateRelease.js
packages/plugin-repo-cli/index.js
packages/plugin-repo-cli/lib/checkIfPluginCanBeAdded.js
packages/plugin-repo-cli/lib/checkIfPluginCanBeAdded.test.js
packages/plugin-repo-cli/lib/errorsHaveChanged.js
packages/plugin-repo-cli/lib/checkIfPluginCanBeAdded.js
packages/plugin-repo-cli/lib/errorsHaveChanged.test.js
packages/plugin-repo-cli/lib/gitCompareUrl.js
packages/plugin-repo-cli/lib/errorsHaveChanged.js
packages/plugin-repo-cli/lib/gitCompareUrl.test.js
packages/plugin-repo-cli/lib/overrideUtils.js
packages/plugin-repo-cli/lib/gitCompareUrl.js
packages/plugin-repo-cli/lib/overrideUtils.test.js
packages/plugin-repo-cli/lib/overrideUtils.js
packages/plugin-repo-cli/lib/types.js
packages/plugin-repo-cli/lib/updateReadme.js
packages/plugin-repo-cli/lib/updateReadme.test.js
packages/plugin-repo-cli/lib/updateReadme.js
packages/plugin-repo-cli/lib/utils.js
packages/plugins/ToggleSidebars/api/index.js
packages/plugins/ToggleSidebars/api/types.js
@@ -808,10 +834,10 @@ packages/renderer/HtmlToHtml.js
packages/renderer/InMemoryCache.js
packages/renderer/MarkupToHtml.js
packages/renderer/MdToHtml.js
packages/renderer/MdToHtml/createEventHandlingAttrs.js
packages/renderer/MdToHtml/createEventHandlingAttrs.test.js
packages/renderer/MdToHtml/linkReplacement.js
packages/renderer/MdToHtml/createEventHandlingAttrs.js
packages/renderer/MdToHtml/linkReplacement.test.js
packages/renderer/MdToHtml/linkReplacement.js
packages/renderer/MdToHtml/renderMedia.js
packages/renderer/MdToHtml/rules/checkbox.js
packages/renderer/MdToHtml/rules/code_inline.js
@@ -830,25 +856,26 @@ packages/renderer/MdToHtml/setupLinkify.js
packages/renderer/MdToHtml/validateLinks.js
packages/renderer/headerAnchor.js
packages/renderer/highlight.js
packages/renderer/htmlUtils.js
packages/renderer/htmlUtils.test.js
packages/renderer/htmlUtils.js
packages/renderer/index.js
packages/renderer/noteStyle.js
packages/renderer/pathUtils.js
packages/renderer/utils.js
packages/tools/build-release-stats.js
packages/tools/build-welcome.js
packages/tools/buildServerDocker.js
packages/tools/buildServerDocker.test.js
packages/tools/bundleDefaultPlugins.js
packages/tools/buildServerDocker.js
packages/tools/bundleDefaultPlugins.test.js
packages/tools/checkLibPaths.js
packages/tools/bundleDefaultPlugins.js
packages/tools/checkIgnoredFiles.js
packages/tools/checkLibPaths.test.js
packages/tools/checkLibPaths.js
packages/tools/convertThemesToCss.js
packages/tools/generate-database-types.js
packages/tools/generate-images.js
packages/tools/git-changelog.js
packages/tools/git-changelog.test.js
packages/tools/git-changelog.js
packages/tools/licenseChecker.js
packages/tools/release-android.js
packages/tools/release-cli.js
@@ -860,6 +887,7 @@ packages/tools/setupNewRelease.js
packages/tools/spellcheck.js
packages/tools/tagServerLatest.js
packages/tools/tool-utils.js
packages/tools/update-readme-download.test.js
packages/tools/update-readme-download.js
packages/tools/update-readme-sponsors.js
packages/tools/updateMarkdownDoc.js
@@ -870,14 +898,14 @@ packages/tools/website/build.js
packages/tools/website/buildTranslations.js
packages/tools/website/updateDownloadPage.js
packages/tools/website/updateNews.js
packages/tools/website/utils/applyTranslations.js
packages/tools/website/utils/applyTranslations.test.js
packages/tools/website/utils/convertLinksToLocale.js
packages/tools/website/utils/applyTranslations.js
packages/tools/website/utils/convertLinksToLocale.test.js
packages/tools/website/utils/convertLinksToLocale.js
packages/tools/website/utils/frontMatter.js
packages/tools/website/utils/news.js
packages/tools/website/utils/openGraph.js
packages/tools/website/utils/openGraph.test.js
packages/tools/website/utils/openGraph.js
packages/tools/website/utils/parser.js
packages/tools/website/utils/pressCarousel.js
packages/tools/website/utils/processTranslations.js

View File

@@ -0,0 +1,13 @@
diff --git a/templates/nsis/include/allowOnlyOneInstallerInstance.nsh b/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
index a1fd1875d852ff69c087a3103eff827c20d37ca5..5222614ddad3276876857e7a9dde4017a6b9fc85 100644
--- a/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
+++ b/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
@@ -42,7 +42,7 @@
${nsProcess::FindProcess} "${_FILE}" ${_ERR}
!else
# find process owned by current user
- nsExec::Exec `cmd /c tasklist /FI "USERNAME eq %USERNAME%" /FI "IMAGENAME eq ${_FILE}" | %SYSTEMROOT%\System32\find.exe "${_FILE}"`
+ nsExec::Exec `cmd /c tasklist /FI "USERNAME eq %USERNAME%" /FI "PID ne $pid" /FI "IMAGENAME eq ${_FILE}" | %SYSTEMROOT%\System32\find.exe "${_FILE}"`
Pop ${_ERR}
!endif
!macroend

View File

@@ -0,0 +1,25 @@
diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
index 0f52b73c61625db2a3081c0950b6bdd2b06e3d40..b0fc3de4be0b3a26b638683613c63c783c2739bb 100644
--- a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
+++ b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
@@ -38,7 +38,7 @@ import com.facebook.react.uimanager.common.ViewUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicReference;
/**
@@ -151,7 +151,10 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
}
private class ConcurrentOperationQueue {
- private final Queue<UIThreadOperation> mQueue = new ConcurrentLinkedQueue<>();
+ // Patch: Use LinkedBlockingQueue instead of ConcurrentLinkedQueue.
+ // In some versions of Android, ConcurrentLinkedQueue is known to drop
+ // items, causing crashing. See https://github.com/laurent22/joplin/issues/8425
+ private final Queue<UIThreadOperation> mQueue = new LinkedBlockingQueue<>();
@Nullable private UIThreadOperation mPeekedOperation = null;
@AnyThread

View File

@@ -0,0 +1,27 @@
diff --git a/android/src/main/java/com/swmansion/reanimated/NodesManager.java b/android/src/main/java/com/swmansion/reanimated/NodesManager.java
index e974f8eb827a35be4d7e5fa9b096af9387c595dd..bc9e5ff566c9484274e8eacefc88327a5ff30def 100644
--- a/android/src/main/java/com/swmansion/reanimated/NodesManager.java
+++ b/android/src/main/java/com/swmansion/reanimated/NodesManager.java
@@ -34,7 +34,7 @@ import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -80,7 +80,12 @@ public class NodesManager implements EventDispatcherListener {
private ReactApplicationContext mReactApplicationContext;
private RCTEventEmitter mCustomEventHandler;
private List<OnAnimationFrame> mFrameCallbacks = new ArrayList<>();
- private ConcurrentLinkedQueue<CopiedEvent> mEventQueue = new ConcurrentLinkedQueue<>();
+
+ // Patch: On some versions of Android, ConcurrentLinkedQueue is known to
+ // drop items. LinkedBlockingQueue is a potentially-slower alternative that
+ // should not drop items.
+ // See https://github.com/laurent22/joplin/issues/8425
+ private LinkedBlockingQueue<CopiedEvent> mEventQueue = new LinkedBlockingQueue<>();
public double currentFrameTimeMs;
public Set<String> uiProps = Collections.emptySet();
public Set<String> nativeProps = Collections.emptySet();

View File

@@ -24,3 +24,9 @@ logFilters:
# eg "string.prototype.matchall@npm:4.0.8 can't be found in the cache and will be fetched from the remote registry"
- code: YN0013
level: discard
# To avoid the error "The remote archive doesn't match the expected checksum".
# Yarn offers no way to understand what the issue is when it happens, or what
# needs to be done so it's just security theater that we have no choice but to
# disable.
checksumBehavior: update

View File

@@ -11,11 +11,17 @@
--variationPrimary-VaraintDark: #072445;
--variationPrimary-VaraintWhite: #f8f9fa;
--variationPrimary-VaraintDarkGray: #212529;
--variationAccent-VaraintLightBlue: #d9e8f8;
--variationAccent-VaraintLightBlue: #F7FBFF;
}
* {
font-family: "Montserrat", sans-serif;
}
h2 {
border-bottom: none;
margin-bottom: 0;
margin-top: 0.7em;
}
#mobile_icon_logo{
display: none;
@@ -101,14 +107,15 @@
align-items: flex-start;
}
}
header .container nav h1.main-logo {
h1.main-logo {
font-weight: 600;
font-size: 48px;
color: var(--primary-White);
text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
color: var(--primary-DarkBlue);
margin: 0;
text-align: right;
border-bottom: 1px solid #ddd;
line-height: 1.3em;
padding-bottom: 0.5em;
}
@media screen and (max-width: 992px) {
header .container nav img {
@@ -207,7 +214,7 @@
font-weight: 700;
font-size: 40px;
color: var(--primary-DarkBlue);
margin-bottom: 45px;
/* margin-bottom: 45px; */
}
@media screen and (max-width: 767px) {
.joplin__logos h2.main-logo {
@@ -223,16 +230,20 @@
margin-bottom: 6px;
}
.joplin__logos > .wrapper {
padding: 42px 59px 48px 66px;
padding: 40px 0 45px 0;
margin: 40px 45px;
width: calc(100% - 6.5vw);
/* width: calc(100% - 6.5vw); */
border: 1px solid var(--variationPrimary-VaraintDarkGray);
border-radius: 5px;
margin-left: 0;
margin-right: 0;
}
@media screen and (max-width: 1440px) {
.joplin__logos > .wrapper {
padding: 40px 0 45px 0;
margin: 40px auto;
margin-left: 0;
margin-right: 0;
}
}
.joplin__logos .wrapper .para-1 {

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -1,4 +1,34 @@
<?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>Mon, 08 May 2023 00:00:00 GMT</lastBuildDate><atom:link href="https://joplinapp.org/rss.xml" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 May 2023 00:00:00 GMT</pubDate><item><title><![CDATA[What's new in Joplin 2.10]]></title><description><![CDATA[<p>Great news! Joplin 2.10 is here and we've made some amazing improvements and bug fixes, with a focus on the mobile app.</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>Mon, 08 May 2023 00:00:00 GMT</lastBuildDate><atom:link href="https://joplinapp.org/rss.xml" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 May 2023 00:00:00 GMT</pubDate><item><title><![CDATA[What's new in Joplin 2.11]]></title><description><![CDATA[<h2>Desktop<a name="desktop" href="#desktop" class="heading-anchor">🔗</a></h2>
<h3>Add support for plugin user data<a name="add-support-for-plugin-user-data" href="#add-support-for-plugin-user-data" class="heading-anchor">🔗</a></h3>
<p>Developers of plugins now have the ability to associate additional information with notes, notebooks, and tags. This data is then synchronized across multiple devices. For instance, it is possible to envision attaching OCR data to an image or incorporating plugin-specific parameters to a note, which can subsequently be synchronized across all devices.</p>
<h3>Improved end-to-end encryption<a name="improved-end-to-end-encryption" href="#improved-end-to-end-encryption" class="heading-anchor">🔗</a></h3>
<p>End-to-end encryption (E2EE) plays a vital role in safeguarding your data privacy. Our aim is to make it effortlessly user-friendly, seamlessly integrated, and possibly enabled by default.</p>
<p>To achieve this objective, we have implemented several enhancements in this version. These improvements encompass more streamlined management of encryption keys and simplified setup processes for both new and existing devices utilising end-to-end encryption.</p>
<p>Moreover, we have upgraded the encryption algorithm from AES-128 to AES-256, ensuring heightened security for your data in the long run.</p>
<h3>Export a Mermaid graph<a name="export-a-mermaid-graph" href="#export-a-mermaid-graph" class="heading-anchor">🔗</a></h3>
<p>There is now a context menu on Mermaid graphs which you can use to export your graph as PNG, SVG, or by copying the vector data to the clipboard.</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20230711-mermaid-export.png" alt=""></p>
<h3>Auto-detect language on startup<a name="auto-detect-language-on-startup" href="#auto-detect-language-on-startup" class="heading-anchor">🔗</a></h3>
<p>A small but useful change - the application language is now automatically detected startup. Of course, if needed you can later change it in the configuration screen.</p>
<h2>Android<a name="android" href="#android" class="heading-anchor">🔗</a></h2>
<p>As always most of these changes also apply to the mobile applications, such as the improved end-to-end encryption support, language auto-detection, and various bug fixes and improvements. But besides those, we also have several mobile-specific updates:</p>
<h3>Support for offline voice typing<a name="support-for-offline-voice-typing" href="#support-for-offline-voice-typing" class="heading-anchor">🔗</a></h3>
<p>The Android mobile app now support offline voice typing - it means your voice recording does not need to be uploaded to Google or Samsung server - it all takes place on your device for added security. To make use of it, open any note, tap on the three dots menu, then &quot;Voice typing&quot;.</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20230711-voice-typing-1.png" alt=""></p>
<p>The first time, the app will need to download the language files to your device:</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20230711-voice-typing-2.png" alt=""></p>
<p>Once they are there, simply record your message and it will appear in the note:</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20230711-voice-typing-3.png" alt=""></p>
<h3>Create and move sub-notebooks<a name="create-and-move-sub-notebooks" href="#create-and-move-sub-notebooks" class="heading-anchor">🔗</a></h3>
<p>@jcgurango implemented support for creating sub-notebooks, and moving notebooks around in the mobile app. To do so, long press on any notebook and press &quot;Edit&quot;. You can now choose to move it under any other notebook using the provided dropdown list.</p>
<h2>Full changelog<a name="full-changelog" href="#full-changelog" class="heading-anchor">🔗</a></h2>
<p>This is just an overview of the main features. The full changelog is available there:</p>
<ul>
<li>Desktop: <a href="https://joplinapp.org/changelog">https://joplinapp.org/changelog</a></li>
<li>Android: <a href="https://joplinapp.org/changelog_android">https://joplinapp.org/changelog_android</a></li>
<li>iOS: <a href="https://joplinapp.org/changelog_ios">https://joplinapp.org/changelog_ios</a></li>
</ul>
]]></description><link>https://joplinapp.org/news/20230508-release-2-11/</link><guid isPermaLink="false">20230508-release-2-11</guid><pubDate>Mon, 08 May 2023 00:00:00 GMT</pubDate><twitter-text>What&apos;s new in Joplin 2.11</twitter-text></item><item><title><![CDATA[What's new in Joplin 2.10]]></title><description><![CDATA[<p>Great news! Joplin 2.10 is here and we've made some amazing improvements and bug fixes, with a focus on the mobile app.</p>
<h1>New design for &quot;New note&quot; and &quot;New to-do&quot; buttons<a name="new-design-for-new-note-and-new-to-do-buttons" href="#new-design-for-new-note-and-new-to-do-buttons" class="heading-anchor">🔗</a></h1>
<p>We're excited to announce that we've made it even easier to create new notes and to-do lists with new designs for the &quot;New note&quot; and &quot;New to-do&quot; buttons.</p>
<p>If there is enough space, the button labels will be shown in full:</p>
@@ -304,13 +334,4 @@
<p>As always the mobile apps (to be released soon) benefit from several of the above changes since they share the same codebase as the desktop app.</p>
<p>Specific to the mobile version 2.5 are some improvements to the beta editor - in particular the layout has been cleaned up, and the first word of sentences is now automatically capitalised, which makes typing notes easier. If you haven't tried the beta editor yet, you can enable it from the Configuration screen.</p>
<p>The full changelog is available there: <a href="https://joplinapp.org/changelog/">https://joplinapp.org/changelog/</a></p>
]]></description><link>https://joplinapp.org/news/20211031-115215/</link><guid isPermaLink="false">20211031-115215</guid><pubDate>Sun, 31 Oct 2021 11:52:15 GMT</pubDate><twitter-text></twitter-text></item><item><title><![CDATA["Certificate has expired" error with Joplin Cloud, and workaround]]></title><description><![CDATA[<p>Some of you might be experiencing an error &quot;Certificate has expired&quot; when synchronising with Joplin Cloud (and possibly other services) when using the desktop application.</p>
<p>This is due to Let's Encrypt root certificate that expired on 30 September, and the new method they are using is not compatible with the Joplin desktop application.</p>
<p>This actually affects thousands of applications, not just Joplin, so various solutions are being considered right now and hopefully a fix will be available relatively soon.</p>
<p>For now, as a workaround, you can simply check &quot;<strong>Ignore TLS certificate errors</strong>&quot; in <strong>Configuration &gt; Synchronisation &gt; Advanced Options</strong></p>
<p>I will let you know as soon as a fix is available so that you can clear that option.</p>
<p>More info:</p>
<p>- <a href="https://community.letsencrypt.org/t/issues-with-electron-and-expired-root/160991">Issue with Electron and expired root</a> on Let's Encrypt</p>
<p>- <a href="https://github.com/electron/electron/issues/31212">Let's Encrypt root CA isn't working properly</a> on Electron GitHub repository</p>
<p><strong>Update:</strong> I have implemented a temporary fix on Joplin Cloud which should solve the issue for now. If you're still having some issues please let me know. An updated desktop app will be available later on with a more permanent fix.</p>
]]></description><link>https://joplinapp.org/news/20210930-163458/</link><guid isPermaLink="false">20210930-163458</guid><pubDate>Thu, 30 Sep 2021 16:34:58 GMT</pubDate><twitter-text></twitter-text></item></channel></rss>
]]></description><link>https://joplinapp.org/news/20211031-115215/</link><guid isPermaLink="false">20211031-115215</guid><pubDate>Sun, 31 Oct 2021 11:52:15 GMT</pubDate><twitter-text></twitter-text></item></channel></rss>

View File

@@ -1,6 +1,7 @@
<!-- Logos Section -->
<section class="joplin__logos">
<div class="container">
<h1 class="main-logo">Joplin brand guidelines</h1>
<h2 class="main-logo">Logos</h2>
<p class="joplin__para">
All the variations of Joplin logo are all front facing. <br />
@@ -14,10 +15,10 @@
<div class="row align-items-center justify-content-tablet-end gy-5 p-row">
<div class="col-xxl-4 col-xl-4 col-lg-6 col-md-6 col-sm-12">
<div class="box">
<h3 class="joplin__tagline1">Lockup logo</h2>
<h3 class="joplin__tagline1">Lockup logo</h3>
<p class="joplin__para">
Joplin lockup is the company's main logo. It is used for
corporate materials and marketing communications. To ensure
Joplin lockup is the main logo. It is used for
products and marketing communications. To ensure
sufficient contrast and readability, two following versions of
the lockup are provided.
</p>
@@ -56,7 +57,7 @@
<div class="row align-items-center gy-5 p-row justify-between">
<div class="col-xxl-6 col-xl-6 col-lg-12 col-md-12 col-sm-12">
<div class="box">
<h3 class="joplin__tagline1">Brandmark logo</h2>
<h3 class="joplin__tagline1">Brandmark logo</h3>
<div class="box-wrapper">
<img
src="{{imageBaseUrl}}/brand/J logo transparent background 1.png"
@@ -66,7 +67,7 @@
The classic brandmark icon is often used on a bright
background to help increase the contrast. It is a reduced
version of a logo which should be used in limited spacing or
when using a full company name is not necessary.
when using a full name is not necessary.
</p>
</div>
</div>
@@ -121,7 +122,6 @@
<div class="info">
<p class="joplin__para">Dark blue</p>
<p class="joplin__para">HEX - 043873</p>
<p class="joplin__para">RGB - 4, 56, 115</p>
</div>
</div>
<div class="circle-wrapper">
@@ -129,7 +129,6 @@
<div class="info">
<p class="joplin__para">White</p>
<p class="joplin__para">HEX - FFFFFF</p>
<p class="joplin__para">RGB - 255, 255,</p>
</div>
</div>
<div class="circle-wrapper">
@@ -137,7 +136,6 @@
<div class="info">
<p class="joplin__para">Dark gray</p>
<p class="joplin__para">HEX - 32363F</p>
<p class="joplin__para">RGB - 50, 54, 63</p>
</div>
</div>
</div>
@@ -151,7 +149,6 @@
<div class="info">
<p class="joplin__para">Light blue</p>
<p class="joplin__para">HEX - 4F9CF9</p>
<p class="joplin__para">RGB - 79, 156, 249</p>
</div>
</div>
<div class="circle-wrapper">
@@ -159,7 +156,6 @@
<div class="info">
<p class="joplin__para">Yellow</p>
<p class="joplin__para">HEX - FFE492</p>
<p class="joplin__para">RGB - 255, 228, 146</p>
</div>
</div>
</div>
@@ -180,7 +176,6 @@
<div class="info">
<p class="joplin__para">Variant dark</p>
<p class="joplin__para">HEX - 072445</p>
<p class="joplin__para">RGB - 7, 36, 69</p>
</div>
</div>
<div class="circle-wrapper">
@@ -188,7 +183,6 @@
<div class="info">
<p class="joplin__para">Variant white</p>
<p class="joplin__para">HEX - F8F9FA</p>
<p class="joplin__para">RGB - 248, 249,</p>
</div>
</div>
<div class="circle-wrapper">
@@ -196,7 +190,6 @@
<div class="info">
<p class="joplin__para">Variant dark gray</p>
<p class="joplin__para">HEX - 212529</p>
<p class="joplin__para">RGB - 33, 37, 41</p>
</div>
</div>
</div>
@@ -212,8 +205,7 @@
<div class="circle variant-light-blue"></div>
<div class="info">
<p class="joplin__para">Variant light blue</p>
<p class="joplin__para">HEX - D9E8F8</p>
<p class="joplin__para">RGB - 217, 232,</p>
<p class="joplin__para">HEX - F7FBFF</p>
</div>
</div>
</div>
@@ -250,10 +242,10 @@
<div class="box">
<h2>Imagery</h2>
<p class="joplin__para">
The company uses vector art illustration . It ensures high
We uses vector art illustration . It ensures high
quality images in any scale, large or small. All the
illustrations come from storyset.com and are personalised to
match the company's colours.
match the Joplin's colours.
</p>
</div>
<div class="box">
@@ -305,7 +297,7 @@
<b>genuine</b> in engaging with our users and Joplin community.
</p>
<p class="joplin__para">
As a company providing open-source product we stay
As an open-source project we stay
<b>open-minded</b> and <b>enthusiastic</b> about new ideas and
solutions. At the same time we continue to be
<b>professional</b> to honour the trust the users place in us.
@@ -327,13 +319,14 @@ const ctx = document.getElementById("chart1");
const myChart = new Chart(ctx, {
type: "pie",
data: {
labels: ["Dark blue 60%", "White 20%", "light blue 10%", "yellow 7%", "dark gray 3%"],
labels: ["Dark blue 40%", "Gray 20%", "White 20%", "Light blue 10%", "Yellow 7%", "Dark gray 3%"],
datasets: [
{
label: "# of Votes",
data: [60, 20, 10, 7, 3],
data: [40, 20, 20, 10, 7, 3],
backgroundColor: [
"#043873",
"#f7fbff",
"#ffffff",
"#4f9cf9",
"#ffe492",
@@ -344,6 +337,11 @@ const myChart = new Chart(ctx, {
},
options: {
layout: {},
elements: {
arc: {
borderColor: '#cccccc',
}
},
plugins: {
title: {
display: true,
@@ -360,13 +358,14 @@ const ctx2 = document.getElementById("chart2");
const myChart2 = new Chart(ctx2, {
type: "pie",
data: {
labels: ["White 60%", "Dark 20%", "light blue 10%", "dark gray 7%", "yellow 3%"],
labels: ["White 40%", "Gray 20%", "Dark blue 20%", "Light blue 10%", "Dark gray 7%", "Yellow 3%"],
datasets: [
{
label: "# of Votes",
data: [60, 20, 10, 7, 3],
data: [40, 20, 20, 10, 7, 3],
backgroundColor: [
"#ffffff",
"#f7fbff",
"#043873",
"#4f9cf9",
"#212529",
@@ -377,6 +376,11 @@ const myChart2 = new Chart(ctx2, {
},
options: {
layout: {},
elements: {
arc: {
borderColor: '#cccccc',
}
},
plugins: {
title: {
display: true,

View File

@@ -96,6 +96,8 @@
console.info('Creating Stripe session for price:', priceId, 'Promotion code:', promotionCode);
const source = localStorage.getItem('source');
return fetch("{{{stripeConfig.webhookBaseUrl}}}/stripe/createCheckoutSession", {
method: "POST",
headers: {
@@ -105,6 +107,7 @@
priceId,
promotionCode,
email: checkoutSessionUser ? checkoutSessionUser.email : '',
source,
})
}).then(async function(result) {
if (!result.ok) {

View File

@@ -38,7 +38,7 @@ The install and update script supports the [following flags](https://github.com/
Operating System | Download | Alt. Download
---|---|---
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeAndroid.png'/></a> | or download the APK file: [64-bit](https://objects.joplinusercontent.com/android-v2.9.8/joplin-v2.9.8.apk?source=JoplinWebsite&type=New) [32-bit](https://objects.joplinusercontent.com/android-v2.9.8/joplin-v2.9.8-32bit.apk?source=JoplinWebsite&type=New)
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeAndroid.png'/></a> | or download the [APK file](https://objects.joplinusercontent.com/v2.11.31/joplin-v2.11.31.apk?source=JoplinWebsite&type=New)
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeIOS.png'/></a> | -
## Terminal application
@@ -66,7 +66,7 @@ A community maintained list of these distributions can be found here: [Unofficia
# Sponsors
<!-- 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://www.hosting.de/nextcloud/?mtm_campaign=managed-nextcloud&amp;mtm_kwd=joplinapp&amp;mtm_source=joplinapp-webseite&amp;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://tranio.com/spain/"><img title="Property for sale in Spain" width="256" src="https://joplinapp.org/images/sponsors/TranioOverseasProperty.jpg"/></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&amp;mtm_kwd=joplinapp&amp;mtm_source=joplinapp-webseite&amp;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://tranio.com/spain/"><img title="Property for sale in Spain" width="256" src="https://joplinapp.org/images/sponsors/TranioOverseasProperty.jpg"/></a> <a href="https://citricsheep.com"><img title="Citric Sheep" width="256" src="https://joplinapp.org/images/sponsors/CitricSheep.png"/></a>
<!-- SPONSORS-ORG -->
* * *
@@ -75,11 +75,11 @@ A community maintained list of these distributions can be found here: [Unofficia
| | | | |
| :---: | :---: | :---: | :---: |
| <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/56287?s=96&v=4"/></br>[fats](https://github.com/fats) | <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/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/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/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/14873877?s=96&v=4"/></br>[dchecks](https://github.com/dchecks) | <img width="50" src="https://avatars2.githubusercontent.com/u/56287?s=96&v=4"/></br>[fats](https://github.com/fats) | <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/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/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/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) | | | |
<!-- SPONSORS-GITHUB -->
<!-- TOC -->
@@ -140,6 +140,7 @@ A community maintained list of these distributions can be found here: [Unofficia
- [Server: File URL Format](https://github.com/laurent22/joplin/blob/dev/readme/spec/server_file_url_format.md)
- [Server: Delta Sync](https://github.com/laurent22/joplin/blob/dev/readme/spec/server_delta_sync.md)
- [Server: Sharing](https://github.com/laurent22/joplin/blob/dev/readme/spec/server_sharing.md)
- [Read-only items](https://github.com/laurent22/joplin/blob/dev/readme/spec/read_only.md)
- Google Summer of Code 2022

View File

@@ -13,5 +13,6 @@ module.exports = {
'*.{js,jsx,ts,tsx}': [
'yarn run linter-precommit',
'yarn run checkLibPaths',
'node packages/tools/checkIgnoredFiles.js',
],
};

View File

@@ -81,8 +81,8 @@
"gulp": "4.0.2",
"husky": "3.1.0",
"lerna": "3.22.1",
"lint-staged": "13.2.2",
"madge": "6.0.0",
"lint-staged": "13.2.3",
"madge": "6.1.0",
"npm-package-json-lint": "6.4.0",
"typescript": "5.0.2"
},
@@ -90,7 +90,7 @@
"@types/fs-extra": "11.0.1",
"eslint-plugin-github": "4.8.0",
"http-server": "14.1.1",
"node-gyp": "9.3.1",
"node-gyp": "9.4.0",
"nodemon": "2.0.22"
},
"packageManager": "yarn@3.5.0",
@@ -98,6 +98,9 @@
"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",
"react-native-vosk@0.1.12": "patch:react-native-vosk@npm%3A0.1.12#./.yarn/patches/react-native-vosk-npm-0.1.12-76b1caaae8.patch",
"eslint@8.39.0": "patch:eslint@npm%3A8.39.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch",
"eslint@^8.13.0": "patch:eslint@npm%3A8.39.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch"
"eslint@^8.13.0": "patch:eslint@npm%3A8.39.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch",
"app-builder-lib@24.4.0": "patch:app-builder-lib@npm%3A24.4.0#./.yarn/patches/app-builder-lib-npm-24.4.0-05322ff057.patch",
"react-native@0.71.10": "patch:react-native@npm%3A0.71.10#./.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch",
"react-native-reanimated@3.3.0": "patch:react-native-reanimated@npm%3A3.3.0#./.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch"
}
}

View File

@@ -1,5 +1,5 @@
const MarkupToHtml = require('@joplin/renderer/MarkupToHtml').default;
import MarkupToHtml, { MarkupLanguage, RenderResult } from '@joplin/renderer/MarkupToHtml';
describe('MarkupToHtml', () => {
@@ -31,7 +31,7 @@ describe('MarkupToHtml', () => {
const input = t[0];
const expected = t[1];
const actual = service.stripMarkup(Number(markup), input);
expect(actual).toBe(expected, `Markup: ${markup}`);
expect(actual).toBe(expected);
}
}
@@ -40,4 +40,18 @@ describe('MarkupToHtml', () => {
expect(service.stripMarkup(1, 'one line\n two line', { collapseWhiteSpaces: true })).toBe('one line two line');
}));
test('should escape HTML in safe mode', async () => {
const service = new MarkupToHtml({ isSafeMode: true });
const testString = '</pre>.<b>Test</b>';
const expectedOutput: RenderResult = {
html: '<pre>&lt;/pre&gt;.&lt;b&gt;Test&lt;/b&gt;</pre>',
cssStrings: [],
pluginAssets: [],
};
expect(await service.render(MarkupLanguage.Html, testString, {}, {})).toMatchObject(expectedOutput);
expect(await service.render(MarkupLanguage.Markdown, testString, {}, {})).toMatchObject(expectedOutput);
});
});

View File

@@ -252,4 +252,41 @@ describe('MdToHtml', () => {
);
}
}));
it('should attach source blocks to block KaTeX', async () => {
const mdToHtml = newTestMdToHtml();
const katex = [
'3 + 3',
'\n\\int_0^1 x dx\n\n',
'\n\\int_0^1 x dx\n3 + 3\n',
'\n\t2^{3^4}\n\t3 + 3\n',
'3\n4',
];
const surroundingTextChoices = [
['', ''],
['Test', ''],
['Test', 'Test!'],
['Test\n\n', '\n\nTest!'],
];
const tests = [];
for (const texSource of katex) {
for (const [start, end] of surroundingTextChoices) {
tests.push([texSource, `${start}\n$$${texSource}$$\n${end}`]);
}
}
for (const [tex, input] of tests) {
const html = await mdToHtml.render(input, null, { bodyOnly: true });
const opening = '<pre class="joplin-source" data-joplin-language="katex" data-joplin-source-open="$$&#10;" data-joplin-source-close="&#10;$$&#10;">';
const closing = '</pre>';
// Remove any single leading and trailing newlines, those are included in data-joplin-source-open
// and data-joplin-source-close.
const trimmedTex = tex.replace(/^[\n]/, '').replace(/[\n]$/, '');
expect(html.html).toContain(opening + trimmedTex + closing);
}
});
});

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export4.dtd">
<en-export export-date="20230809T080314Z" application="Evernote" version="10.58.8">
<note>
<title>Here is a simple test</title>
<created>20230709T080219Z</created>
<updated>20230709T080302Z</updated>
<note-attributes>
</note-attributes>
<content>
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div>a</div><div><br/></div><div>b</div><div><br/></div><div>List 1</div><div style="--en-task-group:true; --en-id:9876cc26-ebd0-482d-bb36-603e2c0512d0;--en-content-hash:7e7703c4ce2d1805937a6024e5f7b426;-webkit-user-modify:read-only;-moz-user-modify:read-only;user-modify:read-only;border-radius:3px;border:1px solid rgba(182,182,182,0.09);background:rgba(174,174,174,0.09);overflow:hidden;color:#868686"><div style="background:rgba(182,182,182,0.09) no-repeat 6px 6px url(&quot;data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzg2ODY4NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5LjcyNTEgMjBDMjAuMTgxIDIwIDIwLjYwMTEgMTkuNzU2IDIwLjgyOSAxOS4zNkMyMS4wNTcgMTguOTY0IDIxLjA1NyAxOC40NzYgMjAuODI5IDE4LjA4TDEzLjEwMzEgNC42Mzk5OUMxMi44NzYgNC4yNDM5OSAxMi40NTUxIDQgMTIgNEMxMS41NDQ5IDQgMTEuMTI0IDQuMjQzOTkgMTAuODk2MSA0LjYzOTk5TDMuMTcwOTggMTguMDhDMi45NDMwMSAxOC40NzYgMi45NDMwMSAxOC45NjQgMy4xNzA5OCAxOS4zNkMzLjM5ODEgMTkuNzU2IDMuODE4OTMgMjAgNC4yNzQwOCAyMEgxOS43MjUxWk00Ljg2NDg5IDE4LjRMMTIgNS45ODc5OEwxOS4xMzUxIDE4LjRINC44NjQ4OVoiLz4KPHBhdGggZD0iTTEyLjc1IDEwLjU3NTJDMTIuNzUgMTAuMTYxIDEyLjQxNDIgOS44MjUyMyAxMiA5LjgyNTIzQzExLjU4NTggOS44MjUyMyAxMS4yNSAxMC4xNjEgMTEuMjUgMTAuNTc1MlYxMy4yOTc5QzExLjI1IDEzLjcxMjEgMTEuNTg1OCAxNC4wNDc5IDEyIDE0LjA0NzlDMTIuNDE0MiAxNC4wNDc5IDEyLjc1IDEzLjcxMjEgMTIuNzUgMTMuMjk3OVYxMC41NzUyWiIvPgo8cGF0aCBkPSJNMTIuODc1IDE1Ljk1MTFDMTIuODc1IDE2LjQzNDQgMTIuNDgzMiAxNi44MjYxIDEyIDE2LjgyNjFDMTEuNTE2OCAxNi44MjYxIDExLjEyNSAxNi40MzQ0IDExLjEyNSAxNS45NTExQzExLjEyNSAxNS40Njc5IDExLjUxNjggMTUuMDc2MSAxMiAxNS4wNzYxQzEyLjQ4MzIgMTUuMDc2MSAxMi44NzUgMTUuNDY3OSAxMi44NzUgMTUuOTUxMVoiLz4KPC9zdmc+Cg==&quot;);padding:8px 38px;font-weight:600">Content not supported</div><div style="padding:2px 6px;margin: 1em">This block is a placeholder for Tasks, which has been officially released on the newest version of Evernote and is no longer supported on this version. Deleting or moving this block may cause unexpected behavior in newer versions of Evernote.</div></div><div>List 2</div><div style="--en-task-group:true; --en-id:b89e9766-5afc-47b8-9c54-e42962d69421;--en-content-hash:85f6897ebdd0d3d12ba8fcc3ce6b8e56;-webkit-user-modify:read-only;-moz-user-modify:read-only;user-modify:read-only;border-radius:3px;border:1px solid rgba(182,182,182,0.09);background:rgba(174,174,174,0.09);overflow:hidden;color:#868686"><div style="background:rgba(182,182,182,0.09) no-repeat 6px 6px url(&quot;data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzg2ODY4NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5LjcyNTEgMjBDMjAuMTgxIDIwIDIwLjYwMTEgMTkuNzU2IDIwLjgyOSAxOS4zNkMyMS4wNTcgMTguOTY0IDIxLjA1NyAxOC40NzYgMjAuODI5IDE4LjA4TDEzLjEwMzEgNC42Mzk5OUMxMi44NzYgNC4yNDM5OSAxMi40NTUxIDQgMTIgNEMxMS41NDQ5IDQgMTEuMTI0IDQuMjQzOTkgMTAuODk2MSA0LjYzOTk5TDMuMTcwOTggMTguMDhDMi45NDMwMSAxOC40NzYgMi45NDMwMSAxOC45NjQgMy4xNzA5OCAxOS4zNkMzLjM5ODEgMTkuNzU2IDMuODE4OTMgMjAgNC4yNzQwOCAyMEgxOS43MjUxWk00Ljg2NDg5IDE4LjRMMTIgNS45ODc5OEwxOS4xMzUxIDE4LjRINC44NjQ4OVoiLz4KPHBhdGggZD0iTTEyLjc1IDEwLjU3NTJDMTIuNzUgMTAuMTYxIDEyLjQxNDIgOS44MjUyMyAxMiA5LjgyNTIzQzExLjU4NTggOS44MjUyMyAxMS4yNSAxMC4xNjEgMTEuMjUgMTAuNTc1MlYxMy4yOTc5QzExLjI1IDEzLjcxMjEgMTEuNTg1OCAxNC4wNDc5IDEyIDE0LjA0NzlDMTIuNDE0MiAxNC4wNDc5IDEyLjc1IDEzLjcxMjEgMTIuNzUgMTMuMjk3OVYxMC41NzUyWiIvPgo8cGF0aCBkPSJNMTIuODc1IDE1Ljk1MTFDMTIuODc1IDE2LjQzNDQgMTIuNDgzMiAxNi44MjYxIDEyIDE2LjgyNjFDMTEuNTE2OCAxNi44MjYxIDExLjEyNSAxNi40MzQ0IDExLjEyNSAxNS45NTExQzExLjEyNSAxNS40Njc5IDExLjUxNjggMTUuMDc2MSAxMiAxNS4wNzYxQzEyLjQ4MzIgMTUuMDc2MSAxMi44NzUgMTUuNDY3OSAxMi44NzUgMTUuOTUxMVoiLz4KPC9zdmc+Cg==&quot;);padding:8px 38px;font-weight:600">Content not supported</div><div style="padding:2px 6px;margin: 1em">This block is a placeholder for Tasks, which has been officially released on the newest version of Evernote and is no longer supported on this version. Deleting or moving this block may cause unexpected behavior in newer versions of Evernote.</div></div></en-note> ]]>
</content>
<task>
<title>Clara</title>
<created>20230709T080237Z</created>
<updated>20230709T080300Z</updated>
<taskStatus>completed</taskStatus>
<taskFlag>false</taskFlag>
<sortWeight>J</sortWeight>
<noteLevelID>7ab2b90f-4aed-405f-8541-cb56132a2e1a</noteLevelID>
<taskGroupNoteLevelID>9876cc26-ebd0-482d-bb36-603e2c0512d0</taskGroupNoteLevelID>
<dueDate>2757600913T000000Z</dueDate>
<statusUpdated>20230709T080237Z</statusUpdated>
<creator>73671305</creator>
<lastEditor>73671305</lastEditor>
</task>
<task>
<title>Bob</title>
<created>20230709T080237Z</created>
<updated>20230709T080250Z</updated>
<taskStatus>open</taskStatus>
<taskFlag>false</taskFlag>
<sortWeight>B</sortWeight>
<noteLevelID>98185f99-1779-4af3-988b-4af054a2c8c0</noteLevelID>
<taskGroupNoteLevelID>9876cc26-ebd0-482d-bb36-603e2c0512d0</taskGroupNoteLevelID>
<dueDate>2757600913T000000Z</dueDate>
<statusUpdated>20230709T080237Z</statusUpdated>
<creator>73671305</creator>
<lastEditor>73671305</lastEditor>
</task>
<task>
<title>Jeff</title>
<created>20230709T080300Z</created>
<updated>20230709T080302Z</updated>
<taskStatus>open</taskStatus>
<taskFlag>false</taskFlag>
<sortWeight>B</sortWeight>
<noteLevelID>8458b06b-0007-4c3d-b61b-87abe15f55b8</noteLevelID>
<taskGroupNoteLevelID>b89e9766-5afc-47b8-9c54-e42962d69421</taskGroupNoteLevelID>
<dueDate>2757600913T000000Z</dueDate>
<statusUpdated>20230709T080300Z</statusUpdated>
<creator>73671305</creator>
<lastEditor>73671305</lastEditor>
</task>
</note>
</en-export>

View File

@@ -0,0 +1,12 @@
a
b
List 1
- [x] Clara
- [ ] Bob
List 2
- [ ] Jeff

View File

@@ -0,0 +1,17 @@
<en-note>
<div>a</div>
<div><br/></div>
<div>b</div>
<div><br/></div>
<div>List 1</div>
<div style="--en-task-group:true; --en-id:9876cc26-ebd0-482d-bb36-603e2c0512d0;--en-content-hash:7e7703c4ce2d1805937a6024e5f7b426;-webkit-user-modify:read-only;-moz-user-modify:read-only;user-modify:read-only;border-radius:3px;border:1px solid rgba(182,182,182,0.09);background:rgba(174,174,174,0.09);overflow:hidden;color:#868686">
<div style="background:rgba(182,182,182,0.09) no-repeat 6px 6px url(&quot;data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzg2ODY4NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5LjcyNTEgMjBDMjAuMTgxIDIwIDIwLjYwMTEgMTkuNzU2IDIwLjgyOSAxOS4zNkMyMS4wNTcgMTguOTY0IDIxLjA1NyAxOC40NzYgMjAuODI5IDE4LjA4TDEzLjEwMzEgNC42Mzk5OUMxMi44NzYgNC4yNDM5OSAxMi40NTUxIDQgMTIgNEMxMS41NDQ5IDQgMTEuMTI0IDQuMjQzOTkgMTAuODk2MSA0LjYzOTk5TDMuMTcwOTggMTguMDhDMi45NDMwMSAxOC40NzYgMi45NDMwMSAxOC45NjQgMy4xNzA5OCAxOS4zNkMzLjM5ODEgMTkuNzU2IDMuODE4OTMgMjAgNC4yNzQwOCAyMEgxOS43MjUxWk00Ljg2NDg5IDE4LjRMMTIgNS45ODc5OEwxOS4xMzUxIDE4LjRINC44NjQ4OVoiLz4KPHBhdGggZD0iTTEyLjc1IDEwLjU3NTJDMTIuNzUgMTAuMTYxIDEyLjQxNDIgOS44MjUyMyAxMiA5LjgyNTIzQzExLjU4NTggOS44MjUyMyAxMS4yNSAxMC4xNjEgMTEuMjUgMTAuNTc1MlYxMy4yOTc5QzExLjI1IDEzLjcxMjEgMTEuNTg1OCAxNC4wNDc5IDEyIDE0LjA0NzlDMTIuNDE0MiAxNC4wNDc5IDEyLjc1IDEzLjcxMjEgMTIuNzUgMTMuMjk3OVYxMC41NzUyWiIvPgo8cGF0aCBkPSJNMTIuODc1IDE1Ljk1MTFDMTIuODc1IDE2LjQzNDQgMTIuNDgzMiAxNi44MjYxIDEyIDE2LjgyNjFDMTEuNTE2OCAxNi44MjYxIDExLjEyNSAxNi40MzQ0IDExLjEyNSAxNS45NTExQzExLjEyNSAxNS40Njc5IDExLjUxNjggMTUuMDc2MSAxMiAxNS4wNzYxQzEyLjQ4MzIgMTUuMDc2MSAxMi44NzUgMTUuNDY3OSAxMi44NzUgMTUuOTUxMVoiLz4KPC9zdmc+Cg==&quot;);padding:8px 38px;font-weight:600">Content not supported</div>
<div style="padding:2px 6px;margin: 1em">This block is a placeholder for Tasks, which has been officially released on the newest version of Evernote and is no longer supported on this version. Deleting or moving this block may cause unexpected behavior in newer versions of Evernote.</div>
</div>
<div>List 2</div>
<div style="--en-task-group:true; --en-id:b89e9766-5afc-47b8-9c54-e42962d69421;--en-content-hash:85f6897ebdd0d3d12ba8fcc3ce6b8e56;-webkit-user-modify:read-only;-moz-user-modify:read-only;user-modify:read-only;border-radius:3px;border:1px solid rgba(182,182,182,0.09);background:rgba(174,174,174,0.09);overflow:hidden;color:#868686">
<div style="background:rgba(182,182,182,0.09) no-repeat 6px 6px url(&quot;data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzg2ODY4NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5LjcyNTEgMjBDMjAuMTgxIDIwIDIwLjYwMTEgMTkuNzU2IDIwLjgyOSAxOS4zNkMyMS4wNTcgMTguOTY0IDIxLjA1NyAxOC40NzYgMjAuODI5IDE4LjA4TDEzLjEwMzEgNC42Mzk5OUMxMi44NzYgNC4yNDM5OSAxMi40NTUxIDQgMTIgNEMxMS41NDQ5IDQgMTEuMTI0IDQuMjQzOTkgMTAuODk2MSA0LjYzOTk5TDMuMTcwOTggMTguMDhDMi45NDMwMSAxOC40NzYgMi45NDMwMSAxOC45NjQgMy4xNzA5OCAxOS4zNkMzLjM5ODEgMTkuNzU2IDMuODE4OTMgMjAgNC4yNzQwOCAyMEgxOS43MjUxWk00Ljg2NDg5IDE4LjRMMTIgNS45ODc5OEwxOS4xMzUxIDE4LjRINC44NjQ4OVoiLz4KPHBhdGggZD0iTTEyLjc1IDEwLjU3NTJDMTIuNzUgMTAuMTYxIDEyLjQxNDIgOS44MjUyMyAxMiA5LjgyNTIzQzExLjU4NTggOS44MjUyMyAxMS4yNSAxMC4xNjEgMTEuMjUgMTAuNTc1MlYxMy4yOTc5QzExLjI1IDEzLjcxMjEgMTEuNTg1OCAxNC4wNDc5IDEyIDE0LjA0NzlDMTIuNDE0MiAxNC4wNDc5IDEyLjc1IDEzLjcxMjEgMTIuNzUgMTMuMjk3OVYxMC41NzUyWiIvPgo8cGF0aCBkPSJNMTIuODc1IDE1Ljk1MTFDMTIuODc1IDE2LjQzNDQgMTIuNDgzMiAxNi44MjYxIDEyIDE2LjgyNjFDMTEuNTE2OCAxNi44MjYxIDExLjEyNSAxNi40MzQ0IDExLjEyNSAxNS45NTExQzExLjEyNSAxNS40Njc5IDExLjUxNjggMTUuMDc2MSAxMiAxNS4wNzYxQzEyLjQ4MzIgMTUuMDc2MSAxMi44NzUgMTUuNDY3OSAxMi44NzUgMTUuOTUxMVoiLz4KPC9zdmc+Cg==&quot;);padding:8px 38px;font-weight:600">Content not supported</div>
<div style="padding:2px 6px;margin: 1em">This block is a placeholder for Tasks, which has been officially released on the newest version of Evernote and is no longer supported on this version. Deleting or moving this block may cause unexpected behavior in newer versions of Evernote.</div>
</div>
</en-note>

View File

@@ -0,0 +1 @@
<p><b>&nbsp; &nbsp;A test...&nbsp;</b>Test</p>

View File

@@ -0,0 +1 @@
&nbsp;  **A test...** Test

View File

@@ -0,0 +1,10 @@
<h1>Linebreaks</h1>
<div>&lt;br&gt;-style linebreaks should be replaced with two spaces followed by a
newline.<br/>This allows the generated mark<br/>down to render to equivalent HTML
even if the <code>markdown.plugin.softbreaks</code> setting is enabled.</div>
<pre class="some-code" style="font-family:monospace;">&lt;br&gt;s shouldn't<br/>lead<br/>to trailing spaces in
code
however.
</pre>
<p>Because it isn't</p>
<div>necessary.<br/><br/><br/><br/>...</div>

View File

@@ -0,0 +1,21 @@
# Linebreaks
&lt;br&gt;-style linebreaks should be replaced with two spaces followed by a newline.
This allows the generated mark
down to render to equivalent HTML even if the `markdown.plugin.softbreaks` setting is enabled.
```
<br>s shouldn't
lead
to trailing spaces in
code
however.
```
Because it isn't
necessary.
...

View File

@@ -1 +1 @@
Some pictures: ![](https://static2.cbrimages.com/wp-content/uploads/2018/09/Die-01-cvrA.jpg?q=35&w=588&h=900&fit=crop&dpr=1.5) ![](http://example.com/test.gif)
Some pictures: ![](https://static2.cbrimages.com/wp-content/uploads/2018/09/Die-01-cvrA.jpg?q=35&w=588&h=900&fit=crop&dpr=1.5)![](http://example.com/test.gif)

View File

@@ -5,5 +5,6 @@
| [Source](https://github.com/nim-lang/nim) | The github project |
| [nimble](https://github.com/nim-lang/nimble) | The nim package manager |
| [choosenim](https://github.com/dom96/choosenim) | Toolchain installer |
| | |
| **Community** | |
| [Forums](https://forum.nim-lang.org) | An async discussion board |

View File

@@ -1 +1 @@
<map name="test" class="jop-noMdConv"><area coords="0,0,1000,1000" href="#" class="jop-noMdConv"/></map><img usemap="#test" src="https://github.com/Ry0taK.png" class="jop-noMdConv"/>
<img usemap="#test" src="https://github.com/Ry0taK.png" class="jop-noMdConv"/>

View File

@@ -100,7 +100,10 @@ export default class ElectronAppWrapper {
webviewTag: true,
// We start with a hidden window, which is then made visible depending on the showTrayIcon setting
// https://github.com/laurent22/joplin/issues/2031
show: debugEarlyBugs,
//
// On Linux/GNOME, however, the window doesn't show correctly if show is false initially:
// https://github.com/laurent22/joplin/issues/8256
show: debugEarlyBugs || shim.isGNOME(),
};
// Linux icon workaround for bug https://github.com/electron-userland/electron-builder/issues/2098

View File

@@ -1,7 +1,8 @@
import InteropService from '@joplin/lib/services/interop/InteropService';
import CommandService from '@joplin/lib/services/CommandService';
import shim from '@joplin/lib/shim';
import { ExportOptions, FileSystemItem, Module } from '@joplin/lib/services/interop/types';
import { ExportOptions, FileSystemItem } from '@joplin/lib/services/interop/types';
import { ExportModule } from '@joplin/lib/services/interop/Module';
import { _ } from '@joplin/lib/locale';
import { PluginStates } from '@joplin/lib/services/plugins/reducer';
@@ -152,7 +153,7 @@ export default class InteropServiceHelper {
}
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public static async export(_dispatch: Function, module: Module, options: ExportNoteOptions = null) {
public static async export(_dispatch: Function, module: ExportModule, options: ExportNoteOptions = null) {
if (!options) options = {};
let path = null;

View File

@@ -66,7 +66,7 @@ import syncDebugLog from '@joplin/lib/services/synchronizer/syncDebugLog';
import eventManager from '@joplin/lib/eventManager';
import path = require('path');
import { checkPreInstalledDefaultPlugins, installDefaultPlugins, setSettingsForDefaultPlugins } from '@joplin/lib/services/plugins/defaultPlugins/defaultPluginsUtils';
// import { runIntegrationTests } from '@joplin/lib/services/e2ee/ppkTestUtils';
import userFetcher, { initializeUserFetcher } from '@joplin/lib/utils/userFetcher';
const pluginClasses = [
require('./plugins/GotoAnything').default,
@@ -487,6 +487,9 @@ class Application extends BaseApplication {
shim.setInterval(() => { runAutoUpdateCheck(); }, 12 * 60 * 60 * 1000);
}
initializeUserFetcher();
shim.setInterval(() => { void userFetcher(); }, 1000 * 60 * 60);
this.updateTray();
shim.setTimeout(() => {
@@ -494,7 +497,7 @@ class Application extends BaseApplication {
}, 1000 * 60 * 60);
if (Setting.value('startMinimized') && Setting.value('showTrayIcon')) {
// Keep it hidden
bridge().window().hide();
} else {
bridge().window().show();
}

View File

@@ -3,8 +3,8 @@ import Logger from '@joplin/lib/Logger';
import { _ } from '@joplin/lib/locale';
import bridge from './services/bridge';
import KvStore from '@joplin/lib/services/KvStore';
const { fileExtension } = require('@joplin/lib/path-utils');
import * as ArrayUtils from '@joplin/lib/ArrayUtils';
import { CheckForUpdateOptions, extractVersionInfo, GitHubRelease } from './utils/checkForUpdatesUtils';
const packageInfo = require('./packageInfo.js');
const compareVersions = require('compare-versions');
@@ -13,10 +13,6 @@ const logger = Logger.create('checkForUpdates');
let checkInBackground_ = false;
let isCheckingForUpdate_ = false;
interface CheckForUpdateOptions {
includePreReleases?: boolean;
}
function onCheckStarted() {
logger.info('Starting...');
isCheckingForUpdate_ = true;
@@ -27,15 +23,7 @@ function onCheckEnded() {
isCheckingForUpdate_ = false;
}
function getMajorMinorTagName(tagName: string) {
const s = tagName.split('.');
s.pop();
return s.join('.');
}
async function fetchLatestRelease(options: CheckForUpdateOptions) {
options = { includePreReleases: false, ...options };
async function fetchLatestRelease() {
const response = await shim.fetch('https://api.github.com/repos/laurent22/joplin/releases');
if (!response.ok) {
@@ -43,89 +31,7 @@ async function fetchLatestRelease(options: CheckForUpdateOptions) {
throw new Error(`Cannot get latest release info: ${responseText.substr(0, 500)}`);
}
const releases = await response.json();
if (!releases.length) throw new Error('Cannot get latest release info (JSON)');
let release = null;
if (options.includePreReleases) {
release = releases[0];
} else {
for (const r of releases) {
if (!r.prerelease) {
release = r;
break;
}
}
}
if (!release) throw new Error('Could not get tag name');
const version = release.tag_name.substr(1);
// We concatenate all the release notes of the major/minor versions
// corresponding to the latest version. For example, if the latest version
// is 1.8.3, we concatenate all the 1.8.x versions. This is so that no
// matter from which version you upgrade, you always see the full changes,
// with the latest changes being on top.
const fullReleaseNotes = [];
const majorMinorTagName = getMajorMinorTagName(release.tag_name);
for (const release of releases) {
if (getMajorMinorTagName(release.tag_name) === majorMinorTagName) {
fullReleaseNotes.push(release.body.trim());
}
}
let downloadUrl = null;
const platform = process.platform;
for (let i = 0; i < release.assets.length; i++) {
const asset = release.assets[i];
let found = false;
const ext = fileExtension(asset.name);
if (platform === 'win32' && ext === 'exe') {
if (shim.isPortable()) {
found = asset.name === 'JoplinPortable.exe';
} else {
found = !!asset.name.match(/^Joplin-Setup-[\d.]+\.exe$/);
}
} else if (platform === 'darwin' && ext === 'dmg') {
found = true;
} else if (platform === 'linux' && ext === '.AppImage') {
found = true;
}
if (found) {
downloadUrl = asset.browser_download_url.replace('github.com/laurent22/joplin/releases/download', 'objects.joplinusercontent.com');
downloadUrl.concat('?source=DesktopApp&type=Update');
break;
}
}
function cleanUpReleaseNotes(releaseNotes: string[]) {
const lines = releaseNotes.join('\n\n* * *\n\n').split('\n');
const output = [];
for (const line of lines) {
const r = line
.replace(/\(#.* by .*\)/g, '') // Removes issue numbers and names - (#3157 by [@user](https://github.com/user))
.replace(/\([0-9a-z]{7}\)/g, '') // Removes commits - "sync state or data (a6caa35)"
.replace(/\(#[0-9]+\)/g, '') // Removes issue numbers - "(#4727)"
.replace(/ {2}/g, ' ')
.trim();
output.push(r);
}
return output.join('\n');
}
return {
version: version,
downloadUrl: downloadUrl,
notes: cleanUpReleaseNotes(fullReleaseNotes),
pageUrl: release.html_url,
prerelease: release.prerelease,
};
return (await response.json()) as GitHubRelease[];
}
function truncateText(text: string, length: number) {
@@ -170,7 +76,8 @@ export default async function checkForUpdates(inBackground: boolean, parentWindo
logger.info(`Checking with options ${JSON.stringify(options)}`);
try {
const release = await fetchLatestRelease(options);
const releases = await fetchLatestRelease();
const release = extractVersionInfo(releases, process.platform, options);
logger.info(`Current version: ${packageInfo.version}`);
logger.info(`Latest version: ${release.version}`);

View File

@@ -23,6 +23,6 @@ export const runtime = (): CommandRuntime => {
bridge().showErrorMessageBox(_('Error opening note in editor: %s', error.message));
}
},
enabledCondition: 'oneNoteSelected',
enabledCondition: 'oneNoteSelected && !noteIsReadOnly',
};
};

View File

@@ -15,6 +15,6 @@ export const runtime = (): CommandRuntime => {
noteId = noteId || stateUtils.selectedNoteId(context.state);
void ExternalEditWatcher.instance().stopWatching(noteId);
},
enabledCondition: 'oneNoteSelected',
enabledCondition: 'oneNoteSelected && !noteIsReadOnly',
};
};

View File

@@ -2,6 +2,7 @@ import CommandService, { CommandRuntime, CommandDeclaration } from '@joplin/lib/
import { _ } from '@joplin/lib/locale';
import { stateUtils } from '@joplin/lib/reducer';
import { DesktopCommandContext } from '../services/commands/types';
import { enabledCondition } from '../gui/NoteEditor/editorCommandDeclarations';
export const declaration: CommandDeclaration = {
name: 'toggleExternalEditing',
@@ -22,7 +23,7 @@ export const runtime = (): CommandRuntime => {
void CommandService.instance().execute('startExternalEditing', noteId);
}
},
enabledCondition: 'oneNoteSelected',
enabledCondition: enabledCondition(declaration.name),
mapStateToTitle: (state: any) => {
const noteId = stateUtils.selectedNoteId(state);
return state.watchedNoteFiles.includes(noteId) ? _('Stop') : '';

View File

@@ -18,6 +18,7 @@ import restart from '../../services/restart';
import PluginService from '@joplin/lib/services/plugins/PluginService';
import { getDefaultPluginsInstallState, updateDefaultPluginsInstallState } from '@joplin/lib/services/plugins/defaultPlugins/defaultPluginsUtils';
import getDefaultPluginsInfo from '@joplin/lib/services/plugins/defaultPlugins/desktopDefaultPluginsInfo';
import JoplinCloudConfigScreen from '../JoplinCloudConfigScreen';
const { KeymapConfigScreen } = require('../KeymapConfig/KeymapConfigScreen');
const settingKeyToControl: any = {
@@ -106,6 +107,7 @@ class ConfigScreenComponent extends React.Component<any, any> {
if (screenName === 'encryption') return <EncryptionConfigScreen/>;
if (screenName === 'server') return <ClipperConfigScreen themeId={this.props.themeId}/>;
if (screenName === 'keymap') return <KeymapConfigScreen themeId={this.props.themeId}/>;
if (screenName === 'joplinCloud') return <JoplinCloudConfigScreen />;
throw new Error(`Invalid screen name: ${screenName}`);
}

View File

@@ -0,0 +1,53 @@
import * as React from 'react';
import { useMemo, useCallback } from 'react';
export type DropdownOptions = Record<string, string>;
export enum DropdownVariant {
Default = 1,
NoBorder,
}
export interface ChangeEvent {
value: string;
}
export type ChangeEventHandler = (event: ChangeEvent)=> void;
interface Props {
options: DropdownOptions;
variant?: DropdownVariant;
className?: string;
onChange?: ChangeEventHandler;
value?: string;
disabled?: boolean;
}
export const Dropdown = (props: Props) => {
const renderOptions = () => {
const optionComps = [];
for (const [value, label] of Object.entries(props.options)) {
optionComps.push(<option key={value} value={value}>{label}</option>);
}
return optionComps;
};
const onChange = useCallback((event: any) => {
props.onChange({ value: event.target.value });
}, [props.onChange]);
const classNames = useMemo(() => {
const variant = props.variant || DropdownVariant.Default;
const output = [
'dropdown-control',
`-variant${variant}`,
];
if (props.className) output.push(props.className);
return output.join(' ');
}, [props.variant, props.className]);
return (
<select disabled={props.disabled} className={classNames} onChange={onChange} value={props.value}>
{renderOptions()}
</select>
);
};

View File

@@ -0,0 +1,14 @@
.dropdown-control {
border: 1px solid var(--joplin-border-color4);
border-radius: 3px;
font-size: var(--joplin-font-size)px;
color: var(--joplin-color);
padding: 0 8px;
box-sizing: border-box;
background-color: var(--joplin-background-color4);
min-height: 26px;
&.-variant2 {
border: none;
}
}

View File

@@ -63,6 +63,8 @@ export default function(props: Props) {
const folder: FolderEntity = {
title: folderTitle,
icon: Folder.serializeIcon(folderIcon),
is_shared: 0,
share_id: '',
};
if (!isNew) folder.id = props.folderId;

View File

@@ -0,0 +1,3 @@
.inbox-email-value {
font-weight: bold;
}

View File

@@ -0,0 +1,32 @@
const { connect } = require('react-redux');
import { AppState } from '../app.reducer';
import { _ } from '@joplin/lib/locale';
import { clipboard } from 'electron';
import Button from './Button/Button';
type JoplinCloudConfigScreenProps = {
inboxEmail: string;
};
const JoplinCloudConfigScreen = (props: JoplinCloudConfigScreenProps) => {
const copyToClipboard = () => {
clipboard.writeText(props.inboxEmail);
};
return (
<div>
<h2>{_('Email to note')}</h2>
<p>{_('Any email sent to this address will be converted into a note and added to your collection. The note will be saved into the Inbox notebook')}</p>
<p className='inbox-email-value'>{props.inboxEmail}</p>
<Button onClick={copyToClipboard} title={_('Copy to clipboard')} />
</div>
);
};
const mapStateToProps = (state: AppState) => {
return {
inboxEmail: state.settings['sync.10.inboxEmail'],
};
};
export default connect(mapStateToProps)(JoplinCloudConfigScreen);

View File

@@ -0,0 +1,32 @@
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
import { _ } from '@joplin/lib/locale';
import bridge from '../../../services/bridge';
import Folder from '@joplin/lib/models/Folder';
const { substrWithEllipsis } = require('@joplin/lib/string-utils');
export const declaration: CommandDeclaration = {
name: 'deleteFolder',
label: () => _('Delete notebook'),
};
export const runtime = (): CommandRuntime => {
return {
execute: async (context: CommandContext, folderId: string = null) => {
if (folderId === null) folderId = context.state.selectedFolderId;
const folder = await Folder.load(folderId);
if (!folder) throw new Error(`No such folder: ${folderId}`);
let deleteMessage = _('Delete notebook "%s"?\n\nAll notes and sub-notebooks within this notebook will also be deleted.', substrWithEllipsis(folder.title, 0, 32));
if (folderId === context.state.settings['sync.10.inboxId']) {
deleteMessage = _('Delete the Inbox notebook?\n\nIf you delete the inbox notebook, any email that\'s recently been sent to it may be lost.');
}
const ok = bridge().showConfirmMessageBox(deleteMessage);
if (!ok) return;
await Folder.delete(folderId);
},
enabledCondition: '!folderIsReadOnly',
};
};

View File

@@ -0,0 +1,32 @@
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
import { _ } from '@joplin/lib/locale';
import Note from '@joplin/lib/models/Note';
import bridge from '../../../services/bridge';
export const declaration: CommandDeclaration = {
name: 'deleteNote',
label: () => _('Delete note'),
iconName: 'fa-times',
};
export const runtime = (): CommandRuntime => {
return {
execute: async (context: CommandContext, noteIds: string[] = null) => {
if (noteIds === null) noteIds = context.state.selectedNoteIds;
if (!noteIds.length) return;
const msg = await Note.deleteMessage(noteIds);
if (!msg) return;
const ok = bridge().showConfirmMessageBox(msg, {
buttons: [_('Delete'), _('Cancel')],
defaultId: 1,
});
if (!ok) return;
await Note.batchDelete(noteIds);
},
enabledCondition: '!noteIsReadOnly',
};
};

View File

@@ -0,0 +1,24 @@
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
import { _ } from '@joplin/lib/locale';
import Note from '@joplin/lib/models/Note';
export const declaration: CommandDeclaration = {
name: 'duplicateNote',
label: () => _('Duplicate'),
};
export const runtime = (): CommandRuntime => {
return {
execute: async (context: CommandContext, noteIds: string[] = null) => {
if (noteIds === null) noteIds = context.state.selectedNoteIds;
for (let i = 0; i < noteIds.length; i++) {
const note = await Note.load(noteIds[i]);
await Note.duplicate(noteIds[i], {
uniqueTitle: _('%s - Copy', note.title),
});
}
},
enabledCondition: '!noteIsReadOnly',
};
};

View File

@@ -1,6 +1,9 @@
// AUTO-GENERATED using `gulp buildCommandIndex`
import * as addProfile from './addProfile';
import * as commandPalette from './commandPalette';
import * as deleteFolder from './deleteFolder';
import * as deleteNote from './deleteNote';
import * as duplicateNote from './duplicateNote';
import * as editAlarm from './editAlarm';
import * as exportPdf from './exportPdf';
import * as gotoAnything from './gotoAnything';
@@ -34,6 +37,7 @@ import * as showSpellCheckerMenu from './showSpellCheckerMenu';
import * as toggleEditors from './toggleEditors';
import * as toggleLayoutMoveMode from './toggleLayoutMoveMode';
import * as toggleNoteList from './toggleNoteList';
import * as toggleNoteType from './toggleNoteType';
import * as toggleNotesSortOrderField from './toggleNotesSortOrderField';
import * as toggleNotesSortOrderReverse from './toggleNotesSortOrderReverse';
import * as togglePerFolderSortOrder from './togglePerFolderSortOrder';
@@ -43,6 +47,9 @@ import * as toggleVisiblePanes from './toggleVisiblePanes';
const index:any[] = [
addProfile,
commandPalette,
deleteFolder,
deleteNote,
duplicateNote,
editAlarm,
exportPdf,
gotoAnything,
@@ -76,6 +83,7 @@ const index:any[] = [
toggleEditors,
toggleLayoutMoveMode,
toggleNoteList,
toggleNoteType,
toggleNotesSortOrderField,
toggleNotesSortOrderReverse,
togglePerFolderSortOrder,

View File

@@ -44,6 +44,6 @@ export const runtime = (comp: any): CommandRuntime => {
},
});
},
enabledCondition: 'someNotesSelected',
enabledCondition: 'someNotesSelected && !noteIsReadOnly',
};
};

View File

@@ -18,5 +18,6 @@ export const runtime = (): CommandRuntime => {
void CommandService.instance().execute('openFolderDialog', options);
},
enabledCondition: '!folderIsReadOnly',
};
};

View File

@@ -30,6 +30,6 @@ export const runtime = (): CommandRuntime => {
id: newNote.id,
});
},
enabledCondition: 'oneFolderSelected && !inConflictFolder',
enabledCondition: 'oneFolderSelected && !inConflictFolder && !folderIsReadOnly',
};
};

View File

@@ -13,5 +13,6 @@ export const runtime = (): CommandRuntime => {
parentId = parentId || context.state.selectedFolderId;
return CommandService.instance().execute('newFolder', parentId);
},
enabledCondition: '!folderIsReadOnly',
};
};

View File

@@ -12,6 +12,6 @@ export const runtime = (): CommandRuntime => {
execute: async (_context: CommandContext, body = '') => {
return CommandService.instance().execute('newNote', body, true);
},
enabledCondition: 'oneFolderSelected && !inConflictFolder',
enabledCondition: 'oneFolderSelected && !inConflictFolder && !folderIsReadOnly',
};
};

View File

@@ -33,5 +33,6 @@ export const runtime = (): CommandRuntime => {
},
});
},
enabledCondition: '!folderIsReadOnly',
};
};

View File

@@ -0,0 +1,30 @@
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
import { _ } from '@joplin/lib/locale';
import Note from '@joplin/lib/models/Note';
import eventManager from '@joplin/lib/eventManager';
export const declaration: CommandDeclaration = {
name: 'toggleNoteType',
label: () => _('Switch between note and to-do type'),
};
export const runtime = (): CommandRuntime => {
return {
execute: async (context: CommandContext, noteIds: string[] = null) => {
if (noteIds === null) noteIds = context.state.selectedNoteIds;
for (let i = 0; i < noteIds.length; i++) {
const note = await Note.load(noteIds[i]);
const newNote = await Note.save(Note.toggleIsTodo(note), { userSideValidation: true });
const eventNote = {
id: newNote.id,
is_todo: newNote.is_todo,
todo_due: newNote.todo_due,
todo_completed: newNote.todo_completed,
};
eventManager.emit('noteTypeToggle', { noteId: note.id, note: eventNote });
}
},
enabledCondition: '!noteIsReadOnly',
};
};

View File

@@ -9,7 +9,7 @@ import { PluginStates, utils as pluginUtils } from '@joplin/lib/services/plugins
import shim from '@joplin/lib/shim';
import Setting from '@joplin/lib/models/Setting';
import versionInfo from '@joplin/lib/versionInfo';
import { Module } from '@joplin/lib/services/interop/types';
import { ImportModule } from '@joplin/lib/services/interop/Module';
import InteropServiceHelper from '../InteropServiceHelper';
import { _ } from '@joplin/lib/locale';
import { isContextMenuItemLocation, MenuItem, MenuItemLocation } from '@joplin/lib/services/plugins/api/types';
@@ -230,7 +230,7 @@ function useMenu(props: Props) {
void CommandService.instance().execute(commandName);
}, []);
const onImportModuleClick = useCallback(async (module: Module, moduleSource: string) => {
const onImportModuleClick = useCallback(async (module: ImportModule, moduleSource: string) => {
let path = null;
if (moduleSource === 'file') {

View File

@@ -893,7 +893,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
mode={props.contentMarkupLanguage === MarkupToHtml.MARKUP_LANGUAGE_HTML ? 'xml' : 'joplin-markdown'}
codeMirrorTheme={styles.editor.codeMirrorTheme}
style={styles.editor}
readOnly={props.visiblePanes.indexOf('editor') < 0}
readOnly={props.disabled || props.visiblePanes.indexOf('editor') < 0}
autoMatchBraces={matchBracesOptions}
keyMap={props.keyboardMode}
plugins={props.plugins}
@@ -927,7 +927,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
<ErrorBoundary message="The text editor encountered a fatal error and could not continue. The error might be due to a plugin, so please try to disable some of them and try again.">
<div style={styles.root} ref={rootRef}>
<div style={styles.rowToolbar}>
<Toolbar themeId={props.themeId} />
<Toolbar themeId={props.themeId}/>
{props.noteToolbar}
</div>
<div style={styles.rowEditorViewer}>

View File

@@ -167,6 +167,7 @@ function Editor(props: EditorProps, ref: any) {
const safeOptions: Record<string, any> = {
value: props.value,
readOnly: props.readOnly,
};
const unsafeOptions: Record<string, any> = {

View File

@@ -11,6 +11,7 @@ const { buildStyle } = require('@joplin/lib/theme');
interface ToolbarProps {
themeId: number;
toolbarButtonInfos: ToolbarButtonInfo[];
disabled?: boolean;
}
function styles_(props: ToolbarProps) {
@@ -28,7 +29,7 @@ const toolbarButtonUtils = new ToolbarButtonUtils(CommandService.instance());
function Toolbar(props: ToolbarProps) {
const styles = styles_(props);
return <ToolbarBase style={styles.root} items={props.toolbarButtonInfos} />;
return <ToolbarBase style={styles.root} items={props.toolbarButtonInfos} disabled={!!props.disabled} />;
}
const mapStateToProps = (state: AppState) => {

View File

@@ -480,6 +480,23 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
border-top: none !important;
}
/* Override the TinyMCE font styles with more specific CSS selectors.
Without this, the built-in FontAwesome styles are not applied because
they are overridden by TinyMCE. */
.plugin-icon.fa, .plugin-icon.far, .plugin-icon.fas {
font-family: "Font Awesome 5 Free";
font-size: ${theme.toolbarHeight - theme.toolbarPadding}px;
}
.plugin-icon.fa, .plugin-icon.fas {
font-weight: 900;
}
.plugin-icon.fab, .plugin-icon.far {
font-weight: 400;
}
.joplin-tinymce .tox-toolbar__group {
background-color: ${theme.backgroundColor3};
padding-top: ${theme.toolbarPadding}px;
@@ -548,15 +565,7 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
'bold', 'italic', 'joplinHighlight', 'joplinStrikethrough', 'formattingExtras', '|',
'link', 'joplinInlineCode', 'joplinCodeBlock', 'joplinAttach', '|',
'bullist', 'numlist', 'joplinChecklist', '|',
'h1', 'h2', 'h3', 'hr', 'blockquote', 'inserttable', `joplinInsertDateTime${toolbarPluginButtons}`,
];
// Available table toolbar buttons:
// https://www.tiny.cloud/docs/advanced/available-toolbar-buttons/#tableplugin
const tableToolbar = [
'tabledelete',
'tableinsertrowafter tablecopyrow tablepasterowafter tabledeleterow',
'tableinsertcolafter tablecopycol tablepastecolafter tabledeletecol',
'h1', 'h2', 'h3', 'hr', 'blockquote', 'table', `joplinInsertDateTime${toolbarPluginButtons}`,
];
const editors = await (window as any).tinymce.init({
@@ -578,7 +587,6 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
// Handle the first table row as table header.
// https://www.tiny.cloud/docs/plugins/table/#table_header_type
table_header_type: 'sectionCells',
table_toolbar: tableToolbar.join(' | '),
table_resize_bars: false,
language_url: ['en_US', 'en_GB'].includes(language) ? undefined : `${bridge().vendorDir()}/lib/tinymce/langs/${language}`,
toolbar: toolbar.join(' '),
@@ -591,6 +599,7 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
joplinInsert: { inline: 'ins', remove: 'all' },
joplinSub: { inline: 'sub', remove: 'all' },
joplinSup: { inline: 'sup', remove: 'all' },
code: { inline: 'code', remove: 'all', attributes: { spellcheck: false } },
},
setup: (editor: Editor) => {
editor.addCommand('joplinAttach', () => {
@@ -631,22 +640,6 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
},
});
editor.ui.registry.addMenuButton('inserttable', {
icon: 'table',
tooltip: 'Table',
fetch: (callback) => {
callback([
{
type: 'fancymenuitem',
fancytype: 'inserttable',
onAction: (data) => {
editor.execCommand('mceInsertTable', false, { rows: data.numRows, columns: data.numColumns, options: { headerRows: 1 } });
},
},
]);
},
});
editor.ui.registry.addButton('joplinInsertDateTime', {
tooltip: _('Insert time'),
icon: 'insert-time',
@@ -656,9 +649,16 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
});
for (const pluginCommandName of pluginCommandNames) {
const iconClassName = CommandService.instance().iconName(pluginCommandName);
// Only allow characters that appear in Font Awesome class names: letters, spaces, and dashes.
const safeIconClassName = iconClassName.replace(/[^a-z0-9 -]/g, '');
editor.ui.registry.addIcon(pluginCommandName, `<i class="plugin-icon ${safeIconClassName}"></i>`);
editor.ui.registry.addButton(pluginCommandName, {
tooltip: CommandService.instance().label(pluginCommandName),
icon: CommandService.instance().iconName(pluginCommandName, 'tinymce'),
icon: pluginCommandName,
onAction: function() {
void CommandService.instance().execute(pluginCommandName);
},
@@ -698,7 +698,17 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
setEditorReady(true);
});
const preprocessContent = () => {
// Disable spellcheck for all inline code blocks.
const codeElements = editor.dom.doc.querySelectorAll('code.inline-code');
for (const code of codeElements) {
code.setAttribute('spellcheck', 'false');
}
};
editor.on('SetContent', () => {
preprocessContent();
props_onMessage.current({ channel: 'noteRenderComplete' });
});
},
@@ -715,18 +725,10 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
// Set the initial content and load the plugin CSS and JS files
// -----------------------------------------------------------------------------------------
const loadDocumentAssets = (editor: any, pluginAssets: any[]) => {
// Note: The way files are cached is not correct because it assumes there's only one version
// of each file. However, when the theme change, a new CSS file, specific to the theme, is
// created. That file should not be loaded on top of the previous one, but as a replacement.
// Otherwise it would do this:
// - Try to load CSS for theme 1 => OK
// - Try to load CSS for theme 2 => OK
// - Try to load CSS for theme 1 => Skip because the file is in cache. As a result, theme 2
// incorrectly stay.
// The fix would be to make allAssets() return a name and a version for each asset. Then the loading
// code would check this and either append the CSS or replace.
const documentCssElements: Record<string, HTMLLinkElement> = {};
const documentScriptElements: Record<string, HTMLScriptElement> = {};
const loadDocumentAssets = (editor: any, pluginAssets: any[]) => {
const theme = themeStyle(props.themeId);
let docHead_: any = null;
@@ -737,49 +739,72 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
return docHead_;
}
const cssFiles = [
const allCssFiles = [
`${bridge().vendorDir()}/lib/@fortawesome/fontawesome-free/css/all.min.css`,
`gui/note-viewer/pluginAssets/highlight.js/${theme.codeThemeCss}`,
].concat(
pluginAssets
.filter((a: any) => a.mime === 'text/css')
.map((a: any) => a.path)
).filter((path: string) => !loadedCssFiles_.includes(path));
);
const jsFiles = [].concat(
const allJsFiles = [].concat(
pluginAssets
.filter((a: any) => a.mime === 'application/javascript')
.map((a: any) => a.path)
).filter((path: string) => !loadedJsFiles_.includes(path));
);
for (const cssFile of cssFiles) loadedCssFiles_.push(cssFile);
for (const jsFile of jsFiles) loadedJsFiles_.push(jsFile);
// Remove all previously loaded files that aren't in the assets this time.
// Note: This is important to ensure that we properly change themes.
// See https://github.com/laurent22/joplin/issues/8520
for (const cssFile of loadedCssFiles_) {
if (!allCssFiles.includes(cssFile)) {
documentCssElements[cssFile]?.remove();
delete documentCssElements[cssFile];
}
}
for (const jsFile of loadedJsFiles_) {
if (!allJsFiles.includes(jsFile)) {
documentScriptElements[jsFile]?.remove();
delete documentScriptElements[jsFile];
}
}
const newCssFiles = allCssFiles.filter((path: string) => !loadedCssFiles_.includes(path));
const newJsFiles = allJsFiles.filter((path: string) => !loadedJsFiles_.includes(path));
loadedCssFiles_ = allCssFiles;
loadedJsFiles_ = allJsFiles;
// console.info('loadDocumentAssets: files to load', cssFiles, jsFiles);
if (cssFiles.length) {
for (const cssFile of cssFiles) {
const script = editor.dom.create('link', {
if (newCssFiles.length) {
for (const cssFile of newCssFiles) {
const style = editor.dom.create('link', {
rel: 'stylesheet',
type: 'text/css',
href: cssFile,
class: 'jop-tinymce-css',
});
docHead().appendChild(script);
documentCssElements[cssFile] = style;
docHead().appendChild(style);
}
}
if (jsFiles.length) {
if (newJsFiles.length) {
const editorElementId = editor.dom.uniqueId();
for (const jsFile of jsFiles) {
for (const jsFile of newJsFiles) {
const script = editor.dom.create('script', {
id: editorElementId,
type: 'text/javascript',
src: jsFile,
});
documentScriptElements[jsFile] = script;
docHead().appendChild(script);
}
}

View File

@@ -31,7 +31,7 @@ import usePrevious from '../hooks/usePrevious';
import Setting from '@joplin/lib/models/Setting';
import stateToWhenClauseContext from '../../services/commands/stateToWhenClauseContext';
import ExternalEditWatcher from '@joplin/lib/services/ExternalEditWatcher';
import { itemIsReadOnly } from '@joplin/lib/models/utils/readOnly';
const { themeStyle } = require('@joplin/lib/theme');
const { substrWithEllipsis } = require('@joplin/lib/string-utils');
import NoteSearchBar from '../NoteSearchBar';
@@ -40,6 +40,12 @@ import Note from '@joplin/lib/models/Note';
import Folder from '@joplin/lib/models/Folder';
const bridge = require('@electron/remote').require('./bridge').default;
import NoteRevisionViewer from '../NoteRevisionViewer';
import { readFromSettings } from '@joplin/lib/services/share/reducer';
import useAsyncEffect from '@joplin/lib/hooks/useAsyncEffect';
import { ModelType } from '@joplin/lib/BaseModel';
import BaseItem from '@joplin/lib/models/BaseItem';
import { ErrorCode } from '@joplin/lib/errors';
import ItemChange from '@joplin/lib/models/ItemChange';
const commands = [
require('./commands/showRevisions'),
@@ -51,6 +57,7 @@ function NoteEditor(props: NoteEditorProps) {
const [showRevisions, setShowRevisions] = useState(false);
const [titleHasBeenManuallyChanged, setTitleHasBeenManuallyChanged] = useState(false);
const [scrollWhenReady, setScrollWhenReady] = useState<ScrollOptions>(null);
const [isReadOnly, setIsReadOnly] = useState<boolean>(false);
const editorRef = useRef<any>();
const titleInputRef = useRef<any>();
@@ -279,6 +286,23 @@ function NoteEditor(props: NoteEditorProps) {
// }
// }, [props.dispatch]);
useAsyncEffect(async event => {
if (!formNote.id) return;
try {
const result = await itemIsReadOnly(BaseItem, ModelType.Note, ItemChange.SOURCE_UNSPECIFIED, formNote.id, props.syncUserId, props.shareCache);
if (event.cancelled) return;
setIsReadOnly(result);
} catch (error) {
if (error.code === ErrorCode.NotFound) {
// Can happen if the note has been deleted but a render is
// triggered anyway. It can be ignored.
} else {
throw error;
}
}
}, [formNote.id, props.syncUserId, props.shareCache]);
const onBodyWillChange = useCallback((event: any) => {
handleProvisionalFlag();
@@ -406,7 +430,7 @@ function NoteEditor(props: NoteEditorProps) {
htmlToMarkdown: htmlToMarkdown,
markupToHtml: markupToHtml,
allAssets: allAssets,
disabled: false,
disabled: isReadOnly,
themeId: props.themeId,
dispatch: props.dispatch,
noteToolbar: null,
@@ -570,6 +594,7 @@ function NoteEditor(props: NoteEditorProps) {
noteTitle={formNote.title}
noteUserUpdatedTime={formNote.user_updated_time}
onTitleChange={onTitleChange}
disabled={isReadOnly}
/>
{renderSearchInfo()}
<div style={{ display: 'flex', flex: 1, paddingLeft: theme.editorPaddingLeft, maxHeight: '100%' }}>
@@ -629,7 +654,9 @@ const mapStateToProps = (state: AppState) => {
], whenClauseContext)[0],
contentMaxWidth: state.settings['style.editor.contentMaxWidth'],
isSafeMode: state.settings.isSafeMode,
useCustomPdfViewer: false, // state.settings.useCustomPdfViewer,
useCustomPdfViewer: false,
syncUserId: state.settings['sync.userId'],
shareCache: readFromSettings(state),
};
};

View File

@@ -38,6 +38,7 @@ interface Props {
isProvisional: boolean;
titleInputRef: any;
onTitleChange(event: ChangeEvent<HTMLInputElement>): void;
disabled: boolean;
}
function styles_(props: Props) {
@@ -98,6 +99,7 @@ export default function NoteTitleBar(props: Props) {
return <NoteToolbar
themeId={props.themeId}
style={styles.toolbarStyle}
disabled={props.disabled}
/>;
}
@@ -109,6 +111,7 @@ export default function NoteTitleBar(props: Props) {
ref={props.titleInputRef}
placeholder={props.isProvisional ? _('Creating new %s...', props.noteIsTodo ? _('to-do') : _('note')) : ''}
style={styles.titleInput}
readOnly={props.disabled}
onChange={props.onTitleChange}
onKeyDown={onTitleKeydown}
value={props.noteTitle}

View File

@@ -1,5 +1,11 @@
import { CommandDeclaration } from '@joplin/lib/services/CommandService';
import { _ } from '@joplin/lib/locale';
import { joplinCommandToTinyMceCommands } from './NoteBody/TinyMCE/utils/joplinCommandToTinyMceCommands';
export const enabledCondition = (commandName: string) => {
const markdownEditorOnly = !Object.keys(joplinCommandToTinyMceCommands).includes(commandName);
return `(!modalDialogVisible || gotoAnythingVisible) ${markdownEditorOnly ? '&& markdownEditorPaneVisible' : ''} && oneNoteSelected && noteIsMarkdown && !noteIsReadOnly`;
};
const declarations: CommandDeclaration[] = [
{

View File

@@ -7,10 +7,13 @@ const Menu = bridge().Menu;
const MenuItem = bridge().MenuItem;
import Resource from '@joplin/lib/models/Resource';
import BaseItem from '@joplin/lib/models/BaseItem';
import BaseModel from '@joplin/lib/BaseModel';
import BaseModel, { ModelType } from '@joplin/lib/BaseModel';
import { processPastedHtml } from './resourceHandling';
import { NoteEntity, ResourceEntity } from '@joplin/lib/services/database/types';
import { TinyMceEditorEvents } from '../NoteBody/TinyMCE/utils/types';
import { itemIsReadOnlySync, ItemSlice } from '@joplin/lib/models/utils/readOnly';
import Setting from '@joplin/lib/models/Setting';
import ItemChange from '@joplin/lib/models/ItemChange';
const fs = require('fs-extra');
const { writeFile } = require('fs-extra');
const { clipboard } = require('electron');
@@ -50,7 +53,11 @@ export async function openItemById(itemId: string, dispatch: Function, hash = ''
}
try {
await ResourceEditWatcher.instance().openAndWatch(resource.id);
if (itemIsReadOnlySync(ModelType.Resource, ItemChange.SOURCE_UNSPECIFIED, resource as ItemSlice, Setting.value('sync.userId'), BaseItem.syncShareCache)) {
await ResourceEditWatcher.instance().openAsReadOnly(resource.id);
} else {
await ResourceEditWatcher.instance().openAndWatch(resource.id);
}
} catch (error) {
console.error(error);
bridge().showErrorMessageBox(error.message);

View File

@@ -2,6 +2,7 @@
import AsyncActionQueue from '@joplin/lib/AsyncActionQueue';
import { ToolbarButtonInfo } from '@joplin/lib/services/commands/ToolbarButtonUtils';
import { PluginStates } from '@joplin/lib/services/plugins/reducer';
import { State as ShareState } from '@joplin/lib/services/share/reducer';
import { MarkupLanguage } from '@joplin/renderer';
import { RenderResult, RenderResultPluginAsset } from '@joplin/renderer/MarkupToHtml';
import { MarkupToHtmlOptions } from './useMarkupToHtml';
@@ -45,6 +46,8 @@ export interface NoteEditorProps {
contentMaxWidth: number;
isSafeMode: boolean;
useCustomPdfViewer: boolean;
shareCache: ShareState;
syncUserId: string;
}
export interface NoteBodyEditorProps {

View File

@@ -1,10 +1,9 @@
import { useEffect } from 'react';
import { FormNote, ScrollOptionTypes } from './types';
import editorCommandDeclarations from '../editorCommandDeclarations';
import editorCommandDeclarations, { enabledCondition } from '../editorCommandDeclarations';
import CommandService, { CommandDeclaration, CommandRuntime, CommandContext } from '@joplin/lib/services/CommandService';
import time from '@joplin/lib/time';
import { reg } from '@joplin/lib/registry';
import { joplinCommandToTinyMceCommands } from '../NoteBody/TinyMCE/utils/joplinCommandToTinyMceCommands';
const commandsWithDependencies = [
require('../commands/showLocalSearch'),
@@ -30,8 +29,6 @@ interface HookDependencies {
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
function editorCommandRuntime(declaration: CommandDeclaration, editorRef: any, setFormNote: Function): CommandRuntime {
const markdownEditorOnly = !Object.keys(joplinCommandToTinyMceCommands).includes(declaration.name);
return {
execute: async (_context: CommandContext, ...args: any[]) => {
if (!editorRef.current) {
@@ -73,7 +70,7 @@ function editorCommandRuntime(declaration: CommandDeclaration, editorRef: any, s
// currently selected text.
//
// https://github.com/laurent22/joplin/issues/5707
enabledCondition: `(!modalDialogVisible || gotoAnythingVisible) ${markdownEditorOnly ? '&& markdownEditorPaneVisible' : ''} && oneNoteSelected && noteIsMarkdown`,
enabledCondition: enabledCondition(declaration.name),
};
}

View File

@@ -5,7 +5,7 @@ import eventManager from '@joplin/lib/eventManager';
import NoteListUtils from '../utils/NoteListUtils';
import { _ } from '@joplin/lib/locale';
import time from '@joplin/lib/time';
import BaseModel from '@joplin/lib/BaseModel';
import BaseModel, { ModelType } from '@joplin/lib/BaseModel';
import bridge from '../../services/bridge';
import Setting from '@joplin/lib/models/Setting';
import NoteListItem from '../NoteListItem';
@@ -19,6 +19,9 @@ import Note from '@joplin/lib/models/Note';
import Folder from '@joplin/lib/models/Folder';
import { Props } from './types';
import usePrevious from '../hooks/usePrevious';
import { itemIsReadOnlySync, ItemSlice } from '@joplin/lib/models/utils/readOnly';
import { FolderEntity } from '@joplin/lib/services/database/types';
import ItemChange from '@joplin/lib/models/ItemChange';
const commands = [
require('./commands/focusElementNoteList'),
@@ -186,7 +189,7 @@ const NoteListComponent = (props: Props) => {
setDragOverTargetNoteIndex(null);
const targetNoteIndex = dragTargetNoteIndex_(event);
const noteIds = JSON.parse(dt.getData('text/x-jop-note-ids'));
const noteIds: string[] = JSON.parse(dt.getData('text/x-jop-note-ids'));
void Note.insertNotesAt(props.selectedFolderId, noteIds, targetNoteIndex, props.uncompletedTodosOnTop, props.showCompletedTodos);
};
@@ -223,7 +226,9 @@ const NoteListComponent = (props: Props) => {
}
};
const noteItem_dragStart = (event: any) => {
const noteItem_dragStart = useCallback((event: any) => {
if (props.parentFolderIsReadOnly) return false;
let noteIds = [];
// Here there is two cases:
@@ -236,13 +241,14 @@ const NoteListComponent = (props: Props) => {
if (clickedNoteId) noteIds.push(clickedNoteId);
}
if (!noteIds.length) return;
if (!noteIds.length) return false;
event.dataTransfer.setDragImage(new Image(), 1, 1);
event.dataTransfer.clearData();
event.dataTransfer.setData('text/x-jop-note-ids', JSON.stringify(noteIds));
event.dataTransfer.effectAllowed = 'move';
};
return true;
}, [props.parentFolderIsReadOnly, props.selectedNoteIds]);
const renderItem = useCallback((item: any, index: number) => {
const highlightedWords = () => {
@@ -278,6 +284,7 @@ const NoteListComponent = (props: Props) => {
onNoteDragOver={noteItem_noteDragOver}
onTitleClick={noteItem_titleClick}
onContextMenu={itemContextMenu}
draggable={!props.parentFolderIsReadOnly}
/>;
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
}, [style, props.themeId, width, itemHeight, dragOverTargetNoteIndex, props.provisionalNoteIds, props.selectedNoteIds, props.watchedNoteFiles,
@@ -286,6 +293,7 @@ const NoteListComponent = (props: Props) => {
props.searches,
props.selectedSearchId,
props.highlightedWords,
props.parentFolderIsReadOnly,
]);
const previousSelectedNoteIds = usePrevious(props.selectedNoteIds, []);
@@ -393,7 +401,8 @@ const NoteListComponent = (props: Props) => {
if (noteIds.length && (keyCode === 46 || (keyCode === 8 && event.metaKey))) {
// DELETE / CMD+Backspace
event.preventDefault();
await NoteListUtils.confirmDeleteNotes(noteIds);
void CommandService.instance().execute('deleteNote', noteIds);
// await NoteListUtils.confirmDeleteNotes(noteIds);
}
if (noteIds.length && keyCode === 32) {
@@ -541,6 +550,9 @@ const NoteListComponent = (props: Props) => {
};
const mapStateToProps = (state: AppState) => {
const selectedFolder: FolderEntity = state.notesParentType === 'Folder' ? BaseModel.byId(state.folders, state.selectedFolderId) : null;
const userId = state.settings['sync.userId'];
return {
notes: state.notes,
folders: state.folders,
@@ -560,6 +572,7 @@ const mapStateToProps = (state: AppState) => {
plugins: state.pluginService.plugins,
customCss: state.customCss,
focusedField: state.focusedField,
parentFolderIsReadOnly: state.notesParentType === 'Folder' && selectedFolder ? itemIsReadOnlySync(ModelType.Folder, ItemChange.SOURCE_UNSPECIFIED, selectedFolder as ItemSlice, userId, state.shareService) : false,
};
};

View File

@@ -25,4 +25,5 @@ export interface Props {
provisionalNoteIds: string[];
visible: boolean;
focusedField: string;
parentFolderIsReadOnly: boolean;
}

View File

@@ -9,7 +9,8 @@ import Note from '@joplin/lib/models/Note';
import { notesSortOrderNextField } from '../../services/sortOrder/notesSortOrderUtils';
import { _ } from '@joplin/lib/locale';
const { connect } = require('react-redux');
const styled = require('styled-components').default;
import styled from 'styled-components';
import stateToWhenClauseContext from '../../services/commands/stateToWhenClauseContext';
enum BaseBreakpoint {
Sm = 75,
@@ -27,6 +28,8 @@ interface Props {
height: number;
width: number;
onContentHeightChange: (sameRow: boolean)=> void;
newNoteButtonEnabled: boolean;
newTodoButtonEnabled: boolean;
}
interface Breakpoints {
@@ -255,6 +258,7 @@ function NoteListControls(props: Props) {
level={ButtonLevel.Primary}
size={ButtonSize.Small}
onClick={onNewNoteButtonClick}
disabled={!props.newNoteButtonEnabled}
/>
<StyledButton ref={newTodoRef}
className="new-todo-button"
@@ -264,6 +268,7 @@ function NoteListControls(props: Props) {
level={ButtonLevel.Secondary}
size={ButtonSize.Small}
onClick={onNewTodoButtonClick}
disabled={!props.newTodoButtonEnabled}
/>
</TopRow>
);
@@ -300,9 +305,13 @@ function NoteListControls(props: Props) {
}
const mapStateToProps = (state: AppState) => {
const whenClauseContext = stateToWhenClauseContext(state);
return {
// TODO: showNewNoteButtons and the logic associated is not needed anymore.
showNewNoteButtons: true,
newNoteButtonEnabled: CommandService.instance().isEnabled('newNote', whenClauseContext),
newTodoButtonEnabled: CommandService.instance().isEnabled('newTodo', whenClauseContext),
sortOrderButtonsVisible: state.settings['notes.sortOrder.buttonsVisible'],
sortOrderField: state.settings['notes.sortOrder.field'],
sortOrderReverse: state.settings['notes.sortOrder.reverse'],

View File

@@ -58,6 +58,7 @@ interface NoteListItemProps {
onNoteDragOver: any;
onTitleClick: any;
onContextMenu(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>): void;
draggable: boolean;
}
function NoteListItem(props: NoteListItemProps, ref: any) {
@@ -185,7 +186,7 @@ function NoteListItem(props: NoteListItemProps, ref: any) {
ref={anchorRef}
onContextMenu={props.onContextMenu}
href="#"
draggable={true}
draggable={props.draggable}
style={listItemTitleStyle}
onClick={onTitleClick}
onDragStart={props.onDragStart}

View File

@@ -11,6 +11,7 @@ interface NoteToolbarProps {
themeId: number;
style: any;
toolbarButtonInfos: ToolbarButtonInfo[];
disabled: boolean;
}
function styles_(props: NoteToolbarProps) {
@@ -27,7 +28,7 @@ function styles_(props: NoteToolbarProps) {
function NoteToolbar(props: NoteToolbarProps) {
const styles = styles_(props);
return <ToolbarBase style={styles.root} items={props.toolbarButtonInfos} />;
return <ToolbarBase style={styles.root} items={props.toolbarButtonInfos} disabled={props.disabled}/>;
}
const toolbarButtonUtils = new ToolbarButtonUtils(CommandService.instance());

View File

@@ -2,7 +2,7 @@ import Dialog from '../Dialog';
import DialogButtonRow, { ClickEvent, ButtonSpec } from '../DialogButtonRow';
import DialogTitle from '../DialogTitle';
import { _ } from '@joplin/lib/locale';
import { useEffect, useState } from 'react';
import { useCallback, useEffect, useState } from 'react';
import { FolderEntity } from '@joplin/lib/services/database/types';
import Folder from '@joplin/lib/models/Folder';
import ShareService, { ApiShare } from '@joplin/lib/services/share/ShareService';
@@ -12,11 +12,12 @@ import StyledInput from '../style/StyledInput';
import Button, { ButtonSize } from '../Button/Button';
import Logger from '@joplin/lib/Logger';
import StyledMessage from '../style/StyledMessage';
import { ShareUserStatus, StateShare, StateShareUser } from '@joplin/lib/services/share/reducer';
import { SharePermissions, ShareUserStatus, StateShare, StateShareUser } from '@joplin/lib/services/share/reducer';
import { State } from '@joplin/lib/reducer';
import { connect } from 'react-redux';
import { reg } from '@joplin/lib/registry';
import useAsyncEffect, { AsyncEffectEvent } from '@joplin/lib/hooks/useAsyncEffect';
import { ChangeEvent, Dropdown, DropdownOptions, DropdownVariant } from '../Dropdown/Dropdown';
const logger = Logger.create('ShareFolderDialog');
@@ -95,6 +96,7 @@ interface Props {
onClose(): void;
shares: StateShare[];
shareUsers: Record<string, StateShareUser[]>;
canUseSharePermissions: boolean;
}
interface RecipientDeleteEvent {
@@ -108,13 +110,20 @@ enum ShareState {
}
function ShareFolderDialog(props: Props) {
const permissionOptions: DropdownOptions = {
'can_read': _('Can view'),
'can_read_and_write': _('Can view and edit'),
};
const [folder, setFolder] = useState<FolderEntity>(null);
const [recipientEmail, setRecipientEmail] = useState<string>('');
const [recipientPermissions, setRecipientPermissions] = useState<string>('can_read_and_write');
const [latestError, setLatestError] = useState<Error>(null);
const [share, setShare] = useState<StateShare>(null);
const [shareUsers, setShareUsers] = useState<StateShareUser[]>([]);
const [shareState, setShareState] = useState<ShareState>(ShareState.Idle);
const [customButtons, setCustomButtons] = useState<ButtonSpec[]>([]);
const [recipientsBeingUpdated, setRecipientsBeingUpdated] = useState<Record<string, boolean>>({});
async function synchronize(event: AsyncEffectEvent = null) {
setShareState(ShareState.Synchronizing);
@@ -140,8 +149,7 @@ function ShareFolderDialog(props: Props) {
useEffect(() => {
const s = props.shares.find(s => s.folder_id === props.folderId);
setShare(s);
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
}, [props.shares]);
}, [props.shares, props.folderId]);
useEffect(() => {
if (!share) return;
@@ -166,7 +174,14 @@ function ShareFolderDialog(props: Props) {
void ShareService.instance().refreshShares();
}, [props.folderId]);
async function shareRecipient_click() {
const permissionsFromString = (p: string): SharePermissions => {
return {
can_read: 1,
can_write: p === 'can_read_and_write' ? 1 : 0,
};
};
const shareRecipient_click = useCallback(async () => {
setShareState(ShareState.Creating);
setLatestError(null);
@@ -192,7 +207,7 @@ function ShareFolderDialog(props: Props) {
}
try {
await ShareService.instance().addShareRecipient(share.id, share.master_key_id, recipientEmail);
await ShareService.instance().addShareRecipient(share.id, share.master_key_id, recipientEmail, permissionsFromString(recipientPermissions));
} catch (error) {
// Handle the error but continue the process because we need to at
// least refresh the shares since one has been created above.
@@ -212,7 +227,7 @@ function ShareFolderDialog(props: Props) {
} finally {
defer(null);
}
}
}, [recipientPermissions, props.folderId, recipientEmail]);
function recipientEmail_change(event: any) {
setRecipientEmail(event.target.value);
@@ -239,19 +254,43 @@ function ShareFolderDialog(props: Props) {
);
}
const recipientPermissions_change = useCallback((event: ChangeEvent) => {
setRecipientPermissions(event.value);
}, []);
function renderAddRecipient() {
const disabled = shareState !== ShareState.Idle;
const dropdown = !props.canUseSharePermissions ? null : <Dropdown className="permission-dropdown" options={permissionOptions} value={recipientPermissions} onChange={recipientPermissions_change}/>;
return (
<StyledAddRecipient>
<StyledFormLabel>{_('Add recipient:')}</StyledFormLabel>
<StyledRecipientControls>
<StyledRecipientInput disabled={disabled} type="email" placeholder="example@domain.com" value={recipientEmail} onChange={recipientEmail_change} />
{dropdown}
<Button size={ButtonSize.Small} disabled={disabled} title={_('Share')} onClick={shareRecipient_click}></Button>
</StyledRecipientControls>
</StyledAddRecipient>
);
}
const recipient_permissionChange = useCallback(async (shareUserId: string, value: string) => {
try {
setRecipientsBeingUpdated(prev => {
return { ...prev, [shareUserId]: true };
});
await ShareService.instance().setPermissions(share.id, shareUserId, permissionsFromString(value));
} catch (error) {
alert(`Could not set permissions: ${error.message}`);
logger.error(error);
} finally {
setRecipientsBeingUpdated(prev => {
return { ...prev, [shareUserId]: false };
});
}
}, [share]);
function renderRecipient(index: number, shareUser: StateShareUser) {
const statusToIcon = {
[ShareUserStatus.Waiting]: 'fas fa-question',
@@ -265,11 +304,16 @@ function ShareFolderDialog(props: Props) {
[ShareUserStatus.Accepted]: _('Recipient has accepted the invitation'),
};
const permission = shareUser.can_write ? 'can_read_and_write' : 'can_read';
const enabled = !recipientsBeingUpdated[shareUser.id];
const dropdown = !props.canUseSharePermissions ? null : <Dropdown disabled={!enabled} className="permission-dropdown" value={permission} options={permissionOptions} variant={DropdownVariant.NoBorder} onChange={event => recipient_permissionChange(shareUser.id, event.value)}/>;
return (
<StyledRecipient key={shareUser.user.email} index={index}>
<StyledRecipientName>{shareUser.user.email}</StyledRecipientName>
{dropdown}
<StyledRecipientStatusIcon title={statusToMessage[shareUser.status]} className={statusToIcon[shareUser.status]}></StyledRecipientStatusIcon>
<Button size={ButtonSize.Small} iconName="far fa-times-circle" onClick={() => recipient_delete({ shareUserId: shareUser.id })}/>
<Button disabled={!enabled} size={ButtonSize.Small} iconName="far fa-times-circle" onClick={() => recipient_delete({ shareUserId: shareUser.id })}/>
</StyledRecipient>
);
}
@@ -335,7 +379,7 @@ function ShareFolderDialog(props: Props) {
function renderContent() {
return (
<StyledRoot>
<StyledRoot className="share-folder-dialog">
<DialogTitle title={_('Share Notebook')}/>
{renderFolder()}
{renderAddRecipient()}
@@ -363,6 +407,7 @@ const mapStateToProps = (state: State) => {
return {
shares: state.shareService.shares,
shareUsers: state.shareService.shareUsers,
canUseSharePermissions: state.settings['sync.target'] === 10 && state.settings['sync.10.canUseSharePermissions'],
};
};

View File

@@ -0,0 +1,5 @@
.share-folder-dialog {
.permission-dropdown {
margin-right: 10px;
}
}

View File

@@ -296,12 +296,9 @@ const SidebarComponent = (props: Props) => {
const state: AppState = store().getState();
let deleteMessage = '';
let deleteButtonLabel = _('Remove');
if (itemType === BaseModel.TYPE_FOLDER) {
const folder = await Folder.load(itemId);
deleteMessage = _('Delete notebook "%s"?\n\nAll notes and sub-notebooks within this notebook will also be deleted.', substrWithEllipsis(folder.title, 0, 32));
deleteButtonLabel = _('Delete');
} else if (itemType === BaseModel.TYPE_TAG) {
const deleteButtonLabel = _('Remove');
if (itemType === BaseModel.TYPE_TAG) {
const tag = await Tag.load(itemId);
deleteMessage = _('Remove tag "%s" from all notes?', substrWithEllipsis(tag.title, 0, 32));
} else if (itemType === BaseModel.TYPE_SEARCH) {
@@ -321,29 +318,33 @@ const SidebarComponent = (props: Props) => {
);
}
menu.append(
new MenuItem({
label: deleteButtonLabel,
click: async () => {
const ok = bridge().showConfirmMessageBox(deleteMessage, {
buttons: [deleteButtonLabel, _('Cancel')],
defaultId: 1,
});
if (!ok) return;
if (itemType === BaseModel.TYPE_FOLDER) {
await Folder.delete(itemId);
} else if (itemType === BaseModel.TYPE_TAG) {
await Tag.untagAll(itemId);
} else if (itemType === BaseModel.TYPE_SEARCH) {
props.dispatch({
type: 'SEARCH_DELETE',
id: itemId,
if (itemType === BaseModel.TYPE_FOLDER) {
menu.append(
new MenuItem(menuUtils.commandToStatefulMenuItem('deleteFolder', itemId))
);
} else {
menu.append(
new MenuItem({
label: deleteButtonLabel,
click: async () => {
const ok = bridge().showConfirmMessageBox(deleteMessage, {
buttons: [deleteButtonLabel, _('Cancel')],
defaultId: 1,
});
}
},
})
);
if (!ok) return;
if (itemType === BaseModel.TYPE_TAG) {
await Tag.untagAll(itemId);
} else if (itemType === BaseModel.TYPE_SEARCH) {
props.dispatch({
type: 'SEARCH_DELETE',
id: itemId,
});
}
},
})
);
}
if (itemType === BaseModel.TYPE_FOLDER && !item.encryption_applied) {
menu.append(new MenuItem(menuUtils.commandToStatefulMenuItem('openFolderDialog', { folderId: itemId })));

View File

@@ -11,7 +11,7 @@
import { useEffect, useState } from 'react';
import useAsyncEffect, { AsyncEffectEvent } from '@joplin/lib/hooks/useAsyncEffect';
import themeToCss from '@joplin/lib/services/style/themeToCss';
import { themeById } from '@joplin/lib/theme';
import { addExtraStyles, themeById } from '@joplin/lib/theme';
interface Props {
themeId: any;
@@ -21,7 +21,7 @@ export default function(props: Props): any {
const [styleSheetContent, setStyleSheetContent] = useState('');
useAsyncEffect(async (event: AsyncEffectEvent) => {
const theme = themeById(props.themeId);
const theme = addExtraStyles(themeById(props.themeId));
const themeCss = themeToCss(theme);
if (event.cancelled) return;
setStyleSheetContent(themeCss);

View File

@@ -9,6 +9,7 @@ interface Props {
themeId: number;
style: any;
items: any[];
disabled: boolean;
}
class ToolbarBaseComponent extends React.Component<Props, any> {
@@ -46,6 +47,7 @@ class ToolbarBaseComponent extends React.Component<Props, any> {
const props = {
key: key,
themeId: this.props.themeId,
disabled: this.props.disabled,
...o,
};

View File

@@ -53,17 +53,7 @@ export default class NoteListUtils {
);
menu.append(
new MenuItem({
label: _('Duplicate'),
click: async () => {
for (let i = 0; i < noteIds.length; i++) {
const note = await Note.load(noteIds[i]);
await Note.duplicate(noteIds[i], {
uniqueTitle: _('%s - Copy', note.title),
});
}
},
})
new MenuItem(menuUtils.commandToStatefulMenuItem('duplicateNote', noteIds))
);
if (singleNoteId) {
@@ -73,22 +63,9 @@ export default class NoteListUtils {
if (noteIds.length <= 1) {
menu.append(
new MenuItem({
label: _('Switch between note and to-do type'),
click: async () => {
for (let i = 0; i < noteIds.length; i++) {
const note = await Note.load(noteIds[i]);
const newNote = await Note.save(Note.toggleIsTodo(note), { userSideValidation: true });
const eventNote = {
id: newNote.id,
is_todo: newNote.is_todo,
todo_due: newNote.todo_due,
todo_completed: newNote.todo_completed,
};
eventManager.emit('noteTypeToggle', { noteId: note.id, note: eventNote });
}
},
})
new MenuItem(
menuUtils.commandToStatefulMenuItem('toggleNoteType', noteIds)
)
);
} else {
const switchNoteType = async (noteIds: string[], type: string) => {
@@ -189,12 +166,9 @@ export default class NoteListUtils {
}
menu.append(
new MenuItem({
label: _('Delete'),
click: async () => {
await this.confirmDeleteNotes(noteIds);
},
})
new MenuItem(
menuUtils.commandToStatefulMenuItem('deleteNote', noteIds)
)
);
const pluginViewInfos = pluginUtils.viewInfosByType(props.plugins, 'menuItem');
@@ -213,19 +187,4 @@ export default class NoteListUtils {
return menu;
}
public static async confirmDeleteNotes(noteIds: string[]) {
if (!noteIds.length) return;
const msg = await Note.deleteMessage(noteIds);
if (!msg) return;
const ok = bridge().showConfirmMessageBox(msg, {
buttons: [_('Delete'), _('Cancel')],
defaultId: 1,
});
if (!ok) return;
await Note.batchDelete(noteIds);
}
}

View File

@@ -30,6 +30,13 @@ const { FileApiDriverLocal } = require('@joplin/lib/file-api-driver-local');
const React = require('react');
const nodeSqlite = require('sqlite3');
// Security: If we attempt to navigate away from the root HTML page, it's likely because
// of an improperly sanitized link. Prevent this by closing the window before we can
// navigate away.
window.onbeforeunload = () => {
window.close();
};
if (bridge().env() === 'dev') {
const newConsole = function(oldConsole) {
const output = {};

View File

@@ -1,6 +1,6 @@
{
"name": "@joplin/app-desktop",
"version": "2.12.0",
"version": "2.12.9",
"description": "Joplin for Desktop",
"main": "main.js",
"private": true,
@@ -78,7 +78,6 @@
},
"mac": {
"icon": "../../Assets/macOs.icns",
"target": "dmg",
"hardenedRuntime": true,
"entitlements": "./build-mac/entitlements.mac.inherit.plist",
"extendInfo": {
@@ -108,6 +107,7 @@
},
"homepage": "https://github.com/laurent22/joplin#readme",
"devDependencies": {
"@electron/rebuild": "3.2.13",
"@joplin/tools": "~2.12",
"@testing-library/react-hooks": "8.0.1",
"@types/jest": "29.5.1",
@@ -115,9 +115,8 @@
"@types/react": "16.14.41",
"@types/react-redux": "7.1.25",
"@types/styled-components": "5.1.26",
"electron": "19.1.4",
"electron-builder": "22.11.7",
"electron-rebuild": "3.2.9",
"electron": "25.2.0",
"electron-builder": "24.4.0",
"glob": "10.2.7",
"gulp": "4.0.2",
"jest": "29.5.0",
@@ -162,7 +161,7 @@
"react": "18.2.0",
"react-datetime": "3.2.0",
"react-dom": "18.2.0",
"react-redux": "8.0.7",
"react-redux": "8.1.1",
"react-select": "5.7.3",
"react-toggle-button": "2.2.0",
"react-tooltip": "4.5.1",

View File

@@ -31,6 +31,12 @@
# ./runForTesting.sh 1 createUsers,createData,reset,sync && ./runForTesting.sh 1a reset,sync && ./runForTesting.sh 1
# ./runForTesting.sh 1a
# ----------------------------------------------------------------------------------
# Team accounts:
# ----------------------------------------------------------------------------------
# ./runForTesting.sh 1 createTeams,createData,resetTeam,sync && ./runForTesting.sh 2 resetTeam,sync && ./runForTesting.sh 1
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
@@ -54,13 +60,26 @@ if [ "$USER_NUM" = "1b" ]; then
USER_PROFILE_NUM=1b
fi
if [ "$USER_NUM" = "2a" ]; then
USER_NUM=2
USER_PROFILE_NUM=2a
fi
if [ "$USER_NUM" = "2b" ]; then
USER_NUM=2
USER_PROFILE_NUM=2b
fi
COMMANDS=($(echo $2 | tr "," "\n"))
PROFILE_DIR=~/.config/joplindev-desktop-$USER_PROFILE_NUM
SYNC_TARGET=10
CMD_FILE="$SCRIPT_DIR/runForTestingCommands-$USER_PROFILE_NUM.txt"
rm -f "$CMD_FILE"
touch "$CMD_FILE"
echo "Using sync target: $SYNC_TARGET"
for CMD in "${COMMANDS[@]}"
do
if [[ $CMD == "createUsers" ]]; then
@@ -71,6 +90,10 @@ do
curl --data '{"action": "createUserDeletions"}' -H 'Content-Type: application/json' http://api.joplincloud.local:22300/api/debug
elif [[ $CMD == "createTeams" ]]; then
curl --data '{"action": "createTeams"}' -H 'Content-Type: application/json' http://api.joplincloud.local:22300/api/debug
elif [[ $CMD == "createData" ]]; then
echo 'mkbook "shared"' >> "$CMD_FILE"
@@ -84,18 +107,26 @@ do
USER_EMAIL="user$USER_NUM@example.com"
rm -rf "$PROFILE_DIR"
# rm -rf "$HOME/Temp/SyncTestE2EE copy"
# rsync -a "$HOME/Temp/SyncTestE2EE/" "$HOME/Temp/SyncTestE2EE copy/"
echo "config keychain.supported 0" >> "$CMD_FILE"
echo "config sync.target $SYNC_TARGET" >> "$CMD_FILE"
echo "config sync.$SYNC_TARGET.username $USER_EMAIL" >> "$CMD_FILE"
echo "config sync.$SYNC_TARGET.password 111111" >> "$CMD_FILE"
# echo "config sync.target 2" >> "$CMD_FILE"
# echo "config sync.2.path \"$HOME/Temp/SyncTestE2EE copy/\"" >> "$CMD_FILE"
if [[ $SYNC_TARGET = 9 ]]; then
echo "config sync.$SYNC_TARGET.path http://api.joplincloud.local:22300" >> "$CMD_FILE"
echo "config sync.$SYNC_TARGET.userContentPath http://joplinusercontent.local:22300" >> "$CMD_FILE"
fi
elif [[ $CMD == "resetTeam" ]]; then
USER_EMAIL="teamuser1-$USER_NUM@example.com"
rm -rf "$PROFILE_DIR"
echo "config keychain.supported 0" >> "$CMD_FILE"
echo "config sync.target 10" >> "$CMD_FILE"
# echo "config sync.10.path http://api.joplincloud.local:22300" >> "$CMD_FILE"
echo "config sync.10.username $USER_EMAIL" >> "$CMD_FILE"
echo "config sync.10.password 111111" >> "$CMD_FILE"
echo "config sync.target $SYNC_TARGET" >> "$CMD_FILE"
echo "config sync.$SYNC_TARGET.username $USER_EMAIL" >> "$CMD_FILE"
echo "config sync.$SYNC_TARGET.password 111111" >> "$CMD_FILE"
elif [[ $CMD == "e2ee" ]]; then
echo "e2ee enable --password 111111" >> "$CMD_FILE"
@@ -104,11 +135,6 @@ do
echo "sync --use-lock 0" >> "$CMD_FILE"
# elif [[ $CMD == "generatePpk" ]]; then
# echo "e2ee generate-ppk --password 111111" >> "$CMD_FILE"
# echo "sync" >> "$CMD_FILE"
else
echo "Unknown command: $CMD"

View File

@@ -2,8 +2,10 @@ import { useEffect } from 'react';
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
export default function(frameWindow: any, onSubmit: Function, onDismiss: Function, loadedHtmlHash: string) {
const document = frameWindow && frameWindow.document ? frameWindow.document : null;
useEffect(() => {
if (!frameWindow) return () => {};
if (!document) return () => {};
function onFormSubmit(event: any) {
event.preventDefault();
@@ -20,18 +22,18 @@ export default function(frameWindow: any, onSubmit: Function, onDismiss: Functio
// Disable enter key from submitting when a text area is in focus!
// https://github.com/laurent22/joplin/issues/4766
//
if (frameWindow.document.activeElement.tagName !== 'TEXTAREA') {
if (document.activeElement.tagName !== 'TEXTAREA') {
if (onSubmit) onSubmit();
}
}
}
frameWindow.document.addEventListener('submit', onFormSubmit);
frameWindow.document.addEventListener('keydown', onKeyDown);
document.addEventListener('submit', onFormSubmit);
document.addEventListener('keydown', onKeyDown);
return () => {
if (frameWindow) frameWindow.document.removeEventListener('submit', onFormSubmit);
if (frameWindow) frameWindow.document.removeEventListener('keydown', onKeyDown);
if (document) document.removeEventListener('submit', onFormSubmit);
if (document) document.removeEventListener('keydown', onKeyDown);
};
}, [frameWindow, loadedHtmlHash, onSubmit, onDismiss]);
}, [document, loadedHtmlHash, onSubmit, onDismiss]);
}

View File

@@ -2,4 +2,7 @@
@use 'gui/EditFolderDialog/style.scss' as edit-folder-dialog;
@use 'gui/EncryptionConfigScreen/style.scss' as encryption-config-screen;
@use 'gui/PasswordInput/style.scss' as password-input;
@use 'gui/JoplinCloudConfigScreen.scss' as joplin-cloud-config-screen;
@use 'gui/Dropdown/style.scss' as dropdown-control;
@use 'gui/ShareFolderDialog/style.scss' as share-folder-dialog;
@use 'main.scss' as main;

View File

@@ -1,5 +1,9 @@
const execCommand = require('./execCommand');
const isArm64 = () => {
return process.platform === 'arm64';
};
const isWindows = () => {
return process && process.platform === 'win32';
};
@@ -21,13 +25,20 @@ async function main() {
// wrong one. However it means it will have to be manually upgraded for each
// new Electron release. Some ABI map there:
// https://github.com/electron/node-abi/tree/master/test
const forceAbiArgs = '--force-abi 89';
const forceAbiArgs = '--force-abi 116';
if (isWindows()) {
// Cannot run this in parallel, or the 64-bit version might end up
// with 32-bit files and vice-versa
console.info(await execCommand(['yarn', 'run', 'electron-rebuild', forceAbiArgs, '--arch ia32'].join(' ')));
console.info(await execCommand(['yarn', 'run', 'electron-rebuild', forceAbiArgs, '--arch x64'].join(' ')));
} else if (isArm64()) {
// Keytar needs it's own electron-rebuild or else it will not fetch the
// existing prebuilt binary, this will cause cross-compilation to fail.
// E.g. for MacOS arm64 it will download:
// https://github.com/atom/node-keytar/releases/download/v7.9.0/keytar-v7.9.0-napi-v3-darwin-arm64.tar.gz
console.info(await execCommand(['yarn', 'run', 'electron-rebuild', forceAbiArgs, '--arch=arm64', '--only=keytar'].join(' ')));
console.info(await execCommand(['yarn', 'run', 'electron-rebuild', forceAbiArgs].join(' ')));
} else {
console.info(await execCommand(['yarn', 'run', 'electron-rebuild', forceAbiArgs].join(' ')));
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,119 @@
import { fileExtension } from '@joplin/lib/path-utils';
import shim from '@joplin/lib/shim';
export interface CheckForUpdateOptions {
includePreReleases?: boolean;
}
export interface GitHubRelease {
tag_name: string;
prerelease: boolean;
body: string;
assets: {
name: string;
browser_download_url: string;
}[];
html_url: string;
}
interface Release {
version: string;
prerelease: boolean;
downloadUrl: string;
notes: string;
pageUrl: string;
}
function getMajorMinorTagName(tagName: string) {
const s = tagName.split('.');
s.pop();
return s.join('.');
}
export const extractVersionInfo = (releases: GitHubRelease[], platform: typeof process.platform, options: CheckForUpdateOptions) => {
options = { includePreReleases: false, ...options };
if (!releases.length) throw new Error('Cannot get latest release info (JSON)');
let release = null;
if (options.includePreReleases) {
release = releases[0];
} else {
for (const r of releases) {
if (!r.prerelease) {
release = r;
break;
}
}
}
if (!release) throw new Error('Could not get tag name');
const version = release.tag_name.substr(1);
// We concatenate all the release notes of the major/minor versions
// corresponding to the latest version. For example, if the latest version
// is 1.8.3, we concatenate all the 1.8.x versions. This is so that no
// matter from which version you upgrade, you always see the full changes,
// with the latest changes being on top.
const fullReleaseNotes = [];
const majorMinorTagName = getMajorMinorTagName(release.tag_name);
for (const release of releases) {
if (getMajorMinorTagName(release.tag_name) === majorMinorTagName) {
fullReleaseNotes.push(release.body.trim());
}
}
let downloadUrl = null;
for (let i = 0; i < release.assets.length; i++) {
const asset = release.assets[i];
let found = false;
const ext = fileExtension(asset.name);
if (platform === 'win32' && ext === 'exe') {
if (shim.isPortable()) {
found = asset.name === 'JoplinPortable.exe';
} else {
found = !!asset.name.match(/^Joplin-Setup-[\d.]+\.exe$/);
}
} else if (platform === 'darwin' && ext === 'dmg' && !asset.name.endsWith('arm64.dmg')) { // We don't return the arm64 version for now
found = true;
} else if (platform === 'linux' && ext === '.AppImage') {
found = true;
}
if (found) {
downloadUrl = asset.browser_download_url.replace('github.com/laurent22/joplin/releases/download', 'objects.joplinusercontent.com');
downloadUrl.concat('?source=DesktopApp&type=Update');
break;
}
}
function cleanUpReleaseNotes(releaseNotes: string[]) {
const lines = releaseNotes.join('\n\n* * *\n\n').split('\n');
const output = [];
for (const line of lines) {
const r = line
.replace(/\(#.* by .*\)/g, '') // Removes issue numbers and names - (#3157 by [@user](https://github.com/user))
.replace(/\([0-9a-z]{7}\)/g, '') // Removes commits - "sync state or data (a6caa35)"
.replace(/\(#[0-9]+\)/g, '') // Removes issue numbers - "(#4727)"
.replace(/ {2}/g, ' ')
.trim();
output.push(r);
}
return output.join('\n');
}
const output: Release = {
version: version,
downloadUrl: downloadUrl,
notes: cleanUpReleaseNotes(fullReleaseNotes),
pageUrl: release.html_url,
prerelease: release.prerelease,
};
return output;
};

View File

@@ -15,7 +15,7 @@ interface FolderPickerProps {
folders: FolderEntity[];
placeholder?: string;
darkText?: boolean;
themeId?: string;
themeId?: number;
}

View File

@@ -17,6 +17,7 @@ const createEditorSettings = (themeId: number) => {
const editorSettings: EditorSettings = {
katexEnabled: true,
spellcheckEnabled: true,
readOnly: false,
themeId,
themeData,
};

View File

@@ -342,6 +342,8 @@ export function initCodeMirror(
...defaultKeymap, ...historyKeymap, indentWithTab, ...searchKeymap,
]),
EditorState.readOnly.of(settings.readOnly),
],
doc: initialText,
}),

View File

@@ -31,6 +31,7 @@ interface MarkdownToolbarProps {
editorSettings: EditorSettings;
onAttach: OnAttachCallback;
style?: ViewStyle;
readOnly: boolean;
}
const MarkdownToolbar = (props: MarkdownToolbarProps) => {
@@ -38,6 +39,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
const styles = useStyles(props.style, themeData);
const selState = props.selectionState;
const editorControl = props.editorControl;
const readOnly = props.readOnly;
const headerButtons: ButtonSpec[] = [];
for (let level = 1; level <= 5; level++) {
@@ -58,6 +60,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
// Make it likely for the first three header buttons to show, less likely for
// the others.
priority: level < 3 ? 2 : 0,
disabled: readOnly,
});
}
@@ -73,6 +76,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
}, [editorControl]),
priority: -2,
disabled: readOnly,
});
listButtons.push({
@@ -86,6 +90,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
}, [editorControl]),
priority: -2,
disabled: readOnly,
});
listButtons.push({
@@ -99,6 +104,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
}, [editorControl]),
priority: -2,
disabled: readOnly,
});
@@ -110,6 +116,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
onPress: editorControl.decreaseIndent,
priority: -1,
disabled: readOnly,
});
listButtons.push({
@@ -120,6 +127,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
onPress: editorControl.increaseIndent,
priority: -1,
disabled: readOnly,
});
@@ -134,6 +142,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
onPress: editorControl.toggleBolded,
priority: 3,
disabled: readOnly,
});
inlineFormattingBtns.push({
@@ -145,6 +154,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
onPress: editorControl.toggleItalicized,
priority: 2,
disabled: readOnly,
});
inlineFormattingBtns.push({
@@ -154,6 +164,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
onPress: editorControl.toggleCode,
priority: 2,
disabled: readOnly,
});
if (props.editorSettings.katexEnabled) {
@@ -164,6 +175,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
onPress: editorControl.toggleMath,
priority: 1,
disabled: readOnly,
});
}
@@ -176,6 +188,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
onPress: editorControl.showLinkDialog,
priority: -3,
disabled: readOnly,
});
@@ -189,6 +202,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
onPress: useCallback(() => {
editorControl.insertText(time.formatDateToLocal(new Date()));
}, [editorControl]),
disabled: readOnly,
});
const onDismissKeyboard = useCallback(() => {
@@ -208,6 +222,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
onDismissKeyboard();
props.onAttach();
}, [props.onAttach, onDismissKeyboard]),
disabled: readOnly,
});
actionButtons.push({
@@ -227,6 +242,7 @@ const MarkdownToolbar = (props: MarkdownToolbarProps) => {
}, [editorControl, props.searchState.dialogVisible]),
priority: -3,
disabled: readOnly,
});
const [keyboardVisible, setKeyboardVisible] = useState(false);

View File

@@ -31,6 +31,7 @@ interface Props {
style: ViewStyle;
contentStyle?: ViewStyle;
toolbarEnabled: boolean;
readOnly: boolean;
onChange: ChangeEventHandler;
onSelectionChange: SelectionChangeEventHandler;
@@ -226,6 +227,7 @@ function NoteEditor(props: Props, ref: any) {
themeData: editorTheme(props.themeId),
katexEnabled: Setting.value('markdown.plugin.katex'),
spellcheckEnabled: Setting.value('editor.mobile.spellcheckEnabled'),
readOnly: props.readOnly,
};
const injectedJavaScript = `
@@ -377,6 +379,7 @@ function NoteEditor(props: Props, ref: any) {
selectionState={selectionState}
searchState={searchState}
onAttach={props.onAttach}
readOnly={props.readOnly}
/>;
// - `scrollEnabled` prevents iOS from scrolling the document (has no effect on Android)

View File

@@ -19,6 +19,7 @@ export interface EditorSettings {
katexEnabled: boolean;
spellcheckEnabled: boolean;
readOnly: boolean;
}
export interface ChangeEvent {

View File

@@ -7,7 +7,7 @@ const Icon = require('react-native-vector-icons/Ionicons').default;
const { BackButtonService } = require('../services/back-button.js');
import NavService from '@joplin/lib/services/NavService';
import { Menu, MenuOptions, MenuOption, MenuTrigger } from 'react-native-popup-menu';
import { _ } from '@joplin/lib/locale';
import { _, _n } from '@joplin/lib/locale';
import Setting from '@joplin/lib/models/Setting';
import Note from '@joplin/lib/models/Note';
import Folder from '@joplin/lib/models/Folder';
@@ -40,10 +40,11 @@ interface NavButtonPressEvent {
screen: string;
}
interface MenuOptionType {
export interface MenuOptionType {
onPress: OnPressCallback;
isDivider?: boolean;
title: string;
disabled?: boolean;
}
type DispatchCommandType=(event: { type: string })=> void;
@@ -81,9 +82,11 @@ interface ScreenHeaderProps {
historyCanGoBack?: boolean;
showMissingMasterKeyMessage?: boolean;
hasDisabledSyncItems?: boolean;
hasDisabledEncryptionItems?: boolean;
shouldUpgradeSyncTarget?: boolean;
showShouldUpgradeSyncTargetMessage?: boolean;
themeId: number;
}
interface ScreenHeaderState {
@@ -98,7 +101,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
}
private styles() {
const themeId = Setting.value('theme');
const themeId = this.props.themeId;
if (this.cachedStyles[themeId]) return this.cachedStyles[themeId];
this.cachedStyles = {};
@@ -201,6 +204,11 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
},
};
styleObject.contextMenuItemTextDisabled = {
...styleObject.contextMenuItemText,
opacity: 0.5,
};
styleObject.topIcon = { ...theme.icon };
styleObject.topIcon.flex = 1;
styleObject.topIcon.textAlignVertical = 'center';
@@ -240,11 +248,15 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
private async duplicateButton_press() {
const noteIds = this.props.selectedNoteIds;
// Duplicate all selected notes. ensureUniqueTitle is set to true to use the
// original note's name as a root for the new unique identifier.
await Note.duplicateMultipleNotes(noteIds, { ensureUniqueTitle: true });
this.props.dispatch({ type: 'NOTE_SELECTION_END' });
try {
// Duplicate all selected notes. ensureUniqueTitle is set to true to use the
// original note's name as a root for the new unique identifier.
await Note.duplicateMultipleNotes(noteIds, { ensureUniqueTitle: true });
} catch (error) {
alert(_n('This note could not be duplicated: %s', 'These notes could not be duplicated: %s', noteIds.length, error.message));
}
}
private async deleteButton_press() {
@@ -259,7 +271,12 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
if (!ok) return;
this.props.dispatch({ type: 'NOTE_SELECTION_END' });
await Note.batchDelete(noteIds);
try {
await Note.batchDelete(noteIds);
} catch (error) {
alert(_n('This note could not be deleted: %s', 'These notes could not be deleted: %s', noteIds.length, error.message));
}
}
private menu_select(value: OnSelectCallbackType) {
@@ -281,7 +298,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
}
public render() {
const themeId = Setting.value('theme');
const themeId = this.props.themeId;
function sideMenuButton(styles: any, onPress: OnPressCallback) {
return (
<TouchableOpacity
@@ -470,8 +487,8 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
menuOptionComponents.push(<View key={`menuOption_${key++}`} style={this.styles().divider} />);
} else {
menuOptionComponents.push(
<MenuOption value={o.onPress} key={`menuOption_${key++}`} style={this.styles().contextMenuItem}>
<Text style={this.styles().contextMenuItemText}>{o.title}</Text>
<MenuOption value={o.onPress} key={`menuOption_${key++}`} style={this.styles().contextMenuItem} disabled={!!o.disabled}>
<Text style={o.disabled ? this.styles().contextMenuItemTextDisabled : this.styles().contextMenuItemText}>{o.title}</Text>
</MenuOption>
);
}
@@ -523,8 +540,13 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
if (!ok) return;
this.props.dispatch({ type: 'NOTE_SELECTION_END' });
for (let i = 0; i < noteIds.length; i++) {
await Note.moveToFolder(noteIds[i], folderId);
try {
for (let i = 0; i < noteIds.length; i++) {
await Note.moveToFolder(noteIds[i], folderId);
}
} catch (error) {
alert(_n('This note could not be moved: %s', 'These notes could not be moved: %s', noteIds.length, error.message));
}
}}
mustSelect={!!folderPickerOptions.mustSelect}
@@ -543,6 +565,10 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
if (this.props.hasDisabledSyncItems) warningComps.push(this.renderWarningBox('Status', _('Some items cannot be synchronised. Press for more info.')));
if (this.props.shouldUpgradeSyncTarget && this.props.showShouldUpgradeSyncTargetMessage !== false) warningComps.push(this.renderWarningBox('UpgradeSyncTarget', _('The sync target needs to be upgraded. Press this banner to proceed.')));
if (this.props.hasDisabledEncryptionItems) {
warningComps.push(this.renderWarningBox('Status', _('Some items cannot be decrypted.')));
}
const showSideMenuButton = !!this.props.showSideMenuButton && !this.props.noteSelectionEnabled;
const showSelectAllButton = this.props.noteSelectionEnabled;
const showSearchButton = !!this.props.showSearchButton && !this.props.noteSelectionEnabled;
@@ -629,6 +655,7 @@ const ScreenHeader = connect((state: State) => {
locale: state.settings.locale,
folders: state.folders,
themeId: state.settings.theme,
hasDisabledEncryptionItems: state.hasDisabledEncryptionItems,
noteSelectionEnabled: state.noteSelectionEnabled,
selectedNoteIds: state.selectedNoteIds,
showMissingMasterKeyMessage: showMissingMasterKeyMessage(syncInfo, state.notLoadedMasterKeys),

View File

@@ -1,29 +1,33 @@
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
import Slider from '@react-native-community/slider';
const React = require('react');
import { Platform, Linking, View, Switch, StyleSheet, ScrollView, Text, Button, TouchableOpacity, TextInput, Alert, PermissionsAndroid, TouchableNativeFeedback } from 'react-native';
import { Platform, Linking, View, Switch, ScrollView, Text, Button, TouchableOpacity, TextInput, Alert, PermissionsAndroid, TouchableNativeFeedback } from 'react-native';
import Setting, { AppType } from '@joplin/lib/models/Setting';
import NavService from '@joplin/lib/services/NavService';
import ReportService from '@joplin/lib/services/ReportService';
import SearchEngine from '@joplin/lib/services/searchengine/SearchEngine';
import checkPermissions from '../../utils/checkPermissions';
import checkPermissions from '../../../utils/checkPermissions';
import time from '@joplin/lib/time';
import shim from '@joplin/lib/shim';
import setIgnoreTlsErrors from '../../utils/TlsUtils';
import setIgnoreTlsErrors from '../../../utils/TlsUtils';
import { reg } from '@joplin/lib/registry';
import { State } from '@joplin/lib/reducer';
const { BackButtonService } = require('../../services/back-button.js');
const { BackButtonService } = require('../../../services/back-button.js');
const VersionInfo = require('react-native-version-info').default;
const { connect } = require('react-redux');
import ScreenHeader from '../ScreenHeader';
import ScreenHeader from '../../ScreenHeader';
const { _ } = require('@joplin/lib/locale');
const { BaseScreenComponent } = require('../base-screen.js');
const { Dropdown } = require('../Dropdown.js');
const { themeStyle } = require('../global-style.js');
const { BaseScreenComponent } = require('../../base-screen.js');
const { Dropdown } = require('../../Dropdown');
const { themeStyle } = require('../../global-style.js');
const shared = require('@joplin/lib/components/shared/config-shared.js');
import SyncTargetRegistry from '@joplin/lib/SyncTargetRegistry';
import { openDocumentTree } from '@joplin/react-native-saf-x';
import biometricAuthenticate from '../biometrics/biometricAuthenticate';
import biometricAuthenticate from '../../biometrics/biometricAuthenticate';
import configScreenStyles from './configScreenStyles';
import NoteExportButton from './NoteExportSection/NoteExportButton';
import ConfigScreenButton from './ConfigScreenButton';
import Clipboard from '@react-native-community/clipboard';
class ConfigScreenComponent extends BaseScreenComponent {
public static navigationOptions(): any {
@@ -223,94 +227,11 @@ class ConfigScreenComponent extends BaseScreenComponent {
public styles() {
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
if (this.styles_[themeId]) return this.styles_[themeId];
this.styles_ = {};
const styles: any = {
body: {
flex: 1,
justifyContent: 'flex-start',
flexDirection: 'column',
},
settingContainer: {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
borderBottomWidth: 1,
borderBottomColor: theme.dividerColor,
paddingTop: theme.marginTop,
paddingBottom: theme.marginBottom,
paddingLeft: theme.marginLeft,
paddingRight: theme.marginRight,
},
settingText: {
color: theme.color,
fontSize: theme.fontSize,
flex: 1,
paddingRight: 5,
},
descriptionText: {
color: theme.colorFaded,
fontSize: theme.fontSizeSmaller,
flex: 1,
},
sliderUnits: {
color: theme.color,
fontSize: theme.fontSize,
marginRight: 10,
},
settingDescriptionText: {
color: theme.colorFaded,
fontSize: theme.fontSizeSmaller,
flex: 1,
paddingLeft: theme.marginLeft,
paddingRight: theme.marginRight,
paddingBottom: theme.marginBottom,
},
permissionText: {
color: theme.color,
fontSize: theme.fontSize,
flex: 1,
marginTop: 10,
},
settingControl: {
color: theme.color,
flex: 1,
},
textInput: {
color: theme.color,
},
};
styles.settingContainerNoBottomBorder = { ...styles.settingContainer, borderBottomWidth: 0,
paddingBottom: theme.marginBottom / 2 };
styles.settingControl.borderBottomWidth = 1;
styles.settingControl.borderBottomColor = theme.dividerColor;
styles.switchSettingText = { ...styles.settingText };
styles.switchSettingText.width = '80%';
styles.switchSettingContainer = { ...styles.settingContainer };
styles.switchSettingContainer.flexDirection = 'row';
styles.switchSettingContainer.justifyContent = 'space-between';
styles.linkText = { ...styles.settingText };
styles.linkText.borderBottomWidth = 1;
styles.linkText.borderBottomColor = theme.color;
styles.linkText.flex = 0;
styles.linkText.fontWeight = 'normal';
styles.headerWrapperStyle = { ...styles.settingContainer, ...theme.headerWrapperStyle };
styles.switchSettingControl = { ...styles.settingControl };
delete styles.switchSettingControl.color;
// styles.switchSettingControl.width = '20%';
styles.switchSettingControl.flex = 0;
this.styles_[themeId] = StyleSheet.create(styles);
this.styles_[themeId] = configScreenStyles(themeId);
return this.styles_[themeId];
}
@@ -388,28 +309,16 @@ class ConfigScreenComponent extends BaseScreenComponent {
);
}
renderButton(key: string, title: string, clickHandler: ()=> void, options: any = null) {
if (!options) options = {};
let descriptionComp = null;
if (options.description) {
descriptionComp = (
<View style={{ flex: 1, marginTop: 10 }}>
<Text style={this.styles().descriptionText}>{options.description}</Text>
</View>
);
}
private renderButton(key: string, title: string, clickHandler: ()=> void, options: any = null) {
return (
<View key={key} style={this.styles().settingContainer}>
<View style={{ flex: 1, flexDirection: 'column' }}>
<View style={{ flex: 1 }}>
<Button title={title} onPress={clickHandler} disabled={!!options.disabled} />
</View>
{options.statusComp}
{descriptionComp}
</View>
</View>
<ConfigScreenButton
key={key}
title={title}
clickHandler={clickHandler}
description={options?.description}
statusComponent={options?.statusComp}
styles={this.styles()}
/>
);
}
@@ -447,6 +356,26 @@ class ConfigScreenComponent extends BaseScreenComponent {
settingComps.push(this.renderButton('e2ee_config_button', _('Encryption Config'), this.e2eeConfig_));
}
if (section.name === 'joplinCloud') {
const description = _('Any email sent to this address will be converted into a note and added to your collection. The note will be saved into the Inbox notebook');
settingComps.push(
<View key="joplinCloud">
<View style={this.styles().settingContainerNoBottomBorder}>
<Text style={this.styles().settingText}>{_('Email to note')}</Text>
<Text style={{ fontWeight: 'bold' }}>{this.props.settings['sync.10.inboxEmail']}</Text>
</View>
{
this.renderButton(
'sync.10.inboxEmail',
_('Copy to clipboard'),
() => Clipboard.setString(this.props.settings['sync.10.inboxEmail']),
{ description }
)
}
</View>
);
}
if (!settingComps.length) return null;
return (
@@ -642,12 +571,13 @@ class ConfigScreenComponent extends BaseScreenComponent {
settingComps.push(this.renderButton('profiles_buttons', _('Manage profiles'), this.manageProfilesButtonPress_));
settingComps.push(this.renderButton('status_button', _('Sync Status'), this.syncStatusButtonPress_));
settingComps.push(this.renderButton('log_button', _('Log'), this.logButtonPress_));
if (Platform.OS === 'android') {
settingComps.push(this.renderButton('export_report_button', this.state.creatingReport ? _('Creating report...') : _('Export Debug Report'), this.exportDebugButtonPress_, { disabled: this.state.creatingReport }));
}
settingComps.push(this.renderButton('fix_search_engine_index', this.state.fixingSearchIndex ? _('Fixing search index...') : _('Fix search index'), this.fixSearchEngineIndexButtonPress_, { disabled: this.state.fixingSearchIndex, description: _('Use this to rebuild the search index if there is a problem with search. It may take a long time depending on the number of notes.') }));
settingComps.push(this.renderHeader('export', _('Export')));
settingComps.push(<NoteExportButton key={'export_as_jex_button'} styles={this.styles()} />);
if (shim.mobilePlatform() === 'android') {
settingComps.push(this.renderButton('export_report_button', this.state.creatingReport ? _('Creating report...') : _('Export Debug Report'), this.exportDebugButtonPress_, { disabled: this.state.creatingReport }));
settingComps.push(this.renderButton('export_data', this.state.profileExportStatus === 'exporting' ? _('Exporting profile...') : _('Export profile'), this.exportProfileButtonPress_, { disabled: this.state.profileExportStatus === 'exporting', description: _('For debugging purpose only: export your profile to an external SD card.') }));
if (this.state.profileExportStatus === 'prompt') {

View File

@@ -0,0 +1,38 @@
import * as React from 'react';
import { FunctionComponent, ReactNode } from 'react';
import { View, Text, Button } from 'react-native';
import { ConfigScreenStyles } from './configScreenStyles';
interface Props {
title: string;
description: string;
clickHandler: ()=> void;
styles: ConfigScreenStyles;
disabled?: boolean;
statusComponent?: ReactNode;
}
const ConfigScreenButton: FunctionComponent<Props> = props => {
let descriptionComp = null;
if (props.description) {
descriptionComp = (
<View style={{ flex: 1, marginTop: 10 }}>
<Text style={props.styles.descriptionText}>{props.description}</Text>
</View>
);
}
return (
<View style={props.styles.settingContainer}>
<View style={{ flex: 1, flexDirection: 'column' }}>
<View style={{ flex: 1 }}>
<Button title={props.title} onPress={props.clickHandler} disabled={!!props.disabled} />
</View>
{props.statusComponent}
{descriptionComp}
</View>
</View>
);
};
export default ConfigScreenButton;

View File

@@ -0,0 +1,57 @@
/**
* @jest-environment jsdom
*/
import * as React from 'react';
import { setImmediate } from 'timers';
// Required by some libraries (setImmediate is not supported in most browsers,
// so is removed by jsdom).
window.setImmediate = setImmediate;
import { _ } from '@joplin/lib/locale';
import { act, fireEvent, render, waitFor } from '@testing-library/react-native';
import { expect, describe, beforeEach, test, jest } from '@jest/globals';
import '@testing-library/jest-native/extend-expect';
import { createNTestNotes, setupDatabaseAndSynchronizer, switchClient } from '@joplin/lib/testing/test-utils';
import Folder from '@joplin/lib/models/Folder';
import configScreenStyles from '../configScreenStyles';
import { type ShareOptions } from 'react-native-share';
import Setting from '@joplin/lib/models/Setting';
import NoteExportButton from './NoteExportButton';
jest.mock('react-native-share', () => {
const Share = {
open: (_options: ShareOptions) => jest.fn(),
};
return { default: Share };
});
describe('NoteExportButton', () => {
beforeEach(async () => {
await setupDatabaseAndSynchronizer(1);
await switchClient(1);
const folder1 = await Folder.save({ title: 'folder1' });
await createNTestNotes(10, folder1);
const folder2 = await Folder.save({ title: 'Folder 2 🙂' });
await createNTestNotes(10, folder2);
});
test('should show "Exported successfully!" after clicking "Export"', async () => {
const styles = configScreenStyles(Setting.THEME_DARK);
const view = render(<NoteExportButton
styles={styles}
/>);
const exportButton = view.getByText(_('Export all notes as JEX'));
await act(() => fireEvent.press(exportButton));
await waitFor(() =>
expect(view.queryByText(_('Exported successfully!'))).not.toBeNull()
);
// With the default folder setup, there should be no warnings
expect(view.queryByText(/Warnings/g)).toBeNull();
});
});

View File

@@ -0,0 +1,114 @@
import * as React from 'react';
import { Text, Alert, View } from 'react-native';
import { _ } from '@joplin/lib/locale';
import Logger from '@joplin/lib/Logger';
import { ProgressBar } from 'react-native-paper';
import { FunctionComponent, useCallback, useState } from 'react';
import shim from '@joplin/lib/shim';
import { join } from 'path';
import Share from 'react-native-share';
import exportAllFolders, { makeExportCacheDirectory } from './exportAllFolders';
import { ExportProgressState } from '@joplin/lib/services/interop/types';
import { ConfigScreenStyles } from '../configScreenStyles';
import ConfigScreenButton from '../ConfigScreenButton';
const logger = Logger.create('NoteExportButton');
interface Props {
styles: ConfigScreenStyles;
}
enum ExportStatus {
NotStarted,
Exporting,
Exported,
}
const NoteExportButton: FunctionComponent<Props> = props => {
const [exportStatus, setExportStatus] = useState<ExportStatus>(ExportStatus.NotStarted);
const [exportProgress, setExportProgress] = useState<number|undefined>(0);
const [warnings, setWarnings] = useState<string>('');
const startExport = useCallback(async () => {
// Don't run multiple exports at the same time.
if (exportStatus === ExportStatus.Exporting) {
return;
}
setExportStatus(ExportStatus.Exporting);
const exportTargetPath = join(await makeExportCacheDirectory(), 'jex-export.jex');
logger.info(`Exporting all folders to path ${exportTargetPath}`);
try {
// Initially, undetermined progress
setExportProgress(undefined);
const status = await exportAllFolders(exportTargetPath, (status, progress) => {
if (progress !== null) {
setExportProgress(progress);
} else if (status === ExportProgressState.Closing || status === ExportProgressState.QueuingItems) {
// We don't have a numeric progress value and the closing/queuing state may take a while.
// Set a special progress value:
setExportProgress(undefined);
}
});
setExportStatus(ExportStatus.Exported);
setWarnings(status.warnings.join('\n'));
await Share.open({
type: 'application/jex',
filename: 'export.jex',
url: `file://${exportTargetPath}`,
failOnCancel: false,
});
} catch (e) {
logger.error('Unable to export:', e);
// Display a message to the user (e.g. in the case where the user is out of disk space).
Alert.alert(_('Error'), _('Unable to export or share data. Reason: %s', e.toString()));
setExportStatus(ExportStatus.NotStarted);
} finally {
await shim.fsDriver().remove(exportTargetPath);
}
}, [exportStatus]);
if (exportStatus === ExportStatus.NotStarted || exportStatus === ExportStatus.Exporting) {
const progressComponent = (
<ProgressBar
visible={exportStatus === ExportStatus.Exporting}
indeterminate={exportProgress === undefined}
progress={exportProgress}/>
);
const descriptionText = _('Share a copy of all notes in a file format that can be imported by Joplin on a computer.');
const startOrCancelExportButton = (
<ConfigScreenButton
title={exportStatus === ExportStatus.Exporting ? _('Exporting...') : _('Export all notes as JEX')}
disabled={exportStatus === ExportStatus.Exporting}
description={exportStatus === ExportStatus.NotStarted ? descriptionText : null}
statusComponent={progressComponent}
clickHandler={startExport}
styles={props.styles}
/>
);
return startOrCancelExportButton;
} else {
const warningComponent = (
<Text style={props.styles.warningText}>
{_('Warnings:\n%s', warnings)}
</Text>
);
const exportSummary = (
<View style={props.styles.settingContainer}>
<Text style={props.styles.descriptionText}>{_('Exported successfully!')}</Text>
{warnings.length > 0 ? warningComponent : null}
</View>
);
return exportSummary;
}
};
export default NoteExportButton;

View File

@@ -0,0 +1,29 @@
import Folder from '@joplin/lib/models/Folder';
import InteropService from '@joplin/lib/services/interop/InteropService';
import { ExportOptions, FileSystemItem, OnExportProgressCallback } from '@joplin/lib/services/interop/types';
import shim from '@joplin/lib/shim';
import { CachesDirectoryPath } from 'react-native-fs';
export const makeExportCacheDirectory = async () => {
const targetDir = `${CachesDirectoryPath}/exports`;
await shim.fsDriver().mkdir(targetDir);
return targetDir;
};
const exportFolders = async (path: string, onProgress: OnExportProgressCallback) => {
const folders = await Folder.all();
const sourceFolderIds = folders.map(folder => folder.id);
const exportOptions: ExportOptions = {
sourceFolderIds,
path,
format: 'jex',
target: FileSystemItem.File,
onProgress,
};
return await InteropService.instance().export(exportOptions);
};
export default exportFolders;

View File

@@ -0,0 +1,137 @@
import { TextStyle, ViewStyle, StyleSheet } from 'react-native';
const { themeStyle } = require('../../global-style.js');
export interface ConfigScreenStyles {
body: ViewStyle;
settingContainer: ViewStyle;
settingContainerNoBottomBorder: ViewStyle;
headerWrapperStyle: ViewStyle;
settingText: TextStyle;
linkText: TextStyle;
descriptionText: TextStyle;
warningText: TextStyle;
sliderUnits: TextStyle;
settingDescriptionText: TextStyle;
permissionText: TextStyle;
textInput: TextStyle;
switchSettingText: TextStyle;
switchSettingContainer: ViewStyle;
switchSettingControl: TextStyle;
settingControl: TextStyle;
}
const configScreenStyles = (themeId: number): ConfigScreenStyles => {
const theme = themeStyle(themeId);
const settingContainerStyle: ViewStyle = {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
borderBottomWidth: 1,
borderBottomColor: theme.dividerColor,
paddingTop: theme.marginTop,
paddingBottom: theme.marginBottom,
paddingLeft: theme.marginLeft,
paddingRight: theme.marginRight,
};
const settingTextStyle: TextStyle = {
color: theme.color,
fontSize: theme.fontSize,
flex: 1,
paddingRight: 5,
};
const settingControlStyle: TextStyle = {
color: theme.color,
flex: 1,
borderBottomWidth: 1,
borderBottomColor: theme.dividerColor,
};
const styles: ConfigScreenStyles = {
body: {
flex: 1,
justifyContent: 'flex-start',
flexDirection: 'column',
},
settingContainer: settingContainerStyle,
settingContainerNoBottomBorder: {
...settingContainerStyle,
borderBottomWidth: 0,
paddingBottom: theme.marginBottom / 2,
},
settingText: settingTextStyle,
descriptionText: {
color: theme.colorFaded,
fontSize: theme.fontSizeSmaller,
flex: 1,
},
linkText: {
...settingTextStyle,
borderBottomWidth: 1,
borderBottomColor: theme.color,
flex: 0,
fontWeight: 'normal',
},
warningText: {
color: theme.color,
backgroundColor: theme.warningBackgroundColor,
fontSize: theme.fontSizeSmaller,
},
sliderUnits: {
color: theme.color,
fontSize: theme.fontSize,
marginRight: 10,
},
settingDescriptionText: {
color: theme.colorFaded,
fontSize: theme.fontSizeSmaller,
flex: 1,
paddingLeft: theme.marginLeft,
paddingRight: theme.marginRight,
paddingBottom: theme.marginBottom,
},
permissionText: {
color: theme.color,
fontSize: theme.fontSize,
flex: 1,
marginTop: 10,
},
settingControl: settingControlStyle,
textInput: {
color: theme.color,
},
switchSettingText: {
...settingTextStyle,
width: '80%',
},
switchSettingContainer: {
...settingContainerStyle,
flexDirection: 'row',
justifyContent: 'space-between',
},
headerWrapperStyle: {
...settingContainerStyle,
...theme.headerWrapperStyle,
},
switchSettingControl: {
...settingControlStyle,
color: undefined,
flex: 0,
},
};
return StyleSheet.create(styles);
};
export default configScreenStyles;

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