Compare commits
225 Commits
v3.0.4
...
android-v3
Author | SHA1 | Date | |
---|---|---|---|
|
fac9ea3b42 | ||
|
45f8e27d6a | ||
|
c8a478d970 | ||
|
75dfb0af5f | ||
|
5e592a3096 | ||
|
84e46ad874 | ||
|
0ec917bb96 | ||
|
818f9f58d1 | ||
|
e1abe0b4cb | ||
|
c972ce223e | ||
|
d9dadf28cb | ||
|
1fb392ff4e | ||
|
affa620983 | ||
|
ed31d8202b | ||
|
573ea6051c | ||
|
f1ec54532f | ||
|
5eb96d71e1 | ||
|
73251bac4a | ||
|
f40a0da195 | ||
|
8dc1ab2cc5 | ||
|
1b46c9f5e7 | ||
|
483ab55a36 | ||
|
502002f9f6 | ||
|
8d8014511f | ||
|
28569e652e | ||
|
9acf36d802 | ||
|
06d26767ed | ||
|
88858d4413 | ||
|
27309427a1 | ||
|
e83a18a907 | ||
|
9bd8b11f67 | ||
|
3a14c7ce2d | ||
|
fe4c9a2401 | ||
|
d2fb19cf6d | ||
|
1f8e3fb620 | ||
|
8bbe1d30b4 | ||
|
ec92f716de | ||
|
ab819d9210 | ||
|
e465b45d6e | ||
|
a4a4170d49 | ||
|
1dcf528443 | ||
|
8cf4ef88b5 | ||
|
bf634270be | ||
|
56437d3e1b | ||
|
d095ab2be7 | ||
|
4751b4dd74 | ||
|
ce22d8238c | ||
|
9e2b9e5b8d | ||
|
4952980e0a | ||
|
59989d2735 | ||
|
eb7f2855b0 | ||
|
a0e3e4fefb | ||
|
de9661448b | ||
|
562aabafa1 | ||
|
a659e45a68 | ||
|
8e44a15c8d | ||
|
a086358824 | ||
|
889c395818 | ||
|
7d0cc675aa | ||
|
73d3f92ae2 | ||
|
f5ceb4064c | ||
|
53d7bc86ca | ||
|
4495fc9a03 | ||
|
7ee5cad21e | ||
|
940739ce12 | ||
|
5730c1efcd | ||
|
b17f28ce94 | ||
|
629e968878 | ||
|
47a924ff4e | ||
|
c511fb59c7 | ||
|
80aeff6ecd | ||
|
97d15bb26a | ||
|
99b36cbff1 | ||
|
74c3d2c9fb | ||
|
df8c7fd31c | ||
|
3a780b9490 | ||
|
97ddb67f68 | ||
|
f50a27985b | ||
|
061a9d5bff | ||
|
06f42e8246 | ||
|
19f0b667b1 | ||
|
ac7165461a | ||
|
efb48e6145 | ||
|
f94c16b22e | ||
|
0938dc9d52 | ||
|
e049698012 | ||
|
c9fb06fd0c | ||
|
96850b7b98 | ||
|
32710e44c3 | ||
|
32e16f6e51 | ||
|
f938d5f489 | ||
|
99b840da34 | ||
|
55c222c577 | ||
|
418a6e455f | ||
|
789d19b18c | ||
|
59b26f2c63 | ||
|
f1eeeabdc5 | ||
|
d2a33b006b | ||
|
2386f583e8 | ||
|
70c5448402 | ||
|
4e3326b12f | ||
|
34092d8491 | ||
|
b8caf08fac | ||
|
b0d0e641ea | ||
|
3a1de4e941 | ||
|
97274c95a5 | ||
|
300d0e3ca5 | ||
|
50d08cd178 | ||
|
28f3d53b3b | ||
|
768e59938c | ||
|
6c7948a087 | ||
|
cc2b442519 | ||
|
fa285a9404 | ||
|
84faa7229d | ||
|
254747ee78 | ||
|
ef167051d6 | ||
|
1ccbdc2341 | ||
|
14747b79cd | ||
|
111385f1ef | ||
|
f36d395a84 | ||
|
5d997084f7 | ||
|
132548181f | ||
|
452c71e8cb | ||
|
f7ac95f850 | ||
|
33286efe9a | ||
|
f21a93febe | ||
|
f817c47dc0 | ||
|
9ccca16df7 | ||
|
114f5695b7 | ||
|
916fa39012 | ||
|
db77a51129 | ||
|
b09d6e8568 | ||
|
3bf9438a59 | ||
|
554894e910 | ||
|
51f1e0202f | ||
|
8b7758442b | ||
|
63bf7694f0 | ||
|
df3aaa7dfd | ||
|
826006ce8b | ||
|
1e085ee619 | ||
|
efb753e229 | ||
|
faf332a0e8 | ||
|
83308337b5 | ||
|
73193df120 | ||
|
2dd27cdd00 | ||
|
c5e3672e9e | ||
|
366517999f | ||
|
8445ffaa86 | ||
|
2a76970461 | ||
|
9fcaf5bd18 | ||
|
652add9af2 | ||
|
c632ea5c48 | ||
|
7ee5f68770 | ||
|
1040675781 | ||
|
24a37e0fef | ||
|
bfe2d262a5 | ||
|
8faf5148a6 | ||
|
27c5dd1852 | ||
|
fae51b90a7 | ||
|
ccd181851c | ||
|
cd0ff94c0c | ||
|
e9e6d8a69c | ||
|
7ad3b34ec3 | ||
|
f39021d373 | ||
|
13116fec76 | ||
|
d49b2ec0e9 | ||
|
09d088b2b5 | ||
|
3312bd27c9 | ||
|
453bdb293f | ||
|
6b0e1598ed | ||
|
56f25d3094 | ||
|
3e458c0028 | ||
|
a747828276 | ||
|
a90e3e04a4 | ||
|
487f01d2ec | ||
|
36c25fdd86 | ||
|
a9fecb31c3 | ||
|
ca8fd8d7ae | ||
|
fb345b1317 | ||
|
966fe38ae3 | ||
|
3042e615ac | ||
|
fd2ae51b93 | ||
|
1227730393 | ||
|
8622bd506f | ||
|
5d6a39ce51 | ||
|
5245c06ed3 | ||
|
3c5977346e | ||
|
a3dc9c2721 | ||
|
90ec1f5bc6 | ||
|
99caa014ca | ||
|
00d0cd1cf7 | ||
|
d6480e50d2 | ||
|
a1a06dd7d0 | ||
|
95b73b5f41 | ||
|
cc00cdfa55 | ||
|
548ba7d712 | ||
|
1ea0c56d7b | ||
|
f764e76f01 | ||
|
4862c2e8ea | ||
|
cbb4d43981 | ||
|
87269e6bcd | ||
|
7d19d294a6 | ||
|
5f3ac323ff | ||
|
0a766d7314 | ||
|
e73535ace0 | ||
|
8e93f0975f | ||
|
57c316a591 | ||
|
f1691b7743 | ||
|
92a025011e | ||
|
d5fa8d0216 | ||
|
1f74a42dfa | ||
|
569b567f21 | ||
|
85f890e7c5 | ||
|
4056fc2281 | ||
|
70c2f0a70a | ||
|
aac8d58372 | ||
|
8ec233f59c | ||
|
a0dd7f58ac | ||
|
443e04b369 | ||
|
cfd9bca4d6 | ||
|
f17157f7e2 | ||
|
18b9f5c79b | ||
|
1b060925a4 | ||
|
00fa618596 | ||
|
131ec9e913 |
@@ -242,6 +242,7 @@ packages/app-desktop/gui/MainScreen/commands/showSpellCheckerMenu.test.js
|
||||
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/toggleMenuBar.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
|
||||
@@ -290,6 +291,7 @@ packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/types.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useContextMenu.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useLinkTooltips.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useWebViewApi.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteEditor.js
|
||||
@@ -321,6 +323,8 @@ packages/app-desktop/gui/NoteEditor/utils/useMarkupToHtml.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useMessageHandler.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useNoteSearchBar.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/usePluginServiceRegistration.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useScheduleSaveCallbacks.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useScrollWhenReadyOptions.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useSearchMarkers.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useWindowCommandHandler.js
|
||||
packages/app-desktop/gui/NoteList/NoteList2.js
|
||||
@@ -452,6 +456,8 @@ packages/app-desktop/integration-tests/models/MainScreen.js
|
||||
packages/app-desktop/integration-tests/models/NoteEditorScreen.js
|
||||
packages/app-desktop/integration-tests/models/SettingsScreen.js
|
||||
packages/app-desktop/integration-tests/models/Sidebar.js
|
||||
packages/app-desktop/integration-tests/noteList.spec.js
|
||||
packages/app-desktop/integration-tests/richTextEditor.spec.js
|
||||
packages/app-desktop/integration-tests/sidebar.spec.js
|
||||
packages/app-desktop/integration-tests/simpleBackup.spec.js
|
||||
packages/app-desktop/integration-tests/util/activateMainMenuItem.js
|
||||
@@ -460,6 +466,7 @@ packages/app-desktop/integration-tests/util/firstNonDevToolsWindow.js
|
||||
packages/app-desktop/integration-tests/util/setFilePickerResponse.js
|
||||
packages/app-desktop/integration-tests/util/setMessageBoxResponse.js
|
||||
packages/app-desktop/integration-tests/util/test.js
|
||||
packages/app-desktop/integration-tests/util/waitForNextOpenPath.js
|
||||
packages/app-desktop/playwright.config.js
|
||||
packages/app-desktop/plugins/GotoAnything.js
|
||||
packages/app-desktop/services/bridge.js
|
||||
@@ -500,20 +507,23 @@ packages/app-desktop/utils/restartInSafeModeFromMain.test.js
|
||||
packages/app-desktop/utils/restartInSafeModeFromMain.js
|
||||
packages/app-mobile/PluginAssetsLoader.js
|
||||
packages/app-mobile/commands/index.js
|
||||
packages/app-mobile/commands/newNote.test.js
|
||||
packages/app-mobile/commands/newNote.js
|
||||
packages/app-mobile/commands/openItem.js
|
||||
packages/app-mobile/commands/openNote.js
|
||||
packages/app-mobile/commands/scrollToHash.js
|
||||
packages/app-mobile/commands/util/goToNote.js
|
||||
packages/app-mobile/components/ActionButton.js
|
||||
packages/app-mobile/components/BackButtonDialogBox.js
|
||||
packages/app-mobile/components/BetaChip.js
|
||||
packages/app-mobile/components/CameraView.js
|
||||
packages/app-mobile/components/CustomButton.js
|
||||
packages/app-mobile/components/DismissibleDialog.js
|
||||
packages/app-mobile/components/Dropdown.test.js
|
||||
packages/app-mobile/components/Dropdown.js
|
||||
packages/app-mobile/components/ExtendedWebView.js
|
||||
packages/app-mobile/components/FolderPicker.js
|
||||
packages/app-mobile/components/Icon.js
|
||||
packages/app-mobile/components/IconButton.js
|
||||
packages/app-mobile/components/Modal.js
|
||||
packages/app-mobile/components/ModalDialog.js
|
||||
packages/app-mobile/components/NoteBodyViewer/NoteBodyViewer.js
|
||||
@@ -581,11 +591,14 @@ packages/app-mobile/components/base-screen.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/buttons/TextButton.js
|
||||
packages/app-mobile/components/buttons/index.js
|
||||
packages/app-mobile/components/getResponsiveValue.test.js
|
||||
packages/app-mobile/components/getResponsiveValue.js
|
||||
packages/app-mobile/components/global-style.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/ConfigScreen.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/FileSystemPathSelector.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/JoplinCloudConfig.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/ExportDebugReportButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/ExportProfileButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/NoteExportButton.test.js
|
||||
@@ -598,25 +611,38 @@ packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/utils/expo
|
||||
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/utils/makeImportExportCacheDirectory.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SectionDescription.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SectionHeader.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SectionSelector.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SectionSelector/SectionTab.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SectionSelector/index.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SettingComponent.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SettingItem.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SettingsButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SettingsToggle.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/configScreenStyles.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/ActionButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/PluginInfoButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/EnablePluginSupportPage.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/InstalledPluginBox.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/PluginChip.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/PluginChips.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/PluginTitle.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/RecommendedBadge.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/index.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginStates.test.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginInfoModal.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginStates.installed.test.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginStates.search.test.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginStates.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginToggle.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginUploadButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/SearchPlugins.test.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/SearchPlugins.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/SectionLabel.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/buttons/ActionButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/buttons/InstallButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/testUtils/WrappedPluginStates.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/testUtils/mockRepositoryApiConstructor.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/testUtils/newRepoApi.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/testUtils/pluginServiceSetup.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/utils/openWebsiteForPlugin.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/utils/usePluginCallbacks.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/utils/usePluginItem.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/utils/useRepoApi.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/utils/useUpdateState.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/types.js
|
||||
packages/app-mobile/components/screens/JoplinCloudLoginScreen.js
|
||||
packages/app-mobile/components/screens/LogScreen.js
|
||||
@@ -657,7 +683,9 @@ packages/app-mobile/plugins/PluginRunner/dialogs/hooks/useWebViewSetup.js
|
||||
packages/app-mobile/plugins/PluginRunner/types.js
|
||||
packages/app-mobile/plugins/PluginRunner/utils/createOnLogHandler.js
|
||||
packages/app-mobile/plugins/hooks/usePlugin.js
|
||||
packages/app-mobile/plugins/loadPlugins.test.js
|
||||
packages/app-mobile/plugins/loadPlugins.js
|
||||
packages/app-mobile/plugins/testing/MockPluginRunner.js
|
||||
packages/app-mobile/root.js
|
||||
packages/app-mobile/services/AlarmServiceDriver.android.js
|
||||
packages/app-mobile/services/AlarmServiceDriver.ios.js
|
||||
@@ -688,6 +716,7 @@ packages/app-mobile/utils/fs-driver/tarExtract.js
|
||||
packages/app-mobile/utils/fs-driver/testUtil/createFilesFromPathRecord.js
|
||||
packages/app-mobile/utils/fs-driver/testUtil/verifyDirectoryMatches.js
|
||||
packages/app-mobile/utils/getPackageInfo.js
|
||||
packages/app-mobile/utils/getVersionInfoText.js
|
||||
packages/app-mobile/utils/initializeCommandService.js
|
||||
packages/app-mobile/utils/ipc/RNToWebViewMessenger.js
|
||||
packages/app-mobile/utils/ipc/WebViewToRNMessenger.js
|
||||
@@ -740,8 +769,9 @@ packages/editor/CodeMirror/markdown/markdownCommands.toggleList.test.js
|
||||
packages/editor/CodeMirror/markdown/markdownCommands.js
|
||||
packages/editor/CodeMirror/markdown/markdownMathParser.test.js
|
||||
packages/editor/CodeMirror/markdown/markdownMathParser.js
|
||||
packages/editor/CodeMirror/markdown/markdownReformatter.test.js
|
||||
packages/editor/CodeMirror/markdown/markdownReformatter.js
|
||||
packages/editor/CodeMirror/markdown/utils/renumberSelectedLists.test.js
|
||||
packages/editor/CodeMirror/markdown/utils/renumberSelectedLists.js
|
||||
packages/editor/CodeMirror/markdown/utils/stripBlockquote.js
|
||||
packages/editor/CodeMirror/pluginApi/PluginLoader.js
|
||||
packages/editor/CodeMirror/pluginApi/codeMirrorRequire.js
|
||||
packages/editor/CodeMirror/pluginApi/customEditorCompletion.test.js
|
||||
@@ -754,8 +784,22 @@ packages/editor/CodeMirror/testUtil/loadLanguages.js
|
||||
packages/editor/CodeMirror/testUtil/pressReleaseKey.js
|
||||
packages/editor/CodeMirror/testUtil/typeText.js
|
||||
packages/editor/CodeMirror/theme.js
|
||||
packages/editor/CodeMirror/util/isInSyntaxNode.js
|
||||
packages/editor/CodeMirror/util/setupVim.js
|
||||
packages/editor/CodeMirror/utils/formatting/RegionSpec.js
|
||||
packages/editor/CodeMirror/utils/formatting/findInlineMatch.test.js
|
||||
packages/editor/CodeMirror/utils/formatting/findInlineMatch.js
|
||||
packages/editor/CodeMirror/utils/formatting/isIndentationEquivalent.js
|
||||
packages/editor/CodeMirror/utils/formatting/tabsToSpaces.test.js
|
||||
packages/editor/CodeMirror/utils/formatting/tabsToSpaces.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleInlineFormatGlobally.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleInlineRegionSurrounded.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleInlineSelectionFormat.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleRegionFormatGlobally.test.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleRegionFormatGlobally.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleSelectedLinesStartWith.js
|
||||
packages/editor/CodeMirror/utils/formatting/types.js
|
||||
packages/editor/CodeMirror/utils/growSelectionToNode.js
|
||||
packages/editor/CodeMirror/utils/isInSyntaxNode.js
|
||||
packages/editor/CodeMirror/utils/setupVim.js
|
||||
packages/editor/SelectionFormatting.js
|
||||
packages/editor/events.js
|
||||
packages/editor/types.js
|
||||
@@ -781,6 +825,7 @@ packages/generator-joplin/generators/app/templates/src/index.js
|
||||
packages/generator-joplin/tools/updateCategories.js
|
||||
packages/htmlpack/src/index.js
|
||||
packages/lib/ArrayUtils.js
|
||||
packages/lib/AsyncActionQueue.test.js
|
||||
packages/lib/AsyncActionQueue.js
|
||||
packages/lib/BaseApplication.js
|
||||
packages/lib/BaseModel.js
|
||||
@@ -870,6 +915,7 @@ packages/lib/markdownUtils.js
|
||||
packages/lib/markdownUtils2.test.js
|
||||
packages/lib/markupLanguageUtils.js
|
||||
packages/lib/migrations/42.js
|
||||
packages/lib/mime-utils.js
|
||||
packages/lib/models/Alarm.js
|
||||
packages/lib/models/BaseItem.test.js
|
||||
packages/lib/models/BaseItem.js
|
||||
@@ -919,6 +965,7 @@ packages/lib/ntp.js
|
||||
packages/lib/onedrive-api.test.js
|
||||
packages/lib/onedrive-api.js
|
||||
packages/lib/path-utils.js
|
||||
packages/lib/reducer.test.js
|
||||
packages/lib/reducer.js
|
||||
packages/lib/registry.test.js
|
||||
packages/lib/registry.js
|
||||
@@ -1201,10 +1248,12 @@ packages/lib/themes/solarizedLight.js
|
||||
packages/lib/themes/type.js
|
||||
packages/lib/time.js
|
||||
packages/lib/types.js
|
||||
packages/lib/urlUtils.js
|
||||
packages/lib/utils/ActionLogger.test.js
|
||||
packages/lib/utils/ActionLogger.js
|
||||
packages/lib/utils/credentialFiles.js
|
||||
packages/lib/utils/focusHandler.js
|
||||
packages/lib/utils/frontMatter.js
|
||||
packages/lib/utils/ipc/RemoteMessenger.test.js
|
||||
packages/lib/utils/ipc/RemoteMessenger.js
|
||||
packages/lib/utils/ipc/TestMessenger.js
|
||||
@@ -1215,7 +1264,8 @@ packages/lib/utils/ipc/utils/mergeCallbacksAndSerializable.js
|
||||
packages/lib/utils/ipc/utils/separateCallbacksFromSerializable.test.js
|
||||
packages/lib/utils/ipc/utils/separateCallbacksFromSerializable.js
|
||||
packages/lib/utils/ipc/utils/separateCallbacksFromSerializableArray.js
|
||||
packages/lib/utils/joplinCloud.js
|
||||
packages/lib/utils/joplinCloud/index.js
|
||||
packages/lib/utils/joplinCloud/types.js
|
||||
packages/lib/utils/processStartFlags.js
|
||||
packages/lib/utils/replaceUnsupportedCharacters.test.js
|
||||
packages/lib/utils/replaceUnsupportedCharacters.js
|
||||
@@ -1287,6 +1337,7 @@ packages/renderer/MdToHtml/rules/mermaid.js
|
||||
packages/renderer/MdToHtml/rules/sanitize_html.js
|
||||
packages/renderer/MdToHtml/rules/source_map.js
|
||||
packages/renderer/MdToHtml/rules/tableHorizontallyScrollable.js
|
||||
packages/renderer/MdToHtml/rules/utils/defaultRule.js
|
||||
packages/renderer/MdToHtml/setupLinkify.js
|
||||
packages/renderer/MdToHtml/validateLinks.js
|
||||
packages/renderer/assetsToHeaders.js
|
||||
|
13
.github/workflows/build-android.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
with:
|
||||
concurrent_skipping: 'same_content_newer'
|
||||
|
||||
BuildAndroidDebug:
|
||||
AssembleRelease:
|
||||
needs: pre_job
|
||||
if: github.repository == 'laurent22/joplin' && needs.pre_job.outputs.should_skip != 'true'
|
||||
runs-on: ubuntu-latest
|
||||
@@ -25,6 +25,11 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update || true
|
||||
sudo apt-get install -y libsecret-1-dev
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '20'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -40,7 +45,9 @@ jobs:
|
||||
- name: Install
|
||||
run: yarn install
|
||||
|
||||
- name: Build Android Release
|
||||
- name: Assemble Android Release
|
||||
run: |
|
||||
cd packages/app-mobile/android && ./gradlew assembleDebug
|
||||
cd packages/app-mobile/android
|
||||
sed -i -- 's/signingConfig signingConfigs.release/signingConfig signingConfigs.debug/' app/build.gradle
|
||||
./gradlew assembleRelease
|
||||
|
2
.github/workflows/cla.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
- name: "CLA Assistant"
|
||||
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
|
||||
# Beta Release
|
||||
uses: contributor-assistant/github-action@v2.3.1
|
||||
uses: contributor-assistant/github-action@v2.3.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# the below token should have repo scope and must be manually added by you in the repository's secret
|
||||
|
2
.github/workflows/github-actions-main.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
matrix:
|
||||
# Do not use unbuntu-latest because it causes `The operation was canceled` failures:
|
||||
# https://github.com/actions/runner-images/issues/6709
|
||||
os: [macos-latest, ubuntu-20.04, windows-2019]
|
||||
os: [macos-12, ubuntu-20.04, windows-2019]
|
||||
steps:
|
||||
|
||||
# Trying to fix random networking issues on Windows
|
||||
|
76
.gitignore
vendored
@@ -10,7 +10,6 @@ _vieux/
|
||||
!var/sessions/.gitkeep
|
||||
!var/SymfonyRequirements.php
|
||||
.DS_Store
|
||||
.vscode/*
|
||||
*.map
|
||||
*.pro.user
|
||||
*.sublime-workspace
|
||||
@@ -222,6 +221,7 @@ packages/app-desktop/gui/MainScreen/commands/showSpellCheckerMenu.test.js
|
||||
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/toggleMenuBar.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
|
||||
@@ -270,6 +270,7 @@ packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/types.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useContextMenu.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useLinkTooltips.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useWebViewApi.js
|
||||
packages/app-desktop/gui/NoteEditor/NoteEditor.js
|
||||
@@ -301,6 +302,8 @@ packages/app-desktop/gui/NoteEditor/utils/useMarkupToHtml.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useMessageHandler.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useNoteSearchBar.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/usePluginServiceRegistration.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useScheduleSaveCallbacks.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useScrollWhenReadyOptions.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useSearchMarkers.js
|
||||
packages/app-desktop/gui/NoteEditor/utils/useWindowCommandHandler.js
|
||||
packages/app-desktop/gui/NoteList/NoteList2.js
|
||||
@@ -432,6 +435,8 @@ packages/app-desktop/integration-tests/models/MainScreen.js
|
||||
packages/app-desktop/integration-tests/models/NoteEditorScreen.js
|
||||
packages/app-desktop/integration-tests/models/SettingsScreen.js
|
||||
packages/app-desktop/integration-tests/models/Sidebar.js
|
||||
packages/app-desktop/integration-tests/noteList.spec.js
|
||||
packages/app-desktop/integration-tests/richTextEditor.spec.js
|
||||
packages/app-desktop/integration-tests/sidebar.spec.js
|
||||
packages/app-desktop/integration-tests/simpleBackup.spec.js
|
||||
packages/app-desktop/integration-tests/util/activateMainMenuItem.js
|
||||
@@ -440,6 +445,7 @@ packages/app-desktop/integration-tests/util/firstNonDevToolsWindow.js
|
||||
packages/app-desktop/integration-tests/util/setFilePickerResponse.js
|
||||
packages/app-desktop/integration-tests/util/setMessageBoxResponse.js
|
||||
packages/app-desktop/integration-tests/util/test.js
|
||||
packages/app-desktop/integration-tests/util/waitForNextOpenPath.js
|
||||
packages/app-desktop/playwright.config.js
|
||||
packages/app-desktop/plugins/GotoAnything.js
|
||||
packages/app-desktop/services/bridge.js
|
||||
@@ -480,20 +486,23 @@ packages/app-desktop/utils/restartInSafeModeFromMain.test.js
|
||||
packages/app-desktop/utils/restartInSafeModeFromMain.js
|
||||
packages/app-mobile/PluginAssetsLoader.js
|
||||
packages/app-mobile/commands/index.js
|
||||
packages/app-mobile/commands/newNote.test.js
|
||||
packages/app-mobile/commands/newNote.js
|
||||
packages/app-mobile/commands/openItem.js
|
||||
packages/app-mobile/commands/openNote.js
|
||||
packages/app-mobile/commands/scrollToHash.js
|
||||
packages/app-mobile/commands/util/goToNote.js
|
||||
packages/app-mobile/components/ActionButton.js
|
||||
packages/app-mobile/components/BackButtonDialogBox.js
|
||||
packages/app-mobile/components/BetaChip.js
|
||||
packages/app-mobile/components/CameraView.js
|
||||
packages/app-mobile/components/CustomButton.js
|
||||
packages/app-mobile/components/DismissibleDialog.js
|
||||
packages/app-mobile/components/Dropdown.test.js
|
||||
packages/app-mobile/components/Dropdown.js
|
||||
packages/app-mobile/components/ExtendedWebView.js
|
||||
packages/app-mobile/components/FolderPicker.js
|
||||
packages/app-mobile/components/Icon.js
|
||||
packages/app-mobile/components/IconButton.js
|
||||
packages/app-mobile/components/Modal.js
|
||||
packages/app-mobile/components/ModalDialog.js
|
||||
packages/app-mobile/components/NoteBodyViewer/NoteBodyViewer.js
|
||||
@@ -561,11 +570,14 @@ packages/app-mobile/components/base-screen.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/buttons/TextButton.js
|
||||
packages/app-mobile/components/buttons/index.js
|
||||
packages/app-mobile/components/getResponsiveValue.test.js
|
||||
packages/app-mobile/components/getResponsiveValue.js
|
||||
packages/app-mobile/components/global-style.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/ConfigScreen.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/FileSystemPathSelector.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/JoplinCloudConfig.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/ExportDebugReportButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/ExportProfileButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/NoteExportButton.test.js
|
||||
@@ -578,25 +590,38 @@ packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/utils/expo
|
||||
packages/app-mobile/components/screens/ConfigScreen/NoteExportSection/utils/makeImportExportCacheDirectory.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SectionDescription.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SectionHeader.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SectionSelector.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SectionSelector/SectionTab.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SectionSelector/index.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SettingComponent.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SettingItem.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SettingsButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/SettingsToggle.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/configScreenStyles.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/ActionButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/PluginInfoButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/EnablePluginSupportPage.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/InstalledPluginBox.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/PluginChip.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/PluginChips.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/PluginTitle.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/RecommendedBadge.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginBox/index.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginStates.test.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginInfoModal.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginStates.installed.test.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginStates.search.test.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginStates.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginToggle.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/PluginUploadButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/SearchPlugins.test.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/SearchPlugins.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/SectionLabel.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/buttons/ActionButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/buttons/InstallButton.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/testUtils/WrappedPluginStates.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/testUtils/mockRepositoryApiConstructor.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/testUtils/newRepoApi.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/testUtils/pluginServiceSetup.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/utils/openWebsiteForPlugin.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/utils/usePluginCallbacks.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/utils/usePluginItem.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/utils/useRepoApi.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/plugins/utils/useUpdateState.js
|
||||
packages/app-mobile/components/screens/ConfigScreen/types.js
|
||||
packages/app-mobile/components/screens/JoplinCloudLoginScreen.js
|
||||
packages/app-mobile/components/screens/LogScreen.js
|
||||
@@ -637,7 +662,9 @@ packages/app-mobile/plugins/PluginRunner/dialogs/hooks/useWebViewSetup.js
|
||||
packages/app-mobile/plugins/PluginRunner/types.js
|
||||
packages/app-mobile/plugins/PluginRunner/utils/createOnLogHandler.js
|
||||
packages/app-mobile/plugins/hooks/usePlugin.js
|
||||
packages/app-mobile/plugins/loadPlugins.test.js
|
||||
packages/app-mobile/plugins/loadPlugins.js
|
||||
packages/app-mobile/plugins/testing/MockPluginRunner.js
|
||||
packages/app-mobile/root.js
|
||||
packages/app-mobile/services/AlarmServiceDriver.android.js
|
||||
packages/app-mobile/services/AlarmServiceDriver.ios.js
|
||||
@@ -668,6 +695,7 @@ packages/app-mobile/utils/fs-driver/tarExtract.js
|
||||
packages/app-mobile/utils/fs-driver/testUtil/createFilesFromPathRecord.js
|
||||
packages/app-mobile/utils/fs-driver/testUtil/verifyDirectoryMatches.js
|
||||
packages/app-mobile/utils/getPackageInfo.js
|
||||
packages/app-mobile/utils/getVersionInfoText.js
|
||||
packages/app-mobile/utils/initializeCommandService.js
|
||||
packages/app-mobile/utils/ipc/RNToWebViewMessenger.js
|
||||
packages/app-mobile/utils/ipc/WebViewToRNMessenger.js
|
||||
@@ -720,8 +748,9 @@ packages/editor/CodeMirror/markdown/markdownCommands.toggleList.test.js
|
||||
packages/editor/CodeMirror/markdown/markdownCommands.js
|
||||
packages/editor/CodeMirror/markdown/markdownMathParser.test.js
|
||||
packages/editor/CodeMirror/markdown/markdownMathParser.js
|
||||
packages/editor/CodeMirror/markdown/markdownReformatter.test.js
|
||||
packages/editor/CodeMirror/markdown/markdownReformatter.js
|
||||
packages/editor/CodeMirror/markdown/utils/renumberSelectedLists.test.js
|
||||
packages/editor/CodeMirror/markdown/utils/renumberSelectedLists.js
|
||||
packages/editor/CodeMirror/markdown/utils/stripBlockquote.js
|
||||
packages/editor/CodeMirror/pluginApi/PluginLoader.js
|
||||
packages/editor/CodeMirror/pluginApi/codeMirrorRequire.js
|
||||
packages/editor/CodeMirror/pluginApi/customEditorCompletion.test.js
|
||||
@@ -734,8 +763,22 @@ packages/editor/CodeMirror/testUtil/loadLanguages.js
|
||||
packages/editor/CodeMirror/testUtil/pressReleaseKey.js
|
||||
packages/editor/CodeMirror/testUtil/typeText.js
|
||||
packages/editor/CodeMirror/theme.js
|
||||
packages/editor/CodeMirror/util/isInSyntaxNode.js
|
||||
packages/editor/CodeMirror/util/setupVim.js
|
||||
packages/editor/CodeMirror/utils/formatting/RegionSpec.js
|
||||
packages/editor/CodeMirror/utils/formatting/findInlineMatch.test.js
|
||||
packages/editor/CodeMirror/utils/formatting/findInlineMatch.js
|
||||
packages/editor/CodeMirror/utils/formatting/isIndentationEquivalent.js
|
||||
packages/editor/CodeMirror/utils/formatting/tabsToSpaces.test.js
|
||||
packages/editor/CodeMirror/utils/formatting/tabsToSpaces.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleInlineFormatGlobally.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleInlineRegionSurrounded.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleInlineSelectionFormat.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleRegionFormatGlobally.test.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleRegionFormatGlobally.js
|
||||
packages/editor/CodeMirror/utils/formatting/toggleSelectedLinesStartWith.js
|
||||
packages/editor/CodeMirror/utils/formatting/types.js
|
||||
packages/editor/CodeMirror/utils/growSelectionToNode.js
|
||||
packages/editor/CodeMirror/utils/isInSyntaxNode.js
|
||||
packages/editor/CodeMirror/utils/setupVim.js
|
||||
packages/editor/SelectionFormatting.js
|
||||
packages/editor/events.js
|
||||
packages/editor/types.js
|
||||
@@ -761,6 +804,7 @@ packages/generator-joplin/generators/app/templates/src/index.js
|
||||
packages/generator-joplin/tools/updateCategories.js
|
||||
packages/htmlpack/src/index.js
|
||||
packages/lib/ArrayUtils.js
|
||||
packages/lib/AsyncActionQueue.test.js
|
||||
packages/lib/AsyncActionQueue.js
|
||||
packages/lib/BaseApplication.js
|
||||
packages/lib/BaseModel.js
|
||||
@@ -850,6 +894,7 @@ packages/lib/markdownUtils.js
|
||||
packages/lib/markdownUtils2.test.js
|
||||
packages/lib/markupLanguageUtils.js
|
||||
packages/lib/migrations/42.js
|
||||
packages/lib/mime-utils.js
|
||||
packages/lib/models/Alarm.js
|
||||
packages/lib/models/BaseItem.test.js
|
||||
packages/lib/models/BaseItem.js
|
||||
@@ -899,6 +944,7 @@ packages/lib/ntp.js
|
||||
packages/lib/onedrive-api.test.js
|
||||
packages/lib/onedrive-api.js
|
||||
packages/lib/path-utils.js
|
||||
packages/lib/reducer.test.js
|
||||
packages/lib/reducer.js
|
||||
packages/lib/registry.test.js
|
||||
packages/lib/registry.js
|
||||
@@ -1181,10 +1227,12 @@ packages/lib/themes/solarizedLight.js
|
||||
packages/lib/themes/type.js
|
||||
packages/lib/time.js
|
||||
packages/lib/types.js
|
||||
packages/lib/urlUtils.js
|
||||
packages/lib/utils/ActionLogger.test.js
|
||||
packages/lib/utils/ActionLogger.js
|
||||
packages/lib/utils/credentialFiles.js
|
||||
packages/lib/utils/focusHandler.js
|
||||
packages/lib/utils/frontMatter.js
|
||||
packages/lib/utils/ipc/RemoteMessenger.test.js
|
||||
packages/lib/utils/ipc/RemoteMessenger.js
|
||||
packages/lib/utils/ipc/TestMessenger.js
|
||||
@@ -1195,7 +1243,8 @@ packages/lib/utils/ipc/utils/mergeCallbacksAndSerializable.js
|
||||
packages/lib/utils/ipc/utils/separateCallbacksFromSerializable.test.js
|
||||
packages/lib/utils/ipc/utils/separateCallbacksFromSerializable.js
|
||||
packages/lib/utils/ipc/utils/separateCallbacksFromSerializableArray.js
|
||||
packages/lib/utils/joplinCloud.js
|
||||
packages/lib/utils/joplinCloud/index.js
|
||||
packages/lib/utils/joplinCloud/types.js
|
||||
packages/lib/utils/processStartFlags.js
|
||||
packages/lib/utils/replaceUnsupportedCharacters.test.js
|
||||
packages/lib/utils/replaceUnsupportedCharacters.js
|
||||
@@ -1267,6 +1316,7 @@ packages/renderer/MdToHtml/rules/mermaid.js
|
||||
packages/renderer/MdToHtml/rules/sanitize_html.js
|
||||
packages/renderer/MdToHtml/rules/source_map.js
|
||||
packages/renderer/MdToHtml/rules/tableHorizontallyScrollable.js
|
||||
packages/renderer/MdToHtml/rules/utils/defaultRule.js
|
||||
packages/renderer/MdToHtml/setupLinkify.js
|
||||
packages/renderer/MdToHtml/validateLinks.js
|
||||
packages/renderer/assetsToHeaders.js
|
||||
|
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"cSpell.enabled": true
|
||||
}
|
@@ -1,8 +1,8 @@
|
||||
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
|
||||
index 8a719ca35af1cc3a4192c5c5f8258fd4f7fea990..5f8831f81cd164a4f627423427ead92fa286b115 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;
|
||||
@@ -37,7 +37,7 @@ import com.facebook.react.uimanager.common.ViewUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
@@ -11,7 +11,7 @@ index 0f52b73c61625db2a3081c0950b6bdd2b06e3d40..b0fc3de4be0b3a26b638683613c63c78
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
@@ -151,7 +151,10 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
|
||||
@@ -149,7 +149,10 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
|
||||
}
|
||||
|
||||
private class ConcurrentOperationQueue {
|
1
Assets/WebsiteAssets/images/draw/add-new-image.svg
Normal file
After Width: | Height: | Size: 345 KiB |
BIN
Assets/WebsiteAssets/images/draw/average-selection-color.png
Normal file
After Width: | Height: | Size: 185 KiB |
BIN
Assets/WebsiteAssets/images/draw/change-visible-region.png
Normal file
After Width: | Height: | Size: 568 KiB |
BIN
Assets/WebsiteAssets/images/draw/color-under-cursor.png
Normal file
After Width: | Height: | Size: 199 KiB |
BIN
Assets/WebsiteAssets/images/draw/desktop-create-new-drawing.png
Normal file
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 184 KiB |
1
Assets/WebsiteAssets/images/draw/edit-from-viewer.svg
Normal file
After Width: | Height: | Size: 200 KiB |
1
Assets/WebsiteAssets/images/draw/editor-toolbar-top.svg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
Assets/WebsiteAssets/images/draw/help-icon.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
Assets/WebsiteAssets/images/draw/infinite-zoom-demo.mp4
Normal file
BIN
Assets/WebsiteAssets/images/draw/lock-rotation.png
Normal file
After Width: | Height: | Size: 104 KiB |
1
Assets/WebsiteAssets/images/draw/long-press-edit.svg
Normal file
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 246 KiB |
BIN
Assets/WebsiteAssets/images/draw/restore-auto-resize.png
Normal file
After Width: | Height: | Size: 310 KiB |
1
Assets/WebsiteAssets/images/draw/show-pen-menu.svg
Normal file
After Width: | Height: | Size: 141 KiB |
BIN
Assets/WebsiteAssets/images/sponsors/SocialFollowers.png
Normal file
After Width: | Height: | Size: 15 KiB |
@@ -31,7 +31,7 @@ Please see the [donation page](https://github.com/laurent22/joplin/blob/dev/read
|
||||
# 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&mtm_kwd=joplinapp&mtm_source=joplinapp-webseite&mtm_medium=banner"><img title="Hosting.de" width="256" src="https://joplinapp.org/images/sponsors/HostingDe.png"/></a> <a href="https://grundstueckspreise.info/"><img title="SP Software GmbH" width="256" src="https://joplinapp.org/images/sponsors/Grundstueckspreise.png"/></a> <a href="https://citricsheep.com"><img title="Citric Sheep" width="256" src="https://joplinapp.org/images/sponsors/CitricSheep.png"/></a> <a href="https://sorted.travel/?utm_source=joplinapp"><img title="Sorted Travel" width="256" src="https://joplinapp.org/images/sponsors/SortedTravel.png"/></a> <a href="https://celebian.com"><img title="Celebian" width="256" src="https://joplinapp.org/images/sponsors/Celebian.png"/></a> <a href="https://bestkru.com"><img title="BestKru" width="256" src="https://joplinapp.org/images/sponsors/BestKru.png"/></a>
|
||||
<a href="https://seirei.ne.jp"><img title="Serei Network" width="256" src="https://joplinapp.org/images/sponsors/SeireiNetwork.png"/></a> <a href="https://www.hosting.de/nextcloud/?mtm_campaign=managed-nextcloud&mtm_kwd=joplinapp&mtm_source=joplinapp-webseite&mtm_medium=banner"><img title="Hosting.de" width="256" src="https://joplinapp.org/images/sponsors/HostingDe.png"/></a> <a href="https://grundstueckspreise.info/"><img title="SP Software GmbH" width="256" src="https://joplinapp.org/images/sponsors/Grundstueckspreise.png"/></a> <a href="https://citricsheep.com"><img title="Citric Sheep" width="256" src="https://joplinapp.org/images/sponsors/CitricSheep.png"/></a> <a href="https://sorted.travel/?utm_source=joplinapp"><img title="Sorted Travel" width="256" src="https://joplinapp.org/images/sponsors/SortedTravel.png"/></a> <a href="https://celebian.com"><img title="Celebian" width="256" src="https://joplinapp.org/images/sponsors/Celebian.png"/></a> <a href="https://bestkru.com"><img title="BestKru" width="256" src="https://joplinapp.org/images/sponsors/BestKru.png"/></a> <a href="https://www.socialfollowers.uk/buy-tiktok-followers/"><img title="Social Followers" width="256" src="https://joplinapp.org/images/sponsors/SocialFollowers.png"/></a>
|
||||
<!-- SPONSORS-ORG -->
|
||||
|
||||
* * *
|
||||
|
@@ -1,24 +1,58 @@
|
||||
# For development this compose file starts the database only. The app can then
|
||||
# be started using `yarn start-dev`, which is useful for development, because
|
||||
# it means the app Docker file doesn't have to be rebuilt on each change.
|
||||
#
|
||||
# Note that log is setup to give as much information as possible, including
|
||||
# whether it's the master or slave database that is being used for a query.
|
||||
#
|
||||
# To setup and test replication, use the following config in Joplin Server. Note
|
||||
# in particular the different port, which means we access the slave and not the
|
||||
# master.
|
||||
#
|
||||
# DB_USE_SLAVE=true
|
||||
# SLAVE_POSTGRES_PASSWORD=joplin
|
||||
# SLAVE_POSTGRES_DATABASE=joplin
|
||||
# SLAVE_POSTGRES_USER=joplin
|
||||
# SLAVE_POSTGRES_PORT=5433
|
||||
# SLAVE_POSTGRES_HOST=localhost
|
||||
# USERS_WITH_REPLICATION=ID1,ID2,...
|
||||
|
||||
version: '3'
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16
|
||||
command: postgres -c work_mem=100000
|
||||
|
||||
postgresql-master:
|
||||
image: 'bitnami/postgresql:16.3.0'
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- '5432:5432'
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=joplin
|
||||
- POSTGRES_USER=joplin
|
||||
- POSTGRES_DB=joplin
|
||||
|
||||
# Use this to specify additional Postgres
|
||||
# config parameters:
|
||||
#
|
||||
# command:
|
||||
# - "postgres"
|
||||
# - "-c"
|
||||
# - "log_min_duration_statement=0"
|
||||
- POSTGRESQL_PASSWORD=joplin
|
||||
- POSTGRESQL_USERNAME=joplin
|
||||
- POSTGRESQL_DATABASE=joplin
|
||||
|
||||
- POSTGRESQL_REPLICATION_MODE=master
|
||||
- POSTGRESQL_REPLICATION_USER=repl_user
|
||||
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
|
||||
|
||||
- POSTGRESQL_LOG_HOSTNAME=true
|
||||
- POSTGRESQL_PGAUDIT_LOG=READ,WRITE
|
||||
- POSTGRESQL_EXTRA_FLAGS=-c work_mem=100000 -c log_statement=all
|
||||
|
||||
postgresql-slave:
|
||||
image: 'bitnami/postgresql:16.3.0'
|
||||
ports:
|
||||
- '5433:5432'
|
||||
depends_on:
|
||||
- postgresql-master
|
||||
environment:
|
||||
- POSTGRESQL_REPLICATION_MODE=slave
|
||||
- POSTGRESQL_REPLICATION_USER=repl_user
|
||||
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
|
||||
- POSTGRESQL_MASTER_HOST=postgresql-master
|
||||
- POSTGRESQL_PASSWORD=joplin
|
||||
- POSTGRESQL_MASTER_PORT_NUMBER=5432
|
||||
|
||||
- POSTGRESQL_LOG_HOSTNAME=true
|
||||
- POSTGRESQL_PGAUDIT_LOG=READ,WRITE
|
||||
- POSTGRESQL_EXTRA_FLAGS=-c work_mem=100000 -c log_statement=all
|
||||
|
@@ -1 +1,13 @@
|
||||
<strong>Joplin</strong> is a free, open source note taking and to-do application, which can handle a large number of notes organised into notebooks. The notes are searchable, can be copied, tagged and modified either from the applications directly or from your own text editor. The notes are in <a href="https://joplinapp.org/help/apps/markdown">Markdown format</a>.</p><p>Notes exported from Evernote <a href="https://joplinapp.org/help/apps/import_export">can be imported</a> into Joplin, including the formatted content (which is converted to Markdown), resources (images, attachments, etc.) and complete metadata (geolocation, updated time, created time, etc.). Plain Markdown files can also be imported.</p><p>Joplin is "offline first", which means you always have all your data on your phone or computer. This ensures that your notes are always accessible, whether you have an internet connection or not.</p><p>The notes can be securely <a href="https://joplinapp.org/help/apps/sync">synchronised</a> using <a href="https://joplinapp.org/help/apps/sync/e2ee">end-to-end encryption</a> with various cloud services including Nextcloud, Dropbox, OneDrive and <a href="https://joplinapp.org/plans/" target="_blank" rel="noopener noreferrer">Joplin Cloud</a>.</p><p>Full text search is available on all platforms to quickly find the information you need. The app can be customised using plugins and themes, and you can also easily create your own.</p><p>The application is available for Windows, Linux, macOS, Android and iOS. A <a href="https://joplinapp.org/help/apps/clipper">Web Clipper</a>, to save web pages and screenshots from your browser, is also available for <a href="https://addons.mozilla.org/firefox/addon/joplin-web-clipper/" target="_blank" rel="noopener noreferrer">Firefox</a> and <a href="https://chrome.google.com/webstore/detail/joplin-web-clipper/alofnhikmmkdbbbgpnglcpdollgjjfek?hl=en-GB" target="_blank" rel="noopener noreferrer">Chrome</a>.</p><div class="top-screenshot"><img loading="lazy" src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/home-top-img.png" class="img_node_modules-@docusaurus-theme-classic-lib-theme-MDXComponents-Img-styles-module" style="max-width: 100%; max-height: 35em;">
|
||||
<strong>Joplin</strong> is a free and open source note taking and to-do application, which can handle a large number of notes organised into notebooks. The notes are searchable, can be copied, tagged and modified either from the applications directly or from your own text editor.
|
||||
|
||||
The notes are in <a href="https://joplinapp.org/help/apps/markdown">Markdown format</a>.
|
||||
|
||||
Notes exported from Evernote <a href="https://joplinapp.org/help/apps/import_export">can be imported</a> into Joplin, including the formatted content (which is converted to Markdown), resources (images, attachments, etc.) and complete metadata (geolocation, updated time, created time, etc.). Plain Markdown files can also be imported.
|
||||
|
||||
Joplin is "offline first", which means you always have all your data on your phone or computer. This ensures that your notes are always accessible, whether you have an internet connection or not.</p>
|
||||
|
||||
The notes can be securely <a href="https://joplinapp.org/help/apps/sync">synchronised</a> using <a href="https://joplinapp.org/help/apps/sync/e2ee">end-to-end encryption</a> with various cloud services including Nextcloud, Dropbox, OneDrive and <a href="https://joplinapp.org/plans/">Joplin Cloud</a>.
|
||||
|
||||
Full text search is available on all platforms to quickly find the information you need. The app can be customised using plugins and themes, and you can also easily create your own.
|
||||
|
||||
The application is available for Windows, Linux, macOS, Android and iOS. A <a href="https://joplinapp.org/help/apps/clipper">Web Clipper</a>, to save web pages and screenshots from your browser, is also available for <a href="https://addons.mozilla.org/firefox/addon/joplin-web-clipper/">Firefox</a> and <a href="https://chrome.google.com/webstore/detail/joplin-web-clipper/alofnhikmmkdbbbgpnglcpdollgjjfek">Chrome</a>.
|
||||
|
@@ -1 +1 @@
|
||||
a note taking and to-do app with sync between Linux, macOS, Windows, and mobile
|
||||
A note taking and to-do app with sync between Linux, macOS, Windows, and mobile
|
13
fastlane/metadata/android/ru/full_description.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
<strong>Joplin</strong> это бесплатное и свободное приложение для создания заметок и списков задач, которое может обрабатывать большое количество заметок, организованных в блокноты. По заметкам есть поиск, их можно копировать, помечать ярлыками и изменять как непосредственно из приложения, так и из вашего собственного текстового редактора.
|
||||
|
||||
Заметки представлены в <a href="https://joplinapp.org/help/apps/markdown">формате Markdown</a>.
|
||||
|
||||
Заметки экспортированные из Evernote <a href="https://joplinapp.org/help/apps/import_export">могут быть импортированы</a> в Joplin, включая отформатированный контент (который преобразуется в Markdown), ресурсы (изображения, вложения и т.д.) и полные метаданные (геолокация, время обновления, время создания и т.д.). Обычные файлы Markdown также можно импортировать.
|
||||
|
||||
Joplin работает "в первую очередь в автономном режиме", что означает, что у вас всегда есть все ваши данные на телефоне или компьютере. Это гарантирует, что ваши заметки всегда будут доступны, независимо от того есть у вас подключение к Интернету или нет.
|
||||
|
||||
Заметки могут быть надежно <a href="https://joplinapp.org/help/apps/sync">синхронизированы</a> с помощью <a href="https://joplinapp.org/help/apps/sync/e2ee">сквозного шифрования</a> на различные облачные сервисы, включая Nextcloud, Dropbox, OneDrive и <a href="https://joplinapp.org/plans/">Joplin Cloud</a>.
|
||||
|
||||
Полнотекстовый поиск доступен на всех платформах для быстрого поиска нужной вам информации. Приложение можно настроить с помощью плагинов и тем, а также легко создать свои.
|
||||
|
||||
Приложение доступно для Windows, Linux, macOS, Android и iOS. A <a href="https://joplinapp.org/help/apps/clipper">Веб-клипер</a> для сохранения веб-страниц и скриншотов из вашего браузера, также доступен для <a href="https://addons.mozilla.org/firefox/addon/joplin-web-clipper/">Firefox</a> и <a href="https://chrome.google.com/webstore/detail/joplin-web-clipper/alofnhikmmkdbbbgpnglcpdollgjjfek">Chrome</a>.
|
1
fastlane/metadata/android/ru/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
Заметки и списки дел с синхронизацией с Linux, macOS, Windows и мобильным
|
@@ -106,7 +106,6 @@
|
||||
"./packages/renderer/**/node_modules/": true,
|
||||
".eslintignore": true,
|
||||
".gitignore": true,
|
||||
".vscode/*": true,
|
||||
".yarn/cache": true,
|
||||
".yarn/install-state.gz": true,
|
||||
".yarn/plugins": true,
|
||||
|
@@ -40,7 +40,7 @@
|
||||
"postinstall": "gulp build",
|
||||
"postPreReleasesToForum": "node ./packages/tools/postPreReleasesToForum",
|
||||
"publishAll": "git pull && yarn buildParallel && lerna version --yes --no-private --no-git-tag-version && gulp completePublishAll",
|
||||
"releaseAndroid": "PATH=\"/usr/local/opt/openjdk@11/bin:$PATH\" node packages/tools/release-android.js",
|
||||
"releaseAndroid": "PATH=\"/usr/local/opt/openjdk@17/bin:$PATH\" node packages/tools/release-android.js",
|
||||
"releaseAndroidClean": "node packages/tools/release-android.js",
|
||||
"releaseCli": "node packages/tools/release-cli.js",
|
||||
"releaseClipper": "node packages/tools/release-clipper.js",
|
||||
@@ -86,7 +86,7 @@
|
||||
"gulp": "4.0.2",
|
||||
"husky": "3.1.0",
|
||||
"lerna": "3.22.1",
|
||||
"lint-staged": "15.2.0",
|
||||
"lint-staged": "15.2.2",
|
||||
"madge": "6.1.0",
|
||||
"npm-package-json-lint": "7.1.0",
|
||||
"typescript": "5.2.2"
|
||||
@@ -104,11 +104,11 @@
|
||||
"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": "patch:eslint@8.52.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",
|
||||
"nanoid": "patch:nanoid@npm%3A3.3.7#./.yarn/patches/nanoid-npm-3.3.7-98824ba130.patch",
|
||||
"pdfjs-dist": "patch:pdfjs-dist@npm%3A3.11.174#./.yarn/patches/pdfjs-dist-npm-3.11.174-67f2fee6d6.patch",
|
||||
"@react-native-community/slider": "patch:@react-native-community/slider@npm%3A4.4.4#./.yarn/patches/@react-native-community-slider-npm-4.4.4-d78e472f48.patch",
|
||||
"husky": "patch:husky@npm%3A3.1.0#./.yarn/patches/husky-npm-3.1.0-5cc13e4e34.patch",
|
||||
"chokidar@^2.0.0": "3.5.3"
|
||||
"chokidar@^2.0.0": "3.5.3",
|
||||
"react-native@0.74.1": "patch:react-native@npm%3A0.74.1#./.yarn/patches/react-native-npm-0.74.1-754c02ae9e.patch"
|
||||
}
|
||||
}
|
||||
|
@@ -239,11 +239,6 @@ async function fetchAllNotes() {
|
||||
type: Database.enumId('fieldType', 'text'),
|
||||
description: 'If an image is provided, you can also specify an optional rectangle that will be used to crop the image. In format `{ x: x, y: y, width: width, height: height }`',
|
||||
});
|
||||
// tableFields.push({
|
||||
// name: 'tags',
|
||||
// type: Database.enumId('fieldType', 'text'),
|
||||
// description: 'Comma-separated list of tags. eg. `tag1,tag2`.',
|
||||
// });
|
||||
}
|
||||
|
||||
lines.push(`## ${toTitleCase(tableName)}`);
|
||||
@@ -269,6 +264,11 @@ async function fetchAllNotes() {
|
||||
lines.push('');
|
||||
}
|
||||
|
||||
if (model.type === BaseModel.TYPE_NOTE) {
|
||||
lines.push('By default, this call will return the all notes **except** the notes in the trash folder and any conflict note. To include these too, you can specify `include_deleted=1` and `include_conflicts=1` as query parameters.');
|
||||
lines.push('');
|
||||
}
|
||||
|
||||
lines.push(`### GET /${tableName}/:id`);
|
||||
lines.push('');
|
||||
lines.push(`Gets ${singular} with ID :id`);
|
||||
|
@@ -63,7 +63,7 @@
|
||||
"string-padding": "1.0.2",
|
||||
"strip-ansi": "6.0.1",
|
||||
"tcp-port-used": "1.0.2",
|
||||
"terminal-kit": "3.0.1",
|
||||
"terminal-kit": "3.0.2",
|
||||
"tkwidgets": "0.5.27",
|
||||
"url-parse": "1.5.10",
|
||||
"word-wrap": "1.2.5",
|
||||
@@ -73,7 +73,7 @@
|
||||
"@joplin/tools": "~3.0",
|
||||
"@types/fs-extra": "11.0.4",
|
||||
"@types/jest": "29.5.8",
|
||||
"@types/node": "18.19.10",
|
||||
"@types/node": "18.19.26",
|
||||
"@types/proper-lockfile": "^4.1.2",
|
||||
"gulp": "4.0.2",
|
||||
"jest": "29.7.0",
|
||||
|
@@ -49,6 +49,8 @@ describe('MdToHtml', () => {
|
||||
checkboxRenderingType: 2,
|
||||
},
|
||||
};
|
||||
} else if (mdFilename.startsWith('sourcemap_')) {
|
||||
mdToHtmlOptions.mapsToLine = true;
|
||||
}
|
||||
|
||||
const markdown = await shim.fsDriver().readFile(mdFilePath);
|
||||
|
21
packages/app-cli/tests/md_to_html/sourcemap_table.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<div class="joplin-table-wrapper">
|
||||
<table class="maps-to-line" source-line="0" source-line-end="3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>This</th>
|
||||
<th>is</th>
|
||||
<th>a</th>
|
||||
<th>test</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>This</td>
|
||||
<td>table</td>
|
||||
<td>has</td>
|
||||
<td>line numbers</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="maps-to-line" source-line="4" source-line-end="5">When <code class="inline-code">mapsToLine</code> is enabled for this file, the table above should have line numbers that link to the original markdown.</p>
|
5
packages/app-cli/tests/md_to_html/sourcemap_table.md
Normal file
@@ -0,0 +1,5 @@
|
||||
| This | is | a | test |
|
||||
|------|----|---|------|
|
||||
| This | table | has | line numbers |
|
||||
|
||||
When `mapsToLine` is enabled for this file, the table above should have line numbers that link to the original markdown.
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -43,9 +43,9 @@ export interface Command {
|
||||
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
|
||||
* And | && | "oneNoteSelected && !inConflictFolder"
|
||||
*
|
||||
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
|
||||
* Joplin, unlike VSCode, also supports parentheses, which allows creating
|
||||
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
|
||||
* level of parenthesis is possible (nested ones aren't supported).
|
||||
* level of parentheses is possible (nested ones aren't supported).
|
||||
*
|
||||
* Currently the supported context variables aren't documented, but you can
|
||||
* find the list below:
|
||||
|
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Not a task
|
||||
---
|
||||
|
||||
This is a note.
|
@@ -0,0 +1,6 @@
|
||||
---
|
||||
title: Task
|
||||
completed?: yes
|
||||
---
|
||||
|
||||
This is a test. This task should import as completed.
|
@@ -26,6 +26,10 @@ export interface AppStateDialog {
|
||||
props: Record<string, any>;
|
||||
}
|
||||
|
||||
export interface EditorScrollPercents {
|
||||
[noteId: string]: number;
|
||||
}
|
||||
|
||||
export interface AppState extends State {
|
||||
route: AppStateRoute;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
@@ -34,8 +38,7 @@ export interface AppState extends State {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
windowContentSize: any;
|
||||
watchedNoteFiles: string[];
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
lastEditorScrollPercents: any;
|
||||
lastEditorScrollPercents: EditorScrollPercents;
|
||||
devToolsVisible: boolean;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
visibleDialogs: any; // empty object if no dialog is visible. Otherwise contains the list of visible dialogs.
|
||||
|
@@ -243,6 +243,24 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
||||
</div>
|
||||
);
|
||||
|
||||
if (settings['sync.target'] === SyncTargetRegistry.nameToId('joplinCloud')) {
|
||||
const goToJoplinCloudLogin = () => {
|
||||
this.props.dispatch({
|
||||
type: 'NAV_GO',
|
||||
routeName: 'JoplinCloudLogin',
|
||||
});
|
||||
};
|
||||
settingComps.push(
|
||||
<div key="connect_to_joplin_cloud_button" style={this.rowStyle_}>
|
||||
<Button
|
||||
title={_('Connect to Joplin Cloud')}
|
||||
level={ButtonLevel.Primary}
|
||||
onClick={goToJoplinCloudLogin}
|
||||
/>
|
||||
</div>,
|
||||
);
|
||||
}
|
||||
|
||||
settingComps.push(
|
||||
<div key="check_sync_config_button" style={this.rowStyle_}>
|
||||
<Button
|
||||
@@ -596,6 +614,9 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
||||
size={ButtonSize.Small}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ width: inputStyle.width, minWidth: inputStyle.minWidth }}>
|
||||
{descriptionComp}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -38,6 +38,7 @@ interface Props {
|
||||
function manifestToItem(manifest: PluginManifest): PluginItem {
|
||||
return {
|
||||
manifest: manifest,
|
||||
installed: true,
|
||||
enabled: true,
|
||||
deleted: false,
|
||||
devMode: false,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import PluginService, { defaultPluginSetting, Plugins, PluginSetting, PluginSettings } from '@joplin/lib/services/plugins/PluginService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import styled from 'styled-components';
|
||||
@@ -83,6 +83,7 @@ function usePluginItems(plugins: Plugins, settings: PluginSettings): PluginItem[
|
||||
|
||||
output.push({
|
||||
manifest: plugin.manifest,
|
||||
installed: true,
|
||||
enabled: setting.enabled,
|
||||
deleted: setting.deleted,
|
||||
devMode: plugin.devMode,
|
||||
@@ -213,8 +214,11 @@ export default function(props: Props) {
|
||||
props.onChange({ value: pluginService.serializePluginSettings(event.value) });
|
||||
}, [pluginService, props.onChange]);
|
||||
|
||||
const onDelete = useOnDeleteHandler(pluginSettings, onPluginSettingsChange, false);
|
||||
const onUpdate = useOnInstallHandler(setUpdatingPluginIds, pluginSettings, repoApi, onPluginSettingsChange, true);
|
||||
const pluginSettingsRef = useRef(pluginSettings);
|
||||
pluginSettingsRef.current = pluginSettings;
|
||||
|
||||
const onDelete = useOnDeleteHandler(pluginSettingsRef, onPluginSettingsChange, false);
|
||||
const onUpdate = useOnInstallHandler(setUpdatingPluginIds, pluginSettingsRef, repoApi, onPluginSettingsChange, true);
|
||||
|
||||
const onToolsClick = useCallback(async () => {
|
||||
const template = [
|
||||
|
@@ -40,7 +40,10 @@ export default function(props: Props) {
|
||||
const [installingPluginsIds, setInstallingPluginIds] = useState<Record<string, boolean>>({});
|
||||
const [searchResultCount, setSearchResultCount] = useState(null);
|
||||
|
||||
const onInstall = useOnInstallHandler(setInstallingPluginIds, props.pluginSettings, props.repoApi, props.onPluginSettingsChange, false);
|
||||
const pluginSettingsRef = useRef(props.pluginSettings);
|
||||
pluginSettingsRef.current = props.pluginSettings;
|
||||
|
||||
const onInstall = useOnInstallHandler(setInstallingPluginIds, pluginSettingsRef, props.repoApi, props.onPluginSettingsChange, false);
|
||||
|
||||
useEffect(() => {
|
||||
setSearchResultCount(null);
|
||||
|
@@ -9,4 +9,25 @@
|
||||
p {
|
||||
padding: calc(var(--joplin-font-size) * 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
.joplin-cloud-account-information {
|
||||
margin-bottom: var(--joplin-margin);
|
||||
|
||||
table {
|
||||
margin-bottom: var(--joplin-margin);
|
||||
border: none;
|
||||
|
||||
td {
|
||||
border: none;
|
||||
border-bottom: 1px solid var(--joplin-border-color4);
|
||||
padding: var(--joplin-font-size);
|
||||
}
|
||||
|
||||
tr:last-child {
|
||||
td {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -4,10 +4,14 @@ import { _ } from '@joplin/lib/locale';
|
||||
import { clipboard } from 'electron';
|
||||
import Button from './Button/Button';
|
||||
import { Fragment } from 'react';
|
||||
import { accountTypeToString } from '@joplin/lib/utils/joplinCloud/types';
|
||||
import bridge from '../services/bridge';
|
||||
|
||||
type JoplinCloudConfigScreenProps = {
|
||||
inboxEmail: string;
|
||||
joplinCloudAccountType: number;
|
||||
userEmail: string;
|
||||
joplinCloudWebsite: string;
|
||||
};
|
||||
|
||||
const JoplinCloudConfigScreen = (props: JoplinCloudConfigScreenProps) => {
|
||||
@@ -17,8 +21,29 @@ const JoplinCloudConfigScreen = (props: JoplinCloudConfigScreenProps) => {
|
||||
|
||||
const isEmailToNoteAvailableInAccount = props.joplinCloudAccountType !== 1;
|
||||
|
||||
const goToJoplinCloudProfile = async () => {
|
||||
await bridge().openExternal(`${props.joplinCloudWebsite}/users/me`);
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="joplin-cloud-account-information">
|
||||
<h2>{_('Account information')}</h2>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>{_('Account type')}</strong></td>
|
||||
<td>{accountTypeToString(props.joplinCloudAccountType)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{_('Email')}</strong></td>
|
||||
<td>{props.userEmail}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<Button onClick={goToJoplinCloudProfile} title={_('Go to Joplin Cloud profile')}/>
|
||||
</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>
|
||||
{
|
||||
@@ -38,6 +63,8 @@ const mapStateToProps = (state: AppState) => {
|
||||
return {
|
||||
inboxEmail: state.settings['sync.10.inboxEmail'],
|
||||
joplinCloudAccountType: state.settings['sync.10.accountType'],
|
||||
userEmail: state.settings['sync.10.userEmail'],
|
||||
joplinCloudWebsite: state.settings['sync.10.website'],
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useMemo, useReducer, useState } from 'react';
|
||||
import { Fragment, useEffect, useMemo, useReducer, useState } from 'react';
|
||||
import ButtonBar from './ConfigScreen/ButtonBar';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import { clipboard } from 'electron';
|
||||
@@ -9,6 +9,7 @@ import { Dispatch } from 'redux';
|
||||
import { reducer, defaultState, generateApplicationConfirmUrl, checkIfLoginWasSuccessful } from '@joplin/lib/services/joplinCloudUtils';
|
||||
import { AppState } from '../app.reducer';
|
||||
import Logger from '@joplin/utils/Logger';
|
||||
import { reg } from '@joplin/lib/registry';
|
||||
|
||||
const logger = Logger.create('JoplinCloudLoginScreen');
|
||||
const { connect } = require('react-redux');
|
||||
@@ -38,6 +39,7 @@ const JoplinCloudScreenComponent = (props: Props) => {
|
||||
if (response && response.success) {
|
||||
dispatch({ type: 'COMPLETED' });
|
||||
clearInterval(interval);
|
||||
void reg.scheduleSync(0);
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error(error);
|
||||
@@ -77,22 +79,26 @@ const JoplinCloudScreenComponent = (props: Props) => {
|
||||
return (
|
||||
<div className="login-page">
|
||||
<div className="page-container">
|
||||
<p className="text">{_('To allow Joplin to synchronise with Joplin Cloud, please login using this URL:')}</p>
|
||||
<div className="buttons-container">
|
||||
<Button
|
||||
onClick={onAuthorizeClicked}
|
||||
title={_('Authorise')}
|
||||
iconName='fa fa-external-link-alt'
|
||||
level={ButtonLevel.Primary}
|
||||
/>
|
||||
<Button
|
||||
onClick={onCopyToClipboardClicked}
|
||||
title={_('Copy link to website')}
|
||||
iconName='fa fa-clone'
|
||||
level={ButtonLevel.Secondary}
|
||||
/>
|
||||
{state.active !== 'COMPLETED' ? (
|
||||
<Fragment>
|
||||
<p className="text">{_('To allow Joplin to synchronise with Joplin Cloud, please login using this URL:')}</p>
|
||||
<div className="buttons-container">
|
||||
<Button
|
||||
onClick={onAuthorizeClicked}
|
||||
title={_('Authorise')}
|
||||
iconName='fa fa-external-link-alt'
|
||||
level={ButtonLevel.Primary}
|
||||
/>
|
||||
<Button
|
||||
onClick={onCopyToClipboardClicked}
|
||||
title={_('Copy link to website')}
|
||||
iconName='fa fa-clone'
|
||||
level={ButtonLevel.Secondary}
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
) : null}
|
||||
<p className={state.className}>{state.message()}
|
||||
{state.active === 'ERROR' ? (
|
||||
<span className={state.className}>{state.errorMessage}</span>
|
||||
|
@@ -39,6 +39,7 @@ import * as showShareNoteDialog from './showShareNoteDialog';
|
||||
import * as showSpellCheckerMenu from './showSpellCheckerMenu';
|
||||
import * as toggleEditors from './toggleEditors';
|
||||
import * as toggleLayoutMoveMode from './toggleLayoutMoveMode';
|
||||
import * as toggleMenuBar from './toggleMenuBar';
|
||||
import * as toggleNoteList from './toggleNoteList';
|
||||
import * as toggleNoteType from './toggleNoteType';
|
||||
import * as toggleNotesSortOrderField from './toggleNotesSortOrderField';
|
||||
@@ -88,6 +89,7 @@ const index: any[] = [
|
||||
showSpellCheckerMenu,
|
||||
toggleEditors,
|
||||
toggleLayoutMoveMode,
|
||||
toggleMenuBar,
|
||||
toggleNoteList,
|
||||
toggleNoteType,
|
||||
toggleNotesSortOrderField,
|
||||
|
@@ -3,9 +3,10 @@ import shim from '@joplin/lib/shim';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import bridge from '../../../services/bridge';
|
||||
import { openItemById } from '../../NoteEditor/utils/contextMenu';
|
||||
const { parseResourceUrl, urlProtocol } = require('@joplin/lib/urlUtils');
|
||||
import { fileUrlToResourceUrl, parseResourceUrl, urlProtocol } from '@joplin/lib/urlUtils';
|
||||
import { fileUriToPath } from '@joplin/utils/url';
|
||||
const { urlDecode } = require('@joplin/lib/string-utils');
|
||||
import { urlDecode } from '@joplin/lib/string-utils';
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'openItem',
|
||||
@@ -16,6 +17,11 @@ export const runtime = (): CommandRuntime => {
|
||||
execute: async (context: CommandContext, link: string) => {
|
||||
if (!link) throw new Error('Link cannot be empty');
|
||||
|
||||
const fromFileUrl = fileUrlToResourceUrl(link, Setting.value('resourceDir'));
|
||||
if (fromFileUrl) {
|
||||
link = fromFileUrl;
|
||||
}
|
||||
|
||||
if (link.startsWith('joplin://') || link.startsWith(':/')) {
|
||||
const parsedUrl = parseResourceUrl(link);
|
||||
if (parsedUrl) {
|
||||
|
@@ -0,0 +1,16 @@
|
||||
import { CommandDeclaration, CommandRuntime } from '@joplin/lib/services/CommandService';
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'toggleMenuBar',
|
||||
label: () => _('Toggle menu bar'),
|
||||
};
|
||||
|
||||
export const runtime = (): CommandRuntime => {
|
||||
return {
|
||||
execute: async () => {
|
||||
Setting.toggle('showMenuBar');
|
||||
},
|
||||
};
|
||||
};
|
@@ -1,7 +1,6 @@
|
||||
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import eventManager, { EventName } from '@joplin/lib/eventManager';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'toggleNoteType',
|
||||
@@ -15,14 +14,7 @@ export const runtime = (): CommandRuntime => {
|
||||
|
||||
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(EventName.NoteTypeToggle, { noteId: note.id, note: eventNote });
|
||||
await Note.save(Note.toggleIsTodo(note), { userSideValidation: true });
|
||||
}
|
||||
},
|
||||
enabledCondition: '!noteIsReadOnly',
|
||||
|
@@ -172,6 +172,7 @@ interface Props {
|
||||
pluginSettings: PluginSettings;
|
||||
noteListRendererIds: string[];
|
||||
noteListRendererId: string;
|
||||
showMenuBar: boolean;
|
||||
}
|
||||
|
||||
const commandNames: string[] = menuCommandNames();
|
||||
@@ -190,6 +191,15 @@ function menuItemSetEnabled(id: string, enabled: boolean) {
|
||||
menuItem.enabled = enabled;
|
||||
}
|
||||
|
||||
const applyMenuBarVisibility = (showMenuBar: boolean) => {
|
||||
// The menu bar cannot be hidden on macOS
|
||||
if (shim.isMac()) return;
|
||||
|
||||
const window = bridge().window();
|
||||
window.setAutoHideMenuBar(!showMenuBar);
|
||||
window.setMenuBarVisibility(showMenuBar);
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
function useMenuStates(menu: any, props: Props) {
|
||||
useEffect(() => {
|
||||
@@ -760,6 +770,7 @@ function useMenu(props: Props) {
|
||||
menuItemDic.resetLayout,
|
||||
separator(),
|
||||
menuItemDic.toggleSideBar,
|
||||
shim.isMac() ? noItem : menuItemDic.toggleMenuBar,
|
||||
menuItemDic.toggleNoteList,
|
||||
menuItemDic.toggleVisiblePanes,
|
||||
{
|
||||
@@ -1083,6 +1094,7 @@ function useMenu(props: Props) {
|
||||
function MenuBar(props: Props): any {
|
||||
const menu = useMenu(props);
|
||||
if (menu) Menu.setApplicationMenu(menu);
|
||||
applyMenuBarVisibility(props.showMenuBar);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1112,6 +1124,7 @@ const mapStateToProps = (state: AppState) => {
|
||||
profileConfig: state.profileConfig,
|
||||
noteListRendererIds: state.noteListRendererIds,
|
||||
noteListRendererId: state.settings['notes.listRendererId'],
|
||||
showMenuBar: state.settings.showMenuBar,
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -4,7 +4,7 @@ import KeymapService, { KeymapItem } from '@joplin/lib/services/KeymapService';
|
||||
import { EditorCommand } from '../../../../utils/types';
|
||||
import shim from '@joplin/lib/shim';
|
||||
import { reg } from '@joplin/lib/registry';
|
||||
import setupVim from '@joplin/editor/CodeMirror/util/setupVim';
|
||||
import setupVim from '@joplin/editor/CodeMirror/utils/setupVim';
|
||||
import { EventName } from '@joplin/lib/eventManager';
|
||||
import normalizeAccelerator from '../../utils/normalizeAccelerator';
|
||||
import { CodeMirrorVersion } from '../../utils/types';
|
||||
|
@@ -352,7 +352,7 @@ const CodeMirror = (props: NoteBodyEditorProps, ref: ForwardedRef<NoteBodyEditor
|
||||
|
||||
return {
|
||||
language: isHTMLNote ? EditorLanguageType.Html : EditorLanguageType.Markdown,
|
||||
readOnly: props.disabled || props.visiblePanes.indexOf('editor') < 0,
|
||||
readOnly: props.disabled,
|
||||
katexEnabled: Setting.value('markdown.plugin.katex'),
|
||||
themeData: {
|
||||
...styles.globalTheme,
|
||||
@@ -366,8 +366,7 @@ const CodeMirror = (props: NoteBodyEditorProps, ref: ForwardedRef<NoteBodyEditor
|
||||
indentWithTabs: true,
|
||||
};
|
||||
}, [
|
||||
props.contentMarkupLanguage, props.disabled, props.visiblePanes,
|
||||
props.keyboardMode, styles.globalTheme,
|
||||
props.contentMarkupLanguage, props.disabled, props.keyboardMode, styles.globalTheme,
|
||||
]);
|
||||
|
||||
// Update the editor's value
|
||||
|
@@ -8,7 +8,7 @@ import { PluginStates } from '@joplin/lib/services/plugins/reducer';
|
||||
import { ContentScriptType } from '@joplin/lib/services/plugins/api/types';
|
||||
import shim from '@joplin/lib/shim';
|
||||
import PluginService from '@joplin/lib/services/plugins/PluginService';
|
||||
import setupVim from '@joplin/editor/CodeMirror/util/setupVim';
|
||||
import setupVim from '@joplin/editor/CodeMirror/utils/setupVim';
|
||||
import { dirname } from 'path';
|
||||
import useKeymap from './utils/useKeymap';
|
||||
import useEditorSearch from '../utils/useEditorSearchExtension';
|
||||
|
@@ -12,25 +12,6 @@ import { focus } from '@joplin/lib/utils/focusHandler';
|
||||
|
||||
const logger = Logger.create('CodeMirror 6 commands');
|
||||
|
||||
const wrapSelectionWithStrings = (editor: CodeMirrorControl, string1: string, string2 = '', defaultText = '') => {
|
||||
if (editor.somethingSelected()) {
|
||||
editor.wrapSelections(string1, string2);
|
||||
} else {
|
||||
editor.wrapSelections(string1 + defaultText, string2);
|
||||
|
||||
// Now select the default text so the user can replace it
|
||||
const selections = editor.listSelections();
|
||||
const newSelections = [];
|
||||
for (let i = 0; i < selections.length; i++) {
|
||||
const s = selections[i];
|
||||
const anchor = { line: s.anchor.line, ch: s.anchor.ch + string1.length };
|
||||
const head = { line: s.head.line, ch: s.head.ch - string2.length };
|
||||
newSelections.push({ anchor: anchor, head: head });
|
||||
}
|
||||
editor.setSelections(newSelections);
|
||||
}
|
||||
};
|
||||
|
||||
interface Props {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
webviewRef: RefObject<any>;
|
||||
@@ -92,7 +73,9 @@ const useEditorCommands = (props: Props) => {
|
||||
textLink: async () => {
|
||||
const url = await dialogs.prompt(_('Insert Hyperlink'));
|
||||
focus('useEditorCommands::textLink', editorRef.current);
|
||||
if (url) wrapSelectionWithStrings(editorRef.current, '[', `](${url})`);
|
||||
if (url) {
|
||||
editorRef.current.wrapSelections('[', `](${url})`);
|
||||
}
|
||||
},
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
insertText: (value: any) => editorRef.current.insertText(value),
|
||||
|
@@ -32,6 +32,7 @@ import markupRenderOptions from '../../utils/markupRenderOptions';
|
||||
import { DropHandler } from '../../utils/useDropHandler';
|
||||
import Logger from '@joplin/utils/Logger';
|
||||
import useWebViewApi from './utils/useWebViewApi';
|
||||
import useLinkTooltips from './utils/useLinkTooltips';
|
||||
import { focus } from '@joplin/lib/utils/focusHandler';
|
||||
const md5 = require('md5');
|
||||
const { clipboard } = require('electron');
|
||||
@@ -363,6 +364,7 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
|
||||
}, []);
|
||||
|
||||
useWebViewApi(editor);
|
||||
const { resetModifiedTitles: resetLinkTooltips } = useLinkTooltips(editor);
|
||||
|
||||
useEffect(() => {
|
||||
const theme = themeStyle(props.themeId);
|
||||
@@ -1048,6 +1050,7 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
|
||||
|
||||
nextOnChangeEventInfo.current = null;
|
||||
|
||||
resetLinkTooltips();
|
||||
const contentMd = await prop_htmlToMarkdownRef.current(info.contentMarkupLanguage, info.editor.getContent(), info.contentOriginalCss);
|
||||
|
||||
lastOnChangeEventInfo.current.content = contentMd;
|
||||
|
@@ -17,6 +17,8 @@ export const joplinCommandToTinyMceCommands: JoplinCommandToTinyMceCommands = {
|
||||
'textItalic': { name: 'mceToggleFormat', value: 'italic' },
|
||||
'textCode': { name: 'mceToggleFormat', value: 'code' },
|
||||
'textLink': { name: 'mceLink' },
|
||||
'textBulletedList': { name: 'InsertUnorderedList' },
|
||||
'textNumberedList': { name: 'InsertOrderedList' },
|
||||
'search': { name: 'SearchReplace' },
|
||||
'attachFile': { name: 'joplinAttach' },
|
||||
'insertDateTime': true,
|
||||
|
@@ -0,0 +1,83 @@
|
||||
import type { Editor } from 'tinymce';
|
||||
import { useCallback, useEffect } from 'react';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import shim from '@joplin/lib/shim';
|
||||
|
||||
const useLinkTooltips = (editor: Editor|null) => {
|
||||
const resetModifiedTitles = useCallback(() => {
|
||||
for (const element of editor.getDoc().querySelectorAll('a[data-joplin-original-title]')) {
|
||||
element.setAttribute('title', element.getAttribute('data-joplin-original-title') ?? '');
|
||||
element.removeAttribute('data-joplin-original-title');
|
||||
}
|
||||
}, [editor]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!editor) return () => {};
|
||||
|
||||
const onMouseOver = (event: MouseEvent) => {
|
||||
let element = event.target as HTMLElement;
|
||||
|
||||
// mouseover events seem to only target the lowest applicable node in the DOM.
|
||||
// If the user's mouse enters <a><strong></strong></a>, the mouseover event will
|
||||
// target the <strong></strong>. As such, the parent nodes need to be checked:
|
||||
let counter = 0;
|
||||
while (element.tagName !== 'A' || !('href' in element)) {
|
||||
element = element.parentElement;
|
||||
counter++;
|
||||
if (!element || counter > 4) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!element.hasAttribute('data-joplin-original-title')) {
|
||||
element.setAttribute('data-joplin-original-title', element.title);
|
||||
}
|
||||
|
||||
// Avoid showing internal HREFs for note links.
|
||||
if (element.hasAttribute('data-resource-id') && !element.title) {
|
||||
if (shim.isMac()) {
|
||||
element.title = _('Cmd-click to open');
|
||||
} else {
|
||||
element.title = _('Ctrl-click to open');
|
||||
}
|
||||
} else {
|
||||
if (shim.isMac()) {
|
||||
element.title = _('Cmd-click to open: %s', element.title || element.href);
|
||||
} else {
|
||||
element.title = _('Ctrl-click to open: %s', element.title || element.href);
|
||||
}
|
||||
}
|
||||
|
||||
const onMouseLeave = () => {
|
||||
resetModifiedTitles();
|
||||
element.removeEventListener('mouseleave', onMouseLeave);
|
||||
};
|
||||
element.addEventListener('mouseleave', onMouseLeave);
|
||||
};
|
||||
|
||||
const clearRootEventListeners = () => {
|
||||
editor.getDoc().removeEventListener('mouseover', onMouseOver);
|
||||
};
|
||||
|
||||
const setUpRootEventListeners = () => {
|
||||
clearRootEventListeners();
|
||||
editor.getDoc().addEventListener('mouseover', onMouseOver);
|
||||
};
|
||||
setUpRootEventListeners();
|
||||
editor.on('SetContent', setUpRootEventListeners);
|
||||
editor.on('keyup', resetModifiedTitles);
|
||||
editor.on('click', resetModifiedTitles);
|
||||
|
||||
return () => {
|
||||
resetModifiedTitles();
|
||||
editor.off('SetContent', setUpRootEventListeners);
|
||||
editor.off('keyup', resetModifiedTitles);
|
||||
editor.off('click', resetModifiedTitles);
|
||||
clearRootEventListeners();
|
||||
};
|
||||
}, [editor, resetModifiedTitles]);
|
||||
|
||||
return { resetModifiedTitles };
|
||||
};
|
||||
|
||||
export default useLinkTooltips;
|
@@ -3,19 +3,18 @@ import { useState, useEffect, useCallback, useRef, useMemo } from 'react';
|
||||
import TinyMCE from './NoteBody/TinyMCE/TinyMCE';
|
||||
import { connect } from 'react-redux';
|
||||
import MultiNoteActions from '../MultiNoteActions';
|
||||
import { htmlToMarkdown, formNoteToNote } from './utils';
|
||||
import { htmlToMarkdown } from './utils';
|
||||
import useSearchMarkers from './utils/useSearchMarkers';
|
||||
import useNoteSearchBar from './utils/useNoteSearchBar';
|
||||
import useMessageHandler from './utils/useMessageHandler';
|
||||
import useWindowCommandHandler from './utils/useWindowCommandHandler';
|
||||
import useDropHandler from './utils/useDropHandler';
|
||||
import useMarkupToHtml from './utils/useMarkupToHtml';
|
||||
import useFormNote, { OnLoadEvent } from './utils/useFormNote';
|
||||
import useFormNote, { OnLoadEvent, OnSetFormNote } from './utils/useFormNote';
|
||||
import useEffectiveNoteId from './utils/useEffectiveNoteId';
|
||||
import useFolder from './utils/useFolder';
|
||||
import styles_ from './styles';
|
||||
import { NoteEditorProps, FormNote, ScrollOptions, ScrollOptionTypes, OnChangeEvent, NoteBodyEditorProps, AllAssetsOptions, NoteBodyEditorRef } from './utils/types';
|
||||
import ResourceEditWatcher from '@joplin/lib/services/ResourceEditWatcher/index';
|
||||
import { NoteEditorProps, FormNote, OnChangeEvent, NoteBodyEditorProps, AllAssetsOptions, NoteBodyEditorRef } from './utils/types';
|
||||
import CommandService from '@joplin/lib/services/CommandService';
|
||||
import ToolbarButton from '../ToolbarButton/ToolbarButton';
|
||||
import Button, { ButtonLevel } from '../Button/Button';
|
||||
@@ -26,7 +25,6 @@ import { _, _n } from '@joplin/lib/locale';
|
||||
import TagList from '../TagList';
|
||||
import NoteTitleBar from './NoteTitle/NoteTitleBar';
|
||||
import markupLanguageUtils from '../../utils/markupLanguageUtils';
|
||||
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';
|
||||
@@ -37,7 +35,7 @@ import NoteSearchBar from '../NoteSearchBar';
|
||||
import { reg } from '@joplin/lib/registry';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
const bridge = require('@electron/remote').require('./bridge').default;
|
||||
import bridge from '../../services/bridge';
|
||||
import NoteRevisionViewer from '../NoteRevisionViewer';
|
||||
import { parseShareCache } from '@joplin/lib/services/share/reducer';
|
||||
import useAsyncEffect from '@joplin/lib/hooks/useAsyncEffect';
|
||||
@@ -51,6 +49,9 @@ import CodeMirror5 from './NoteBody/CodeMirror/v5/CodeMirror';
|
||||
import { openItemById } from './utils/contextMenu';
|
||||
import getPluginSettingValue from '@joplin/lib/services/plugins/utils/getPluginSettingValue';
|
||||
import { MarkupLanguage } from '@joplin/renderer';
|
||||
import useScrollWhenReadyOptions from './utils/useScrollWhenReadyOptions';
|
||||
import useScheduleSaveCallbacks from './utils/useScheduleSaveCallbacks';
|
||||
const debounce = require('debounce');
|
||||
|
||||
const commands = [
|
||||
require('./commands/showRevisions'),
|
||||
@@ -61,20 +62,21 @@ const toolbarButtonUtils = new ToolbarButtonUtils(CommandService.instance());
|
||||
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<NoteBodyEditorRef>();
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
const titleInputRef = useRef<any>();
|
||||
const titleInputRef = useRef<HTMLInputElement>();
|
||||
const isMountedRef = useRef(true);
|
||||
const noteSearchBarRef = useRef(null);
|
||||
|
||||
const setFormNoteRef = useRef<OnSetFormNote>();
|
||||
const { saveNoteIfWillChange, scheduleSaveNote } = useScheduleSaveCallbacks({
|
||||
setFormNote: setFormNoteRef, dispatch: props.dispatch, editorRef,
|
||||
});
|
||||
const formNote_beforeLoad = useCallback(async (event: OnLoadEvent) => {
|
||||
await saveNoteIfWillChange(event.formNote);
|
||||
setShowRevisions(false);
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, []);
|
||||
}, [saveNoteIfWillChange]);
|
||||
|
||||
const formNote_afterLoad = useCallback(async () => {
|
||||
setTitleHasBeenManuallyChanged(false);
|
||||
@@ -92,7 +94,7 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
onBeforeLoad: formNote_beforeLoad,
|
||||
onAfterLoad: formNote_afterLoad,
|
||||
});
|
||||
|
||||
setFormNoteRef.current = setFormNote;
|
||||
const formNoteRef = useRef<FormNote>();
|
||||
formNoteRef.current = { ...formNote };
|
||||
|
||||
@@ -116,53 +118,6 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
|
||||
const styles = styles_(props);
|
||||
|
||||
function scheduleSaveNote(formNote: FormNote) {
|
||||
if (!formNote.saveActionQueue) throw new Error('saveActionQueue is not set!!'); // Sanity check
|
||||
|
||||
// reg.logger().debug('Scheduling...', formNote);
|
||||
|
||||
const makeAction = (formNote: FormNote) => {
|
||||
return async function() {
|
||||
const note = await formNoteToNote(formNote);
|
||||
reg.logger().debug('Saving note...', note);
|
||||
const savedNote = await Note.save(note);
|
||||
|
||||
setFormNote((prev: FormNote) => {
|
||||
return { ...prev, user_updated_time: savedNote.user_updated_time, hasChanged: false };
|
||||
});
|
||||
|
||||
void ExternalEditWatcher.instance().updateNoteFile(savedNote);
|
||||
|
||||
props.dispatch({
|
||||
type: 'EDITOR_NOTE_STATUS_REMOVE',
|
||||
id: formNote.id,
|
||||
});
|
||||
|
||||
eventManager.emit(EventName.NoteContentChange, { note: savedNote });
|
||||
};
|
||||
};
|
||||
|
||||
formNote.saveActionQueue.push(makeAction(formNote));
|
||||
}
|
||||
|
||||
async function saveNoteIfWillChange(formNote: FormNote) {
|
||||
if (!formNote.id || !formNote.bodyWillChangeId) return;
|
||||
|
||||
const body = await editorRef.current.content();
|
||||
|
||||
scheduleSaveNote({
|
||||
...formNote,
|
||||
body: body,
|
||||
bodyWillChangeId: 0,
|
||||
bodyChangeId: 0,
|
||||
});
|
||||
}
|
||||
|
||||
async function saveNoteAndWait(formNote: FormNote) {
|
||||
await saveNoteIfWillChange(formNote);
|
||||
return formNote.saveActionQueue.waitForAllDone();
|
||||
}
|
||||
|
||||
const whiteBackgroundNoteRendering = formNote.markup_language === MarkupLanguage.Html;
|
||||
|
||||
const markupToHtml = useMarkupToHtml({
|
||||
@@ -201,29 +156,18 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
id: formNote.id,
|
||||
});
|
||||
}
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, [props.isProvisional, formNote.id]);
|
||||
}, [props.isProvisional, formNote.id, props.dispatch]);
|
||||
|
||||
const previousNoteId = usePrevious(formNote.id);
|
||||
|
||||
useEffect(() => {
|
||||
if (formNote.id === previousNoteId) return;
|
||||
|
||||
if (editorRef.current) {
|
||||
editorRef.current.resetScroll();
|
||||
}
|
||||
|
||||
setScrollWhenReady({
|
||||
type: props.selectedNoteHash ? ScrollOptionTypes.Hash : ScrollOptionTypes.Percent,
|
||||
value: props.selectedNoteHash ? props.selectedNoteHash : props.lastEditorScrollPercents[formNote.id] || 0,
|
||||
});
|
||||
|
||||
void ResourceEditWatcher.instance().stopWatchingAll();
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, [formNote.id, previousNoteId]);
|
||||
const scheduleNoteListResort = useMemo(() => {
|
||||
return debounce(() => {
|
||||
// Although the note list will update automatically, it may take some time. This
|
||||
// forces an immediate update.
|
||||
props.dispatch({ type: 'NOTE_SORT' });
|
||||
}, 100);
|
||||
}, [props.dispatch]);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
const onFieldChange = useCallback((field: string, value: any, changeId = 0) => {
|
||||
const onFieldChange = useCallback(async (field: string, value: any, changeId = 0) => {
|
||||
if (!isMountedRef.current) {
|
||||
// When the component is unmounted, various actions can happen which can
|
||||
// trigger onChange events, for example the textarea might be cleared.
|
||||
@@ -263,19 +207,23 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
// The previously loaded note, that was modified, will be saved via saveNoteIfWillChange()
|
||||
} else {
|
||||
setFormNote(newNote);
|
||||
scheduleSaveNote(newNote);
|
||||
await scheduleSaveNote(newNote);
|
||||
}
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, [handleProvisionalFlag, formNote, isNewNote, titleHasBeenManuallyChanged]);
|
||||
|
||||
if (field === 'title') {
|
||||
// Scheduling a resort needs to be:
|
||||
// - called after scheduleSaveNote so that the new note title is used for sorting
|
||||
// - debounced because many calls to scheduleSaveNote can resolve at once
|
||||
scheduleNoteListResort();
|
||||
}
|
||||
}, [handleProvisionalFlag, formNote, setFormNote, isNewNote, titleHasBeenManuallyChanged, scheduleNoteListResort, scheduleSaveNote]);
|
||||
|
||||
useWindowCommandHandler({
|
||||
dispatch: props.dispatch,
|
||||
formNote,
|
||||
setShowLocalSearch,
|
||||
noteSearchBarRef,
|
||||
editorRef,
|
||||
titleInputRef,
|
||||
saveNoteAndWait,
|
||||
setFormNote,
|
||||
});
|
||||
|
||||
@@ -339,10 +287,15 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
id: formNote.id,
|
||||
status: 'saving',
|
||||
});
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, [formNote, handleProvisionalFlag]);
|
||||
}, [formNote, setFormNote, handleProvisionalFlag, props.dispatch]);
|
||||
|
||||
const onMessage = useMessageHandler(scrollWhenReady, setScrollWhenReady, editorRef, setLocalSearchResultCount, props.dispatch, formNote, htmlToMarkdown, markupToHtml);
|
||||
const { scrollWhenReady, clearScrollWhenReady } = useScrollWhenReadyOptions({
|
||||
noteId: formNote.id,
|
||||
selectedNoteHash: props.selectedNoteHash,
|
||||
lastEditorScrollPercents: props.lastEditorScrollPercents,
|
||||
editorRef,
|
||||
});
|
||||
const onMessage = useMessageHandler(scrollWhenReady, clearScrollWhenReady, editorRef, setLocalSearchResultCount, props.dispatch, formNote, htmlToMarkdown, markupToHtml);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
const externalEditWatcher_noteChange = useCallback((event: any) => {
|
||||
@@ -355,8 +308,7 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
|
||||
setFormNote(newFormNote);
|
||||
}
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, [formNote]);
|
||||
}, [formNote, setFormNote]);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
const onNotePropertyChange = useCallback((event: any) => {
|
||||
@@ -373,8 +325,7 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
|
||||
return newFormNote;
|
||||
});
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, []);
|
||||
}, [setFormNote]);
|
||||
|
||||
useEffect(() => {
|
||||
eventManager.on(EventName.AlarmChange, onNotePropertyChange);
|
||||
@@ -409,8 +360,7 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
});
|
||||
}, [props.dispatch]);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
function renderNoNotes(rootStyle: any) {
|
||||
function renderNoNotes(rootStyle: React.CSSProperties) {
|
||||
const emptyDivStyle = {
|
||||
backgroundColor: 'black',
|
||||
opacity: 0.1,
|
||||
@@ -493,7 +443,7 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
}
|
||||
|
||||
const onRichTextReadMoreLinkClick = useCallback(() => {
|
||||
bridge().openExternal('https://joplinapp.org/help/apps/rich_text_editor');
|
||||
void bridge().openExternal('https://joplinapp.org/help/apps/rich_text_editor');
|
||||
}, []);
|
||||
|
||||
const onRichTextDismissLinkClick = useCallback(() => {
|
||||
@@ -521,8 +471,7 @@ function NoteEditor(props: NoteEditorProps) {
|
||||
if (showRevisions) {
|
||||
const theme = themeStyle(props.themeId);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
const revStyle: any = {
|
||||
const revStyle: React.CSSProperties = {
|
||||
// ...props.style,
|
||||
display: 'inline-flex',
|
||||
padding: theme.margin,
|
||||
|
@@ -36,8 +36,7 @@ interface Props {
|
||||
noteTitle: string;
|
||||
noteIsTodo: number;
|
||||
isProvisional: boolean;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
titleInputRef: any;
|
||||
titleInputRef: React.RefObject<HTMLInputElement>;
|
||||
onTitleChange(event: ChangeEvent<HTMLInputElement>): void;
|
||||
disabled: boolean;
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ import Resource from '@joplin/lib/models/Resource';
|
||||
const bridge = require('@electron/remote').require('./bridge').default;
|
||||
import ResourceFetcher from '@joplin/lib/services/ResourceFetcher';
|
||||
import htmlUtils from '@joplin/lib/htmlUtils';
|
||||
import rendererHtmlUtils, { extractHtmlBody } from '@joplin/renderer/htmlUtils';
|
||||
import rendererHtmlUtils, { extractHtmlBody, removeWrappingParagraphAndTrailingEmptyElements } from '@joplin/renderer/htmlUtils';
|
||||
import Logger from '@joplin/utils/Logger';
|
||||
import { fileUriToPath } from '@joplin/utils/url';
|
||||
import { MarkupLanguage } from '@joplin/renderer';
|
||||
@@ -15,7 +15,7 @@ import markupRenderOptions from './markupRenderOptions';
|
||||
import { fileExtension, filename, safeFileExtension, safeFilename } from '@joplin/utils/path';
|
||||
const joplinRendererUtils = require('@joplin/renderer').utils;
|
||||
const { clipboard } = require('electron');
|
||||
const mimeUtils = require('@joplin/lib/mime-utils.js').mime;
|
||||
import * as mimeUtils from '@joplin/lib/mime-utils';
|
||||
const md5 = require('md5');
|
||||
const path = require('path');
|
||||
|
||||
@@ -220,6 +220,13 @@ export async function processPastedHtml(html: string, htmlToMd: HtmlToMarkdownHa
|
||||
if (htmlToMd && mdToHtml) {
|
||||
const md = await htmlToMd(MarkupLanguage.Markdown, html, '');
|
||||
html = (await mdToHtml(MarkupLanguage.Markdown, md, markupRenderOptions({ bodyOnly: true }))).html;
|
||||
|
||||
// When plugins that add to the end of rendered content are installed, bodyOnly can
|
||||
// fail to remove the wrapping paragraph. This works around that issue by removing
|
||||
// the wrapping paragraph in more cases. See issue #10061.
|
||||
if (!md.trim().includes('\n')) {
|
||||
html = removeWrappingParagraphAndTrailingEmptyElements(html);
|
||||
}
|
||||
}
|
||||
|
||||
return extractHtmlBody(rendererHtmlUtils.sanitizeHtml(html, {
|
||||
|
@@ -1,7 +1,9 @@
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import { setupDatabaseAndSynchronizer, switchClient } from '@joplin/lib/testing/test-utils';
|
||||
import { renderHook } from '@testing-library/react-hooks';
|
||||
import { act, renderHook } from '@testing-library/react-hooks';
|
||||
import useFormNote, { HookDependencies } from './useFormNote';
|
||||
import shim from '@joplin/lib/shim';
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
|
||||
const defaultFormNoteProps: HookDependencies = {
|
||||
syncStarted: false,
|
||||
@@ -75,6 +77,8 @@ describe('useFormNote', () => {
|
||||
title: 'Test Note!',
|
||||
});
|
||||
});
|
||||
|
||||
formNote.unmount();
|
||||
});
|
||||
|
||||
// It seems this test is crashing the worker on CI (out of memory), so disabling it for now.
|
||||
@@ -109,4 +113,43 @@ describe('useFormNote', () => {
|
||||
// });
|
||||
// });
|
||||
|
||||
test('should refresh resource infos when changed outside the editor', async () => {
|
||||
let note = await Note.save({});
|
||||
note = await shim.attachFileToNote(note, __filename);
|
||||
const resourceIds = Note.linkedItemIds(note.body);
|
||||
const resource = await Resource.load(resourceIds[0]);
|
||||
|
||||
const makeFormNoteProps = (syncStarted: boolean, decryptionStarted: boolean): HookDependencies => {
|
||||
return {
|
||||
...defaultFormNoteProps,
|
||||
syncStarted,
|
||||
decryptionStarted,
|
||||
noteId: note.id,
|
||||
};
|
||||
};
|
||||
|
||||
const formNote = renderHook(props => useFormNote(props), {
|
||||
initialProps: makeFormNoteProps(true, false),
|
||||
});
|
||||
|
||||
await formNote.waitFor(() => {
|
||||
return Object.values(formNote.result.current.resourceInfos).length > 0;
|
||||
});
|
||||
const initialResourceInfos = formNote.result.current.resourceInfos;
|
||||
expect(initialResourceInfos).toMatchObject({
|
||||
[resource.id]: { item: { id: resource.id } },
|
||||
});
|
||||
|
||||
await act(async () => {
|
||||
await Resource.save({ ...resource, filename: 'test.ts' });
|
||||
});
|
||||
await formNote.waitFor(() => {
|
||||
const resourceInfo = formNote.result.current.resourceInfos[resource.id];
|
||||
expect(resourceInfo.item).toMatchObject({
|
||||
id: resource.id, filename: 'test.ts',
|
||||
});
|
||||
});
|
||||
|
||||
formNote.unmount();
|
||||
});
|
||||
});
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { useState, useEffect, useCallback } from 'react';
|
||||
import { useState, useEffect, useCallback, RefObject, useRef } from 'react';
|
||||
import { FormNote, defaultFormNote, ResourceInfos } from './types';
|
||||
import { clearResourceCache, attachedResources } from './resourceHandling';
|
||||
import AsyncActionQueue from '@joplin/lib/AsyncActionQueue';
|
||||
@@ -6,15 +6,17 @@ import { handleResourceDownloadMode } from './resourceHandling';
|
||||
import { splitHtml } from '@joplin/renderer/HtmlToHtml';
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
import usePrevious from '../../hooks/usePrevious';
|
||||
import ResourceEditWatcher from '@joplin/lib/services/ResourceEditWatcher/index';
|
||||
|
||||
const { MarkupToHtml } = require('@joplin/renderer');
|
||||
import { MarkupToHtml } from '@joplin/renderer';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import { reg } from '@joplin/lib/registry';
|
||||
import ResourceFetcher from '@joplin/lib/services/ResourceFetcher';
|
||||
import DecryptionWorker from '@joplin/lib/services/DecryptionWorker';
|
||||
import { NoteEntity } from '@joplin/lib/services/database/types';
|
||||
import { focus } from '@joplin/lib/utils/focusHandler';
|
||||
import Logger from '@joplin/utils/Logger';
|
||||
import eventManager, { EventName } from '@joplin/lib/eventManager';
|
||||
import DecryptionWorker from '@joplin/lib/services/DecryptionWorker';
|
||||
|
||||
const logger = Logger.create('useFormNote');
|
||||
|
||||
export interface OnLoadEvent {
|
||||
formNote: FormNote;
|
||||
@@ -25,28 +27,28 @@ export interface HookDependencies {
|
||||
decryptionStarted: boolean;
|
||||
noteId: string;
|
||||
isProvisional: boolean;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
titleInputRef: any;
|
||||
titleInputRef: RefObject<HTMLInputElement>;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
editorRef: any;
|
||||
onBeforeLoad(event: OnLoadEvent): void;
|
||||
onAfterLoad(event: OnLoadEvent): void;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
|
||||
function installResourceChangeHandler(onResourceChangeHandler: Function) {
|
||||
type MapFormNoteCallback = (previousFormNote: FormNote)=> FormNote;
|
||||
export type OnSetFormNote = (newFormNote: FormNote|MapFormNoteCallback)=> void;
|
||||
|
||||
function installResourceChangeHandler(onResourceChangeHandler: ()=> void) {
|
||||
ResourceFetcher.instance().on('downloadComplete', onResourceChangeHandler);
|
||||
ResourceFetcher.instance().on('downloadStarted', onResourceChangeHandler);
|
||||
DecryptionWorker.instance().on('resourceDecrypted', onResourceChangeHandler);
|
||||
ResourceEditWatcher.instance().on('resourceChange', onResourceChangeHandler);
|
||||
eventManager.on(EventName.ResourceChange, onResourceChangeHandler);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
|
||||
function uninstallResourceChangeHandler(onResourceChangeHandler: Function) {
|
||||
function uninstallResourceChangeHandler(onResourceChangeHandler: ()=> void) {
|
||||
ResourceFetcher.instance().off('downloadComplete', onResourceChangeHandler);
|
||||
ResourceFetcher.instance().off('downloadStarted', onResourceChangeHandler);
|
||||
DecryptionWorker.instance().off('resourceDecrypted', onResourceChangeHandler);
|
||||
ResourceEditWatcher.instance().off('resourceChange', onResourceChangeHandler);
|
||||
eventManager.off(EventName.ResourceChange, onResourceChangeHandler);
|
||||
}
|
||||
|
||||
function resourceInfosChanged(a: ResourceInfos, b: ResourceInfos): boolean {
|
||||
@@ -77,11 +79,14 @@ export default function useFormNote(dependencies: HookDependencies) {
|
||||
const previousNoteId = usePrevious(formNote.id);
|
||||
const [resourceInfos, setResourceInfos] = useState<ResourceInfos>({});
|
||||
|
||||
const formNoteRef = useRef(formNote);
|
||||
formNoteRef.current = formNote;
|
||||
|
||||
// Increasing the value of this counter cancels any ongoing note refreshes and starts
|
||||
// a new refresh.
|
||||
const [formNoteRefreshScheduled, setFormNoteRefreshScheduled] = useState<number>(0);
|
||||
|
||||
async function initNoteState(n: NoteEntity) {
|
||||
const initNoteState = useCallback(async (n: NoteEntity, isNewNote: boolean) => {
|
||||
let originalCss = '';
|
||||
|
||||
if (n.markup_language === MarkupToHtml.MARKUP_LANGUAGE_HTML) {
|
||||
@@ -106,22 +111,39 @@ export default function useFormNote(dependencies: HookDependencies) {
|
||||
encryption_applied: n.encryption_applied,
|
||||
};
|
||||
|
||||
logger.debug('Initializing note state');
|
||||
|
||||
// Note that for performance reason,the call to setResourceInfos should
|
||||
// be first because it loads the resource infos in an async way. If we
|
||||
// swap them, the formNote will be updated first and rendered, then the
|
||||
// the resources will load, and the note will be re-rendered.
|
||||
setResourceInfos(await attachedResources(n.body));
|
||||
const resources = await attachedResources(n.body);
|
||||
|
||||
// If the user changes the note while resources are loading, this can lead to
|
||||
// a note being incorrectly marked as "unchanged".
|
||||
if (!isNewNote && formNoteRef.current?.hasChanged) {
|
||||
logger.info('Cancelled note refresh -- form note changed while loading attached resources.');
|
||||
return null;
|
||||
}
|
||||
|
||||
setResourceInfos(resources);
|
||||
setFormNote(newFormNote);
|
||||
|
||||
logger.debug('Resource info and form note set.');
|
||||
|
||||
await handleResourceDownloadMode(n.body);
|
||||
|
||||
return newFormNote;
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (formNoteRefreshScheduled <= 0) return () => {};
|
||||
if (formNoteRef.current.hasChanged) {
|
||||
logger.info('Form note changed between scheduling a refresh and the refresh itself. Cancelling the refresh.');
|
||||
return () => {};
|
||||
}
|
||||
|
||||
reg.logger().info('Sync has finished and note has never been changed - reloading it');
|
||||
logger.info('Sync has finished and note has never been changed - reloading it');
|
||||
|
||||
let cancelled = false;
|
||||
|
||||
@@ -133,11 +155,12 @@ export default function useFormNote(dependencies: HookDependencies) {
|
||||
// it would not have been loaded in the editor (due to note selection changing
|
||||
// on delete)
|
||||
if (!n) {
|
||||
reg.logger().warn('Trying to reload note that has been deleted:', noteId);
|
||||
logger.warn('Trying to reload note that has been deleted:', noteId);
|
||||
return;
|
||||
}
|
||||
|
||||
await initNoteState(n);
|
||||
await initNoteState(n, false);
|
||||
|
||||
setFormNoteRefreshScheduled(0);
|
||||
};
|
||||
|
||||
@@ -146,7 +169,7 @@ export default function useFormNote(dependencies: HookDependencies) {
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
}, [formNoteRefreshScheduled, noteId]);
|
||||
}, [formNoteRefreshScheduled, noteId, initNoteState]);
|
||||
|
||||
const refreshFormNote = useCallback(() => {
|
||||
// Increase the counter to cancel any ongoing refresh attempts
|
||||
@@ -163,7 +186,9 @@ export default function useFormNote(dependencies: HookDependencies) {
|
||||
const syncJustEnded = prevSyncStarted && !syncStarted;
|
||||
|
||||
if (!decryptionJustEnded && !syncJustEnded) return;
|
||||
if (formNote.hasChanged) return;
|
||||
if (formNoteRef.current.hasChanged) return;
|
||||
|
||||
logger.debug('Sync or decryption finished with an unchanged formNote.');
|
||||
|
||||
// Refresh the form note.
|
||||
// This is kept separate from the above logic so that when prevSyncStarted is changed
|
||||
@@ -172,7 +197,7 @@ export default function useFormNote(dependencies: HookDependencies) {
|
||||
}, [
|
||||
prevSyncStarted, syncStarted,
|
||||
prevDecryptionStarted, decryptionStarted,
|
||||
formNote.hasChanged, refreshFormNote,
|
||||
refreshFormNote,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -185,7 +210,7 @@ export default function useFormNote(dependencies: HookDependencies) {
|
||||
|
||||
let cancelled = false;
|
||||
|
||||
reg.logger().debug('Loading existing note', noteId);
|
||||
logger.debug('Loading existing note', noteId);
|
||||
|
||||
function handleAutoFocus(noteIsTodo: boolean) {
|
||||
if (!isProvisional) return;
|
||||
@@ -205,11 +230,11 @@ export default function useFormNote(dependencies: HookDependencies) {
|
||||
const n = await Note.load(noteId);
|
||||
if (cancelled) return;
|
||||
if (!n) throw new Error(`Cannot find note with ID: ${noteId}`);
|
||||
reg.logger().debug('Loaded note:', n);
|
||||
logger.debug('Loaded note:', n);
|
||||
|
||||
await onBeforeLoad({ formNote });
|
||||
|
||||
const newFormNote = await initNoteState(n);
|
||||
const newFormNote = await initNoteState(n, true);
|
||||
|
||||
setIsNewNote(isProvisional);
|
||||
|
||||
@@ -231,7 +256,8 @@ export default function useFormNote(dependencies: HookDependencies) {
|
||||
const resourceIds = await Note.linkedResourceIds(formNote.body);
|
||||
if (!event || resourceIds.indexOf(event.id) >= 0) {
|
||||
clearResourceCache();
|
||||
setResourceInfos(await attachedResources(formNote.body));
|
||||
const newResourceInfos = await attachedResources(formNote.body);
|
||||
setResourceInfos(newResourceInfos);
|
||||
}
|
||||
}, [formNote.body]);
|
||||
|
||||
@@ -266,5 +292,24 @@ export default function useFormNote(dependencies: HookDependencies) {
|
||||
};
|
||||
}, [formNote.body]);
|
||||
|
||||
return { isNewNote, formNote, setFormNote, resourceInfos };
|
||||
// Currently, useFormNote relies on formNoteRef being up-to-date immediately after the editor
|
||||
// changes, with no delay during which async code can run. Even a small delay (e.g. that introduced
|
||||
// by a setState -> useEffect) can lead to a race condition. See https://github.com/laurent22/joplin/issues/8960.
|
||||
const onSetFormNote: OnSetFormNote = useCallback(newFormNote => {
|
||||
if (typeof newFormNote === 'function') {
|
||||
const newNote = newFormNote(formNoteRef.current);
|
||||
formNoteRef.current = newNote;
|
||||
setFormNote(newNote);
|
||||
} else {
|
||||
formNoteRef.current = newFormNote;
|
||||
setFormNote(newFormNote);
|
||||
}
|
||||
}, [setFormNote]);
|
||||
|
||||
return {
|
||||
isNewNote,
|
||||
formNote,
|
||||
setFormNote: onSetFormNote,
|
||||
resourceInfos,
|
||||
};
|
||||
}
|
||||
|
@@ -25,7 +25,6 @@ export default function useMarkupToHtml(deps: HookDependencies) {
|
||||
resourceBaseUrl: `file://${Setting.value('resourceDir')}/`,
|
||||
customCss: customCss || '',
|
||||
});
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, [plugins, customCss]);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
@@ -63,6 +62,5 @@ export default function useMarkupToHtml(deps: HookDependencies) {
|
||||
});
|
||||
|
||||
return result;
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, [themeId, customCss, markupToHtml, whiteBackgroundNoteRendering]);
|
||||
}, [themeId, markupToHtml, whiteBackgroundNoteRendering, deps.settingValue]);
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { useCallback } from 'react';
|
||||
import { FormNote, HtmlToMarkdownHandler, MarkupToHtmlHandler } from './types';
|
||||
import { FormNote, HtmlToMarkdownHandler, MarkupToHtmlHandler, ScrollOptions } from './types';
|
||||
import contextMenu from './contextMenu';
|
||||
import CommandService from '@joplin/lib/services/CommandService';
|
||||
import PostMessageService from '@joplin/lib/services/PostMessageService';
|
||||
@@ -8,7 +8,7 @@ import { reg } from '@joplin/lib/registry';
|
||||
const bridge = require('@electron/remote').require('./bridge').default;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any -- Old code before rule was applied, Old code before rule was applied
|
||||
export default function useMessageHandler(scrollWhenReady: any, setScrollWhenReady: Function, editorRef: any, setLocalSearchResultCount: Function, dispatch: Function, formNote: FormNote, htmlToMd: HtmlToMarkdownHandler, mdToHtml: MarkupToHtmlHandler) {
|
||||
export default function useMessageHandler(scrollWhenReady: ScrollOptions|null, clearScrollWhenReady: ()=> void, editorRef: any, setLocalSearchResultCount: Function, dispatch: Function, formNote: FormNote, htmlToMd: HtmlToMarkdownHandler, mdToHtml: MarkupToHtmlHandler) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
return useCallback(async (event: any) => {
|
||||
const msg = event.channel ? event.channel : '';
|
||||
@@ -25,7 +25,7 @@ export default function useMessageHandler(scrollWhenReady: any, setScrollWhenRea
|
||||
} else if (msg === 'noteRenderComplete') {
|
||||
if (scrollWhenReady) {
|
||||
const options = { ...scrollWhenReady };
|
||||
setScrollWhenReady(null);
|
||||
clearScrollWhenReady();
|
||||
editorRef.current.scrollTo(options);
|
||||
}
|
||||
} else if (msg === 'setMarkerCount') {
|
||||
|
@@ -0,0 +1,66 @@
|
||||
import Logger from '@joplin/utils/Logger';
|
||||
import { RefObject, useCallback } from 'react';
|
||||
import { FormNote, NoteBodyEditorRef } from './types';
|
||||
import { formNoteToNote } from '.';
|
||||
import ExternalEditWatcher from '@joplin/lib/services/ExternalEditWatcher';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import type { Dispatch } from 'redux';
|
||||
import eventManager, { EventName } from '@joplin/lib/eventManager';
|
||||
import type { OnSetFormNote } from './useFormNote';
|
||||
|
||||
const logger = Logger.create('useScheduleSaveCallbacks');
|
||||
|
||||
interface Props {
|
||||
setFormNote: RefObject<OnSetFormNote>;
|
||||
dispatch: Dispatch;
|
||||
editorRef: RefObject<NoteBodyEditorRef>;
|
||||
}
|
||||
|
||||
const useScheduleSaveCallbacks = (props: Props) => {
|
||||
const scheduleSaveNote = useCallback((formNote: FormNote) => {
|
||||
if (!formNote.saveActionQueue) throw new Error('saveActionQueue is not set!!'); // Sanity check
|
||||
|
||||
// reg.logger().debug('Scheduling...', formNote);
|
||||
|
||||
const makeAction = (formNote: FormNote) => {
|
||||
return async function() {
|
||||
const note = await formNoteToNote(formNote);
|
||||
logger.debug('Saving note...', note);
|
||||
const savedNote = await Note.save(note);
|
||||
|
||||
props.setFormNote.current((prev: FormNote) => {
|
||||
return { ...prev, user_updated_time: savedNote.user_updated_time, hasChanged: false };
|
||||
});
|
||||
|
||||
void ExternalEditWatcher.instance().updateNoteFile(savedNote);
|
||||
|
||||
props.dispatch({
|
||||
type: 'EDITOR_NOTE_STATUS_REMOVE',
|
||||
id: formNote.id,
|
||||
});
|
||||
|
||||
eventManager.emit(EventName.NoteContentChange, { note: savedNote });
|
||||
};
|
||||
};
|
||||
|
||||
formNote.saveActionQueue.push(makeAction(formNote));
|
||||
return formNote.saveActionQueue.waitForAllDone();
|
||||
}, [props.dispatch, props.setFormNote]);
|
||||
|
||||
const saveNoteIfWillChange = useCallback(async (formNote: FormNote) => {
|
||||
if (!formNote.id || !formNote.bodyWillChangeId) return;
|
||||
|
||||
const body = await props.editorRef.current.content();
|
||||
|
||||
void scheduleSaveNote({
|
||||
...formNote,
|
||||
body: body,
|
||||
bodyWillChangeId: 0,
|
||||
bodyChangeId: 0,
|
||||
});
|
||||
}, [scheduleSaveNote, props.editorRef]);
|
||||
|
||||
return { saveNoteIfWillChange, scheduleSaveNote };
|
||||
};
|
||||
|
||||
export default useScheduleSaveCallbacks;
|
@@ -0,0 +1,44 @@
|
||||
import { RefObject, useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { NoteBodyEditorRef, ScrollOptions, ScrollOptionTypes } from './types';
|
||||
import usePrevious from '@joplin/lib/hooks/usePrevious';
|
||||
import ResourceEditWatcher from '@joplin/lib/services/ResourceEditWatcher';
|
||||
import type { EditorScrollPercents } from '../../../app.reducer';
|
||||
|
||||
interface Props {
|
||||
noteId: string;
|
||||
selectedNoteHash: string;
|
||||
lastEditorScrollPercents: EditorScrollPercents;
|
||||
editorRef: RefObject<NoteBodyEditorRef>;
|
||||
}
|
||||
|
||||
const useScrollWhenReadyOptions = ({ noteId, selectedNoteHash, lastEditorScrollPercents, editorRef }: Props) => {
|
||||
const [scrollWhenReady, setScrollWhenReady] = useState<ScrollOptions|null>(null);
|
||||
|
||||
const previousNoteId = usePrevious(noteId);
|
||||
const lastScrollPercentsRef = useRef<EditorScrollPercents>();
|
||||
lastScrollPercentsRef.current = lastEditorScrollPercents;
|
||||
|
||||
useEffect(() => {
|
||||
if (noteId === previousNoteId) return;
|
||||
|
||||
if (editorRef.current) {
|
||||
editorRef.current.resetScroll();
|
||||
}
|
||||
|
||||
const lastScrollPercent = lastScrollPercentsRef.current[noteId] || 0;
|
||||
setScrollWhenReady({
|
||||
type: selectedNoteHash ? ScrollOptionTypes.Hash : ScrollOptionTypes.Percent,
|
||||
value: selectedNoteHash ? selectedNoteHash : lastScrollPercent,
|
||||
});
|
||||
|
||||
void ResourceEditWatcher.instance().stopWatchingAll();
|
||||
}, [noteId, previousNoteId, selectedNoteHash, editorRef]);
|
||||
|
||||
const clearScrollWhenReady = useCallback(() => {
|
||||
setScrollWhenReady(null);
|
||||
}, []);
|
||||
|
||||
return { scrollWhenReady, clearScrollWhenReady };
|
||||
};
|
||||
|
||||
export default useScrollWhenReadyOptions;
|
@@ -15,7 +15,6 @@ const commandsWithDependencies = [
|
||||
type SetFormNoteCallback = (callback: (prev: FormNote)=> FormNote)=> void;
|
||||
|
||||
interface HookDependencies {
|
||||
formNote: FormNote;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
|
||||
setShowLocalSearch: Function;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
|
||||
@@ -23,10 +22,7 @@ interface HookDependencies {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
noteSearchBarRef: any;
|
||||
editorRef: RefObject<NoteBodyEditorRef>;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
titleInputRef: any;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
|
||||
saveNoteAndWait: Function;
|
||||
titleInputRef: RefObject<HTMLInputElement>;
|
||||
setFormNote: SetFormNoteCallback;
|
||||
}
|
||||
|
||||
@@ -109,6 +105,5 @@ export default function useWindowCommandHandler(dependencies: HookDependencies)
|
||||
CommandService.instance().unregisterRuntime(command.declaration.name);
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, [editorRef, setShowLocalSearch, noteSearchBarRef, titleInputRef]);
|
||||
}, [editorRef, setShowLocalSearch, noteSearchBarRef, titleInputRef, setFormNote]);
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ const NoteList = (props: Props) => {
|
||||
props.notes.length,
|
||||
);
|
||||
|
||||
const focusNote = useFocusNote(itemRefs);
|
||||
const focusNote = useFocusNote(itemRefs, props.notes, makeItemIndexVisible);
|
||||
|
||||
const moveNote = useMoveNote(
|
||||
props.notesParentType,
|
||||
|
@@ -1,19 +1,31 @@
|
||||
import shim from '@joplin/lib/shim';
|
||||
import { useRef, useCallback, MutableRefObject } from 'react';
|
||||
import { focus } from '@joplin/lib/utils/focusHandler';
|
||||
import { NoteEntity } from '@joplin/lib/services/database/types';
|
||||
|
||||
export type FocusNote = (noteId: string)=> void;
|
||||
type ItemRefs = MutableRefObject<Record<string, HTMLDivElement>>;
|
||||
type OnMakeIndexVisible = (i: number)=> void;
|
||||
|
||||
const useFocusNote = (itemRefs: MutableRefObject<Record<string, HTMLDivElement>>) => {
|
||||
const useFocusNote = (itemRefs: ItemRefs, notes: NoteEntity[], makeItemIndexVisible: OnMakeIndexVisible) => {
|
||||
const focusItemIID = useRef(null);
|
||||
|
||||
const notesRef = useRef(notes);
|
||||
notesRef.current = notes;
|
||||
|
||||
const focusNote: FocusNote = useCallback((noteId: string) => {
|
||||
// - We need to focus the item manually otherwise focus might be lost when the
|
||||
// list is scrolled and items within it are being rebuilt.
|
||||
// - We need to use an interval because when leaving the arrow pressed, the rendering
|
||||
// of items might lag behind and so the ref is not yet available at this point.
|
||||
// - We need to use an interval because when leaving the arrow pressed or scrolling
|
||||
// offscreen items into view, the rendering of items might lag behind and so the
|
||||
// ref is not yet available at this point.
|
||||
|
||||
if (!itemRefs.current[noteId]) {
|
||||
const targetIndex = notesRef.current.findIndex(note => note.id === noteId);
|
||||
if (targetIndex > -1) {
|
||||
makeItemIndexVisible(targetIndex);
|
||||
}
|
||||
|
||||
if (focusItemIID.current) shim.clearInterval(focusItemIID.current);
|
||||
focusItemIID.current = shim.setInterval(() => {
|
||||
if (itemRefs.current[noteId]) {
|
||||
@@ -26,7 +38,7 @@ const useFocusNote = (itemRefs: MutableRefObject<Record<string, HTMLDivElement>>
|
||||
if (focusItemIID.current) shim.clearInterval(focusItemIID.current);
|
||||
focus('useFocusNote2', itemRefs.current[noteId]);
|
||||
}
|
||||
}, [itemRefs]);
|
||||
}, [itemRefs, makeItemIndexVisible]);
|
||||
|
||||
return focusNote;
|
||||
};
|
||||
|
@@ -7,6 +7,7 @@ const { themeStyle } = require('@joplin/lib/theme');
|
||||
import bridge from '../services/bridge';
|
||||
const prettyBytes = require('pretty-bytes');
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
import { LoadOptions } from '@joplin/lib/models/utils/types';
|
||||
|
||||
interface Style {
|
||||
width: number;
|
||||
@@ -31,6 +32,7 @@ interface State {
|
||||
resources: InnerResource[] | undefined;
|
||||
sorting: ActiveSorting;
|
||||
isLoading: boolean;
|
||||
filter: string;
|
||||
}
|
||||
|
||||
interface ResourceTable {
|
||||
@@ -42,6 +44,7 @@ interface ResourceTable {
|
||||
onResourceDelete: (resource: InnerResource)=> any;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
onToggleSorting: (order: SortingOrder)=> any;
|
||||
filter: string;
|
||||
themeId: number;
|
||||
style: Style;
|
||||
}
|
||||
@@ -89,6 +92,10 @@ const ResourceTableComp = (props: ResourceTable) => {
|
||||
fontWeight: 'bold',
|
||||
};
|
||||
|
||||
const filteredResources = props.resources.filter(
|
||||
(resource: InnerResource) => !props.filter || resource.title?.includes(props.filter) || resource.id.includes(props.filter),
|
||||
);
|
||||
|
||||
return (
|
||||
<table style={{ width: '100%' }}>
|
||||
<thead>
|
||||
@@ -100,7 +107,7 @@ const ResourceTableComp = (props: ResourceTable) => {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{props.resources.map((resource: InnerResource, index: number) =>
|
||||
{filteredResources.map((resource: InnerResource, index: number) =>
|
||||
<tr key={index}>
|
||||
<td style={titleCellStyle} className="titleCell">
|
||||
<a
|
||||
@@ -136,13 +143,15 @@ const getNextSortingOrderType = (s: SortingType): SortingType => {
|
||||
}
|
||||
};
|
||||
|
||||
const MAX_RESOURCES = 10000;
|
||||
const defaultMaxResources = 10000;
|
||||
const searchMaxResources = 1000;
|
||||
|
||||
class ResourceScreenComponent extends React.Component<Props, State> {
|
||||
public constructor(props: Props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
resources: undefined,
|
||||
filter: '',
|
||||
sorting: {
|
||||
type: 'asc',
|
||||
order: 'name',
|
||||
@@ -151,22 +160,57 @@ class ResourceScreenComponent extends React.Component<Props, State> {
|
||||
};
|
||||
}
|
||||
|
||||
public async reloadResources(sorting: ActiveSorting) {
|
||||
private get maxResources() {
|
||||
// Use a smaller maximum when searching for performance -- results update
|
||||
// when the search input changes.
|
||||
if (this.state.filter) {
|
||||
return searchMaxResources;
|
||||
} else {
|
||||
return defaultMaxResources;
|
||||
}
|
||||
}
|
||||
|
||||
private reloadResourcesCounter = 0;
|
||||
public async reloadResources() {
|
||||
this.setState({ isLoading: true });
|
||||
|
||||
this.reloadResourcesCounter ++;
|
||||
const currentCounterValue = this.reloadResourcesCounter;
|
||||
|
||||
let searchOptions: Partial<LoadOptions> = {};
|
||||
if (this.state.filter) {
|
||||
const search = `%${this.state.filter}%`;
|
||||
searchOptions = {
|
||||
where: 'id LIKE ? OR title LIKE ?',
|
||||
whereParams: [search, search],
|
||||
};
|
||||
}
|
||||
|
||||
const resources = await Resource.all({
|
||||
order: [{
|
||||
by: getSortingOrderColumn(sorting.order),
|
||||
dir: sorting.type,
|
||||
by: getSortingOrderColumn(this.state.sorting.order),
|
||||
dir: this.state.sorting.type,
|
||||
caseInsensitive: true,
|
||||
}],
|
||||
limit: MAX_RESOURCES,
|
||||
limit: this.maxResources,
|
||||
fields: ['title', 'id', 'size', 'file_extension'],
|
||||
...searchOptions,
|
||||
});
|
||||
|
||||
const cancelled = currentCounterValue !== this.reloadResourcesCounter;
|
||||
if (cancelled) return;
|
||||
|
||||
this.setState({ resources, isLoading: false });
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
void this.reloadResources(this.state.sorting);
|
||||
void this.reloadResources();
|
||||
}
|
||||
|
||||
public componentDidUpdate(_prevProps: Props, prevState: State) {
|
||||
if (prevState.sorting !== this.state.sorting || prevState.filter !== this.state.filter) {
|
||||
void this.reloadResources();
|
||||
}
|
||||
}
|
||||
|
||||
public onResourceDelete(resource: InnerResource) {
|
||||
@@ -185,7 +229,7 @@ class ResourceScreenComponent extends React.Component<Props, State> {
|
||||
})
|
||||
// eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied
|
||||
.finally(() => {
|
||||
void this.reloadResources(this.state.sorting);
|
||||
void this.reloadResources();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -208,9 +252,12 @@ class ResourceScreenComponent extends React.Component<Props, State> {
|
||||
};
|
||||
}
|
||||
this.setState({ sorting: newSorting });
|
||||
void this.reloadResources(newSorting);
|
||||
}
|
||||
|
||||
public onFilterUpdate = (updateEvent: React.ChangeEvent<HTMLInputElement>) => {
|
||||
this.setState({ filter: updateEvent.target.value });
|
||||
};
|
||||
|
||||
public render() {
|
||||
const style = this.props.style;
|
||||
const theme = themeStyle(this.props.themeId);
|
||||
@@ -236,20 +283,30 @@ class ResourceScreenComponent extends React.Component<Props, State> {
|
||||
<div style={{ ...theme.notificationBox, marginBottom: 10 }}>{
|
||||
_('This is an advanced tool to show the attachments that are linked to your notes. Please be careful when deleting one of them as they cannot be restored afterwards.')
|
||||
}</div>
|
||||
<div style={{ float: 'right' }}>
|
||||
<input
|
||||
style={theme.inputStyle}
|
||||
type="search"
|
||||
value={this.state.filter}
|
||||
onChange={this.onFilterUpdate}
|
||||
placeholder={_('Search...')}
|
||||
/>
|
||||
</div>
|
||||
{this.state.isLoading && <div>{_('Please wait...')}</div>}
|
||||
{!this.state.isLoading && <div>
|
||||
{!this.state.resources && <div>
|
||||
{_('No resources!')}
|
||||
</div>
|
||||
}
|
||||
{this.state.resources && this.state.resources.length === MAX_RESOURCES &&
|
||||
<div>{_('Warning: not all resources shown for performance reasons (limit: %s).', MAX_RESOURCES)}</div>
|
||||
{this.state.resources && this.state.resources.length === this.maxResources &&
|
||||
<div>{_('Warning: not all resources shown for performance reasons (limit: %s).', this.maxResources)}</div>
|
||||
}
|
||||
{this.state.resources && <ResourceTableComp
|
||||
themeId={this.props.themeId}
|
||||
style={style}
|
||||
resources={this.state.resources}
|
||||
sorting={this.state.sorting}
|
||||
filter={this.state.filter}
|
||||
onToggleSorting={(order) => this.onToggleSortOrder(order)}
|
||||
onResourceClick={(resource) => this.openResource(resource)}
|
||||
onResourceDelete={(resource) => this.onResourceDelete(resource)}
|
||||
|
@@ -84,6 +84,11 @@ export const StyledListItemAnchor = styled.a`
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
height: 100%;
|
||||
|
||||
/* A different background color is already used to indicate focus for sidebar list items. */
|
||||
&:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledShareIcon = styled.i`
|
||||
|
@@ -34,6 +34,7 @@ export default function() {
|
||||
'toggleExternalEditing',
|
||||
'toggleLayoutMoveMode',
|
||||
'resetLayout',
|
||||
'toggleMenuBar',
|
||||
'toggleNoteList',
|
||||
'toggleNotesSortOrderField',
|
||||
'toggleNotesSortOrderReverse',
|
||||
|
@@ -207,7 +207,7 @@
|
||||
for (const [assetId, asset] of Object.entries(pluginAssetsAdded_)) {
|
||||
if (!processedAssetIds.includes(assetId)) {
|
||||
try {
|
||||
asset.element.remove();
|
||||
if (asset?.element) asset.element.remove();
|
||||
} catch (error) {
|
||||
// We don't throw an exception but we log it since
|
||||
// it shouldn't happen
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { utils as pluginUtils, PluginStates } from '@joplin/lib/services/plugins/reducer';
|
||||
import CommandService from '@joplin/lib/services/CommandService';
|
||||
import eventManager, { EventName } from '@joplin/lib/eventManager';
|
||||
import InteropService from '@joplin/lib/services/interop/InteropService';
|
||||
import MenuUtils from '@joplin/lib/services/commands/MenuUtils';
|
||||
import InteropServiceHelper from '../../InteropServiceHelper';
|
||||
@@ -78,7 +77,6 @@ export default class NoteListUtils {
|
||||
const newNote = Note.changeNoteType(note, type);
|
||||
if (newNote === note) continue;
|
||||
await Note.save(newNote, { userSideValidation: true });
|
||||
eventManager.emit(EventName.NoteTypeToggle, { noteId: note.id });
|
||||
}
|
||||
};
|
||||
|
||||
|