1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-27 20:29:45 +02:00

Compare commits

...

400 Commits

Author SHA1 Message Date
Laurent Cozic
255a4fac93 Electron release v1.0.75 2018-03-16 10:03:47 +00:00
Laurent Cozic
3e3fb88de8 Merge branch 'master' into resource_cleanup 2018-03-16 10:03:05 +00:00
Laurent Cozic
e4cf03ae46 Only build master branch 2018-03-16 10:02:58 +00:00
Laurent Cozic
554a3eb10d Electron release v1.0.74 2018-03-16 09:11:25 +00:00
Laurent Cozic
61881b528a Electron: Trying to fix signed executable issue 2018-03-16 09:11:10 +00:00
Laurent Cozic
c2507cbc4e CLI v1.0.101 2018-03-16 08:17:27 +00:00
Laurent Cozic
ed0f6d165c Android release v1.0.107 2018-03-16 08:10:32 +00:00
Laurent Cozic
8e22d38eb3 Electron release v1.0.73 2018-03-16 08:08:10 +00:00
Laurent Cozic
2599c425c3 Updated translations 2018-03-15 18:15:33 +00:00
Laurent Cozic
0e15821a81 Merge branch 'master' of github.com:laurent22/joplin 2018-03-15 18:10:11 +00:00
Laurent Cozic
c1bb51c12b All: Finished service to clean up resources 2018-03-15 18:08:46 +00:00
Laurent Cozic
1532b6d159 All: Made WebDAV options dynamics so that changing username or password doesn't require restarting the app 2018-03-15 17:57:11 +00:00
Laurent Cozic
945018b698 All: Allow deleting and syncing deleted resources 2018-03-15 17:46:54 +00:00
Laurent Cozic
df7b981e5e Merge branch 'master' into resource_cleanup 2018-03-15 18:19:06 +00:00
Laurent Cozic
4fe495675b Merge pull request #301 from fmrtn/master
Updated Spanish translation
2018-03-15 14:26:28 +00:00
Fernando
7828eef2ad Updated Spanish translation 2018-03-15 15:24:37 +01:00
Laurent Cozic
694f81b75f Merge pull request #300 from rtmkrlv/master
Updated Russian translation
2018-03-15 13:15:09 +00:00
rtmkrlv
8364b6e08d Updated Russian translation 2018-03-15 11:14:04 +02:00
rtmkrlv
3f4328ce9d Merge pull request #5 from laurent22/master
Update fork from original repository
2018-03-15 10:41:44 +02:00
Laurent Cozic
9e0bf1acb2 Mobile: Fixes #299: App freezes when connecting to OneDrive login page while internet connection is down 2018-03-14 23:17:02 +00:00
Laurent Cozic
c9e130a771 Merge branch 'master' into resource_cleanup 2018-03-14 17:41:06 +00:00
Laurent Cozic
26331f61e1 Electron: Resolves #298: Removed extraneous first characters from auto-title 2018-03-14 17:37:47 +00:00
Laurent Cozic
694672859a Updated translations 2018-03-14 17:32:05 +00:00
Laurent Cozic
858ead40b9 /bin/bash: qa: command not found 2018-03-14 17:29:13 +00:00
Laurent Cozic
b07fe5cc34 CLI: Fixes #288: Don't log commands in release versions 2018-03-14 17:28:41 +00:00
Laurent Cozic
0317171097 Electron: Fixes #292: Removed buggy electron-updater and implemented custom check 2018-03-14 17:23:19 +00:00
Laurent Cozic
9741a3a53d Merge pull request #283 from jcgerhard/master
Updated german translation de_DE
2018-03-14 16:44:54 +00:00
Laurent Cozic
7937fab5ff Electron: Fixes #291: Crash with empty backtick 2018-03-13 17:54:40 +00:00
Laurent Cozic
f595be07d4 Adding service to keep track of note resources associations 2018-03-12 23:40:43 +00:00
Laurent Cozic
eef106c99b Electron: Resolves #237: Export to PDF and print option 2018-03-12 18:01:47 +00:00
Laurent Cozic
dbe1833f92 Made easier to add export options 2018-03-12 08:30:10 +00:00
Jan C. Gerhard
520dc0ae21 Updated german translation de_DE 2018-03-12 08:08:14 +01:00
Laurent Cozic
c9be287f4a Electron release v1.0.72 2018-03-11 19:34:07 +00:00
Laurent Cozic
711f5dcaba Android release v1.0.106 2018-03-11 19:32:41 +00:00
Laurent Cozic
ebc0aa9809 Electron release v1.0.71 2018-03-11 19:31:07 +00:00
Laurent Cozic
dcaaf50a5a All: Fixes #271: Sort by created time was not respected 2018-03-10 15:34:55 +00:00
Laurent Cozic
3370b57134 Finished removing prettier 2018-03-10 15:34:29 +00:00
Laurent Cozic
55c5ddedf4 Revert "Applied prettier to code base"
This reverts commit c4f19465a6.
2018-03-09 20:59:12 +00:00
Laurent Cozic
5e8b09f5af All: Display icon next to resources and allow downloading them from Electron client 2018-03-09 20:46:28 +00:00
Laurent Cozic
1acffce62d All: Display last sync error unless it's a timeout or network error 2018-03-09 19:51:01 +00:00
Laurent Cozic
8555ecce87 Merge branch 'master' of github.com:laurent22/joplin 2018-03-09 19:07:47 +00:00
Laurent Cozic
4df5f668dc All: Improved sync when dealing with many items, in particular when using Nextcloud 2018-03-09 19:07:38 +00:00
Laurent Cozic
cceebeebef Update CONTRIBUTING.md 2018-03-09 17:59:41 +00:00
Laurent Cozic
c4f19465a6 Applied prettier to code base 2018-03-09 17:49:35 +00:00
Laurent Cozic
e868102c98 Revert "Adding prettier to all projects"
This reverts commit d6a4436313.
2018-03-09 17:45:42 +00:00
Laurent Cozic
0d4a1837f5 Merge branch 'master' of github.com:laurent22/joplin 2018-03-09 17:32:26 +00:00
Laurent Cozic
d6a4436313 Adding prettier to all projects 2018-03-09 17:32:10 +00:00
Laurent Cozic
03b5c6aa5e Added prettier options to ST project 2018-03-09 17:48:08 +00:00
Laurent Cozic
250cd47e02 Added prettier config file 2018-03-09 17:41:34 +00:00
Laurent Cozic
943fef32e7 Merge pull request #281 from fmrtn/master
Updated Spanish translation
2018-03-09 16:59:55 +00:00
Fernando
408634671c Updated Spanish translation 2018-03-09 17:28:39 +01:00
Laurent Cozic
570b5856ba Updated translations 2018-03-09 09:11:13 +00:00
Laurent Cozic
d114d14e87 Added donation links 2018-03-09 09:09:13 +00:00
Laurent Cozic
32791f502e More consistent links 2018-03-09 08:57:34 +00:00
Laurent Cozic
083ab0c788 Updated website 2018-03-09 08:53:26 +00:00
Laurent Cozic
003c4c4e26 Moved readme files to own folder 2018-03-09 08:47:21 +00:00
Laurent Cozic
f08f89ebd4 Added donate page 2018-03-09 08:30:36 +00:00
Laurent Cozic
3c973144c4 Added image 2018-03-09 08:18:02 +00:00
Laurent Cozic
82e99ca658 All: Better handling of startup errors 2018-03-07 19:11:55 +00:00
Laurent Cozic
b04d750cec Merge branch 'master' of github.com:laurent22/joplin 2018-03-07 17:40:00 +00:00
Laurent Cozic
c804e9f541 CLI: Fixes #268: Improve error message for invalid flags 2018-03-07 17:39:45 +00:00
Laurent Cozic
7753f3f842 Minor tweaks 2018-03-07 17:35:11 +00:00
Laurent Cozic
c985b7c682 Merge pull request #277 from fmrtn/master
Updated Spanish translation
2018-03-07 17:30:48 +00:00
Fernando
4509919c22 Updated Spanish translation 2018-03-07 17:04:10 +01:00
Laurent Cozic
89b164c7ca Merge pull request #272 from alexdevero/windows-build-instructions
Add build instructions for Windows
2018-03-06 23:16:32 +00:00
Alex Devero
e52d17b39a Add build instructions for Windows 2018-03-06 08:42:29 +01:00
Laurent Cozic
5014914dc9 Android release v1.0.104 2018-03-05 18:23:11 +00:00
Laurent Cozic
122ab83a84 Android: Fix when downloading many encrypted items 2018-03-05 18:21:42 +00:00
Laurent Cozic
7a985c2c8a Android release v1.0.103 2018-03-02 18:15:09 +00:00
Laurent Cozic
b11ad30a31 Updated translations 2018-03-02 18:12:58 +00:00
Laurent Cozic
5914fc97df Merge branch 'master' of github.com:laurent22/joplin 2018-03-02 18:03:28 +00:00
Laurent Cozic
e41ae1832d Minor tweaks 2018-03-02 18:24:02 +00:00
Laurent Cozic
89b50909ed Electron: Resolves #266: Allow setting text editor font family 2018-03-02 18:16:48 +00:00
Laurent Cozic
edccd7412f Merge pull request #265 from jaredcrowe/docs-correct-checkbox-syntax
correct the documentation about adding checkboxes
2018-03-02 17:59:33 +00:00
Jared Crowe
c76beae057 correct the documentation about adding checkboxes 2018-03-02 09:30:27 +11:00
Laurent Cozic
23c5934a7d Electron: Allow exporting only selected notes or notebook 2018-03-01 20:14:06 +00:00
Laurent Cozic
a078947d6d Allow importing and exporting single notes and notebooks 2018-03-01 18:35:17 +00:00
rtmkrlv
0faaf660b4 Merge pull request #4 from laurent22/master
Update fork from original repository
2018-03-01 15:31:51 +02:00
Laurent Cozic
5ba98b4200 CLI v1.0.100 2018-02-28 21:18:27 +00:00
Laurent Cozic
c36513b99d Updated translation 2018-02-28 20:46:15 +00:00
Laurent Cozic
97814531fa Update readme downloads 2018-02-28 20:06:06 +00:00
Laurent Cozic
fd3e335a02 Electron release v1.0.70 2018-02-28 18:57:10 +00:00
Laurent Cozic
e676fa2b57 Trying to fix Electron builder 2018-02-28 18:56:57 +00:00
Laurent Cozic
122cbbf673 Electron release v1.0.69 2018-02-28 18:43:12 +00:00
Laurent Cozic
271793b324 Trying to upgrade Electron Builder 2018-02-28 18:43:03 +00:00
Laurent Cozic
134b31933b Electron release v1.0.68 2018-02-28 18:13:02 +00:00
Laurent Cozic
0ec5518a62 Android release v1.0.102 2018-02-28 18:10:33 +00:00
Laurent Cozic
76931370d7 Updated readme for import/export 2018-02-27 22:15:20 +00:00
Laurent Cozic
8cf0e4517a Merge branch 'master' of github.com:laurent22/joplin 2018-02-28 17:27:06 +00:00
Laurent Cozic
e75c62bf0f Electron: Fix logic of hidding app in macOS 2018-02-27 21:54:40 +00:00
Laurent Cozic
058285e0b9 All: Made scheduled sync delay slightly shorter 2018-02-27 21:19:11 +00:00
Laurent Cozic
795568d8c2 Electron: Fixed note sorting bug 2018-02-27 21:11:53 +00:00
Laurent Cozic
df4933fddd All: Prevent export of encrypted items 2018-02-27 20:51:07 +00:00
Laurent Cozic
4046a51472 Electron: Handle import export 2018-02-27 20:04:38 +00:00
Laurent Cozic
45845f645d Refactored Interop service to make export/import code more modular 2018-02-26 19:25:54 +00:00
Laurent Cozic
d7fd8944f7 Moved Enex import to InteropService 2018-02-26 19:16:01 +00:00
Laurent Cozic
3cee671f25 Done MD importer 2018-02-26 18:43:50 +00:00
Laurent Cozic
8f2e5faff3 Support importing JEX and raw data 2018-02-25 17:01:16 +00:00
Laurent Cozic
39ddd934f6 Changed export format extension to JEX and made it a non-compressed tar file 2018-02-25 21:08:40 +00:00
Laurent Cozic
9f8a46b9d9 All: Added more export options including jpz format 2018-02-23 19:32:19 +00:00
Laurent Cozic
c6698eaea6 Electron: Fixes #256: Check that no other instance of Joplin is running before launching a new one 2018-02-23 17:51:23 +00:00
Laurent Cozic
8a96cf3434 All: Allow sorting notes by various fields 2018-02-22 18:58:15 +00:00
Laurent Cozic
74d255c056 Updated readme 2018-02-21 18:19:22 +00:00
Laurent Cozic
71aa841265 Mobile: Fixes #244: When accessing configuration or encrypt configuration option while making a note and the going back, the note gets erased 2018-02-21 22:08:34 +00:00
Laurent Cozic
14a93a9f26 All: Fixed sync interval sorting order 2018-02-21 19:58:28 +00:00
Laurent Cozic
e1fd9c6922 Clean up 2018-02-21 19:20:33 +00:00
Laurent Cozic
b9db747b5c Minor refactoring to make function purpose clearer 2018-02-21 18:36:29 +00:00
Laurent Cozic
4a56c76901 Electron: Fixes #247: Unreadable error messages when checking for updates 2018-02-20 18:07:31 +00:00
Laurent Cozic
6bb3184a72 macOS: Resolves #243: Added black and white tray icon for macOS 2018-02-20 00:41:52 +00:00
Laurent Cozic
7fb8fbd450 iOS: Added compatibility with iPad 2018-02-19 23:41:53 +00:00
Laurent Cozic
9d5bba472e iOS v1.0.13 2018-02-19 23:41:12 +00:00
Laurent Cozic
e6d821a45f CLI v1.0.99 2018-02-19 22:59:09 +00:00
Laurent Cozic
72f0027e21 Electron release v1.0.67 2018-02-19 21:05:43 +00:00
Laurent Cozic
29a13a9943 Android release v1.0.101 2018-02-19 21:04:27 +00:00
Laurent Cozic
3691ae4d13 Electron: Fixes #217: Display a message when the note has no content and only the note viewer is visible 2018-02-19 18:56:56 +00:00
Laurent Cozic
4dda397c29 Removed es_CR translation as it's unfortunately too incomplete and there's already a 100% Spanish translation 2018-02-19 18:44:41 +00:00
Laurent Cozic
b4b058998d Updated French and Español translation 2018-02-19 18:41:39 +00:00
Laurent Cozic
10919e415e Merge branch 'master' of github.com:laurent22/joplin 2018-02-19 18:38:56 +00:00
Laurent Cozic
4966d74864 All: Fixes #240: Tags should be handled in a case-insensitive way 2018-02-19 18:38:27 +00:00
Laurent Cozic
c70ecb30a5 All: Fixes #241: Ignore response for certain calls. Also re-enabled If-None-Match fix. 2018-02-19 18:37:44 +00:00
Laurent Cozic
acc0d17e0f Minor changes 2018-02-19 18:36:31 +00:00
Laurent Cozic
b509b878bf Merge pull request #238 from fmrtn/master
Improved Spanish translations
2018-02-19 18:02:58 +00:00
Laurent Cozic
322ec2efa1 Android release v1.0.100 2018-02-18 22:58:37 +00:00
Laurent Cozic
1232661b1e Electron release v1.0.66 2018-02-18 22:56:57 +00:00
Laurent Cozic
c46d123503 All: Fixed: Local items were no longer being deleted via sync. Also fixed Nextcloud sync target. 2018-02-18 21:52:07 +00:00
Laurent Cozic
8f4060999f Merge branch 'master' of github.com:laurent22/joplin 2018-02-18 21:16:26 +00:00
Laurent Cozic
0addd86069 iOS: Improved compatbility with some WebDAV services (Seafile) 2018-02-18 21:16:18 +00:00
Fernando
760086307b Improved Spanish translations 2018-02-18 17:15:18 +01:00
Laurent Cozic
fc6558a64c Electron release v1.0.65 2018-02-17 19:29:26 +00:00
Laurent Cozic
eca500880d All: Convert new lines in tables to BR tag, and added support for HTML tags in Markdown viewers 2018-02-17 19:29:10 +00:00
Laurent Cozic
90bcd7c977 Merge pull request #226 from fmrtn/master
Nextcloud typos and Spanish update
2018-02-17 11:05:25 +00:00
Fernando
cca0c6eaf3 Updated Spanish translation 2018-02-17 01:09:32 +01:00
Fernando
b0736002be Fixed several Nextcloud typos 2018-02-17 01:09:00 +01:00
Laurent Cozic
51fc2d8e51 CLI v1.0.98 2018-02-16 23:49:22 +00:00
Laurent Cozic
d87c192ff1 Updated readme and translation 2018-02-16 23:26:31 +00:00
Laurent Cozic
52ccf398a6 Update readme 2018-02-16 23:17:55 +00:00
Laurent Cozic
344d0e2687 Update readme 2018-02-16 23:14:26 +00:00
Laurent Cozic
1bc4d6b423 CLI v1.0.97 2018-02-16 23:08:57 +00:00
Laurent Cozic
baa9ca7ea3 Updated terminal readme 2018-02-16 23:08:04 +00:00
Laurent Cozic
e4d477fb4c CLI: Resolve #63: Allow customizing shortcuts 2018-02-16 22:53:53 +00:00
Laurent Cozic
71319eee28 Also add link to po file in translation table 2018-02-16 21:45:28 +00:00
Laurent Cozic
68b31526f8 Updated translations 2018-02-16 21:39:54 +00:00
Laurent Cozic
0b2b7324d9 Merge pull request #224 from fmrtn/master
Fixed and updated Spanish translation
2018-02-16 20:35:46 +00:00
Fernando
43512cf27b Fixed and updated Spanish translation 2018-02-16 20:36:58 +01:00
Laurent Cozic
4218b65969 Electron: Added several keyboard shortcuts 2018-02-16 18:08:02 +00:00
Laurent Cozic
7244e12b78 Electron: Fixed: Confirmation message boxes, and release notes text 2018-02-16 18:06:02 +00:00
Laurent Cozic
a796ef5c66 All: Fixed: Notify DecryptionWorker when item added due to conflict, to make sure it is decrypted as early as possible 2018-02-16 17:55:50 +00:00
Laurent Cozic
9474a05aaa Update readme 2018-02-16 00:17:05 +00:00
Laurent Cozic
41df355a7e CLI v1.0.96 2018-02-15 23:51:00 +00:00
Laurent Cozic
4f3ab87914 Electron release v1.0.64 2018-02-15 23:21:47 +00:00
Laurent Cozic
5d1a08707c Android release v1.0.98 2018-02-15 23:20:28 +00:00
Laurent Cozic
4f822df80e Merge branch 'master' of github.com:laurent22/joplin 2018-02-15 23:05:34 +00:00
Laurent Cozic
951be5cbf6 Electron: Fixes #201, Fixes #216: Make sure only one update check can run at a time, and improved modal dialog boxes 2018-02-15 23:05:04 +00:00
Laurent Cozic
b6c2341542 Merge pull request #219 from fmrtn/patch-1
Update README.md
2018-02-15 18:33:48 +00:00
Laurent Cozic
a6e6b49a9d Merge branch 'master' of github.com:laurent22/joplin 2018-02-15 18:33:21 +00:00
Laurent Cozic
3a4bbd571e All: Provide Content-Length header for WebDAV for better compatibility with more servers 2018-02-15 18:33:08 +00:00
Laurent Cozic
feccc6150e Merge branch 'master' of github.com:laurent22/joplin 2018-02-15 18:19:11 +00:00
Laurent Cozic
a37b599a6b macOS: Allow copy and paste from config and encryption screen 2018-02-15 18:19:00 +00:00
Laurent Cozic
9347683fe3 All: Fixed Nextcloud sync target ID (which was incorrectly set to WebDAV sync ID) 2018-02-15 18:01:05 +00:00
Laurent Cozic
3551c26e28 Fixed race condition when testing with memory driver and fixed encoding issue 2018-02-15 17:12:09 +00:00
Fernando
cfca0107eb Update README.md 2018-02-15 13:09:59 +01:00
rtmkrlv
dfbe37fdaf Merge pull request #3 from laurent22/master
Update fork from original repository
2018-02-15 10:37:59 +02:00
Laurent Cozic
81bc975193 Update readme 2018-02-14 21:54:34 +00:00
Laurent Cozic
7908fda451 Android release v1.0.97 2018-02-14 19:11:35 +00:00
Laurent Cozic
cdbb7c4b0d Merge branch 'master' of github.com:laurent22/joplin 2018-02-14 19:10:42 +00:00
Laurent Cozic
414e57ec55 Electron release v1.0.63 2018-02-14 19:08:24 +00:00
Laurent Cozic
1871123066 All: Improved WebDAV driver compatibility with some services (eg. Seafile) 2018-02-14 19:08:07 +00:00
Laurent Cozic
87bc08bef5 iOS: Fixed resource decryption issue, log page crash and text input rendering issue 2018-02-14 15:28:56 +00:00
Laurent Cozic
214a39c3d3 All: Improved the way settings are changed. Should also fixed issue with sync context being accidentally broken. 2018-02-13 18:26:33 +00:00
Laurent Cozic
ef0cc5e33e Update readme 2018-02-12 20:23:16 +00:00
Laurent Cozic
3a1fa583ab CLI v1.0.95 2018-02-12 18:07:20 +00:00
Laurent Cozic
c1161ae017 Android release v1.0.95 2018-02-12 17:58:55 +00:00
Laurent Cozic
1023ec6206 Electron release v1.0.62 2018-02-12 17:56:42 +00:00
Laurent Cozic
7841421c0d All: Fixes #209: Items with non-ASCII characters end up truncated on Nextcloud 2018-02-12 18:15:22 +00:00
Laurent Cozic
995d8c35dd Updated readme 2018-02-11 20:49:28 +00:00
Laurent Cozic
b179471eff Electron: Fixes #205: Importing Evernote notes while on import page re-imports previous import 2018-02-11 20:31:26 +00:00
Laurent Cozic
19a126ebfe Android release v1.0.94 2018-02-11 17:29:09 +00:00
Laurent Cozic
7e56e5b587 Mobile: Fixes #207: Crash when changing dropdown value in config screen 2018-02-11 17:26:20 +00:00
Laurent Cozic
acf0c79341 Graduated E2EE and WebDAV from beta, and moved to v1.0 2018-02-11 13:50:59 +00:00
Laurent Cozic
9fe7e23ffe Android release v0.10.92 2018-02-11 13:20:32 +00:00
Laurent Cozic
c94cc93971 Fixed translator names 2018-02-10 13:03:01 +00:00
Laurent Cozic
b26094eba8 Fixed Basque flag 2018-02-10 12:52:57 +00:00
Laurent Cozic
89a5ccdf93 Added Basque translation, fixed issue with handling invalid translations. Updated translation FR. 2018-02-10 12:43:45 +00:00
Laurent Cozic
ce2da0e6dc Update readme 2018-02-09 16:03:43 +00:00
Laurent Cozic
f49d644b6a Electron release v0.10.61 2018-02-08 18:15:49 +00:00
Laurent Cozic
02ac0b8593 Removed uneeded created_time property 2018-02-07 20:42:52 +00:00
Laurent Cozic
78e5eaf1e2 Electron: Toolbar button to set tags 2018-02-07 20:35:11 +00:00
Laurent Cozic
fc0d227396 Electron: Allowing opening and saving resource images 2018-02-07 20:23:17 +00:00
Laurent Cozic
f91c52cdf7 Mobile: Update time when app is activated 2018-02-07 19:51:58 +00:00
Laurent Cozic
3f14878d0f All: Improved request repeating mechanism 2018-02-07 19:46:07 +00:00
Laurent Cozic
69fd32e7c6 All: Use mutex when saving model to avoid race conditions when decrypting and syncing at the same time 2018-02-07 19:02:07 +00:00
Laurent Cozic
80801cedf0 Android release v0.10.91 2018-02-07 17:57:08 +00:00
Laurent Cozic
480e4fa94b Merge branch 'master' of github.com:laurent22/joplin 2018-02-07 17:56:36 +00:00
Laurent Cozic
717c789836 Android release v0.10.90 2018-02-07 17:55:54 +00:00
Laurent Cozic
f099376446 Update README.md 2018-02-07 17:55:17 +00:00
Laurent Cozic
41fa9d093e Android release v0.10.89 2018-02-07 17:54:06 +00:00
Laurent Cozic
e2f3f81eb6 Android release v0.10.88 2018-02-07 17:51:31 +00:00
Laurent Cozic
5cab7aeb55 Fixed: Make sure alarms and resources are attached to right note when creating new note 2018-02-06 19:31:22 +00:00
Laurent Cozic
fa5f418c22 All: Added sync config check to config screens 2018-02-06 18:59:36 +00:00
Laurent Cozic
a25fcacace Electron: Display message when creating new note or to-do 2018-02-06 18:12:43 +00:00
Laurent Cozic
727ba7300e All: Also support $ as delimiter for Katex expressoins 2018-02-06 17:58:54 +00:00
Laurent Cozic
d25d9b3f44 CLI v0.10.93 2018-02-06 13:17:10 +00:00
Laurent Cozic
9d762a4319 Android release v0.10.86 2018-02-06 13:01:20 +00:00
Laurent Cozic
18d94c7585 Electron release v0.10.60 2018-02-06 12:57:40 +00:00
Laurent Cozic
af82345eb8 Fixed tray icon and update issue 2018-02-06 13:11:59 +00:00
Laurent Cozic
1e94a22986 Merge branch 'master' of github.com:laurent22/joplin 2018-02-06 13:06:59 +00:00
Laurent Cozic
e19a8a99ff macOS: Fixed startup crash 2018-02-06 13:05:36 +00:00
Laurent Cozic
f975009e24 Update readme 2018-02-05 19:02:11 +00:00
Laurent Cozic
90640fafc7 Merge branch 'master' of github.com:laurent22/joplin 2018-02-05 18:49:58 +00:00
Laurent Cozic
42e0e1e5a5 Updated build instructions 2018-02-06 09:42:20 +00:00
Laurent Cozic
61f64fa933 Added Markdown doc 2018-02-05 22:53:10 +00:00
Laurent Cozic
0d0ffd6d27 Added Markdown doc 2018-02-05 22:50:17 +00:00
Laurent Cozic
023ccffd2e Electron release v0.10.59 2018-02-05 22:20:31 +00:00
Laurent Cozic
bc26098c7d Android release v0.10.85 2018-02-05 22:19:21 +00:00
Laurent Cozic
7257a71a18 Mobile: Fixes #159: Make sure text fields aren't hidden by keyboard on iOS 2018-02-05 18:32:59 +00:00
Laurent Cozic
8ad8b73585 Better error handling for Katex and handling of code blocks and inline 2018-02-05 17:55:35 +00:00
Laurent Cozic
9a06815db9 Electron release v0.10.58 2018-02-05 17:34:39 +00:00
Laurent Cozic
66947d4954 Fixing appveyor script 2018-02-05 17:34:31 +00:00
Laurent Cozic
3ec22185d5 Electron release v0.10.57 2018-02-05 17:32:54 +00:00
Laurent Cozic
0f05c23e26 Fixing deployment script 2018-02-05 17:32:48 +00:00
Laurent Cozic
74493fece0 Android release v0.10.83 2018-02-05 17:32:00 +00:00
Laurent Cozic
557a96e814 Electron release v0.10.56 2018-02-05 17:27:38 +00:00
Laurent Cozic
4b23b419a4 Electron release v0.10.55 2018-02-05 17:27:09 +00:00
Laurent Cozic
8b7f5b1151 Fix scrolling issue in Electron app 2018-02-04 18:45:52 +00:00
Laurent Cozic
29e9ccf216 Electron: Reverted to older Sharp version to fix Ubuntu issue 2018-02-04 18:31:13 +00:00
Laurent Cozic
2c04f5c8bc Improved Android and Electron release process 2018-02-04 18:05:07 +00:00
Laurent Cozic
5430a747e9 Improved Android and Electron release process 2018-02-04 17:55:22 +00:00
Laurent Cozic
13bc185829 Improved Android and Electron release process 2018-02-04 17:51:42 +00:00
Laurent Cozic
ed87581a8a Improved Android and Electron release process 2018-02-04 17:48:29 +00:00
Laurent Cozic
2645ec96a8 Fixed tool utils 2018-02-04 17:44:32 +00:00
Laurent Cozic
d278d830f0 Improved Android and Electron release process 2018-02-04 17:42:33 +00:00
Laurent Cozic
b4dce0ed46 All: Added Katex support 2018-02-04 17:12:24 +00:00
Laurent Cozic
e8416042d4 Merge branch 'master' into math-support 2018-02-02 20:35:32 +00:00
Laurent Cozic
70adbe5e76 Added flags 2018-02-01 20:21:54 +00:00
Laurent Cozic
f66be08d1d Added list of translated languages to README file 2018-02-01 20:15:31 +00:00
Laurent Cozic
fad96f5266 All: Added section to list missing master keys 2018-02-01 19:01:20 +00:00
Laurent Cozic
c33a7f5f47 Updated French translation 2018-02-02 00:08:37 +00:00
Laurent Cozic
28afbcde02 Updated translations 2018-02-02 00:02:47 +00:00
Laurent Cozic
691292d2b3 Merge branch 'master' of github.com:laurent22/joplin 2018-02-01 23:40:15 +00:00
Laurent Cozic
30ff81064f All: Made WebDAV driver more generic to support services other than Nextcloud and added WebDAV sync target 2018-02-01 23:40:05 +00:00
Laurent Cozic
f9f398ad98 Merge pull request #194 from rtmkrlv/russian-locale
Update Russian translation
2018-02-01 15:26:15 +01:00
rtmkrlv
537884bdcd Merge branch 'master' into russian-locale 2018-02-01 15:50:39 +02:00
rtmkrlv
d54400a7cb Updated Russian translation 2018-02-01 15:43:26 +02:00
rtmkrlv
37e7ea0b52 Merge pull request #2 from laurent22/master
Update fork from original repository
2018-02-01 14:43:34 +02:00
Laurent Cozic
42c78264fb Update website 2018-01-31 20:21:38 +00:00
Laurent Cozic
c52da82447 Electron: Fix: Don't allow adding notes and to-do to conflict notebook 2018-01-31 20:19:11 +00:00
Laurent Cozic
cca43624e4 Electron: Added tray icon support 2018-01-31 20:10:32 +00:00
Laurent Cozic
dac1cd7668 Mobile: Allow filtering log by warning/error 2018-01-31 19:51:29 +00:00
Laurent Cozic
b4c00db0e3 Electron release v0.10.54 2018-01-31 19:40:40 +00:00
Laurent Cozic
3ce393a8b2 Electron release v0.10.53 2018-01-31 19:34:47 +00:00
Laurent Cozic
2b627fe4ab Fixed auto-update check 2018-01-31 19:34:38 +00:00
Laurent Cozic
fcf8a1649d CLI v0.10.92 2018-01-31 19:28:31 +00:00
Laurent Cozic
8d3b050831 Update website 2018-01-31 19:26:21 +00:00
Laurent Cozic
43297ef0a3 Updated translations 2018-01-31 19:14:32 +00:00
Laurent Cozic
551fabdfc9 Tweak and error handling on auto-update 2018-01-31 19:10:45 +00:00
Laurent Cozic
d6de56b2db All: Fixed crash when having invalid UTF-8 string in text editor 2018-01-31 19:01:11 +00:00
Laurent Cozic
9e979804f3 Electron release v0.10.52 2018-01-31 17:53:18 +00:00
Laurent Cozic
b8e0f182cc Android release v0.10.81 2018-01-31 17:51:22 +00:00
Laurent Cozic
9a41b9e192 Electron: Improved auto-update process to avoid random crashes 2018-01-30 22:35:50 +00:00
Laurent Cozic
9b8f520b9f Electron: Allow focusing either title or body when creating a new note or to-odo 2018-01-30 21:49:22 +00:00
Laurent Cozic
5b6019805c Electron: Fixed auto-title when title is manually entered first 2018-01-30 21:36:54 +00:00
Laurent Cozic
a4106436c4 Fixed delta function when processing many items 2018-01-30 21:10:54 +00:00
Laurent Cozic
f6b4eb511e Add Content-Size header for WebDAV, which is required by some services 2018-01-30 20:24:09 +00:00
Laurent Cozic
eb67ac17a0 Allow decryption to continue even if an item cannot be decrypted 2018-01-30 20:15:05 +00:00
Laurent Cozic
7b760d03ef All: Handle case where file is left half-uploaded on Nextcloud instance (possibly an ocloud.de issue only) 2018-01-30 20:10:36 +00:00
Laurent Cozic
2805ae2acf Fixed crash when calling fetch() with invalid URL in RN app 2018-01-30 19:01:07 +00:00
Laurent Cozic
5cb5ccc781 All: Optimised Nextcloud sync delta functionality 2018-01-29 20:51:14 +00:00
Laurent Cozic
0dba2821b6 Merge pull request #189 from strobeltobias/patch-2
Update German translation
2018-01-29 18:59:20 +00:00
Tobias Strobel
1db7825b22 Update German translation
Grammar and wording fixes, translating new strings.
2018-01-29 14:24:50 +01:00
Laurent Cozic
8a92d6ad70 Update website 2018-01-28 18:47:22 +00:00
Laurent Cozic
138ad9fcad Mobile: Fixes #114: Update geolocation in metadata after it has been set 2018-01-28 18:42:43 +00:00
Laurent Cozic
08cb518c25 Check if current folder exists 2018-01-28 18:19:56 +00:00
Laurent Cozic
6d04eab200 Merge pull request #185 from pf-siedler/autocomp_file_and_item
Autocompletion for files and items
2018-01-28 18:17:01 +00:00
Laurent Cozic
8a8cb51e1b Electron release v0.10.51 2018-01-28 18:07:08 +00:00
Laurent Cozic
5c66042a2d CLI v0.10.91 2018-01-28 17:59:34 +00:00
Laurent Cozic
ae75181b02 Electron release v0.10.50 2018-01-28 17:52:15 +00:00
Laurent Cozic
9dc3238182 Added beta notice 2018-01-28 17:51:38 +00:00
Laurent Cozic
0a68749373 Android release v0.10.79 2018-01-28 17:45:54 +00:00
Laurent Cozic
1519116291 Updated French translation 2018-01-28 17:43:21 +00:00
Laurent Cozic
d023d841e2 Update translations 2018-01-28 17:38:30 +00:00
Laurent Cozic
d7a1465d8e Skip sync report events in log 2018-01-28 17:38:17 +00:00
Laurent Cozic
15848fc696 Closing a resource is async 2018-01-28 17:37:51 +00:00
Laurent Cozic
837ae2c9f2 Send only one NOT_LOADED event per master key 2018-01-28 17:37:29 +00:00
Laurent Cozic
6789b98ead Return fileNotFound error when file cannot be opened so that it is skipped by synchroniser 2018-01-28 17:37:03 +00:00
Laurent Cozic
29f6e74ee3 Convert fs errors to normal errors 2018-01-28 17:36:36 +00:00
Laurent Cozic
2780c38c45 Fixed WebDAV error handling 2018-01-28 17:36:11 +00:00
Laurent Cozic
4531838217 Display stars for secure config value 2018-01-28 17:35:20 +00:00
pf-siedler
7bccf7f65d Implement auto completaion for <item> usage 2018-01-28 23:12:54 +09:00
pf-siedler
c62a24a9cb Implement auto completion for <file> usage
Suggest file names from current directory.
2018-01-28 22:59:58 +09:00
Laurent Cozic
c6830499f7 Fixed Travis 2018-01-28 11:48:29 +00:00
Laurent Cozic
d9f00a2539 Electron release v0.10.49 2018-01-26 17:21:34 +00:00
Laurent Cozic
def83c9119 Merge branch 'master' of github.com:laurent22/joplin 2018-01-26 17:19:58 +00:00
Laurent Cozic
b6cb0056c7 CLI v0.10.90 2018-01-26 17:19:42 +00:00
Laurent Cozic
1669b5258a Fixed detection of encrypted item 2018-01-25 23:01:18 +00:00
Laurent Cozic
5a9e0bfc26 Handle password text input in mobile and desktop 2018-01-25 22:44:09 +00:00
Laurent Cozic
8f3fdb3afe Tweaks to make sure Nextcloud driver passes all test units 2018-01-25 21:15:58 +00:00
Laurent Cozic
7ab135c099 Various tweaks to get Nextcloud working in mobile 2018-01-25 20:48:01 +00:00
Laurent Cozic
1cc27f2509 Got Nextcloud sync to work in Electron 2018-01-25 19:01:14 +00:00
Laurent Cozic
ef700b421c Update CONTRIBUTING.md 2018-01-25 13:35:04 +00:00
Laurent Cozic
b9af5ac052 Update issue_template.md 2018-01-25 13:34:07 +00:00
Laurent Cozic
173f2d421d Update PULL_REQUEST_TEMPLATE 2018-01-25 13:32:19 +00:00
Laurent Cozic
9f82c069c9 Update CONTRIBUTING.md 2018-01-25 13:31:17 +00:00
Laurent Cozic
6ade09c228 Merge branch 'master' into webdav 2018-01-24 17:25:34 +00:00
Laurent Cozic
5393a1399c Finished WebDAV driver 2018-01-23 20:10:20 +00:00
Laurent Cozic
fd29f20b2e Electron: Fix checkbox issue in config screen 2018-01-23 18:31:49 +00:00
Laurent Cozic
c011b53d1f Electron: Upgraded Electron to 1.7.11 to fix security vulnerability 2018-01-23 18:10:30 +00:00
Laurent Cozic
26e3a7b68c Merge branch 'master' of github.com:laurent22/joplin 2018-01-23 17:53:19 +00:00
Laurent Cozic
e70a291698 Merge pull request #174 from gabcoh/fix171
Fix #171
2018-01-23 11:26:11 +00:00
Laurent Cozic
511bd57726 Merge pull request #175 from alexdevero/add-font-size-settings
Add font size settings
2018-01-23 11:25:47 +00:00
Laurent Cozic
c6de8598dc Electron release v0.10.48 2018-01-22 19:10:29 +00:00
Laurent Cozic
7bee25599d Removed uneeded code 2018-01-22 19:06:50 +00:00
Laurent Cozic
773a1ad829 Travis: only build tags 2018-01-21 20:03:40 +00:00
Laurent Cozic
1a1e264fa4 All: Refactored so that memory and file sync target use same delta logic 2018-01-21 19:45:32 +00:00
Laurent Cozic
5b99ecefca Merge branch 'master' into webdav 2018-01-21 19:10:39 +00:00
Laurent Cozic
1bfeed377a All: Optimised file sync logic so that it doesn't fetch the content of
all the items on each sync. Also limit the number of items in a batch
to 1000
2018-01-21 18:54:47 +00:00
Laurent Cozic
86eee376bb All: Handle case where resource blob is missing during sync 2018-01-21 17:48:50 +00:00
Laurent Cozic
6a7d368184 All: Started Nextcloud support 2018-01-21 17:01:37 +00:00
Alex Devero
1da19ae98d Fix indentation 2018-01-19 14:11:40 +01:00
Alex Devero
f52c117b09 Add font size settings 2018-01-19 13:27:44 +01:00
Laurent Cozic
2551f96149 Fixed Readme 2018-01-18 22:43:37 +00:00
Laurent Cozic
c984c19fee Android release v0.10.78 2018-01-18 22:35:05 +00:00
Laurent Cozic
ac8e91e82e Started FAQ 2018-01-18 22:34:27 +00:00
Gabe Cohen
af50d80541 Fix #171 2018-01-18 14:29:13 -06:00
Laurent Cozic
e355f4e49b Fixed license 2018-01-18 20:14:05 +00:00
Laurent Cozic
738ef2b0fa Android release v0.10.75 2018-01-18 17:29:57 +00:00
Laurent Cozic
9746a3964b All: Removed certain log statements so that sensitive info doesn't end up in logs 2018-01-17 21:17:40 +00:00
Laurent Cozic
9efbf74b6f All: Various changes to get filesystem target to work on mobile 2018-01-17 21:01:41 +00:00
Laurent Cozic
c16ea6b237 Typo 2018-01-17 20:19:45 +00:00
Laurent Cozic
b06a3b588f Add APK download link 2018-01-17 20:19:20 +00:00
Laurent Cozic
6ff67e0995 Automate building and deploying Android app 2018-01-17 20:16:13 +00:00
Laurent Cozic
1a5c8d126d All: Refactored filesystem sync driver to support mobile 2018-01-17 18:51:15 +00:00
Laurent Cozic
f632580eed CLI: Display error when cannot open note with editor 2018-01-17 18:10:07 +00:00
Laurent Cozic
1d73f0cdee Simplified and fixed caching issue 2018-01-17 17:59:33 +00:00
Laurent Cozic
99c7111f8c CLI: Fixes #168: Invalid code block would crash app 2018-01-17 17:52:55 +00:00
Laurent Cozic
ae9806561a Added tech spec info 2018-01-16 19:51:37 +00:00
Laurent Cozic
fffdf5b5b7 Fixed link 2018-01-17 00:47:45 +00:00
Laurent Cozic
3de19c3db7 All: Added Dutch translation. Thanks @tcassaert 2018-01-17 00:43:47 +00:00
Laurent Cozic
56e074b4ef Merge branch 'master' of github.com:laurent22/joplin 2018-01-17 00:41:04 +00:00
Laurent Cozic
1a79253780 Update doc 2018-01-17 00:40:35 +00:00
Laurent Cozic
b67908df11 Merge pull request #165 from tcassaert/master
Dutch translation
2018-01-16 17:32:33 +00:00
tcassaert
6a5089f71d Dutch translation
All EN keys are translated to nl_BE.
2018-01-15 22:33:05 +01:00
Laurent Cozic
f710463b67 Electron: Fixes #155: Caret alignment issue with Russian text 2018-01-15 19:01:00 +00:00
Laurent Cozic
6ae0c3aba0 Electron release v0.10.47 2018-01-15 18:41:19 +00:00
Laurent Cozic
07c6347014 Android v0.10.74 2018-01-15 18:40:44 +00:00
Laurent Cozic
b10999e83e All: Update French translation 2018-01-15 18:35:39 +00:00
Laurent Cozic
961b5bfd25 All: Fixes #85: Don't record deleted_items entries for folders deleted via sync 2018-01-15 18:10:14 +00:00
Laurent Cozic
d1f1d1068a Electron release v0.10.46 2018-01-15 12:29:58 +00:00
Laurent Cozic
faade0afe2 All: Fixed model ID issue 2018-01-14 17:11:44 +00:00
Laurent Cozic
a442a49e2f Electron release v0.10.45 2018-01-15 12:27:10 +00:00
Laurent Cozic
7d3fbbcaba Updated translations 2018-01-14 17:07:34 +00:00
Laurent Cozic
d9bb7c3271 Android v0.10.73 2018-01-14 17:05:59 +00:00
Laurent Cozic
4d1dd17fa2 All: Fixed issue with timestamp when saving notes 2018-01-14 17:01:22 +00:00
Laurent Cozic
c5c6c777be Electron release v0.10.44 2018-01-12 18:11:39 +01:00
Laurent Cozic
1fd1a73fda Electron: Improved the way new note are created, and automatically add a title. Made saving and loading notes more reliable. 2018-01-12 19:58:01 +00:00
Laurent Cozic
feeb498a79 All: Fixed OneDrive sync when resync is requested 2018-01-12 19:01:34 +00:00
Laurent Cozic
1d7f30d441 Electron: Fixed logic to save, and make sure scheduled save always happen even when changing note 2018-01-11 21:05:34 +01:00
Laurent Cozic
53da63e371 Trying to add math support 2018-01-11 19:51:01 +00:00
Laurent Cozic
424443a2d8 CLI: Display arrays and objects in settings 2018-01-09 21:25:31 +01:00
Laurent Cozic
08b58f0e4c All: Fixed table font size and family 2018-01-09 21:09:49 +01:00
Laurent Cozic
c2a0d8600f Electron: Move prompt to top to avoid issue with date picker being hidden 2018-01-09 21:06:47 +01:00
Laurent Cozic
ede3c2ce2f Electron: Fixed display of too long notebook titles 2018-01-09 19:34:06 +01:00
Laurent Cozic
0b93515711 Electron: Display URL for links 2018-01-09 19:26:46 +01:00
Laurent Cozic
2f13e689b9 Electron: Don't scroll back to top when note is reloaded via sync 2018-01-09 20:26:20 +00:00
Laurent Cozic
ea135a0d28 Electron: Fixed logic of what note is used when right-clicking one or more notes 2018-01-09 20:16:09 +00:00
Laurent Cozic
f67e4a03e4 CLI: Detect installed Node version 2018-01-09 19:56:38 +00:00
Laurent Cozic
e9268edeff All: Fixes #150: Extra comma causes crash 2018-01-09 19:45:08 +00:00
Laurent Cozic
a8576a55d6 CLI v0.10.87 2018-01-09 09:31:03 +01:00
Laurent Cozic
eb500cdf9e All: Display sync items being fetched 2018-01-08 21:36:00 +01:00
Laurent Cozic
7b9dc66121 All: Schedule sync after enabling or disabling encryption 2018-01-08 21:25:38 +01:00
Laurent Cozic
bba2c68c6f All: Schedule sync only after 30 seconds 2018-01-08 21:05:08 +01:00
Laurent Cozic
c70d8bea78 All: Fixes #129: Tags are case insensitive 2018-01-08 21:04:44 +01:00
Laurent Cozic
176bda66ad Merge branch 'master' of github.com:laurent22/joplin 2018-01-08 20:09:12 +01:00
Laurent Cozic
78ce10ddf0 All: Fixed race condition when a note is being uploaded while it's being modified in the text editor 2018-01-08 20:09:01 +01:00
Laurent Cozic
29f14681a8 Mobile: Fixed mix of tabs and spaces 2018-01-08 19:31:04 +00:00
Laurent Cozic
aaf617e41c iOS v0.10.9 2018-01-08 18:26:30 +01:00
Laurent Cozic
b99146ed7f Merge pull request #111 from marcosvega91/fix_scroll_note_keyboard
Fix scroll note keyboard on IOS
2018-01-08 16:45:58 +00:00
Laurent Cozic
d136161650 Android v0.10.71 2018-01-07 19:29:57 +00:00
Laurent Cozic
39051a27a1 Update website 2018-01-08 11:12:22 +01:00
Laurent Cozic
30bc9dd551 Electron release v0.10.43 2018-01-08 10:57:36 +01:00
Laurent Cozic
cc2f665313 Electron: Undone tests 2018-01-08 10:57:29 +01:00
Laurent Cozic
37c989ed28 Electron release v0.10.42 2018-01-08 10:27:02 +01:00
Laurent Cozic
adc5885980 All: Better handling of null values in settings 2018-01-07 19:20:10 +00:00
Laurent Cozic
8de5b4219d All: Updated translations 2018-01-06 21:05:34 +01:00
Laurent Cozic
e096ddebd4 Merge branch 'master' of github.com:laurent22/joplin 2018-01-06 20:40:47 +01:00
Laurent Cozic
83398dd0bc Mobile: Fixes #139: Crash when creating new notebook 2018-01-06 20:37:42 +01:00
Laurent Cozic
ddc78ebb41 Merge pull request #138 from rtmkrlv/russian-locale
Updated Russian translation
2018-01-06 19:34:02 +00:00
rtmkrlv
70b69eb31e Merge branch 'master' into russian-locale 2018-01-06 14:59:28 +02:00
rtmkrlv
3fa891e136 Merge branch 'master' into russian-locale 2018-01-06 14:54:46 +02:00
rtmkrlv
6f7a9f3295 Updated Russian translation
Added translation of new strings and small corrections
2018-01-06 14:45:30 +02:00
rtmkrlv
44bf518244 Revert "Updated Russian translation"
This reverts commit 63cb9b4968.
2018-01-06 14:36:37 +02:00
rtmkrlv
63cb9b4968 Updated Russian translation
Added translation of new strings and small corrections
2018-01-06 14:33:32 +02:00
rtmkrlv
a6cecc103c Merge pull request #1 from laurent22/master
Update
2018-01-06 13:43:28 +02:00
Laurent Cozic
8e8793943b Update README.md 2018-01-06 10:19:50 +01:00
Laurent Cozic
83d9faf2fe Create PULL_REQUEST_TEMPLATE 2018-01-06 10:17:14 +01:00
Laurent Cozic
f45a4fff8b Mobile: Fixes #136, fixes #137: styling issues on E2EE 2018-01-06 10:06:41 +01:00
Laurent Cozic
1e02aa3120 Update website 2018-01-05 21:38:37 +01:00
Laurent Cozic
77fec75f23 CLI v0.10.86 2018-01-05 21:02:23 +01:00
marcosvega91
277ad90f72 Indent with tab 2017-12-19 21:14:40 +01:00
marcosvega91
f2e3bedde6 Fix scroll
After fixing the issue on ios, it caused an issue on android that I solved with this commit
2017-12-19 10:28:52 +01:00
marcosvega91
98c0f2315a Fix scroll
Fixed the issue that not permit to view edited text when the keyboard is shown.
2017-12-19 10:08:22 +01:00
226 changed files with 19134 additions and 6123 deletions

7
.gitignore vendored
View File

@@ -35,4 +35,9 @@ _vieux/
_mydocs
.DS_Store
Assets/DownloadBadges*.psd
node_modules
node_modules
Tools/github_oauth_token.txt
_releases
ReactNativeClient/lib/csstojs/
ElectronClient/app/gui/note-viewer/fonts/
Tools/commit_hook.txt

View File

@@ -1,5 +1,12 @@
# Only build tags (Doesn't work - doesn't build anything)
if: tag IS present
rvm: 2.3.3
branches:
only:
- master
matrix:
include:
- os: osx
@@ -43,7 +50,8 @@ before_install:
script:
- |
cd ElectronClient/app
rsync -aP --delete ../../ReactNativeClient/lib/ lib/
cd Tools
npm install
yarn dist
cd ../ElectronClient/app
rsync -aP --delete ../../ReactNativeClient/lib/ lib/
npm install && yarn dist

View File

@@ -8,7 +8,7 @@
brew install yarn node
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
If you get a node-gyp related error you might need to manually install it: `npm install -g node-gyp`
## Linux and Windows (WSL) dependencies
@@ -17,6 +17,15 @@ If you get a node-gyp related error you might need to manually install it: `npm
- Install node v8.x (check with `node --version`) - https://nodejs.org/en/
- If you get a node-gyp related error you might need to manually install it: `npm install -g node-gyp`
# Building the tools
Before building any of the applications, you need to build the tools:
```
cd Tools
npm install
```
# Building the Electron application
```
@@ -28,10 +37,23 @@ yarn dist
If there's an error `while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory`, run `sudo apt-get install libgconf-2-4`
For node-gyp to work, you might need to install the `windows-build-tools` using `npm install --global windows-build-tools`.
That will create the executable file in the `dist` directory.
From `/ElectronClient` you can also run `run.sh` to run the app for testing.
## Building Electron application on Windows
```
cd Tools
npm install
cd ..\ElectronClient\app
xcopy /C /I /H /R /Y /S ..\..\ReactNativeClient\lib lib
npm install
yarn dist
```
# Building the Mobile application
First you need to setup React Native to build projects with native code. For this, follow the instructions on the [Get Started](https://facebook.github.io/react-native/docs/getting-started.html) tutorial, in the "Building Projects with Native Code" tab.

View File

@@ -1,6 +1,19 @@
# Reporting a bug
Please check first that it [has not already been reported](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). Also consider [enabling debug mode](https://github.com/laurent22/joplin/blob/master/readme/debugging.md) before reporting the issue so that you can provide as much details as possible to help fix it.
If possible, **please provide a screenshot**. A screenshot showing the problem is often more useful than a paragraph describing it as it can make it immediately clear what the issue is.
# Feature requests
Again, please check that it has not already been requested. If it has, simply **up-vote the issue** - the ones with the most up-votes are likely to be implemented. Adding a "+1" comment does nothing.
# Adding new features
If you want to add a new feature, consider asking about it before implementing it to make sure it is within the scope of the project. Of course you are free to create the pull request directly but it is not guaranteed it is going to be accepted.
# Style
- Only use tabs for indentation, not spaces.
- Do not remove or add optional characters from other lines (such as colons or new line characters) as it can make the commit needlessly big, and create conflicts with other changes.
Building the apps is relatively easy - please [see the build instructions](https://github.com/laurent22/joplin/blob/master/BUILD.md) for more details.
# Coding style
See the [prettier config](https://github.com/laurent22/joplin/blob/master/prettier.config.js).

View File

@@ -35,38 +35,55 @@ const ConsoleWidget = require('./gui/ConsoleWidget.js');
class AppGui {
constructor(app, store) {
this.app_ = app;
this.store_ = store;
constructor(app, store, keymap) {
try {
this.app_ = app;
this.store_ = store;
BaseWidget.setLogger(app.logger());
BaseWidget.setLogger(app.logger());
this.term_ = new TermWrapper(tk.terminal);
this.term_ = new TermWrapper(tk.terminal);
this.renderer_ = null;
this.logger_ = new Logger();
this.buildUi();
// Some keys are directly handled by the tkwidget framework
// so they need to be remapped in a different way.
this.tkWidgetKeys_ = {
'focus_next': 'TAB',
'focus_previous': 'SHIFT_TAB',
'move_up': 'UP',
'move_down': 'DOWN',
'page_down': 'PAGE_DOWN',
'page_up': 'PAGE_UP',
};
this.renderer_ = new Renderer(this.term(), this.rootWidget_);
this.renderer_ = null;
this.logger_ = new Logger();
this.buildUi();
this.app_.on('modelAction', async (event) => {
await this.handleModelAction(event.action);
});
this.renderer_ = new Renderer(this.term(), this.rootWidget_);
this.shortcuts_ = this.setupShortcuts();
this.app_.on('modelAction', async (event) => {
await this.handleModelAction(event.action);
});
this.inputMode_ = AppGui.INPUT_MODE_NORMAL;
this.keymap_ = this.setupKeymap(keymap);
this.commandCancelCalled_ = false;
this.inputMode_ = AppGui.INPUT_MODE_NORMAL;
this.currentShortcutKeys_ = [];
this.lastShortcutKeyTime_ = 0;
this.commandCancelCalled_ = false;
// Recurrent sync is setup only when the GUI is started. In
// a regular command it's not necessary since the process
// exits right away.
reg.setupRecurrentSync();
DecryptionWorker.instance().scheduleStart();
this.currentShortcutKeys_ = [];
this.lastShortcutKeyTime_ = 0;
// Recurrent sync is setup only when the GUI is started. In
// a regular command it's not necessary since the process
// exits right away.
reg.setupRecurrentSync();
DecryptionWorker.instance().scheduleStart();
} catch (error) {
this.fullScreen(false);
console.error(error);
process.exit(1);
}
}
store() {
@@ -105,6 +122,7 @@ class AppGui {
buildUi() {
this.rootWidget_ = new ReduxRootWidget(this.store_);
this.rootWidget_.name = 'root';
this.rootWidget_.autoShortcutsEnabled = false;
const folderList = new FolderListWidget();
folderList.style = {
@@ -269,155 +287,31 @@ class AppGui {
addCommandToConsole(cmd) {
if (!cmd) return;
const isConfigPassword = cmd.indexOf('config ') >= 0 && cmd.indexOf('password') >= 0;
if (isConfigPassword) return;
this.stdout(chalk.cyan.bold('> ' + cmd));
}
setupShortcuts() {
const shortcuts = {};
setupKeymap(keymap) {
const output = [];
shortcuts['TAB'] = {
friendlyName: 'Tab',
description: () => _('Give focus to next pane'),
isDocOnly: true,
}
for (let i = 0; i < keymap.length; i++) {
const item = Object.assign({}, keymap[i]);
shortcuts['SHIFT_TAB'] = {
friendlyName: 'Shift+Tab',
description: () => _('Give focus to previous pane'),
isDocOnly: true,
}
if (!item.command) throw new Error('Missing command for keymap item: ' + JSON.stringify(item));
shortcuts[':'] = {
description: () => _('Enter command line mode'),
action: async () => {
const cmd = await this.widget('statusBar').prompt();
if (!cmd) return;
this.addCommandToConsole(cmd);
await this.processCommand(cmd);
},
};
if (!('type' in item)) item.type = 'exec';
shortcuts['ESC'] = { // Built into terminal-kit inputField
description: () => _('Exit command line mode'),
isDocOnly: true,
};
shortcuts['ENTER'] = {
description: () => _('Edit the selected note'),
action: () => {
const w = this.widget('mainWindow').focusedWidget;
if (w.name === 'folderList') {
this.widget('noteList').focus();
} else if (w.name === 'noteList' || w.name === 'noteText') {
this.processCommand('edit $n');
}
},
}
shortcuts['CTRL_C'] = {
description: () => _('Cancel the current command.'),
friendlyName: 'Ctrl+C',
isDocOnly: true,
}
shortcuts['CTRL_D'] = {
description: () => _('Exit the application.'),
friendlyName: 'Ctrl+D',
isDocOnly: true,
}
shortcuts['DELETE'] = {
description: () => _('Delete the currently selected note or notebook.'),
action: async () => {
if (this.widget('folderList').hasFocus) {
const item = this.widget('folderList').selectedJoplinItem;
if (!item) return;
if (item.type_ === BaseModel.TYPE_FOLDER) {
await this.processCommand('rmbook ' + item.id);
} else if (item.type_ === BaseModel.TYPE_TAG) {
this.stdout(_('To delete a tag, untag the associated notes.'));
} else if (item.type_ === BaseModel.TYPE_SEARCH) {
this.store().dispatch({
type: 'SEARCH_DELETE',
id: item.id,
});
}
} else if (this.widget('noteList').hasFocus) {
await this.processCommand('rmnote $n');
} else {
this.stdout(_('Please select the note or notebook to be deleted first.'));
}
if (item.command in this.tkWidgetKeys_) {
item.type = 'tkwidgets';
}
};
shortcuts['BACKSPACE'] = {
alias: 'DELETE',
};
item.canRunAlongOtherCommands = item.type === 'function' && ['toggle_metadata', 'toggle_console'].indexOf(item.command) >= 0;
shortcuts[' '] = {
friendlyName: 'SPACE',
description: () => _('Set a to-do as completed / not completed'),
action: 'todo toggle $n',
output.push(item);
}
shortcuts['tc'] = {
description: () => _('[t]oggle [c]onsole between maximized/minimized/hidden/visible.'),
action: () => {
if (!this.consoleIsShown()) {
this.showConsole();
this.minimizeConsole();
} else {
if (this.consoleIsMaximized()) {
this.hideConsole();
} else {
this.maximizeConsole();
}
}
},
canRunAlongOtherCommands: true,
}
shortcuts['/'] = {
description: () => _('Search'),
action: { type: 'prompt', initialText: 'search ""', cursorPosition: -2 },
};
shortcuts['tm'] = {
description: () => _('[t]oggle note [m]etadata.'),
action: () => {
this.toggleNoteMetadata();
},
canRunAlongOtherCommands: true,
}
shortcuts['mn'] = {
description: () => _('[M]ake a new [n]ote'),
action: { type: 'prompt', initialText: 'mknote ""', cursorPosition: -2 },
}
shortcuts['mt'] = {
description: () => _('[M]ake a new [t]odo'),
action: { type: 'prompt', initialText: 'mktodo ""', cursorPosition: -2 },
}
shortcuts['mb'] = {
description: () => _('[M]ake a new note[b]ook'),
action: { type: 'prompt', initialText: 'mkbook ""', cursorPosition: -2 },
}
shortcuts['yn'] = {
description: () => _('Copy ([Y]ank) the [n]ote to a notebook.'),
action: { type: 'prompt', initialText: 'cp $n ""', cursorPosition: -2 },
}
shortcuts['dn'] = {
description: () => _('Move the note to a notebook.'),
action: { type: 'prompt', initialText: 'mv $n ""', cursorPosition: -2 },
}
return shortcuts;
return output;
}
toggleConsole() {
@@ -492,8 +386,16 @@ class AppGui {
return this.logger_;
}
shortcuts() {
return this.shortcuts_;
keymap() {
return this.keymap_;
}
keymapItemByKey(key) {
for (let i = 0; i < this.keymap_.length; i++) {
const item = this.keymap_[i];
if (item.keys.indexOf(key) >= 0) return item;
}
return null;
}
term() {
@@ -524,17 +426,77 @@ class AppGui {
}
}
async processCommand(cmd) {
async processFunctionCommand(cmd) {
if (cmd === 'activate') {
const w = this.widget('mainWindow').focusedWidget;
if (w.name === 'folderList') {
this.widget('noteList').focus();
} else if (w.name === 'noteList' || w.name === 'noteText') {
this.processPromptCommand('edit $n');
}
} else if (cmd === 'delete') {
if (this.widget('folderList').hasFocus) {
const item = this.widget('folderList').selectedJoplinItem;
if (!item) return;
if (item.type_ === BaseModel.TYPE_FOLDER) {
await this.processPromptCommand('rmbook ' + item.id);
} else if (item.type_ === BaseModel.TYPE_TAG) {
this.stdout(_('To delete a tag, untag the associated notes.'));
} else if (item.type_ === BaseModel.TYPE_SEARCH) {
this.store().dispatch({
type: 'SEARCH_DELETE',
id: item.id,
});
}
} else if (this.widget('noteList').hasFocus) {
await this.processPromptCommand('rmnote $n');
} else {
this.stdout(_('Please select the note or notebook to be deleted first.'));
}
} else if (cmd === 'toggle_console') {
if (!this.consoleIsShown()) {
this.showConsole();
this.minimizeConsole();
} else {
if (this.consoleIsMaximized()) {
this.hideConsole();
} else {
this.maximizeConsole();
}
}
} else if (cmd === 'toggle_metadata') {
this.toggleNoteMetadata();
} else if (cmd === 'enter_command_line_mode') {
const cmd = await this.widget('statusBar').prompt();
if (!cmd) return;
this.addCommandToConsole(cmd);
await this.processPromptCommand(cmd);
} else {
throw new Error('Unknown command: ' + cmd);
}
}
async processPromptCommand(cmd) {
if (!cmd) return;
cmd = cmd.trim();
if (!cmd.length) return;
this.logger().info('Got command: ' + cmd);
if (cmd === 'q' || cmd === 'wq' || cmd === 'qa') { // Vim bonus
await this.app().exit();
return;
}
// this.logger().debug('Got command: ' + cmd);
try {
let note = this.widget('noteList').currentItem;
@@ -786,35 +748,34 @@ class AppGui {
// -------------------------------------------------------------------------
const shortcutKey = this.currentShortcutKeys_.join('');
let cmd = shortcutKey in this.shortcuts_ ? this.shortcuts_[shortcutKey] : null;
let keymapItem = this.keymapItemByKey(shortcutKey);
// If this command is an alias to another command, resolve to the actual command
if (cmd && cmd.alias) cmd = this.shortcuts_[cmd.alias];
let processShortcutKeys = !this.app().currentCommand() && cmd;
if (cmd && cmd.canRunAlongOtherCommands) processShortcutKeys = true;
let processShortcutKeys = !this.app().currentCommand() && keymapItem;
if (keymapItem && keymapItem.canRunAlongOtherCommands) processShortcutKeys = true;
if (statusBar.promptActive) processShortcutKeys = false;
if (cmd && cmd.isDocOnly) processShortcutKeys = false;
if (processShortcutKeys) {
this.logger().info('Shortcut:', shortcutKey, cmd.description());
this.logger().debug('Shortcut:', shortcutKey, keymapItem);
this.currentShortcutKeys_ = [];
if (typeof cmd.action === 'function') {
await cmd.action();
} else if (typeof cmd.action === 'object') {
if (cmd.action.type === 'prompt') {
let promptOptions = {};
if ('cursorPosition' in cmd.action) promptOptions.cursorPosition = cmd.action.cursorPosition;
const commandString = await statusBar.prompt(cmd.action.initialText ? cmd.action.initialText : '', null, promptOptions);
this.addCommandToConsole(commandString);
await this.processCommand(commandString);
} else {
throw new Error('Unknown command: ' + JSON.stringify(cmd.action));
}
} else { // String
this.stdout(cmd.action);
await this.processCommand(cmd.action);
if (keymapItem.type === 'function') {
this.processFunctionCommand(keymapItem.command);
} else if (keymapItem.type === 'prompt') {
let promptOptions = {};
if ('cursorPosition' in keymapItem) promptOptions.cursorPosition = keymapItem.cursorPosition;
const commandString = await statusBar.prompt(keymapItem.command ? keymapItem.command : '', null, promptOptions);
this.addCommandToConsole(commandString);
await this.processPromptCommand(commandString);
} else if (keymapItem.type === 'exec') {
this.stdout(keymapItem.command);
await this.processPromptCommand(keymapItem.command);
} else if (keymapItem.type === 'tkwidgets') {
this.widget('root').handleKey(this.tkWidgetKeys_[keymapItem.command]);
} else {
throw new Error('Unknown command type: ' + JSON.stringify(keymapItem));
}
}

View File

@@ -5,6 +5,7 @@ const { JoplinDatabase } = require('lib/joplin-database.js');
const { Database } = require('lib/database.js');
const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
const { DatabaseDriverNode } = require('lib/database-driver-node.js');
const ResourceService = require('lib/services/ResourceService');
const BaseModel = require('lib/BaseModel.js');
const Folder = require('lib/models/Folder.js');
const BaseItem = require('lib/models/BaseItem.js');
@@ -21,6 +22,7 @@ const os = require('os');
const fs = require('fs-extra');
const { cliUtils } = require('./cli-utils.js');
const EventEmitter = require('events');
const Cache = require('lib/Cache');
class Application extends BaseApplication {
@@ -34,6 +36,7 @@ class Application extends BaseApplication {
this.allCommandsLoaded_ = false;
this.showStackTraces_ = false;
this.gui_ = null;
this.cache_ = new Cache();
}
gui() {
@@ -223,12 +226,8 @@ class Application extends BaseApplication {
async commandMetadata() {
if (this.commandMetadata_) return this.commandMetadata_;
const osTmpdir = require('os-tmpdir');
const storage = require('node-persist');
await storage.init({ dir: osTmpdir() + '/commandMetadata', ttl: 1000 * 60 * 60 * 24 });
let output = await storage.getItem('metadata');
if (Setting.value('env') != 'dev' && output) {
let output = await this.cache_.getItem('metadata');
if (output) {
this.commandMetadata_ = output;
return Object.assign({}, this.commandMetadata_);
}
@@ -242,7 +241,7 @@ class Application extends BaseApplication {
output[n] = cmd.metadata();
}
await storage.setItem('metadata', output);
await this.cache_.setItem('metadata', output, 1000 * 60 * 60 * 24);
this.commandMetadata_ = output;
return Object.assign({}, this.commandMetadata_);
@@ -285,7 +284,7 @@ class Application extends BaseApplication {
exit: () => {},
showModalOverlay: (text) => {},
hideModalOverlay: () => {},
stdoutMaxWidth: () => { return 78; },
stdoutMaxWidth: () => { return 100; },
forceRender: () => {},
termSaveState: () => {},
termRestoreState: (state) => {},
@@ -294,7 +293,7 @@ class Application extends BaseApplication {
async execCommand(argv) {
if (!argv.length) return this.execCommand(['help']);
reg.logger().info('execCommand()', argv);
// reg.logger().debug('execCommand()', argv);
const commandName = argv[0];
this.activeCommand_ = this.findCommandByName(commandName);
@@ -314,6 +313,63 @@ class Application extends BaseApplication {
return this.activeCommand_;
}
async loadKeymaps() {
const defaultKeyMap = [
{ "keys": [":"], "type": "function", "command": "enter_command_line_mode" },
{ "keys": ["TAB"], "type": "function", "command": "focus_next" },
{ "keys": ["SHIFT_TAB"], "type": "function", "command": "focus_previous" },
{ "keys": ["UP"], "type": "function", "command": "move_up" },
{ "keys": ["DOWN"], "type": "function", "command": "move_down" },
{ "keys": ["PAGE_UP"], "type": "function", "command": "page_up" },
{ "keys": ["PAGE_DOWN"], "type": "function", "command": "page_down" },
{ "keys": ["ENTER"], "type": "function", "command": "activate" },
{ "keys": ["DELETE", "BACKSPACE"], "type": "function", "command": "delete" },
{ "keys": [" "], "command": "todo toggle $n" },
{ "keys": ["tc"], "type": "function", "command": "toggle_console" },
{ "keys": ["tm"], "type": "function", "command": "toggle_metadata" },
{ "keys": ["/"], "type": "prompt", "command": "search \"\"", "cursorPosition": -2 },
{ "keys": ["mn"], "type": "prompt", "command": "mknote \"\"", "cursorPosition": -2 },
{ "keys": ["mt"], "type": "prompt", "command": "mktodo \"\"", "cursorPosition": -2 },
{ "keys": ["mb"], "type": "prompt", "command": "mkbook \"\"", "cursorPosition": -2 },
{ "keys": ["yn"], "type": "prompt", "command": "cp $n \"\"", "cursorPosition": -2 },
{ "keys": ["dn"], "type": "prompt", "command": "mv $n \"\"", "cursorPosition": -2 }
];
// Filter the keymap item by command so that items in keymap.json can override
// the default ones.
const itemsByCommand = {};
for (let i = 0; i < defaultKeyMap.length; i++) {
itemsByCommand[defaultKeyMap[i].command] = defaultKeyMap[i]
}
const filePath = Setting.value('profileDir') + '/keymap.json';
if (await fs.pathExists(filePath)) {
try {
let configString = await fs.readFile(filePath, 'utf-8');
configString = configString.replace(/^\s*\/\/.*/, ''); // Strip off comments
const keymap = JSON.parse(configString);
for (let keymapIndex = 0; keymapIndex < keymap.length; keymapIndex++) {
const item = keymap[keymapIndex];
itemsByCommand[item.command] = item;
}
} catch (error) {
let msg = error.message ? error.message : '';
msg = 'Could not load keymap ' + filePath + '\n' + msg;
error.message = msg;
throw error;
}
}
const output = [];
for (let n in itemsByCommand) {
if (!itemsByCommand.hasOwnProperty(n)) continue;
output.push(itemsByCommand[n]);
}
return output;
}
async start(argv) {
argv = await super.start(argv);
@@ -332,16 +388,19 @@ class Application extends BaseApplication {
await this.execCommand(argv);
} catch (error) {
if (this.showStackTraces_) {
console.info(error);
console.error(error);
} else {
console.info(error.message);
}
process.exit(1);
}
} else { // Otherwise open the GUI
this.initRedux();
const keymap = await this.loadKeymaps();
const AppGui = require('./app-gui.js');
this.gui_ = new AppGui(this, this.store());
this.gui_ = new AppGui(this, this.store(), keymap);
this.gui_.setLogger(this.logger_);
await this.gui_.start();
@@ -354,6 +413,12 @@ class Application extends BaseApplication {
const tags = await Tag.allWithNotes();
const resourceService = new ResourceService();
resourceService.maintenance();
setInterval(() => {
resourceService.maintenance();
}, 1000 * 60 * 60 * 4);
this.dispatch({
type: 'TAG_UPDATE_ALL',
items: tags,

View File

@@ -4,6 +4,7 @@ var Folder = require('lib/models/Folder.js');
var Tag = require('lib/models/Tag.js');
var { cliUtils } = require('./cli-utils.js');
var yargParser = require('yargs-parser');
var fs = require('fs-extra');
async function handleAutocompletionPromise(line) {
// Auto-complete the command name
@@ -48,7 +49,7 @@ async function handleAutocompletionPromise(line) {
if (options.length > 1 && options[1].indexOf(next) === 0) {
l.push(options[1]);
} else if (options[0].indexOf(next) === 0) {
l.push(options[2]);
l.push(options[0]);
}
}
if (l.length === 0) {
@@ -71,8 +72,10 @@ async function handleAutocompletionPromise(line) {
let argName = cmdUsage[positionalArgs - 1];
argName = cliUtils.parseCommandArg(argName).name;
if (argName == 'note' || argName == 'note-pattern' && app().currentFolder()) {
const notes = await Note.previews(app().currentFolder().id, { titlePattern: next + '*' });
const currentFolder = app().currentFolder();
if (argName == 'note' || argName == 'note-pattern') {
const notes = currentFolder ? await Note.previews(currentFolder.id, { titlePattern: next + '*' }) : [];
l.push(...notes.map((n) => n.title));
}
@@ -81,11 +84,22 @@ async function handleAutocompletionPromise(line) {
l.push(...folders.map((n) => n.title));
}
if (argName == 'item') {
const notes = currentFolder ? await Note.previews(currentFolder.id, { titlePattern: next + '*' }) : [];
const folders = await Folder.search({ titlePattern: next + '*' });
l.push(...notes.map((n) => n.title), folders.map((n) => n.title));
}
if (argName == 'tag') {
let tags = await Tag.search({ titlePattern: next + '*' });
l.push(...tags.map((n) => n.title));
}
if (argName == 'file') {
let files = await fs.readdir('.');
l.push(...files);
}
if (argName == 'tag-command') {
let c = filterList(['add', 'remove', 'list'], next);
l.push(...c);

View File

@@ -32,10 +32,6 @@ class BaseCommand {
return this.compatibleUis().indexOf(ui) >= 0;
}
aliases() {
return [];
}
options() {
return [];
}

View File

@@ -23,7 +23,11 @@ class Command extends BaseCommand {
const verbose = args.options.verbose;
const renderKeyValue = (name) => {
const value = Setting.value(name);
const md = Setting.settingMetadata(name);
let value = Setting.value(name);
if (typeof value === 'object' || Array.isArray(value)) value = JSON.stringify(value);
if (md.secure) value = '********';
if (Setting.isEnum(name)) {
return _('%s = %s (%s)', name, value, Setting.enumOptionsDoc(name));
} else {

View File

@@ -131,7 +131,6 @@ class Command extends BaseCommand {
} else if (stat.isDirectory()) {
continue;
} else {
itemCount++;
const content = await fs.readFile(fullPath, 'utf8');
const item = await BaseItem.unserialize(content);
const ItemClass = BaseItem.itemClass(item);
@@ -141,6 +140,8 @@ class Command extends BaseCommand {
continue;
}
itemCount++;
const isEncrypted = await EncryptionService.instance().itemIsEncrypted(item);
if (isEncrypted) {

View File

@@ -81,7 +81,9 @@ class Command extends BaseCommand {
const termState = app().gui().termSaveState();
const spawnSync = require('child_process').spawnSync;
spawnSync(editorPath, editorArgs, { stdio: 'inherit' });
const result = spawnSync(editorPath, editorArgs, { stdio: 'inherit' });
if (result.error) this.stdout(_('Error opening note in editor: %s', result.error.message));
app().gui().termRestoreState(termState);
app().gui().hideModalOverlay();

View File

@@ -1,5 +1,5 @@
const { BaseCommand } = require('./base-command.js');
const { Exporter } = require('lib/services/exporter.js');
const InteropService = require('lib/services/InteropService.js');
const BaseModel = require('lib/BaseModel.js');
const Note = require('lib/models/Note.js');
const { reg } = require('lib/registry.js');
@@ -10,15 +10,21 @@ const fs = require('fs-extra');
class Command extends BaseCommand {
usage() {
return 'export <directory>';
return 'export <path>';
}
description() {
return _('Exports Joplin data to the given directory. By default, it will export the complete database including notebooks, notes, tags and resources.');
return _('Exports Joplin data to the given path. By default, it will export the complete database including notebooks, notes, tags and resources.');
}
options() {
const service = new InteropService();
const formats = service.modules()
.filter(m => m.type === 'exporter')
.map(m => m.format + (m.description ? ' (' + m.description + ')' : ''));
return [
['--format <format>', _('Destination format: %s', formats.join(', '))],
['--note <note>', _('Exports only the given note.')],
['--notebook <notebook>', _('Exports only the given notebook.')],
];
@@ -26,13 +32,9 @@ class Command extends BaseCommand {
async action(args) {
let exportOptions = {};
exportOptions.destDir = args.directory;
exportOptions.writeFile = (filePath, data) => {
return fs.writeFile(filePath, data);
};
exportOptions.copyFile = (source, dest) => {
return fs.copy(source, dest, { overwrite: true });
};
exportOptions.path = args.path;
exportOptions.format = args.options.format ? args.options.format : 'jex';
if (args.options.note) {
@@ -48,10 +50,10 @@ class Command extends BaseCommand {
}
const exporter = new Exporter();
const result = await exporter.export(exportOptions);
const service = new InteropService();
const result = await service.export(exportOptions);
reg.logger().info('Export result: ', result);
result.warnings.map((w) => this.stdout(w));
}
}

View File

@@ -36,21 +36,22 @@ class Command extends BaseCommand {
async action(args) {
const stdoutWidth = app().commandStdoutMaxWidth();
if (args.command === 'shortcuts') {
if (args.command === 'shortcuts' || args.command === 'keymap') {
this.stdout(_('For information on how to customise the shortcuts please visit %s', 'http://joplin.cozic.net/terminal/#shortcuts'));
this.stdout('');
if (app().gui().isDummy()) {
throw new Error(_('Shortcuts are not available in CLI mode.'));
}
const shortcuts = app().gui().shortcuts();
const keymap = app().gui().keymap();
let rows = [];
for (let n in shortcuts) {
if (!shortcuts.hasOwnProperty(n)) continue;
const shortcut = shortcuts[n];
if (!shortcut.description) continue;
n = shortcut.friendlyName ? shortcut.friendlyName : n;
rows.push([n, shortcut.description()]);
for (let i = 0; i < keymap.length; i++) {
const item = keymap[i];
const keys = item.keys.map((k) => k === ' ' ? '(SPACE)' : k);
rows.push([keys.join(', '), item.command]);
}
cliUtils.printArray(this.stdout.bind(this), rows);
@@ -78,7 +79,7 @@ class Command extends BaseCommand {
this.stdout(_('To maximise/minimise the console, press "TC".'));
this.stdout(_('To enter command line mode, press ":"'));
this.stdout(_('To exit command line mode, press ESCAPE'));
this.stdout(_('For the complete list of available keyboard shortcuts, type `help shortcuts`'));
this.stdout(_('For the list of keyboard shortcuts and config options, type `help keymap`'));
}
app().gui().showConsole();

View File

@@ -1,68 +0,0 @@
const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const Folder = require('lib/models/Folder.js');
const { importEnex } = require('lib/import-enex');
const { filename, basename } = require('lib/path-utils.js');
const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand {
usage() {
return 'import-enex <file> [notebook]';
}
description() {
return _('Imports an Evernote notebook file (.enex file).');
}
options() {
return [
['-f, --force', _('Do not ask for confirmation.')],
];
}
async action(args) {
let filePath = args.file;
let folder = null;
let folderTitle = args['notebook'];
let force = args.options.force === true;
if (!folderTitle) folderTitle = filename(filePath);
folder = await Folder.loadByField('title', folderTitle);
const msg = folder ? _('File "%s" will be imported into existing notebook "%s". Continue?', basename(filePath), folderTitle) : _('New notebook "%s" will be created and file "%s" will be imported into it. Continue?', folderTitle, basename(filePath));
const ok = force ? true : await this.prompt(msg);
if (!ok) return;
let lastProgress = '';
let options = {
onProgress: (progressState) => {
let line = [];
line.push(_('Found: %d.', progressState.loaded));
line.push(_('Created: %d.', progressState.created));
if (progressState.updated) line.push(_('Updated: %d.', progressState.updated));
if (progressState.skipped) line.push(_('Skipped: %d.', progressState.skipped));
if (progressState.resourcesCreated) line.push(_('Resources: %d.', progressState.resourcesCreated));
if (progressState.notesTagged) line.push(_('Tagged: %d.', progressState.notesTagged));
lastProgress = line.join(' ');
cliUtils.redraw(lastProgress);
},
onError: (error) => {
let s = error.trace ? error.trace : error.toString();
this.stdout(s);
},
}
folder = !folder ? await Folder.save({ title: folderTitle }) : folder;
app().gui().showConsole();
this.stdout(_('Importing notes...'));
await importEnex(folder.id, filePath, options);
cliUtils.redrawDone();
this.stdout(_('The notes have been imported: %s', lastProgress));
}
}
module.exports = Command;

View File

@@ -0,0 +1,75 @@
const { BaseCommand } = require('./base-command.js');
const InteropService = require('lib/services/InteropService.js');
const BaseModel = require('lib/BaseModel.js');
const Note = require('lib/models/Note.js');
const { filename, basename, fileExtension } = require('lib/path-utils.js');
const { importEnex } = require('lib/import-enex');
const { cliUtils } = require('./cli-utils.js');
const { reg } = require('lib/registry.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const fs = require('fs-extra');
class Command extends BaseCommand {
usage() {
return 'import <path> [notebook]';
}
description() {
return _('Imports data into Joplin.');
}
options() {
const service = new InteropService();
const formats = service.modules().filter(m => m.type === 'importer').map(m => m.format);
return [
['--format <format>', _('Source format: %s', (['auto'].concat(formats)).join(', '))],
['-f, --force', _('Do not ask for confirmation.')],
];
}
async action(args) {
let folder = await app().loadItem(BaseModel.TYPE_FOLDER, args.notebook);
if (args.notebook && !folder) throw new Error(_('Cannot find "%s".', args.notebook));
const importOptions = {};
importOptions.path = args.path;
importOptions.format = args.options.format ? args.options.format : 'auto';
importOptions.destinationFolderId = folder ? folder.id : null;
let lastProgress = '';
// onProgress/onError supported by Enex import only
importOptions.onProgress = (progressState) => {
let line = [];
line.push(_('Found: %d.', progressState.loaded));
line.push(_('Created: %d.', progressState.created));
if (progressState.updated) line.push(_('Updated: %d.', progressState.updated));
if (progressState.skipped) line.push(_('Skipped: %d.', progressState.skipped));
if (progressState.resourcesCreated) line.push(_('Resources: %d.', progressState.resourcesCreated));
if (progressState.notesTagged) line.push(_('Tagged: %d.', progressState.notesTagged));
lastProgress = line.join(' ');
cliUtils.redraw(lastProgress);
};
importOptions.onError = (error) => {
let s = error.trace ? error.trace : error.toString();
this.stdout(s);
};
app().gui().showConsole();
this.stdout(_('Importing notes...'));
const service = new InteropService();
const result = await service.import(importOptions);
result.warnings.map((w) => this.stdout(w));
cliUtils.redrawDone();
if (lastProgress) this.stdout(_('The notes have been imported: %s', lastProgress));
}
}
module.exports = Command;

View File

@@ -14,10 +14,6 @@ class Command extends BaseCommand {
return _('Creates a new notebook.');
}
aliases() {
return ['mkdir'];
}
async action(args) {
let folder = await Folder.save({ title: args['new-notebook'] }, { userSideValidation: true });
app().switchCurrentFolder(folder);

View File

@@ -10,7 +10,7 @@ const { cliUtils } = require('./cli-utils.js');
const md5 = require('md5');
const locker = require('proper-lockfile');
const fs = require('fs-extra');
const osTmpdir = require('os-tmpdir');
const SyncTargetRegistry = require('lib/SyncTargetRegistry');
class Command extends BaseCommand {
@@ -61,14 +61,28 @@ class Command extends BaseCommand {
});
}
async doAuth(syncTargetId) {
async doAuth() {
const syncTarget = reg.syncTarget(this.syncTargetId_);
this.oneDriveApiUtils_ = new OneDriveApiNodeUtils(syncTarget.api());
const auth = await this.oneDriveApiUtils_.oauthDance({
log: (...s) => { return this.stdout(...s); }
});
this.oneDriveApiUtils_ = null;
return auth;
const syncTargetMd = SyncTargetRegistry.idToMetadata(this.syncTargetId_);
if (this.syncTargetId_ === 3 || this.syncTargetId_ === 4) { // OneDrive
this.oneDriveApiUtils_ = new OneDriveApiNodeUtils(syncTarget.api());
const auth = await this.oneDriveApiUtils_.oauthDance({
log: (...s) => { return this.stdout(...s); }
});
this.oneDriveApiUtils_ = null;
Setting.setValue('sync.' + this.syncTargetId_ + '.auth', auth ? JSON.stringify(auth) : null);
if (!auth) {
this.stdout(_('Authentication was not completed (did not receive an authentication token).'));
return false;
}
return true;
}
this.stdout(_('Not authentified with %s. Please provide any missing credentials.', syncTarget.label()));
return false;
}
cancelAuth() {
@@ -86,7 +100,7 @@ class Command extends BaseCommand {
this.releaseLockFn_ = null;
// Lock is unique per profile/database
const lockFilePath = osTmpdir() + '/synclock_' + md5(Setting.value('profileDir'));
const lockFilePath = require('os').tmpdir() + '/synclock_' + md5(escape(Setting.value('profileDir'))); // https://github.com/pvorb/node-md5/issues/41
if (!await fs.pathExists(lockFilePath)) await fs.writeFile(lockFilePath, 'synclock');
try {
@@ -120,12 +134,8 @@ class Command extends BaseCommand {
app().gui().showConsole();
app().gui().maximizeConsole();
const auth = await this.doAuth(this.syncTargetId_);
Setting.setValue('sync.' + this.syncTargetId_ + '.auth', auth ? JSON.stringify(auth) : null);
if (!auth) {
this.stdout(_('Authentication was not completed (did not receive an authentication token).'));
return cleanUp();
}
const authDone = await this.doAuth();
if (!authDone) return cleanUp();
}
const sync = await syncTarget.synchronizer();

View File

@@ -133,7 +133,8 @@ class StatusBarWidget extends BaseWidget {
resolveResult = input ? input.trim() : input;
// Add the command to history but only if it's longer than one character.
// Below that it's usually an answer like "y"/"n", etc.
if (!isSecurePrompt && input && input.length > 1) this.history_.push(input);
const isConfigPassword = input.indexOf('config ') >= 0 && input.indexOf('password') >= 0;
if (!isSecurePrompt && input && input.length > 1 && !isConfigPassword) this.history_.push(input);
}
}

View File

@@ -53,9 +53,8 @@ function renderCommandHelp(cmd, width = null) {
desc.push(label);
}
if (md.description) {
desc.push(md.description());
}
const description = Setting.keyDescription(md.key, 'cli');
if (description) desc.push(description);
desc.push(_('Type: %s.', md.isEnum ? _('Enum') : Setting.typeToString(md.type)));
if (md.isEnum) desc.push(_('Possible values: %s.', Setting.enumOptionsDoc(md.key, '%s (%s)')));

View File

@@ -3,6 +3,13 @@
// Make it possible to require("/lib/...") without specifying full path
require('app-module-path').addPath(__dirname);
const compareVersion = require('compare-version');
const nodeVersion = process && process.versions && process.versions.node ? process.versions.node : '0.0.0';
if (compareVersion(nodeVersion, '8.0.0') < 0) {
console.error('Joplin requires Node 8+. Detected version ' + nodeVersion);
process.exit(1);
}
const { app } = require('./app.js');
const Folder = require('lib/models/Folder.js');
const Resource = require('lib/models/Resource.js');
@@ -16,12 +23,14 @@ const { Logger } = require('lib/logger.js');
const { FsDriverNode } = require('lib/fs-driver-node.js');
const { shimInit } = require('lib/shim-init-node.js');
const { _ } = require('lib/locale.js');
const { FileApiDriverLocal } = require('lib/file-api-driver-local.js');
const EncryptionService = require('lib/services/EncryptionService');
const fsDriver = new FsDriverNode();
Logger.fsDriver_ = fsDriver;
Resource.fsDriver_ = fsDriver;
EncryptionService.fsDriver_ = fsDriver;
FileApiDriverLocal.fsDriver_ = fsDriver;
// That's not good, but it's to avoid circular dependency issues
// in the BaseItem class.
@@ -57,7 +66,34 @@ process.stdout.on('error', function( err ) {
}
});
// async function main() {
// const InteropService = require('lib/services/InteropService');
// const service = new InteropService();
// console.info(service.moduleByFormat('importer', 'enex'));
// //await service.modules();
// }
// main().catch((error) => { console.error(error); });
application.start(process.argv).catch((error) => {
console.error(_('Fatal error:'));
console.error(error);
if (error.code == 'flagError') {
console.error(error.message);
console.error(_('Type `joplin help` for usage information.'));
} else {
console.error(_('Fatal error:'));
console.error(error);
}
process.exit(1);
});

File diff suppressed because it is too large Load Diff

View File

@@ -15,63 +15,12 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Give focus to next pane"
msgstr ""
msgid "Give focus to previous pane"
msgstr ""
msgid "Enter command line mode"
msgstr ""
msgid "Exit command line mode"
msgstr ""
msgid "Edit the selected note"
msgstr ""
msgid "Cancel the current command."
msgstr ""
msgid "Exit the application."
msgstr ""
msgid "Delete the currently selected note or notebook."
msgstr ""
msgid "To delete a tag, untag the associated notes."
msgstr ""
msgid "Please select the note or notebook to be deleted first."
msgstr ""
msgid "Set a to-do as completed / not completed"
msgstr ""
msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
msgstr ""
msgid "Search"
msgstr ""
msgid "[t]oggle note [m]etadata."
msgstr ""
msgid "[M]ake a new [n]ote"
msgstr ""
msgid "[M]ake a new [t]odo"
msgstr ""
msgid "[M]ake a new note[b]ook"
msgstr ""
msgid "Copy ([Y]ank) the [n]ote to a notebook."
msgstr ""
msgid "Move the note to a notebook."
msgstr ""
msgid "Press Ctrl+D or type \"exit\" to exit the application"
msgstr ""
@@ -108,6 +57,9 @@ msgstr ""
msgid "The command \"%s\" is only available in GUI mode"
msgstr ""
msgid "Cannot change encrypted item"
msgstr ""
#, javascript-format
msgid "Missing required argument: %s"
msgstr ""
@@ -165,6 +117,35 @@ msgstr ""
msgid "Note is not a to-do: \"%s\""
msgstr ""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
msgstr ""
msgid "Enter master password:"
msgstr ""
msgid "Operation cancelled"
msgstr ""
msgid ""
"Starting decryption... Please wait as it may take several minutes depending "
"on how much there is to decrypt."
msgstr ""
msgid "Completed decryption."
msgstr ""
msgid "Enabled"
msgstr ""
msgid "Disabled"
msgstr ""
#, javascript-format
msgid "Encryption is: %s"
msgstr ""
msgid "Edit note."
msgstr ""
@@ -182,6 +163,10 @@ msgstr ""
msgid "Starting to edit note. Close the editor to get back to the prompt."
msgstr ""
#, javascript-format
msgid "Error opening note in editor: %s"
msgstr ""
msgid "Note has been saved."
msgstr ""
@@ -189,10 +174,14 @@ msgid "Exits the application."
msgstr ""
msgid ""
"Exports Joplin data to the given directory. By default, it will export the "
"Exports Joplin data to the given path. By default, it will export the "
"complete database including notebooks, notes, tags and resources."
msgstr ""
#, javascript-format
msgid "Destination format: %s"
msgstr ""
msgid "Exports only the given note."
msgstr ""
@@ -205,6 +194,10 @@ msgstr ""
msgid "Displays usage information."
msgstr ""
#, javascript-format
msgid "For information on how to customise the shortcuts please visit %s"
msgstr ""
msgid "Shortcuts are not available in CLI mode."
msgstr ""
@@ -240,25 +233,19 @@ msgid "To exit command line mode, press ESCAPE"
msgstr ""
msgid ""
"For the complete list of available keyboard shortcuts, type `help shortcuts`"
"For the list of keyboard shortcuts and config options, type `help keymap`"
msgstr ""
msgid "Imports an Evernote notebook file (.enex file)."
msgid "Imports data into Joplin."
msgstr ""
#, javascript-format
msgid "Source format: %s"
msgstr ""
msgid "Do not ask for confirmation."
msgstr ""
#, javascript-format
msgid "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
msgstr ""
#, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into "
"it. Continue?"
msgstr ""
#, javascript-format
msgid "Found: %d."
msgstr ""
@@ -381,6 +368,14 @@ msgstr ""
msgid "Sync to provided target (defaults to sync.target config value)"
msgstr ""
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr ""
#, javascript-format
msgid "Not authentified with %s. Please provide any missing credentials."
msgstr ""
msgid "Synchronisation is already in progress."
msgstr ""
@@ -391,10 +386,6 @@ msgid ""
"operation."
msgstr ""
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr ""
#, javascript-format
msgid "Synchronisation target: %s (%s)"
msgstr ""
@@ -458,6 +449,9 @@ msgstr ""
msgid "Possible keys/values:"
msgstr ""
msgid "Type `joplin help` for usage information."
msgstr ""
msgid "Fatal error:"
msgstr ""
@@ -488,6 +482,24 @@ msgid ""
"For example, to create a notebook press `mb`; to create a note press `mn`."
msgstr ""
msgid ""
"One or more items are currently encrypted and you may need to supply a "
"master password. To do so please type `e2ee decrypt`. If you have already "
"supplied the password, the encrypted items are being decrypted in the "
"background and will be available soon."
msgstr ""
#, javascript-format
msgid "Exporting to \"%s\" as \"%s\" format. Please wait..."
msgstr ""
#, javascript-format
msgid "Importing from \"%s\" as \"%s\" format. Please wait..."
msgstr ""
msgid "PDF File"
msgstr ""
msgid "File"
msgstr ""
@@ -500,10 +512,17 @@ msgstr ""
msgid "New notebook"
msgstr ""
msgid "Import Evernote notes"
msgid "Import"
msgstr ""
msgid "Evernote Export Files"
msgid "Export"
msgstr ""
msgid "Print"
msgstr ""
#, javascript-format
msgid "Hide %s"
msgstr ""
msgid "Quit"
@@ -524,13 +543,22 @@ msgstr ""
msgid "Search in all the notes"
msgstr ""
msgid "View"
msgstr ""
msgid "Toggle editor layout"
msgstr ""
msgid "Tools"
msgstr ""
msgid "Synchronisation status"
msgstr ""
msgid "Options"
msgid "Encryption options"
msgstr ""
msgid "General Options"
msgstr ""
msgid "Help"
@@ -539,6 +567,12 @@ msgstr ""
msgid "Website and documentation"
msgstr ""
msgid "Make a donation"
msgstr ""
msgid "Check for updates..."
msgstr ""
msgid "About Joplin"
msgstr ""
@@ -546,12 +580,34 @@ msgstr ""
msgid "%s %s (%s, %s)"
msgstr ""
#, javascript-format
msgid "Open %s"
msgstr ""
msgid "Exit"
msgstr ""
msgid "OK"
msgstr ""
msgid "Cancel"
msgstr ""
msgid "Current version is up-to-date."
msgstr ""
msgid "An update is available, do you want to download it now?"
msgstr ""
msgid "Yes"
msgstr ""
msgid "No"
msgstr ""
msgid "Check synchronisation configuration"
msgstr ""
#, javascript-format
msgid "Notes and settings are stored in: %s"
msgstr ""
@@ -608,18 +664,21 @@ msgid ""
"how the notes or notebooks were originally encrypted."
msgstr ""
msgid "Missing Master Keys"
msgstr ""
msgid ""
"The master keys with these IDs are used to encrypt some of your items, "
"however the application does not currently have access to them. It is likely "
"they will eventually be downloaded via synchronisation."
msgstr ""
msgid "Status"
msgstr ""
msgid "Encryption is:"
msgstr ""
msgid "Enabled"
msgstr ""
msgid "Disabled"
msgstr ""
msgid "Back"
msgstr ""
@@ -631,15 +690,9 @@ msgstr ""
msgid "Please create a notebook first."
msgstr ""
msgid "Note title:"
msgstr ""
msgid "Please create a notebook first"
msgstr ""
msgid "To-do title:"
msgstr ""
msgid "Notebook title:"
msgstr ""
@@ -655,6 +708,9 @@ msgstr ""
msgid "Set alarm:"
msgstr ""
msgid "Search"
msgstr ""
msgid "Layout"
msgstr ""
@@ -689,6 +745,12 @@ msgid ""
"There is currently no notebook. Create one by clicking on \"New notebook\"."
msgstr ""
msgid "Open..."
msgstr ""
msgid "Save as..."
msgstr ""
#, javascript-format
msgid "Unsupported link or message: %s"
msgstr ""
@@ -696,9 +758,28 @@ msgstr ""
msgid "Attach file"
msgstr ""
msgid "Tags"
msgstr ""
msgid "Set alarm"
msgstr ""
#, javascript-format
msgid ""
"This note has no content. Click on \"%s\" to toggle the editor and edit the "
"note."
msgstr ""
msgid "to-do"
msgstr ""
msgid "note"
msgstr ""
#, javascript-format
msgid "Creating new %s..."
msgstr ""
msgid "Refresh"
msgstr ""
@@ -708,7 +789,7 @@ msgstr ""
msgid "OneDrive Login"
msgstr ""
msgid "Import"
msgid "Options"
msgstr ""
msgid "Synchronisation Status"
@@ -732,9 +813,6 @@ msgstr ""
msgid "Notebooks"
msgstr ""
msgid "Tags"
msgstr ""
msgid "Searches"
msgstr ""
@@ -752,12 +830,18 @@ msgstr ""
msgid "File system"
msgstr ""
msgid "Nextcloud"
msgstr ""
msgid "OneDrive"
msgstr ""
msgid "OneDrive Dev (For testing only)"
msgstr ""
msgid "WebDAV"
msgstr ""
#, javascript-format
msgid "Unknown log level: %s"
msgstr ""
@@ -808,6 +892,10 @@ msgstr ""
msgid "Deleted remote items: %d."
msgstr ""
#, javascript-format
msgid "Fetched items: %d/%d."
msgstr ""
#, javascript-format
msgid "State: \"%s\"."
msgstr ""
@@ -819,10 +907,26 @@ msgstr ""
msgid "Completed: %s"
msgstr ""
#, javascript-format
msgid "Last error: %s"
msgstr ""
msgid "Idle"
msgstr ""
msgid "In progress"
msgstr ""
#, javascript-format
msgid "Synchronisation is already in progress. State: %s"
msgstr ""
msgid "Encrypted"
msgstr ""
msgid "Encrypted items cannot be modified"
msgstr ""
msgid "Conflicts"
msgstr ""
@@ -874,12 +978,47 @@ msgstr ""
msgid "Dark"
msgstr ""
msgid "Show uncompleted todos on top of the lists"
msgid "Uncompleted to-dos on top"
msgstr ""
msgid "Sort notes by"
msgstr ""
msgid "Reverse sort order"
msgstr ""
msgid "Save geo-location with notes"
msgstr ""
msgid "When creating a new to-do:"
msgstr ""
msgid "Focus title"
msgstr ""
msgid "Focus body"
msgstr ""
msgid "When creating a new note:"
msgstr ""
msgid "Show tray icon"
msgstr ""
msgid "Global zoom percentage"
msgstr ""
msgid "Editor font family"
msgstr ""
msgid ""
"The font name will not be checked. If incorrect or empty, it will default to "
"a generic monospace font."
msgstr ""
msgid "Automatically update the application"
msgstr ""
msgid "Synchronisation interval"
msgstr ""
@@ -895,9 +1034,6 @@ msgstr ""
msgid "%d hours"
msgstr ""
msgid "Automatically update the application"
msgstr ""
msgid "Show advanced options"
msgstr ""
@@ -905,8 +1041,8 @@ msgid "Synchronisation target"
msgstr ""
msgid ""
"The target to synchonise to. If synchronising with the file system, set "
"`sync.2.path` to specify the target directory."
"The target to synchonise to. Each sync target may have additional parameters "
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
msgid "Directory to synchronise with (absolute path)"
@@ -917,15 +1053,74 @@ msgid ""
"See `sync.target`."
msgstr ""
msgid "Nextcloud WebDAV URL"
msgstr ""
msgid "Nextcloud username"
msgstr ""
msgid "Nextcloud password"
msgstr ""
msgid "WebDAV URL"
msgstr ""
msgid "WebDAV username"
msgstr ""
msgid "WebDAV password"
msgstr ""
#, javascript-format
msgid "Invalid option value: \"%s\". Possible values are: %s."
msgstr ""
msgid "Joplin Export File"
msgstr ""
msgid "Markdown"
msgstr ""
msgid "Joplin Export Directory"
msgstr ""
msgid "Evernote Export File"
msgstr ""
msgid "Directory"
msgstr ""
#, javascript-format
msgid "Cannot load \"%s\" module for format \"%s\""
msgstr ""
#, javascript-format
msgid "Please specify import format for %s"
msgstr ""
#, javascript-format
msgid ""
"This item is currently encrypted: %s \"%s\". Please wait for all items to be "
"decrypted and try again."
msgstr ""
msgid "There is no data to export."
msgstr ""
msgid "Please specify the notebook where the notes should be imported to."
msgstr ""
msgid "Items that cannot be synchronised"
msgstr ""
#, javascript-format
msgid "\"%s\": \"%s\""
msgid "%s (%s): %s"
msgstr ""
msgid ""
"These items will remain on the device but will not be uploaded to the sync "
"target. In order to find these items, either search for the title or the ID "
"(which is displayed in brackets above)."
msgstr ""
msgid "Sync status (synced items / total items)"
@@ -973,6 +1168,9 @@ msgstr ""
msgid "Export Debug Report"
msgstr ""
msgid "Encryption Config"
msgstr ""
msgid "Configuration"
msgstr ""
@@ -983,6 +1181,9 @@ msgstr ""
msgid "Move %d notes to notebook \"%s\"?"
msgstr ""
msgid "Press to set the decryption password."
msgstr ""
msgid "Select date"
msgstr ""
@@ -992,6 +1193,26 @@ msgstr ""
msgid "Cancel synchronisation"
msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr ""
#, javascript-format
msgid "Created: %s"
msgstr ""
msgid "Password:"
msgstr ""
msgid "Password cannot be empty"
msgstr ""
msgid "Enable"
msgstr ""
#, javascript-format
msgid "The notebook could not be saved: %s"
msgstr ""
@@ -999,6 +1220,12 @@ msgstr ""
msgid "Edit notebook"
msgstr ""
msgid "Show all"
msgstr ""
msgid "Errors only"
msgstr ""
msgid "This note has been modified:"
msgstr ""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1479
CliClient/locales/eu.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -17,69 +17,12 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
msgid "Give focus to next pane"
msgstr "Fokusiraj sljedeće okno"
msgid "Give focus to previous pane"
msgstr "Fokusiraj prethodno okno"
msgid "Enter command line mode"
msgstr "Otvori naredbeni redak"
msgid "Exit command line mode"
msgstr "Napusti naredbeni redak"
msgid "Edit the selected note"
msgstr "Uredi odabranu bilješku"
msgid "Cancel the current command."
msgstr "Prekini trenutnu naredbu."
msgid "Exit the application."
msgstr "Izađi iz aplikacije."
msgid "Delete the currently selected note or notebook."
msgstr "Obriši odabranu bilješku ili bilježnicu."
msgid "To delete a tag, untag the associated notes."
msgstr "Da bi mogao obrisati oznaku, skini oznaku s povezanih bilješki."
msgid "Please select the note or notebook to be deleted first."
msgstr "Odaberi bilješku ili bilježnicu za brisanje."
msgid "Set a to-do as completed / not completed"
msgstr "Postavi zadatak kao završen/nezavršen"
#, fuzzy
msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
msgstr "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
msgid "Search"
msgstr "Traži"
#, fuzzy
msgid "[t]oggle note [m]etadata."
msgstr "[t]oggle note [m]etadata."
#, fuzzy
msgid "[M]ake a new [n]ote"
msgstr "[M]ake a new [n]ote"
#, fuzzy
msgid "[M]ake a new [t]odo"
msgstr "[M]ake a new [t]odo"
#, fuzzy
msgid "[M]ake a new note[b]ook"
msgstr "[M]ake a new note[b]ook"
#, fuzzy
msgid "Copy ([Y]ank) the [n]ote to a notebook."
msgstr "Copy ([Y]ank) the [n]ote to a notebook."
msgid "Move the note to a notebook."
msgstr "Premjesti bilješku u bilježnicu."
msgid "Press Ctrl+D or type \"exit\" to exit the application"
msgstr "Pritisni Ctrl+D ili napiši \"exit\" za izlazak iz aplikacije"
@@ -116,6 +59,9 @@ msgstr "Ne postoji naredba: %s"
msgid "The command \"%s\" is only available in GUI mode"
msgstr "Naredba \"%s\" postoji samo u inačici s grafičkim sučeljem"
msgid "Cannot change encrypted item"
msgstr ""
#, javascript-format
msgid "Missing required argument: %s"
msgstr "Nedostaje obavezni argument: %s"
@@ -180,6 +126,36 @@ msgstr "Označava zadatak završenim."
msgid "Note is not a to-do: \"%s\""
msgstr "Bilješka nije zadatak: \"%s\""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
msgstr ""
msgid "Enter master password:"
msgstr ""
msgid "Operation cancelled"
msgstr ""
msgid ""
"Starting decryption... Please wait as it may take several minutes depending "
"on how much there is to decrypt."
msgstr ""
msgid "Completed decryption."
msgstr ""
#, fuzzy
msgid "Enabled"
msgstr "Onemogućeno"
msgid "Disabled"
msgstr "Onemogućeno"
#, javascript-format
msgid "Encryption is: %s"
msgstr ""
msgid "Edit note."
msgstr "Uredi bilješku."
@@ -202,19 +178,28 @@ msgid "Starting to edit note. Close the editor to get back to the prompt."
msgstr ""
"Počinjem uređivati bilješku. Za povratak u naredbeni redak, zatvori uređivač."
#, javascript-format
msgid "Error opening note in editor: %s"
msgstr ""
msgid "Note has been saved."
msgstr "Bilješka je spremljena."
msgid "Exits the application."
msgstr "Izlaz iz aplikacije."
#, fuzzy
msgid ""
"Exports Joplin data to the given directory. By default, it will export the "
"Exports Joplin data to the given path. By default, it will export the "
"complete database including notebooks, notes, tags and resources."
msgstr ""
"Izvozi podatke u dati direktorij. Po defaultu izvozi sve podatke uključujući "
"bilježnice, bilješke, zadatke i resurse."
#, fuzzy, javascript-format
msgid "Destination format: %s"
msgstr "Format datuma"
msgid "Exports only the given note."
msgstr "Izvozi samo datu bilješku."
@@ -227,6 +212,10 @@ msgstr "Prikazuje geolokacijski URL bilješke."
msgid "Displays usage information."
msgstr "Prikazuje informacije o korištenju."
#, javascript-format
msgid "For information on how to customise the shortcuts please visit %s"
msgstr ""
msgid "Shortcuts are not available in CLI mode."
msgstr "Prečaci nisu podržani u naredbenom retku."
@@ -270,29 +259,21 @@ msgstr "Za ulaz u naredbeni redak, pritisni \":\""
msgid "To exit command line mode, press ESCAPE"
msgstr "Za izlaz iz naredbenog retka, pritisni Esc"
#, fuzzy
msgid ""
"For the complete list of available keyboard shortcuts, type `help shortcuts`"
"For the list of keyboard shortcuts and config options, type `help keymap`"
msgstr "Za potpunu listu mogućih prečaca, upiši `help shortcuts`"
msgid "Imports an Evernote notebook file (.enex file)."
msgstr "Uvozi Evernote bilježnicu (.enex datoteku)."
msgid "Imports data into Joplin."
msgstr ""
#, fuzzy, javascript-format
msgid "Source format: %s"
msgstr "Ne postoji naredba: %s"
msgid "Do not ask for confirmation."
msgstr "Ne pitaj za potvrdu."
#, javascript-format
msgid "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
msgstr ""
"Datoteka \"%s\" će biti uvezena u postojeću bilježnicu \"%s\". Nastavi?"
#, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into "
"it. Continue?"
msgstr ""
"Nova bilježnica \"%s\" će biti stvorena i datoteka \"%s\" će biti uvezena u "
"nju. Nastavi?"
#, javascript-format
msgid "Found: %d."
msgstr "Nađeno: %d."
@@ -433,6 +414,16 @@ msgstr "Sinkronizira sa udaljenom pohranom podataka."
msgid "Sync to provided target (defaults to sync.target config value)"
msgstr "Sinkroniziraj sa metom (default je polje sync.target u konfiguraciji)"
#, fuzzy
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr ""
"Ovjera nije dovršena (nije dobivena potvrda ovjere - authentication token)."
#, javascript-format
msgid "Not authentified with %s. Please provide any missing credentials."
msgstr ""
msgid "Synchronisation is already in progress."
msgstr "Sinkronizacija je već u toku."
@@ -444,12 +435,6 @@ msgid ""
msgstr ""
"Ako sinkronizacija nije u toku, obriši lock datoteku u \"%s\" i nastavi..."
#, fuzzy
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr ""
"Ovjera nije dovršena (nije dobivena potvrda ovjere - authentication token)."
#, javascript-format
msgid "Synchronisation target: %s (%s)"
msgstr "Meta sinkronizacije: %s (%s)"
@@ -525,6 +510,10 @@ msgstr "Default: %s"
msgid "Possible keys/values:"
msgstr "Mogući ključevi/vrijednosti:"
#, fuzzy
msgid "Type `joplin help` for usage information."
msgstr "Prikazuje informacije o korištenju."
msgid "Fatal error:"
msgstr "Fatalna greška:"
@@ -566,6 +555,25 @@ msgstr ""
"\n"
"For example, to create a notebook press `mb`; to create a note press `mn`."
msgid ""
"One or more items are currently encrypted and you may need to supply a "
"master password. To do so please type `e2ee decrypt`. If you have already "
"supplied the password, the encrypted items are being decrypted in the "
"background and will be available soon."
msgstr ""
#, javascript-format
msgid "Exporting to \"%s\" as \"%s\" format. Please wait..."
msgstr ""
#, javascript-format
msgid "Importing from \"%s\" as \"%s\" format. Please wait..."
msgstr ""
#, fuzzy
msgid "PDF File"
msgstr "Datoteka"
msgid "File"
msgstr "Datoteka"
@@ -578,11 +586,19 @@ msgstr "Novi zadatak"
msgid "New notebook"
msgstr "Nova bilježnica"
msgid "Import Evernote notes"
msgstr "Uvezi Evernote bilješke"
msgid "Import"
msgstr "Uvoz"
msgid "Evernote Export Files"
msgstr "Evernote izvozne datoteke"
#, fuzzy
msgid "Export"
msgstr "Uvoz"
msgid "Print"
msgstr ""
#, javascript-format
msgid "Hide %s"
msgstr ""
msgid "Quit"
msgstr "Izađi"
@@ -602,13 +618,23 @@ msgstr "Zalijepi"
msgid "Search in all the notes"
msgstr "Pretraži u svim bilješkama"
msgid "View"
msgstr ""
msgid "Toggle editor layout"
msgstr ""
msgid "Tools"
msgstr "Alati"
msgid "Synchronisation status"
msgstr "Status sinkronizacije"
msgid "Options"
msgid "Encryption options"
msgstr ""
#, fuzzy
msgid "General Options"
msgstr "Opcije"
msgid "Help"
@@ -617,6 +643,13 @@ msgstr "Pomoć"
msgid "Website and documentation"
msgstr "Website i dokumentacija"
#, fuzzy
msgid "Make a donation"
msgstr "Website i dokumentacija"
msgid "Check for updates..."
msgstr ""
msgid "About Joplin"
msgstr "O Joplinu"
@@ -624,12 +657,36 @@ msgstr "O Joplinu"
msgid "%s %s (%s, %s)"
msgstr "%s %s (%s, %s)"
#, fuzzy, javascript-format
msgid "Open %s"
msgstr "On %s: %s"
msgid "Exit"
msgstr ""
msgid "OK"
msgstr "U redu"
msgid "Cancel"
msgstr "Odustani"
msgid "Current version is up-to-date."
msgstr ""
msgid "An update is available, do you want to download it now?"
msgstr ""
msgid "Yes"
msgstr ""
#, fuzzy
msgid "No"
msgstr "N"
#, fuzzy
msgid "Check synchronisation configuration"
msgstr "Prekini sinkronizaciju"
#, javascript-format
msgid "Notes and settings are stored in: %s"
msgstr "Bilješke i postavke su pohranjene u: %s"
@@ -686,19 +743,21 @@ msgid ""
"how the notes or notebooks were originally encrypted."
msgstr ""
msgid "Missing Master Keys"
msgstr ""
msgid ""
"The master keys with these IDs are used to encrypt some of your items, "
"however the application does not currently have access to them. It is likely "
"they will eventually be downloaded via synchronisation."
msgstr ""
msgid "Status"
msgstr "Status"
msgid "Encryption is:"
msgstr ""
#, fuzzy
msgid "Enabled"
msgstr "Onemogućeno"
msgid "Disabled"
msgstr "Onemogućeno"
msgid "Back"
msgstr "Natrag"
@@ -712,15 +771,9 @@ msgstr ""
msgid "Please create a notebook first."
msgstr "Prvo stvori bilježnicu."
msgid "Note title:"
msgstr "Naslov bilješke:"
msgid "Please create a notebook first"
msgstr "Prvo stvori bilježnicu"
msgid "To-do title:"
msgstr "Naslov zadatka:"
msgid "Notebook title:"
msgstr "Naslov bilježnice:"
@@ -736,6 +789,9 @@ msgstr "Preimenuj bilježnicu:"
msgid "Set alarm:"
msgstr "Postavi upozorenje:"
msgid "Search"
msgstr "Traži"
msgid "Layout"
msgstr "Izgled"
@@ -771,6 +827,13 @@ msgid ""
"There is currently no notebook. Create one by clicking on \"New notebook\"."
msgstr "Ovdje nema bilježnica. Stvori novu pritiskom na \"Nova bilježnica\"."
msgid "Open..."
msgstr ""
#, fuzzy
msgid "Save as..."
msgstr "Spremi promjene"
#, javascript-format
msgid "Unsupported link or message: %s"
msgstr "Nepodržana poveznica ili poruka: %s"
@@ -778,9 +841,30 @@ msgstr "Nepodržana poveznica ili poruka: %s"
msgid "Attach file"
msgstr "Priloži datoteku"
msgid "Tags"
msgstr "Oznake"
msgid "Set alarm"
msgstr "Postavi upozorenje"
#, javascript-format
msgid ""
"This note has no content. Click on \"%s\" to toggle the editor and edit the "
"note."
msgstr ""
#, fuzzy
msgid "to-do"
msgstr "Novi zadatak"
#, fuzzy
msgid "note"
msgstr "Nova bilješka"
#, fuzzy, javascript-format
msgid "Creating new %s..."
msgstr "Uvozim bilješke..."
msgid "Refresh"
msgstr "Osvježi"
@@ -790,8 +874,8 @@ msgstr "Očisti"
msgid "OneDrive Login"
msgstr "OneDrive Login"
msgid "Import"
msgstr "Uvoz"
msgid "Options"
msgstr "Opcije"
msgid "Synchronisation Status"
msgstr "Status Sinkronizacije"
@@ -814,9 +898,6 @@ msgstr "Sinkroniziraj"
msgid "Notebooks"
msgstr "Bilježnice"
msgid "Tags"
msgstr "Oznake"
msgid "Searches"
msgstr "Pretraživanja"
@@ -834,12 +915,18 @@ msgstr "Nepoznata zastavica: %s"
msgid "File system"
msgstr "Datotečni sustav"
msgid "Nextcloud"
msgstr ""
msgid "OneDrive"
msgstr "OneDrive"
msgid "OneDrive Dev (For testing only)"
msgstr "OneDrive Dev (Samo za testiranje)"
msgid "WebDAV"
msgstr ""
#, javascript-format
msgid "Unknown log level: %s"
msgstr "Nepoznata razina logiranja: %s"
@@ -896,6 +983,10 @@ msgstr "Obrisane lokalne stavke: %d."
msgid "Deleted remote items: %d."
msgstr "Obrisane udaljene stavke: %d."
#, fuzzy, javascript-format
msgid "Fetched items: %d/%d."
msgstr "Stvorene lokalne stavke: %d."
#, javascript-format
msgid "State: \"%s\"."
msgstr "Stanje: \"%s\"."
@@ -907,10 +998,27 @@ msgstr "Prekidam..."
msgid "Completed: %s"
msgstr "Dovršeno: %s"
#, fuzzy, javascript-format
msgid "Last error: %s"
msgstr "Fatalna greška:"
msgid "Idle"
msgstr ""
msgid "In progress"
msgstr ""
#, javascript-format
msgid "Synchronisation is already in progress. State: %s"
msgstr "Sinkronizacija je već u toku. Stanje: %s"
msgid "Encrypted"
msgstr ""
#, fuzzy
msgid "Encrypted items cannot be modified"
msgstr "Neke stavke se ne mogu sinkronizirati."
msgid "Conflicts"
msgstr "Sukobi"
@@ -964,12 +1072,52 @@ msgstr "Svijetla"
msgid "Dark"
msgstr "Tamna"
msgid "Show uncompleted todos on top of the lists"
#, fuzzy
msgid "Uncompleted to-dos on top"
msgstr "Prikaži nezavršene zadatke na vrhu liste"
msgid "Sort notes by"
msgstr ""
#, fuzzy
msgid "Reverse sort order"
msgstr "Mijenja redoslijed."
msgid "Save geo-location with notes"
msgstr "Spremi geolokacijske podatke sa bilješkama"
#, fuzzy
msgid "When creating a new to-do:"
msgstr "Stvara novi zadatak."
#, fuzzy
msgid "Focus title"
msgstr "Naslov bilješke:"
msgid "Focus body"
msgstr ""
#, fuzzy
msgid "When creating a new note:"
msgstr "Stvara novu bilješku."
msgid "Show tray icon"
msgstr ""
msgid "Global zoom percentage"
msgstr ""
msgid "Editor font family"
msgstr ""
msgid ""
"The font name will not be checked. If incorrect or empty, it will default to "
"a generic monospace font."
msgstr ""
msgid "Automatically update the application"
msgstr "Automatsko instaliranje nove verzije"
msgid "Synchronisation interval"
msgstr "Interval sinkronizacije"
@@ -985,9 +1133,6 @@ msgstr "%d sat"
msgid "%d hours"
msgstr "%d sati"
msgid "Automatically update the application"
msgstr "Automatsko instaliranje nove verzije"
msgid "Show advanced options"
msgstr "Prikaži napredne opcije"
@@ -995,11 +1140,9 @@ msgid "Synchronisation target"
msgstr "Sinkroniziraj sa"
msgid ""
"The target to synchonise to. If synchronising with the file system, set "
"`sync.2.path` to specify the target directory."
"The target to synchonise to. Each sync target may have additional parameters "
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
"Meta sinkronizacije. U slučaju sinkroniziranja s vlastitim datotečnim "
"sustavom, postavi `sync.2.path` na ciljani direktorij."
msgid "Directory to synchronise with (absolute path)"
msgstr "Direktorij za sinkroniziranje (apsolutna putanja)"
@@ -1011,16 +1154,78 @@ msgstr ""
"Putanja do direktorija za sinkronizaciju u slučaju kad je sinkronizacija sa "
"datotečnim sustavom omogućena. Vidi `sync.target`."
msgid "Nextcloud WebDAV URL"
msgstr ""
msgid "Nextcloud username"
msgstr ""
msgid "Nextcloud password"
msgstr ""
msgid "WebDAV URL"
msgstr ""
msgid "WebDAV username"
msgstr ""
msgid "WebDAV password"
msgstr ""
#, javascript-format
msgid "Invalid option value: \"%s\". Possible values are: %s."
msgstr "Nevažeća vrijednost: \"%s\". Moguće vrijednosti su: %s."
#, fuzzy
msgid "Joplin Export File"
msgstr "Evernote izvozne datoteke"
msgid "Markdown"
msgstr ""
msgid "Joplin Export Directory"
msgstr ""
#, fuzzy
msgid "Evernote Export File"
msgstr "Evernote izvozne datoteke"
msgid "Directory"
msgstr ""
#, javascript-format
msgid "Cannot load \"%s\" module for format \"%s\""
msgstr ""
#, javascript-format
msgid "Please specify import format for %s"
msgstr ""
#, javascript-format
msgid ""
"This item is currently encrypted: %s \"%s\". Please wait for all items to be "
"decrypted and try again."
msgstr ""
msgid "There is no data to export."
msgstr ""
#, fuzzy
msgid "Please specify the notebook where the notes should be imported to."
msgstr "Odaberi lokaciju za izvoz statusa sinkronizacije"
msgid "Items that cannot be synchronised"
msgstr "Stavke koje se ne mogu sinkronizirati"
#, javascript-format
msgid "\"%s\": \"%s\""
msgstr "\"%s\": \"%s\""
#, fuzzy, javascript-format
msgid "%s (%s): %s"
msgstr "%s %s (%s)"
msgid ""
"These items will remain on the device but will not be uploaded to the sync "
"target. In order to find these items, either search for the title or the ID "
"(which is displayed in brackets above)."
msgstr ""
msgid "Sync status (synced items / total items)"
msgstr "Status (sinkronizirane stavke / ukupni broj stavki)"
@@ -1067,6 +1272,9 @@ msgstr "Log"
msgid "Export Debug Report"
msgstr "Izvezi Debug izvještaj"
msgid "Encryption Config"
msgstr ""
msgid "Configuration"
msgstr "Konfiguracija"
@@ -1077,6 +1285,9 @@ msgstr "Premjesti u bilježnicu..."
msgid "Move %d notes to notebook \"%s\"?"
msgstr "Premjesti %d bilješke u bilježnicu \"%s\"?"
msgid "Press to set the decryption password."
msgstr ""
msgid "Select date"
msgstr "Odaberi datum"
@@ -1086,6 +1297,27 @@ msgstr "Potvrdi"
msgid "Cancel synchronisation"
msgstr "Prekini sinkronizaciju"
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr ""
#, fuzzy, javascript-format
msgid "Created: %s"
msgstr "Stvoreno: %d."
msgid "Password:"
msgstr ""
msgid "Password cannot be empty"
msgstr ""
#, fuzzy
msgid "Enable"
msgstr "Onemogućeno"
#, javascript-format
msgid "The notebook could not be saved: %s"
msgstr "Bilježnicu nije moguće snimiti: %s"
@@ -1093,6 +1325,12 @@ msgstr "Bilježnicu nije moguće snimiti: %s"
msgid "Edit notebook"
msgstr "Uredi bilježnicu"
msgid "Show all"
msgstr ""
msgid "Errors only"
msgstr ""
msgid "This note has been modified:"
msgstr "Bilješka je promijenjena:"
@@ -1145,3 +1383,95 @@ msgstr "Trenutno nemaš nijednu bilježnicu. Stvori novu klikom na (+) gumb."
msgid "Welcome"
msgstr "Dobro došli"
#, fuzzy
#~ msgid ""
#~ "Release notes:\n"
#~ "\n"
#~ "%s"
#~ msgstr "Obriši bilješke?"
#~ msgid "Imports an Evernote notebook file (.enex file)."
#~ msgstr "Uvozi Evernote bilježnicu (.enex datoteku)."
#~ msgid ""
#~ "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
#~ msgstr ""
#~ "Datoteka \"%s\" će biti uvezena u postojeću bilježnicu \"%s\". Nastavi?"
#~ msgid ""
#~ "New notebook \"%s\" will be created and file \"%s\" will be imported into "
#~ "it. Continue?"
#~ msgstr ""
#~ "Nova bilježnica \"%s\" će biti stvorena i datoteka \"%s\" će biti uvezena "
#~ "u nju. Nastavi?"
#~ msgid "Import Evernote notes"
#~ msgstr "Uvezi Evernote bilješke"
#~ msgid "Give focus to next pane"
#~ msgstr "Fokusiraj sljedeće okno"
#~ msgid "Give focus to previous pane"
#~ msgstr "Fokusiraj prethodno okno"
#~ msgid "Enter command line mode"
#~ msgstr "Otvori naredbeni redak"
#~ msgid "Exit command line mode"
#~ msgstr "Napusti naredbeni redak"
#~ msgid "Edit the selected note"
#~ msgstr "Uredi odabranu bilješku"
#~ msgid "Cancel the current command."
#~ msgstr "Prekini trenutnu naredbu."
#~ msgid "Exit the application."
#~ msgstr "Izađi iz aplikacije."
#~ msgid "Delete the currently selected note or notebook."
#~ msgstr "Obriši odabranu bilješku ili bilježnicu."
#~ msgid "Set a to-do as completed / not completed"
#~ msgstr "Postavi zadatak kao završen/nezavršen"
#, fuzzy
#~ msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
#~ msgstr "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
#, fuzzy
#~ msgid "[t]oggle note [m]etadata."
#~ msgstr "[t]oggle note [m]etadata."
#, fuzzy
#~ msgid "[M]ake a new [n]ote"
#~ msgstr "[M]ake a new [n]ote"
#, fuzzy
#~ msgid "[M]ake a new [t]odo"
#~ msgstr "[M]ake a new [t]odo"
#, fuzzy
#~ msgid "[M]ake a new note[b]ook"
#~ msgstr "[M]ake a new note[b]ook"
#, fuzzy
#~ msgid "Copy ([Y]ank) the [n]ote to a notebook."
#~ msgstr "Copy ([Y]ank) the [n]ote to a notebook."
#~ msgid "Move the note to a notebook."
#~ msgstr "Premjesti bilješku u bilježnicu."
#~ msgid ""
#~ "The target to synchonise to. If synchronising with the file system, set "
#~ "`sync.2.path` to specify the target directory."
#~ msgstr ""
#~ "Meta sinkronizacije. U slučaju sinkroniziranja s vlastitim datotečnim "
#~ "sustavom, postavi `sync.2.path` na ciljani direktorij."
#~ msgid "To-do title:"
#~ msgstr "Naslov zadatka:"
#~ msgid "\"%s\": \"%s\""
#~ msgstr "\"%s\": \"%s\""

View File

@@ -16,65 +16,12 @@ msgstr ""
"X-Generator: Poedit 2.0.3\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Give focus to next pane"
msgstr "Pannello successivo"
msgid "Give focus to previous pane"
msgstr "Pannello precedente"
msgid "Enter command line mode"
msgstr "Accedi alla modalità linea di comando"
msgid "Exit command line mode"
msgstr "Esci dalla modalità linea di comando"
msgid "Edit the selected note"
msgstr "Modifica la nota selezionata"
msgid "Cancel the current command."
msgstr "Cancella il comando corrente."
msgid "Exit the application."
msgstr "Esci dall'applicazione."
msgid "Delete the currently selected note or notebook."
msgstr "Elimina la nota o il blocco note selezionato."
msgid "To delete a tag, untag the associated notes."
msgstr "Elimina un'etichetta, togli l'etichetta associata alle note."
msgid "Please select the note or notebook to be deleted first."
msgstr "Per favore seleziona la nota o il blocco note da eliminare."
msgid "Set a to-do as completed / not completed"
msgstr "Imposta un'attività come completata / non completata"
msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
msgstr ""
"Scegli lo s[t]ato della [c]onsole: massimizzato/minimizzato/nascosto/"
"visibile."
msgid "Search"
msgstr "Cerca"
msgid "[t]oggle note [m]etadata."
msgstr "mos[t]ra/nascondi i [m]etadata nelle note."
msgid "[M]ake a new [n]ote"
msgstr "Crea ([M]ake) una nuova [n]ota"
msgid "[M]ake a new [t]odo"
msgstr "Crea ([M]ake) una nuova at[t]ività"
msgid "[M]ake a new note[b]ook"
msgstr "Crea ([M]ake) un nuovo [b]locco note"
msgid "Copy ([Y]ank) the [n]ote to a notebook."
msgstr "Copia ([Y]) la [n]ota in un blocco note."
msgid "Move the note to a notebook."
msgstr "Sposta la nota in un blocco note."
msgid "Press Ctrl+D or type \"exit\" to exit the application"
msgstr "Premi Ctrl+D o digita \"exit\" per uscire dall'applicazione"
@@ -112,6 +59,9 @@ msgstr "Nessun comando: %s"
msgid "The command \"%s\" is only available in GUI mode"
msgstr "Il comando \"%s\" è disponibile solo nella modalità grafica"
msgid "Cannot change encrypted item"
msgstr ""
#, javascript-format
msgid "Missing required argument: %s"
msgstr "Argomento richiesto mancante: %s"
@@ -174,6 +124,36 @@ msgstr "Segna un'attività come completata."
msgid "Note is not a to-do: \"%s\""
msgstr "La nota non è un'attività: \"%s\""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
msgstr ""
msgid "Enter master password:"
msgstr ""
msgid "Operation cancelled"
msgstr ""
msgid ""
"Starting decryption... Please wait as it may take several minutes depending "
"on how much there is to decrypt."
msgstr ""
msgid "Completed decryption."
msgstr ""
#, fuzzy
msgid "Enabled"
msgstr "Disabilitato"
msgid "Disabled"
msgstr "Disabilitato"
#, javascript-format
msgid "Encryption is: %s"
msgstr ""
msgid "Edit note."
msgstr "Modifica nota."
@@ -193,20 +173,29 @@ msgstr "Non esiste la nota: \"%s\". Desideri crearla?"
msgid "Starting to edit note. Close the editor to get back to the prompt."
msgstr "Comincia a modificare la nota. Chiudi l'editor per tornare al prompt."
#, javascript-format
msgid "Error opening note in editor: %s"
msgstr ""
msgid "Note has been saved."
msgstr "La nota è stata salvata."
msgid "Exits the application."
msgstr "Esci dall'applicazione."
#, fuzzy
msgid ""
"Exports Joplin data to the given directory. By default, it will export the "
"Exports Joplin data to the given path. By default, it will export the "
"complete database including notebooks, notes, tags and resources."
msgstr ""
"Esporta i dati da Joplin nella directory selezionata. Come impostazione "
"predefinita verrà esportato il database completo, inclusi blocchi note, "
"note, etichette e risorse."
#, fuzzy, javascript-format
msgid "Destination format: %s"
msgstr "Formato della data"
msgid "Exports only the given note."
msgstr "Esporta solo la seguente nota."
@@ -219,6 +208,10 @@ msgstr "Mostra l'URL di geolocalizzazione per la nota."
msgid "Displays usage information."
msgstr "Mostra le informazioni di utilizzo."
#, javascript-format
msgid "For information on how to customise the shortcuts please visit %s"
msgstr ""
msgid "Shortcuts are not available in CLI mode."
msgstr "Le scorciatoie non sono disponibili nella modalità CLI."
@@ -261,30 +254,22 @@ msgstr "Per entrare nella modalità command line, premi \":\""
msgid "To exit command line mode, press ESCAPE"
msgstr "Per uscire dalla modalità command line, premi ESC"
#, fuzzy
msgid ""
"For the complete list of available keyboard shortcuts, type `help shortcuts`"
"For the list of keyboard shortcuts and config options, type `help keymap`"
msgstr ""
"Per la lista completa delle scorciatoie disponibili, digita `help shortcuts`"
msgid "Imports an Evernote notebook file (.enex file)."
msgstr "Importa un file blocco note di Evernote (.enex file)."
msgid "Imports data into Joplin."
msgstr ""
#, fuzzy, javascript-format
msgid "Source format: %s"
msgstr "Nessun comando: %s"
msgid "Do not ask for confirmation."
msgstr "Non chiedere conferma."
#, javascript-format
msgid "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
msgstr ""
"Il file \"%s\" sarà importato nel blocco note esistente \"%s\". Continuare?"
#, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into "
"it. Continue?"
msgstr ""
"Un nuovo blocco note \"%s\" sarà creato e al suo interno verrà importato il "
"file \"%s\" . Continuare?"
#, javascript-format
msgid "Found: %d."
msgstr "Trovato: %d."
@@ -416,6 +401,16 @@ msgstr ""
"Sincronizza con l'obiettivo fornito (come predefinito il valore di "
"configurazione sync.target)"
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr ""
"Autenticazione non completata (non è stato ricevuto alcun token di "
"autenticazione)."
#, javascript-format
msgid "Not authentified with %s. Please provide any missing credentials."
msgstr ""
msgid "Synchronisation is already in progress."
msgstr "La sincronizzazione è in corso."
@@ -429,12 +424,6 @@ msgstr ""
"sincronizzazione, è possibile eliminare il file di blocco in \"% s\" e "
"riprendere l'operazione."
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr ""
"Autenticazione non completata (non è stato ricevuto alcun token di "
"autenticazione)."
#, javascript-format
msgid "Synchronisation target: %s (%s)"
msgstr "Posizione di sincronizzazione: %s (%s)"
@@ -507,6 +496,10 @@ msgstr "Predefinito: %s"
msgid "Possible keys/values:"
msgstr "Chiave/valore possibili:"
#, fuzzy
msgid "Type `joplin help` for usage information."
msgstr "Mostra le informazioni di utilizzo."
msgid "Fatal error:"
msgstr "Errore fatale:"
@@ -544,6 +537,25 @@ msgid ""
"For example, to create a notebook press `mb`; to create a note press `mn`."
msgstr ""
msgid ""
"One or more items are currently encrypted and you may need to supply a "
"master password. To do so please type `e2ee decrypt`. If you have already "
"supplied the password, the encrypted items are being decrypted in the "
"background and will be available soon."
msgstr ""
#, javascript-format
msgid "Exporting to \"%s\" as \"%s\" format. Please wait..."
msgstr ""
#, javascript-format
msgid "Importing from \"%s\" as \"%s\" format. Please wait..."
msgstr ""
#, fuzzy
msgid "PDF File"
msgstr "File"
msgid "File"
msgstr "File"
@@ -556,11 +568,19 @@ msgstr "Nuova attività"
msgid "New notebook"
msgstr "Nuovo blocco note"
msgid "Import Evernote notes"
msgstr "Importa le note da Evernote"
msgid "Import"
msgstr "Importa"
msgid "Evernote Export Files"
msgstr "Esposta i files di Evernote"
#, fuzzy
msgid "Export"
msgstr "Importa"
msgid "Print"
msgstr ""
#, javascript-format
msgid "Hide %s"
msgstr ""
msgid "Quit"
msgstr "Esci"
@@ -580,13 +600,23 @@ msgstr "Incolla"
msgid "Search in all the notes"
msgstr "Cerca in tutte le note"
msgid "View"
msgstr ""
msgid "Toggle editor layout"
msgstr ""
msgid "Tools"
msgstr "Strumenti"
msgid "Synchronisation status"
msgstr "Stato di sincronizzazione"
msgid "Options"
msgid "Encryption options"
msgstr ""
#, fuzzy
msgid "General Options"
msgstr "Opzioni"
msgid "Help"
@@ -595,6 +625,13 @@ msgstr "Aiuto"
msgid "Website and documentation"
msgstr "Sito web e documentazione"
#, fuzzy
msgid "Make a donation"
msgstr "Sito web e documentazione"
msgid "Check for updates..."
msgstr ""
msgid "About Joplin"
msgstr "Informazione si Joplin"
@@ -602,12 +639,36 @@ msgstr "Informazione si Joplin"
msgid "%s %s (%s, %s)"
msgstr "%s %s (%s, %s)"
#, fuzzy, javascript-format
msgid "Open %s"
msgstr "Su %s: %s"
msgid "Exit"
msgstr ""
msgid "OK"
msgstr "OK"
msgid "Cancel"
msgstr "Cancella"
msgid "Current version is up-to-date."
msgstr ""
msgid "An update is available, do you want to download it now?"
msgstr ""
msgid "Yes"
msgstr ""
#, fuzzy
msgid "No"
msgstr "N"
#, fuzzy
msgid "Check synchronisation configuration"
msgstr "Cancella la sincronizzazione"
#, javascript-format
msgid "Notes and settings are stored in: %s"
msgstr ""
@@ -666,19 +727,21 @@ msgid ""
"how the notes or notebooks were originally encrypted."
msgstr ""
msgid "Missing Master Keys"
msgstr ""
msgid ""
"The master keys with these IDs are used to encrypt some of your items, "
"however the application does not currently have access to them. It is likely "
"they will eventually be downloaded via synchronisation."
msgstr ""
msgid "Status"
msgstr "Stato"
msgid "Encryption is:"
msgstr ""
#, fuzzy
msgid "Enabled"
msgstr "Disabilitato"
msgid "Disabled"
msgstr "Disabilitato"
msgid "Back"
msgstr "Indietro"
@@ -690,15 +753,9 @@ msgstr "Il nuovo blocco note \"%s\" verrà creato e \"%s\" vi verrà importato"
msgid "Please create a notebook first."
msgstr "Per favore prima crea un blocco note."
msgid "Note title:"
msgstr "Titolo della Nota:"
msgid "Please create a notebook first"
msgstr "Per favore prima crea un blocco note"
msgid "To-do title:"
msgstr "Titolo dell'attività:"
msgid "Notebook title:"
msgstr "Titolo del blocco note:"
@@ -714,6 +771,9 @@ msgstr "Rinomina il blocco note:"
msgid "Set alarm:"
msgstr "Imposta allarme:"
msgid "Search"
msgstr "Cerca"
msgid "Layout"
msgstr "Disposizione"
@@ -750,6 +810,13 @@ msgid ""
"There is currently no notebook. Create one by clicking on \"New notebook\"."
msgstr "Al momento non ci sono note. Creane una cliccando sul bottone (+)."
msgid "Open..."
msgstr ""
#, fuzzy
msgid "Save as..."
msgstr "Salva i cambiamenti"
#, javascript-format
msgid "Unsupported link or message: %s"
msgstr "Collegamento o messaggio non supportato: %s"
@@ -757,9 +824,30 @@ msgstr "Collegamento o messaggio non supportato: %s"
msgid "Attach file"
msgstr "Allega file"
msgid "Tags"
msgstr "Etichette"
msgid "Set alarm"
msgstr "Imposta allarme"
#, javascript-format
msgid ""
"This note has no content. Click on \"%s\" to toggle the editor and edit the "
"note."
msgstr ""
#, fuzzy
msgid "to-do"
msgstr "Nuova attività"
#, fuzzy
msgid "note"
msgstr "Nuova nota"
#, fuzzy, javascript-format
msgid "Creating new %s..."
msgstr "Importazione delle note..."
msgid "Refresh"
msgstr "Aggiorna"
@@ -769,8 +857,8 @@ msgstr "Pulisci"
msgid "OneDrive Login"
msgstr "Login OneDrive"
msgid "Import"
msgstr "Importa"
msgid "Options"
msgstr "Opzioni"
msgid "Synchronisation Status"
msgstr "Stato della Sincronizzazione"
@@ -793,9 +881,6 @@ msgstr "Sincronizza"
msgid "Notebooks"
msgstr "Blocchi note"
msgid "Tags"
msgstr "Etichette"
msgid "Searches"
msgstr "Ricerche"
@@ -814,12 +899,18 @@ msgstr "Etichetta sconosciuta: %s"
msgid "File system"
msgstr "File system"
msgid "Nextcloud"
msgstr ""
msgid "OneDrive"
msgstr "OneDrive"
msgid "OneDrive Dev (For testing only)"
msgstr "OneDrive Dev (solo per test)"
msgid "WebDAV"
msgstr ""
#, javascript-format
msgid "Unknown log level: %s"
msgstr "Livello di log sconosciuto: %s"
@@ -878,6 +969,10 @@ msgstr "Elementi locali eliminati: %d."
msgid "Deleted remote items: %d."
msgstr "Elementi remoti eliminati: %d."
#, fuzzy, javascript-format
msgid "Fetched items: %d/%d."
msgstr "Elementi locali creati: %d."
#, javascript-format
msgid "State: \"%s\"."
msgstr "Stato: \"%s\"."
@@ -889,10 +984,27 @@ msgstr "Cancellazione..."
msgid "Completed: %s"
msgstr "Completata: %s"
#, fuzzy, javascript-format
msgid "Last error: %s"
msgstr "Errore fatale:"
msgid "Idle"
msgstr ""
msgid "In progress"
msgstr ""
#, javascript-format
msgid "Synchronisation is already in progress. State: %s"
msgstr "La sincronizzazione è già in corso. Stato: %s"
msgid "Encrypted"
msgstr ""
#, fuzzy
msgid "Encrypted items cannot be modified"
msgstr "Alcuni elementi non possono essere sincronizzati."
msgid "Conflicts"
msgstr "Conflitti"
@@ -946,12 +1058,52 @@ msgstr "Chiaro"
msgid "Dark"
msgstr "Scuro"
msgid "Show uncompleted todos on top of the lists"
#, fuzzy
msgid "Uncompleted to-dos on top"
msgstr "Mostra todo inclompleti in cima alla lista"
msgid "Sort notes by"
msgstr ""
#, fuzzy
msgid "Reverse sort order"
msgstr "Inverti l'ordine."
msgid "Save geo-location with notes"
msgstr "Salva geo-localizzazione con le note"
#, fuzzy
msgid "When creating a new to-do:"
msgstr "Crea una nuova attività."
#, fuzzy
msgid "Focus title"
msgstr "Titolo della Nota:"
msgid "Focus body"
msgstr ""
#, fuzzy
msgid "When creating a new note:"
msgstr "Crea una nuova nota."
msgid "Show tray icon"
msgstr ""
msgid "Global zoom percentage"
msgstr ""
msgid "Editor font family"
msgstr ""
msgid ""
"The font name will not be checked. If incorrect or empty, it will default to "
"a generic monospace font."
msgstr ""
msgid "Automatically update the application"
msgstr "Aggiorna automaticamente l'applicazione"
msgid "Synchronisation interval"
msgstr "Intervallo di sincronizzazione"
@@ -967,9 +1119,6 @@ msgstr "%d ora"
msgid "%d hours"
msgstr "%d ore"
msgid "Automatically update the application"
msgstr "Aggiorna automaticamente l'applicazione"
msgid "Show advanced options"
msgstr "Mostra opzioni avanzate"
@@ -977,12 +1126,9 @@ msgid "Synchronisation target"
msgstr "Destinazione di sincronizzazione"
msgid ""
"The target to synchonise to. If synchronising with the file system, set "
"`sync.2.path` to specify the target directory."
"The target to synchonise to. Each sync target may have additional parameters "
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
"La destinazione della sincronizzazione. Se si sincronizza con il file "
"system, impostare ' Sync. 2. Path ' per specificare la directory di "
"destinazione."
msgid "Directory to synchronise with (absolute path)"
msgstr ""
@@ -994,16 +1140,78 @@ msgstr ""
"Il percorso di sincronizzazione quando la sincronizzazione è abilitata. Vedi "
"`sync.target`."
msgid "Nextcloud WebDAV URL"
msgstr ""
msgid "Nextcloud username"
msgstr ""
msgid "Nextcloud password"
msgstr ""
msgid "WebDAV URL"
msgstr ""
msgid "WebDAV username"
msgstr ""
msgid "WebDAV password"
msgstr ""
#, javascript-format
msgid "Invalid option value: \"%s\". Possible values are: %s."
msgstr "Oprione non valida: \"%s\". I valori possibili sono: %s."
#, fuzzy
msgid "Joplin Export File"
msgstr "Esposta i files di Evernote"
msgid "Markdown"
msgstr ""
msgid "Joplin Export Directory"
msgstr ""
#, fuzzy
msgid "Evernote Export File"
msgstr "Esposta i files di Evernote"
msgid "Directory"
msgstr ""
#, javascript-format
msgid "Cannot load \"%s\" module for format \"%s\""
msgstr ""
#, javascript-format
msgid "Please specify import format for %s"
msgstr ""
#, javascript-format
msgid ""
"This item is currently encrypted: %s \"%s\". Please wait for all items to be "
"decrypted and try again."
msgstr ""
msgid "There is no data to export."
msgstr ""
#, fuzzy
msgid "Please specify the notebook where the notes should be imported to."
msgstr "Per favore seleziona la nota o il blocco note da eliminare."
msgid "Items that cannot be synchronised"
msgstr "Elementi che non possono essere sincronizzati"
#, javascript-format
msgid "\"%s\": \"%s\""
msgstr "\"%s\": \"%s\""
#, fuzzy, javascript-format
msgid "%s (%s): %s"
msgstr "%s %s (%s)"
msgid ""
"These items will remain on the device but will not be uploaded to the sync "
"target. In order to find these items, either search for the title or the ID "
"(which is displayed in brackets above)."
msgstr ""
msgid "Sync status (synced items / total items)"
msgstr "Stato di sincronizzazione (Elementi sincronizzati / Elementi totali)"
@@ -1050,6 +1258,9 @@ msgstr "Log"
msgid "Export Debug Report"
msgstr "Esporta il Report di Debug"
msgid "Encryption Config"
msgstr ""
msgid "Configuration"
msgstr "Configurazione"
@@ -1060,6 +1271,9 @@ msgstr "Sposta sul blocco note..."
msgid "Move %d notes to notebook \"%s\"?"
msgstr "Spostare le note %d sul blocco note \"%s\"?"
msgid "Press to set the decryption password."
msgstr ""
msgid "Select date"
msgstr "Seleziona la data"
@@ -1069,6 +1283,27 @@ msgstr "Conferma"
msgid "Cancel synchronisation"
msgstr "Cancella la sincronizzazione"
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr ""
#, fuzzy, javascript-format
msgid "Created: %s"
msgstr "Creato: %d."
msgid "Password:"
msgstr ""
msgid "Password cannot be empty"
msgstr ""
#, fuzzy
msgid "Enable"
msgstr "Disabilitato"
#, javascript-format
msgid "The notebook could not be saved: %s"
msgstr "Il blocco note non può essere salvato: %s"
@@ -1076,6 +1311,12 @@ msgstr "Il blocco note non può essere salvato: %s"
msgid "Edit notebook"
msgstr "Modifica blocco note"
msgid "Show all"
msgstr ""
msgid "Errors only"
msgstr ""
msgid "This note has been modified:"
msgstr "Questa note è stata modificata:"
@@ -1131,6 +1372,96 @@ msgstr ""
msgid "Welcome"
msgstr "Benvenuto"
#, fuzzy
#~ msgid ""
#~ "Release notes:\n"
#~ "\n"
#~ "%s"
#~ msgstr "Eliminare le note?"
#~ msgid "Imports an Evernote notebook file (.enex file)."
#~ msgstr "Importa un file blocco note di Evernote (.enex file)."
#~ msgid ""
#~ "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
#~ msgstr ""
#~ "Il file \"%s\" sarà importato nel blocco note esistente \"%s\". "
#~ "Continuare?"
#~ msgid ""
#~ "New notebook \"%s\" will be created and file \"%s\" will be imported into "
#~ "it. Continue?"
#~ msgstr ""
#~ "Un nuovo blocco note \"%s\" sarà creato e al suo interno verrà importato "
#~ "il file \"%s\" . Continuare?"
#~ msgid "Import Evernote notes"
#~ msgstr "Importa le note da Evernote"
#~ msgid "Give focus to next pane"
#~ msgstr "Pannello successivo"
#~ msgid "Give focus to previous pane"
#~ msgstr "Pannello precedente"
#~ msgid "Enter command line mode"
#~ msgstr "Accedi alla modalità linea di comando"
#~ msgid "Exit command line mode"
#~ msgstr "Esci dalla modalità linea di comando"
#~ msgid "Edit the selected note"
#~ msgstr "Modifica la nota selezionata"
#~ msgid "Cancel the current command."
#~ msgstr "Cancella il comando corrente."
#~ msgid "Exit the application."
#~ msgstr "Esci dall'applicazione."
#~ msgid "Delete the currently selected note or notebook."
#~ msgstr "Elimina la nota o il blocco note selezionato."
#~ msgid "Set a to-do as completed / not completed"
#~ msgstr "Imposta un'attività come completata / non completata"
#~ msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
#~ msgstr ""
#~ "Scegli lo s[t]ato della [c]onsole: massimizzato/minimizzato/nascosto/"
#~ "visibile."
#~ msgid "[t]oggle note [m]etadata."
#~ msgstr "mos[t]ra/nascondi i [m]etadata nelle note."
#~ msgid "[M]ake a new [n]ote"
#~ msgstr "Crea ([M]ake) una nuova [n]ota"
#~ msgid "[M]ake a new [t]odo"
#~ msgstr "Crea ([M]ake) una nuova at[t]ività"
#~ msgid "[M]ake a new note[b]ook"
#~ msgstr "Crea ([M]ake) un nuovo [b]locco note"
#~ msgid "Copy ([Y]ank) the [n]ote to a notebook."
#~ msgstr "Copia ([Y]) la [n]ota in un blocco note."
#~ msgid "Move the note to a notebook."
#~ msgstr "Sposta la nota in un blocco note."
#~ msgid ""
#~ "The target to synchonise to. If synchronising with the file system, set "
#~ "`sync.2.path` to specify the target directory."
#~ msgstr ""
#~ "La destinazione della sincronizzazione. Se si sincronizza con il file "
#~ "system, impostare ' Sync. 2. Path ' per specificare la directory di "
#~ "destinazione."
#~ msgid "To-do title:"
#~ msgstr "Titolo dell'attività:"
#~ msgid "\"%s\": \"%s\""
#~ msgstr "\"%s\": \"%s\""
#~ msgid "Delete notebook?"
#~ msgstr "Eliminare il blocco note?"

View File

@@ -16,63 +16,12 @@ msgstr ""
"X-Generator: Poedit 2.0.5\n"
"Plural-Forms: nplurals=1; plural=0;\n"
msgid "Give focus to next pane"
msgstr "次のペインへ"
msgid "Give focus to previous pane"
msgstr "前のペインへ"
msgid "Enter command line mode"
msgstr "コマンドラインモードに入る"
msgid "Exit command line mode"
msgstr "コマンドラインモードの終了"
msgid "Edit the selected note"
msgstr "選択したノートを編集"
msgid "Cancel the current command."
msgstr "現在のコマンドをキャンセル"
msgid "Exit the application."
msgstr "アプリケーションを終了する"
msgid "Delete the currently selected note or notebook."
msgstr "選択中のノートまたはノートブックを削除"
msgid "To delete a tag, untag the associated notes."
msgstr "タグを削除するには、関連するノートからタグを外してください。"
msgid "Please select the note or notebook to be deleted first."
msgstr "ます削除するノートかノートブックを選択してください。"
msgid "Set a to-do as completed / not completed"
msgstr "ToDoを完了/未完に設定"
msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
msgstr "コンソールを最大表示/最小表示/非表示/可視で切り替える([t][c])"
msgid "Search"
msgstr "検索"
msgid "[t]oggle note [m]etadata."
msgstr "ノートのメタ情報を切り替える [tm]"
msgid "[M]ake a new [n]ote"
msgstr "新しいノートの作成 [mn]"
msgid "[M]ake a new [t]odo"
msgstr "新しいToDoの作成 [mt]"
msgid "[M]ake a new note[b]ook"
msgstr "新しいノートブックの作成 [mb]"
msgid "Copy ([Y]ank) the [n]ote to a notebook."
msgstr "ノートをノートブックにコピー [yn]"
msgid "Move the note to a notebook."
msgstr "ノートをノートブックに移動"
msgid "Press Ctrl+D or type \"exit\" to exit the application"
msgstr "アプリケーションを終了するには、Ctrl+Dまたは\"exit\"と入力してください"
@@ -110,6 +59,9 @@ msgstr "コマンドが違います:%s"
msgid "The command \"%s\" is only available in GUI mode"
msgstr "コマンド \"%s\"は、GUIのみで有効です。"
msgid "Cannot change encrypted item"
msgstr ""
#, javascript-format
msgid "Missing required argument: %s"
msgstr "引数が足りません:%s"
@@ -171,6 +123,36 @@ msgstr "ToDoを完了として"
msgid "Note is not a to-do: \"%s\""
msgstr "ノートはToDoリストではありません:\"%s\""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
msgstr ""
msgid "Enter master password:"
msgstr ""
msgid "Operation cancelled"
msgstr ""
msgid ""
"Starting decryption... Please wait as it may take several minutes depending "
"on how much there is to decrypt."
msgstr ""
msgid "Completed decryption."
msgstr ""
#, fuzzy
msgid "Enabled"
msgstr "無効"
msgid "Disabled"
msgstr "無効"
#, javascript-format
msgid "Encryption is: %s"
msgstr ""
msgid "Edit note."
msgstr "ノートを編集する。"
@@ -190,19 +172,28 @@ msgstr "\"%s\"というノートはありません。お作りいたしますか
msgid "Starting to edit note. Close the editor to get back to the prompt."
msgstr "ノートの編集の開始。エディタを閉じると元の画面に戻ることが出来ます。"
#, javascript-format
msgid "Error opening note in editor: %s"
msgstr ""
msgid "Note has been saved."
msgstr "ノートは保存されました。"
msgid "Exits the application."
msgstr "アプリケーションの終了。"
#, fuzzy
msgid ""
"Exports Joplin data to the given directory. By default, it will export the "
"Exports Joplin data to the given path. By default, it will export the "
"complete database including notebooks, notes, tags and resources."
msgstr ""
"Joplinのデータを選択されたディレクトリに出力する。標準では、ノートブック・"
"ノート・タグ・添付データを含むすべてのデータベースを出力します。"
#, fuzzy, javascript-format
msgid "Destination format: %s"
msgstr "日付の形式"
msgid "Exports only the given note."
msgstr "選択されたノートのみを出力する。"
@@ -215,6 +206,10 @@ msgstr "ノートの位置情報URLを表示する。"
msgid "Displays usage information."
msgstr "使い方を表示する。"
#, javascript-format
msgid "For information on how to customise the shortcuts please visit %s"
msgstr ""
msgid "Shortcuts are not available in CLI mode."
msgstr "CLIモードではショートカットは使用できません。"
@@ -254,31 +249,23 @@ msgstr "コマンドラインモードに入るには、\":\"を入力してく
msgid "To exit command line mode, press ESCAPE"
msgstr "コマンドラインモードを終了するには、ESCキーを押してください。"
#, fuzzy
msgid ""
"For the complete list of available keyboard shortcuts, type `help shortcuts`"
"For the list of keyboard shortcuts and config options, type `help keymap`"
msgstr ""
"有効なすべてのキーボードショートカットを表示するには、`help shortcuts`と入力"
"してください。"
msgid "Imports an Evernote notebook file (.enex file)."
msgstr "Evernoteノートブックファイル(.enex)のインポート"
msgid "Imports data into Joplin."
msgstr ""
#, fuzzy, javascript-format
msgid "Source format: %s"
msgstr "コマンドが違います:%s"
msgid "Do not ask for confirmation."
msgstr "確認を行わない。"
#, javascript-format
msgid "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
msgstr ""
"ファイル \"%s\" はノートブック \"%s\"に取り込まれます。よろしいですか?"
#, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into "
"it. Continue?"
msgstr ""
"新しいノートブック\"%s\"が作成され、ファイル\"%s\"が取り込まれます。よろしい"
"ですか?"
#, javascript-format
msgid "Found: %d."
msgstr "見つかりました:%d"
@@ -413,6 +400,14 @@ msgstr "リモート保存領域と同期します。"
msgid "Sync to provided target (defaults to sync.target config value)"
msgstr "指定のターゲットと同期します。(標準: sync.targetの設定値)"
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr "認証は完了していません(認証トークンが得られませんでした)"
#, javascript-format
msgid "Not authentified with %s. Please provide any missing credentials."
msgstr ""
msgid "Synchronisation is already in progress."
msgstr "同期はすでに実行中です。"
@@ -425,10 +420,6 @@ msgstr ""
"ロックファイルがすでに保持されています。同期作業が行われていない場合は、\"%s"
"\"にあるロックファイルを削除して、作業を再度行ってください。"
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr "認証は完了していません(認証トークンが得られませんでした)"
#, javascript-format
msgid "Synchronisation target: %s (%s)"
msgstr "同期先: %s (%s)"
@@ -501,6 +492,10 @@ msgstr "規定値: %s"
msgid "Possible keys/values:"
msgstr "取り得るキーバリュー: "
#, fuzzy
msgid "Type `joplin help` for usage information."
msgstr "使い方を表示する。"
msgid "Fatal error:"
msgstr "致命的なエラー: "
@@ -543,6 +538,25 @@ msgstr ""
"例えば、ノートブックの作成には`mb`で出来、ノートの作成は`mn`で行うことが出来"
"ます。"
msgid ""
"One or more items are currently encrypted and you may need to supply a "
"master password. To do so please type `e2ee decrypt`. If you have already "
"supplied the password, the encrypted items are being decrypted in the "
"background and will be available soon."
msgstr ""
#, javascript-format
msgid "Exporting to \"%s\" as \"%s\" format. Please wait..."
msgstr ""
#, javascript-format
msgid "Importing from \"%s\" as \"%s\" format. Please wait..."
msgstr ""
#, fuzzy
msgid "PDF File"
msgstr "ファイル"
msgid "File"
msgstr "ファイル"
@@ -555,11 +569,19 @@ msgstr "新しいToDo"
msgid "New notebook"
msgstr "新しいノートブック"
msgid "Import Evernote notes"
msgstr "Evernoteのインポート"
msgid "Import"
msgstr "インポート"
msgid "Evernote Export Files"
msgstr "Evernote Exportファイル"
#, fuzzy
msgid "Export"
msgstr "インポート"
msgid "Print"
msgstr ""
#, javascript-format
msgid "Hide %s"
msgstr ""
msgid "Quit"
msgstr "終了"
@@ -579,13 +601,23 @@ msgstr "貼り付け"
msgid "Search in all the notes"
msgstr "すべてのノートを検索"
msgid "View"
msgstr ""
msgid "Toggle editor layout"
msgstr ""
msgid "Tools"
msgstr "ツール"
msgid "Synchronisation status"
msgstr "同期状況"
msgid "Options"
msgid "Encryption options"
msgstr ""
#, fuzzy
msgid "General Options"
msgstr "オプション"
msgid "Help"
@@ -594,6 +626,13 @@ msgstr "ヘルプ"
msgid "Website and documentation"
msgstr "Webサイトとドキュメント"
#, fuzzy
msgid "Make a donation"
msgstr "Webサイトとドキュメント"
msgid "Check for updates..."
msgstr ""
msgid "About Joplin"
msgstr "Joplinについて"
@@ -601,12 +640,35 @@ msgstr "Joplinについて"
msgid "%s %s (%s, %s)"
msgstr ""
#, javascript-format
msgid "Open %s"
msgstr ""
msgid "Exit"
msgstr ""
msgid "OK"
msgstr ""
msgid "Cancel"
msgstr "キャンセル"
msgid "Current version is up-to-date."
msgstr ""
msgid "An update is available, do you want to download it now?"
msgstr ""
msgid "Yes"
msgstr ""
msgid "No"
msgstr ""
#, fuzzy
msgid "Check synchronisation configuration"
msgstr "同期の中止"
#, javascript-format
msgid "Notes and settings are stored in: %s"
msgstr "ノートと設定は、%sに保存されます。"
@@ -667,19 +729,21 @@ msgstr ""
"注意:\"active\"に指定されたマスターキーのみが暗号化に使用されます。暗号化に"
"使用されたキーの応じて、すべてのキーが暗号解除のために使用されます。"
msgid "Missing Master Keys"
msgstr ""
msgid ""
"The master keys with these IDs are used to encrypt some of your items, "
"however the application does not currently have access to them. It is likely "
"they will eventually be downloaded via synchronisation."
msgstr ""
msgid "Status"
msgstr "状態"
msgid "Encryption is:"
msgstr ""
#, fuzzy
msgid "Enabled"
msgstr "無効"
msgid "Disabled"
msgstr "無効"
msgid "Back"
msgstr "戻る"
@@ -693,15 +757,9 @@ msgstr ""
msgid "Please create a notebook first."
msgstr "ますはノートブックを作成して下さい。"
msgid "Note title:"
msgstr "ノートの題名:"
msgid "Please create a notebook first"
msgstr "ますはノートブックを作成して下さい。"
msgid "To-do title:"
msgstr "ToDoの題名:"
msgid "Notebook title:"
msgstr "ノートブックの題名:"
@@ -717,6 +775,9 @@ msgstr "ノートブックの名前を変更:"
msgid "Set alarm:"
msgstr "アラームをセット:"
msgid "Search"
msgstr "検索"
msgid "Layout"
msgstr "レイアウト"
@@ -752,6 +813,13 @@ msgid ""
"There is currently no notebook. Create one by clicking on \"New notebook\"."
msgstr "ノートブックがありません。新しいノートブックを作成してください。"
msgid "Open..."
msgstr ""
#, fuzzy
msgid "Save as..."
msgstr "変更を保存"
#, javascript-format
msgid "Unsupported link or message: %s"
msgstr ""
@@ -759,9 +827,30 @@ msgstr ""
msgid "Attach file"
msgstr "ファイルを添付"
msgid "Tags"
msgstr "タグ"
msgid "Set alarm"
msgstr "アラームをセット"
#, javascript-format
msgid ""
"This note has no content. Click on \"%s\" to toggle the editor and edit the "
"note."
msgstr ""
#, fuzzy
msgid "to-do"
msgstr "新しいToDo"
#, fuzzy
msgid "note"
msgstr "新しいノート"
#, fuzzy, javascript-format
msgid "Creating new %s..."
msgstr "ノートのインポート…"
msgid "Refresh"
msgstr "更新"
@@ -771,8 +860,8 @@ msgstr "クリア"
msgid "OneDrive Login"
msgstr "OneDriveログイン"
msgid "Import"
msgstr "インポート"
msgid "Options"
msgstr "オプション"
msgid "Synchronisation Status"
msgstr "同期状況"
@@ -795,9 +884,6 @@ msgstr "同期"
msgid "Notebooks"
msgstr "ノートブック"
msgid "Tags"
msgstr "タグ"
msgid "Searches"
msgstr "検索"
@@ -815,12 +901,18 @@ msgstr "不明なフラグ: %s"
msgid "File system"
msgstr "ファイルシステム"
msgid "Nextcloud"
msgstr ""
msgid "OneDrive"
msgstr ""
msgid "OneDrive Dev (For testing only)"
msgstr ""
msgid "WebDAV"
msgstr ""
#, javascript-format
msgid "Unknown log level: %s"
msgstr ""
@@ -879,6 +971,10 @@ msgstr "ローカルアイテムの削除: %d."
msgid "Deleted remote items: %d."
msgstr "リモートアイテムの削除: %d."
#, fuzzy, javascript-format
msgid "Fetched items: %d/%d."
msgstr "ローカルアイテムの作成: %d."
#, javascript-format
msgid "State: \"%s\"."
msgstr "状態: \"%s\"。"
@@ -890,10 +986,27 @@ msgstr "中止中..."
msgid "Completed: %s"
msgstr "完了: %s"
#, fuzzy, javascript-format
msgid "Last error: %s"
msgstr "致命的なエラー: "
msgid "Idle"
msgstr ""
msgid "In progress"
msgstr ""
#, javascript-format
msgid "Synchronisation is already in progress. State: %s"
msgstr "同期作業はすでに実行中です。状態: %s"
msgid "Encrypted"
msgstr ""
#, fuzzy
msgid "Encrypted items cannot be modified"
msgstr "いくつかの項目は同期されませんでした。"
msgid "Conflicts"
msgstr "衝突"
@@ -949,12 +1062,52 @@ msgstr "明るい"
msgid "Dark"
msgstr "暗い"
msgid "Show uncompleted todos on top of the lists"
#, fuzzy
msgid "Uncompleted to-dos on top"
msgstr "未完のToDoをリストの上部に表示"
msgid "Sort notes by"
msgstr ""
#, fuzzy
msgid "Reverse sort order"
msgstr "逆順に並び替える。"
msgid "Save geo-location with notes"
msgstr "ノートに位置情報を保存"
#, fuzzy
msgid "When creating a new to-do:"
msgstr "新しいToDoを作成します。"
#, fuzzy
msgid "Focus title"
msgstr "ノートの題名:"
msgid "Focus body"
msgstr ""
#, fuzzy
msgid "When creating a new note:"
msgstr "あたらしいノートを作成します。"
msgid "Show tray icon"
msgstr ""
msgid "Global zoom percentage"
msgstr ""
msgid "Editor font family"
msgstr ""
msgid ""
"The font name will not be checked. If incorrect or empty, it will default to "
"a generic monospace font."
msgstr ""
msgid "Automatically update the application"
msgstr "アプリケーションの自動更新"
msgid "Synchronisation interval"
msgstr "同期間隔"
@@ -970,9 +1123,6 @@ msgstr "%d 時間"
msgid "%d hours"
msgstr "%d 時間"
msgid "Automatically update the application"
msgstr "アプリケーションの自動更新"
msgid "Show advanced options"
msgstr "詳細な設定の表示"
@@ -980,11 +1130,9 @@ msgid "Synchronisation target"
msgstr "同期先"
msgid ""
"The target to synchonise to. If synchronising with the file system, set "
"`sync.2.path` to specify the target directory."
"The target to synchonise to. Each sync target may have additional parameters "
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
"同期先です。ローカルのファイルシステムと同期する場合は、`sync.2.path`を同期先"
"のディレクトリに設定してください。"
msgid "Directory to synchronise with (absolute path)"
msgstr "同期先のディレクトリ(絶対パス)"
@@ -996,15 +1144,77 @@ msgstr ""
"ファイルシステム同期の有効時に同期を行うパスです。`sync.target`も参考にしてく"
"ださい。"
msgid "Nextcloud WebDAV URL"
msgstr ""
msgid "Nextcloud username"
msgstr ""
msgid "Nextcloud password"
msgstr ""
msgid "WebDAV URL"
msgstr ""
msgid "WebDAV username"
msgstr ""
msgid "WebDAV password"
msgstr ""
#, javascript-format
msgid "Invalid option value: \"%s\". Possible values are: %s."
msgstr "無効な設定値: \"%s\"。有効な値は: %sです。"
#, fuzzy
msgid "Joplin Export File"
msgstr "Evernote Exportファイル"
msgid "Markdown"
msgstr ""
msgid "Joplin Export Directory"
msgstr ""
#, fuzzy
msgid "Evernote Export File"
msgstr "Evernote Exportファイル"
msgid "Directory"
msgstr ""
#, javascript-format
msgid "Cannot load \"%s\" module for format \"%s\""
msgstr ""
#, javascript-format
msgid "Please specify import format for %s"
msgstr ""
#, javascript-format
msgid ""
"This item is currently encrypted: %s \"%s\". Please wait for all items to be "
"decrypted and try again."
msgstr ""
msgid "There is no data to export."
msgstr ""
#, fuzzy
msgid "Please specify the notebook where the notes should be imported to."
msgstr "同期状況の出力先を選択してください"
msgid "Items that cannot be synchronised"
msgstr "同期が出来なかったアイテム"
#, javascript-format
msgid "\"%s\": \"%s\""
msgid "%s (%s): %s"
msgstr ""
msgid ""
"These items will remain on the device but will not be uploaded to the sync "
"target. In order to find these items, either search for the title or the ID "
"(which is displayed in brackets above)."
msgstr ""
msgid "Sync status (synced items / total items)"
@@ -1052,6 +1262,9 @@ msgstr "ログ"
msgid "Export Debug Report"
msgstr "デバッグレポートの出力"
msgid "Encryption Config"
msgstr ""
msgid "Configuration"
msgstr "設定"
@@ -1062,6 +1275,9 @@ msgstr "ノートブックへ移動..."
msgid "Move %d notes to notebook \"%s\"?"
msgstr "%d個のノートを\"%s\"に移動しますか?"
msgid "Press to set the decryption password."
msgstr ""
msgid "Select date"
msgstr "日付の選択"
@@ -1071,6 +1287,27 @@ msgstr "確認"
msgid "Cancel synchronisation"
msgstr "同期の中止"
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr ""
#, fuzzy, javascript-format
msgid "Created: %s"
msgstr "作成しました:%d"
msgid "Password:"
msgstr ""
msgid "Password cannot be empty"
msgstr ""
#, fuzzy
msgid "Enable"
msgstr "無効"
#, javascript-format
msgid "The notebook could not be saved: %s"
msgstr "ノートブックは保存できませんでした:%s"
@@ -1078,6 +1315,12 @@ msgstr "ノートブックは保存できませんでした:%s"
msgid "Edit notebook"
msgstr "ノートブックの編集"
msgid "Show all"
msgstr ""
msgid "Errors only"
msgstr ""
msgid "This note has been modified:"
msgstr "ノートは変更されています:"
@@ -1132,3 +1375,86 @@ msgstr ""
msgid "Welcome"
msgstr "ようこそ"
#, fuzzy
#~ msgid ""
#~ "Release notes:\n"
#~ "\n"
#~ "%s"
#~ msgstr "ノートを削除しますか?"
#~ msgid "Imports an Evernote notebook file (.enex file)."
#~ msgstr "Evernoteノートブックファイル(.enex)のインポート"
#~ msgid ""
#~ "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
#~ msgstr ""
#~ "ファイル \"%s\" はノートブック \"%s\"に取り込まれます。よろしいですか?"
#~ msgid ""
#~ "New notebook \"%s\" will be created and file \"%s\" will be imported into "
#~ "it. Continue?"
#~ msgstr ""
#~ "新しいノートブック\"%s\"が作成され、ファイル\"%s\"が取り込まれます。よろし"
#~ "いですか?"
#~ msgid "Import Evernote notes"
#~ msgstr "Evernoteのインポート"
#~ msgid "Give focus to next pane"
#~ msgstr "次のペインへ"
#~ msgid "Give focus to previous pane"
#~ msgstr "前のペインへ"
#~ msgid "Enter command line mode"
#~ msgstr "コマンドラインモードに入る"
#~ msgid "Exit command line mode"
#~ msgstr "コマンドラインモードの終了"
#~ msgid "Edit the selected note"
#~ msgstr "選択したノートを編集"
#~ msgid "Cancel the current command."
#~ msgstr "現在のコマンドをキャンセル"
#~ msgid "Exit the application."
#~ msgstr "アプリケーションを終了する"
#~ msgid "Delete the currently selected note or notebook."
#~ msgstr "選択中のノートまたはノートブックを削除"
#~ msgid "Set a to-do as completed / not completed"
#~ msgstr "ToDoを完了/未完に設定"
#~ msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
#~ msgstr "コンソールを最大表示/最小表示/非表示/可視で切り替える([t][c])"
#~ msgid "[t]oggle note [m]etadata."
#~ msgstr "ノートのメタ情報を切り替える [tm]"
#~ msgid "[M]ake a new [n]ote"
#~ msgstr "新しいノートの作成 [mn]"
#~ msgid "[M]ake a new [t]odo"
#~ msgstr "新しいToDoの作成 [mt]"
#~ msgid "[M]ake a new note[b]ook"
#~ msgstr "新しいノートブックの作成 [mb]"
#~ msgid "Copy ([Y]ank) the [n]ote to a notebook."
#~ msgstr "ノートをノートブックにコピー [yn]"
#~ msgid "Move the note to a notebook."
#~ msgstr "ノートをノートブックに移動"
#~ msgid ""
#~ "The target to synchonise to. If synchronising with the file system, set "
#~ "`sync.2.path` to specify the target directory."
#~ msgstr ""
#~ "同期先です。ローカルのファイルシステムと同期する場合は、`sync.2.path`を同"
#~ "期先のディレクトリに設定してください。"
#~ msgid "To-do title:"
#~ msgstr "ToDoの題名:"

View File

@@ -15,63 +15,12 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Give focus to next pane"
msgstr ""
msgid "Give focus to previous pane"
msgstr ""
msgid "Enter command line mode"
msgstr ""
msgid "Exit command line mode"
msgstr ""
msgid "Edit the selected note"
msgstr ""
msgid "Cancel the current command."
msgstr ""
msgid "Exit the application."
msgstr ""
msgid "Delete the currently selected note or notebook."
msgstr ""
msgid "To delete a tag, untag the associated notes."
msgstr ""
msgid "Please select the note or notebook to be deleted first."
msgstr ""
msgid "Set a to-do as completed / not completed"
msgstr ""
msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
msgstr ""
msgid "Search"
msgstr ""
msgid "[t]oggle note [m]etadata."
msgstr ""
msgid "[M]ake a new [n]ote"
msgstr ""
msgid "[M]ake a new [t]odo"
msgstr ""
msgid "[M]ake a new note[b]ook"
msgstr ""
msgid "Copy ([Y]ank) the [n]ote to a notebook."
msgstr ""
msgid "Move the note to a notebook."
msgstr ""
msgid "Press Ctrl+D or type \"exit\" to exit the application"
msgstr ""
@@ -108,6 +57,9 @@ msgstr ""
msgid "The command \"%s\" is only available in GUI mode"
msgstr ""
msgid "Cannot change encrypted item"
msgstr ""
#, javascript-format
msgid "Missing required argument: %s"
msgstr ""
@@ -165,6 +117,35 @@ msgstr ""
msgid "Note is not a to-do: \"%s\""
msgstr ""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
msgstr ""
msgid "Enter master password:"
msgstr ""
msgid "Operation cancelled"
msgstr ""
msgid ""
"Starting decryption... Please wait as it may take several minutes depending "
"on how much there is to decrypt."
msgstr ""
msgid "Completed decryption."
msgstr ""
msgid "Enabled"
msgstr ""
msgid "Disabled"
msgstr ""
#, javascript-format
msgid "Encryption is: %s"
msgstr ""
msgid "Edit note."
msgstr ""
@@ -182,6 +163,10 @@ msgstr ""
msgid "Starting to edit note. Close the editor to get back to the prompt."
msgstr ""
#, javascript-format
msgid "Error opening note in editor: %s"
msgstr ""
msgid "Note has been saved."
msgstr ""
@@ -189,10 +174,14 @@ msgid "Exits the application."
msgstr ""
msgid ""
"Exports Joplin data to the given directory. By default, it will export the "
"Exports Joplin data to the given path. By default, it will export the "
"complete database including notebooks, notes, tags and resources."
msgstr ""
#, javascript-format
msgid "Destination format: %s"
msgstr ""
msgid "Exports only the given note."
msgstr ""
@@ -205,6 +194,10 @@ msgstr ""
msgid "Displays usage information."
msgstr ""
#, javascript-format
msgid "For information on how to customise the shortcuts please visit %s"
msgstr ""
msgid "Shortcuts are not available in CLI mode."
msgstr ""
@@ -240,25 +233,19 @@ msgid "To exit command line mode, press ESCAPE"
msgstr ""
msgid ""
"For the complete list of available keyboard shortcuts, type `help shortcuts`"
"For the list of keyboard shortcuts and config options, type `help keymap`"
msgstr ""
msgid "Imports an Evernote notebook file (.enex file)."
msgid "Imports data into Joplin."
msgstr ""
#, javascript-format
msgid "Source format: %s"
msgstr ""
msgid "Do not ask for confirmation."
msgstr ""
#, javascript-format
msgid "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
msgstr ""
#, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into "
"it. Continue?"
msgstr ""
#, javascript-format
msgid "Found: %d."
msgstr ""
@@ -381,6 +368,14 @@ msgstr ""
msgid "Sync to provided target (defaults to sync.target config value)"
msgstr ""
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr ""
#, javascript-format
msgid "Not authentified with %s. Please provide any missing credentials."
msgstr ""
msgid "Synchronisation is already in progress."
msgstr ""
@@ -391,10 +386,6 @@ msgid ""
"operation."
msgstr ""
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr ""
#, javascript-format
msgid "Synchronisation target: %s (%s)"
msgstr ""
@@ -458,6 +449,9 @@ msgstr ""
msgid "Possible keys/values:"
msgstr ""
msgid "Type `joplin help` for usage information."
msgstr ""
msgid "Fatal error:"
msgstr ""
@@ -488,6 +482,24 @@ msgid ""
"For example, to create a notebook press `mb`; to create a note press `mn`."
msgstr ""
msgid ""
"One or more items are currently encrypted and you may need to supply a "
"master password. To do so please type `e2ee decrypt`. If you have already "
"supplied the password, the encrypted items are being decrypted in the "
"background and will be available soon."
msgstr ""
#, javascript-format
msgid "Exporting to \"%s\" as \"%s\" format. Please wait..."
msgstr ""
#, javascript-format
msgid "Importing from \"%s\" as \"%s\" format. Please wait..."
msgstr ""
msgid "PDF File"
msgstr ""
msgid "File"
msgstr ""
@@ -500,10 +512,17 @@ msgstr ""
msgid "New notebook"
msgstr ""
msgid "Import Evernote notes"
msgid "Import"
msgstr ""
msgid "Evernote Export Files"
msgid "Export"
msgstr ""
msgid "Print"
msgstr ""
#, javascript-format
msgid "Hide %s"
msgstr ""
msgid "Quit"
@@ -524,13 +543,22 @@ msgstr ""
msgid "Search in all the notes"
msgstr ""
msgid "View"
msgstr ""
msgid "Toggle editor layout"
msgstr ""
msgid "Tools"
msgstr ""
msgid "Synchronisation status"
msgstr ""
msgid "Options"
msgid "Encryption options"
msgstr ""
msgid "General Options"
msgstr ""
msgid "Help"
@@ -539,6 +567,12 @@ msgstr ""
msgid "Website and documentation"
msgstr ""
msgid "Make a donation"
msgstr ""
msgid "Check for updates..."
msgstr ""
msgid "About Joplin"
msgstr ""
@@ -546,12 +580,34 @@ msgstr ""
msgid "%s %s (%s, %s)"
msgstr ""
#, javascript-format
msgid "Open %s"
msgstr ""
msgid "Exit"
msgstr ""
msgid "OK"
msgstr ""
msgid "Cancel"
msgstr ""
msgid "Current version is up-to-date."
msgstr ""
msgid "An update is available, do you want to download it now?"
msgstr ""
msgid "Yes"
msgstr ""
msgid "No"
msgstr ""
msgid "Check synchronisation configuration"
msgstr ""
#, javascript-format
msgid "Notes and settings are stored in: %s"
msgstr ""
@@ -608,18 +664,21 @@ msgid ""
"how the notes or notebooks were originally encrypted."
msgstr ""
msgid "Missing Master Keys"
msgstr ""
msgid ""
"The master keys with these IDs are used to encrypt some of your items, "
"however the application does not currently have access to them. It is likely "
"they will eventually be downloaded via synchronisation."
msgstr ""
msgid "Status"
msgstr ""
msgid "Encryption is:"
msgstr ""
msgid "Enabled"
msgstr ""
msgid "Disabled"
msgstr ""
msgid "Back"
msgstr ""
@@ -631,15 +690,9 @@ msgstr ""
msgid "Please create a notebook first."
msgstr ""
msgid "Note title:"
msgstr ""
msgid "Please create a notebook first"
msgstr ""
msgid "To-do title:"
msgstr ""
msgid "Notebook title:"
msgstr ""
@@ -655,6 +708,9 @@ msgstr ""
msgid "Set alarm:"
msgstr ""
msgid "Search"
msgstr ""
msgid "Layout"
msgstr ""
@@ -689,6 +745,12 @@ msgid ""
"There is currently no notebook. Create one by clicking on \"New notebook\"."
msgstr ""
msgid "Open..."
msgstr ""
msgid "Save as..."
msgstr ""
#, javascript-format
msgid "Unsupported link or message: %s"
msgstr ""
@@ -696,9 +758,28 @@ msgstr ""
msgid "Attach file"
msgstr ""
msgid "Tags"
msgstr ""
msgid "Set alarm"
msgstr ""
#, javascript-format
msgid ""
"This note has no content. Click on \"%s\" to toggle the editor and edit the "
"note."
msgstr ""
msgid "to-do"
msgstr ""
msgid "note"
msgstr ""
#, javascript-format
msgid "Creating new %s..."
msgstr ""
msgid "Refresh"
msgstr ""
@@ -708,7 +789,7 @@ msgstr ""
msgid "OneDrive Login"
msgstr ""
msgid "Import"
msgid "Options"
msgstr ""
msgid "Synchronisation Status"
@@ -732,9 +813,6 @@ msgstr ""
msgid "Notebooks"
msgstr ""
msgid "Tags"
msgstr ""
msgid "Searches"
msgstr ""
@@ -752,12 +830,18 @@ msgstr ""
msgid "File system"
msgstr ""
msgid "Nextcloud"
msgstr ""
msgid "OneDrive"
msgstr ""
msgid "OneDrive Dev (For testing only)"
msgstr ""
msgid "WebDAV"
msgstr ""
#, javascript-format
msgid "Unknown log level: %s"
msgstr ""
@@ -808,6 +892,10 @@ msgstr ""
msgid "Deleted remote items: %d."
msgstr ""
#, javascript-format
msgid "Fetched items: %d/%d."
msgstr ""
#, javascript-format
msgid "State: \"%s\"."
msgstr ""
@@ -819,10 +907,26 @@ msgstr ""
msgid "Completed: %s"
msgstr ""
#, javascript-format
msgid "Last error: %s"
msgstr ""
msgid "Idle"
msgstr ""
msgid "In progress"
msgstr ""
#, javascript-format
msgid "Synchronisation is already in progress. State: %s"
msgstr ""
msgid "Encrypted"
msgstr ""
msgid "Encrypted items cannot be modified"
msgstr ""
msgid "Conflicts"
msgstr ""
@@ -874,12 +978,47 @@ msgstr ""
msgid "Dark"
msgstr ""
msgid "Show uncompleted todos on top of the lists"
msgid "Uncompleted to-dos on top"
msgstr ""
msgid "Sort notes by"
msgstr ""
msgid "Reverse sort order"
msgstr ""
msgid "Save geo-location with notes"
msgstr ""
msgid "When creating a new to-do:"
msgstr ""
msgid "Focus title"
msgstr ""
msgid "Focus body"
msgstr ""
msgid "When creating a new note:"
msgstr ""
msgid "Show tray icon"
msgstr ""
msgid "Global zoom percentage"
msgstr ""
msgid "Editor font family"
msgstr ""
msgid ""
"The font name will not be checked. If incorrect or empty, it will default to "
"a generic monospace font."
msgstr ""
msgid "Automatically update the application"
msgstr ""
msgid "Synchronisation interval"
msgstr ""
@@ -895,9 +1034,6 @@ msgstr ""
msgid "%d hours"
msgstr ""
msgid "Automatically update the application"
msgstr ""
msgid "Show advanced options"
msgstr ""
@@ -905,8 +1041,8 @@ msgid "Synchronisation target"
msgstr ""
msgid ""
"The target to synchonise to. If synchronising with the file system, set "
"`sync.2.path` to specify the target directory."
"The target to synchonise to. Each sync target may have additional parameters "
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
msgid "Directory to synchronise with (absolute path)"
@@ -917,15 +1053,74 @@ msgid ""
"See `sync.target`."
msgstr ""
msgid "Nextcloud WebDAV URL"
msgstr ""
msgid "Nextcloud username"
msgstr ""
msgid "Nextcloud password"
msgstr ""
msgid "WebDAV URL"
msgstr ""
msgid "WebDAV username"
msgstr ""
msgid "WebDAV password"
msgstr ""
#, javascript-format
msgid "Invalid option value: \"%s\". Possible values are: %s."
msgstr ""
msgid "Joplin Export File"
msgstr ""
msgid "Markdown"
msgstr ""
msgid "Joplin Export Directory"
msgstr ""
msgid "Evernote Export File"
msgstr ""
msgid "Directory"
msgstr ""
#, javascript-format
msgid "Cannot load \"%s\" module for format \"%s\""
msgstr ""
#, javascript-format
msgid "Please specify import format for %s"
msgstr ""
#, javascript-format
msgid ""
"This item is currently encrypted: %s \"%s\". Please wait for all items to be "
"decrypted and try again."
msgstr ""
msgid "There is no data to export."
msgstr ""
msgid "Please specify the notebook where the notes should be imported to."
msgstr ""
msgid "Items that cannot be synchronised"
msgstr ""
#, javascript-format
msgid "\"%s\": \"%s\""
msgid "%s (%s): %s"
msgstr ""
msgid ""
"These items will remain on the device but will not be uploaded to the sync "
"target. In order to find these items, either search for the title or the ID "
"(which is displayed in brackets above)."
msgstr ""
msgid "Sync status (synced items / total items)"
@@ -973,6 +1168,9 @@ msgstr ""
msgid "Export Debug Report"
msgstr ""
msgid "Encryption Config"
msgstr ""
msgid "Configuration"
msgstr ""
@@ -983,6 +1181,9 @@ msgstr ""
msgid "Move %d notes to notebook \"%s\"?"
msgstr ""
msgid "Press to set the decryption password."
msgstr ""
msgid "Select date"
msgstr ""
@@ -992,6 +1193,26 @@ msgstr ""
msgid "Cancel synchronisation"
msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr ""
#, javascript-format
msgid "Created: %s"
msgstr ""
msgid "Password:"
msgstr ""
msgid "Password cannot be empty"
msgstr ""
msgid "Enable"
msgstr ""
#, javascript-format
msgid "The notebook could not be saved: %s"
msgstr ""
@@ -999,6 +1220,12 @@ msgstr ""
msgid "Edit notebook"
msgstr ""
msgid "Show all"
msgstr ""
msgid "Errors only"
msgstr ""
msgid "This note has been modified:"
msgstr ""

1492
CliClient/locales/nl_BE.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -7,73 +7,22 @@ msgid ""
msgstr ""
"Project-Id-Version: Joplin-CLI 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: rtmkrlv <artyom.karlov@gmail.com>\n"
"Last-Translator: Artyom Karlov <artyom.karlov@gmail.com>\n"
"Language-Team: \n"
"Language: ru_RU\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.4\n"
"X-Generator: Poedit 2.0.6\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
msgid "Give focus to next pane"
msgstr "Переключиться на следующую панель"
msgid "Give focus to previous pane"
msgstr "Переключиться на предыдущую панель"
msgid "Enter command line mode"
msgstr "Войти в режим командной строки"
msgid "Exit command line mode"
msgstr "Выйти из режима командной строки"
msgid "Edit the selected note"
msgstr "Редактировать выбранную заметку"
msgid "Cancel the current command."
msgstr "Отменить текущую команду."
msgid "Exit the application."
msgstr "Выйти из приложения."
msgid "Delete the currently selected note or notebook."
msgstr "Удалить текущую выбранную заметку или блокнот."
msgid "To delete a tag, untag the associated notes."
msgstr "Чтобы удалить тег, уберите его с ассоциированных с ним заметок."
msgid "Please select the note or notebook to be deleted first."
msgstr "Сначала выберите заметку или блокнот, которые должны быть удалены."
msgid "Set a to-do as completed / not completed"
msgstr "Отметить задачу как завершённую/незавершённую"
msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
msgstr "[tc] переключить консоль между развёрнутой/свёрнутой/скрытой/видимой."
msgid "Search"
msgstr "Поиск"
msgid "[t]oggle note [m]etadata."
msgstr "[tm] переключить отображение метаданных заметки."
msgid "[M]ake a new [n]ote"
msgstr "[mn] создать новую заметку"
msgid "[M]ake a new [t]odo"
msgstr "[mt] создать новую задачу"
msgid "[M]ake a new note[b]ook"
msgstr "[mb] создать новый блокнот"
msgid "Copy ([Y]ank) the [n]ote to a notebook."
msgstr "[yn] копировать заметку в блокнот."
msgid "Move the note to a notebook."
msgstr "Переместить заметку в блокнот."
msgid "Press Ctrl+D or type \"exit\" to exit the application"
msgstr "Для выхода из приложения нажмите Ctrl+D или введите «exit»"
@@ -111,6 +60,9 @@ msgstr "Нет такой команды: %s"
msgid "The command \"%s\" is only available in GUI mode"
msgstr "Команда «%s» доступна только в режиме GUI"
msgid "Cannot change encrypted item"
msgstr "Не удалось изменить зашифрованный элемент"
#, javascript-format
msgid "Missing required argument: %s"
msgstr "Отсутствует требуемый аргумент: %s"
@@ -120,7 +72,7 @@ msgid "%s: %s"
msgstr "%s: %s"
msgid "Your choice: "
msgstr "Ваш выбор:"
msgstr "Ваш выбор: "
#, javascript-format
msgid "Invalid answer: %s"
@@ -173,6 +125,39 @@ msgstr "Отмечает задачу как завершённую."
msgid "Note is not a to-do: \"%s\""
msgstr "Заметка не является задачей: «%s»"
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
msgstr ""
"Управляет конфигурацией E2EE. Команды: `enable`, `disable`, `decrypt`, "
"`status` и `target-status`."
msgid "Enter master password:"
msgstr "Введите мастер-пароль:"
msgid "Operation cancelled"
msgstr "Операция отменена"
msgid ""
"Starting decryption... Please wait as it may take several minutes depending "
"on how much there is to decrypt."
msgstr ""
"Запуск расшифровки... Пожалуйста, ожидайте. Время расшифровки зависит от "
"объёма расшифровываемых данных."
msgid "Completed decryption."
msgstr "Расшифровка завершена."
msgid "Enabled"
msgstr "Включено"
msgid "Disabled"
msgstr "Отключено"
#, javascript-format
msgid "Encryption is: %s"
msgstr "Шифрование: %s"
msgid "Edit note."
msgstr "Редактировать заметку."
@@ -194,6 +179,10 @@ msgstr ""
"Запуск редактирования заметки. Закройте редактор, чтобы вернуться к "
"командной строке."
#, javascript-format
msgid "Error opening note in editor: %s"
msgstr "Ошибка при открытии заметки в редакторе: %s"
msgid "Note has been saved."
msgstr "Заметка сохранена."
@@ -201,12 +190,16 @@ msgid "Exits the application."
msgstr "Выход из приложения."
msgid ""
"Exports Joplin data to the given directory. By default, it will export the "
"Exports Joplin data to the given path. By default, it will export the "
"complete database including notebooks, notes, tags and resources."
msgstr ""
"Экспортирует данные Joplin в заданный каталог. По умолчанию экспортируется "
"Экспортирует данные Joplin по заданному пути. По умолчанию экспортируется "
"полная база данных, включая блокноты, заметки, теги и ресурсы."
#, javascript-format
msgid "Destination format: %s"
msgstr "Целевой формат: %s"
msgid "Exports only the given note."
msgstr "Экспортирует только заданную заметку."
@@ -219,6 +212,10 @@ msgstr "Выводит URL геолокации для заметки."
msgid "Displays usage information."
msgstr "Выводит информацию об использовании."
#, javascript-format
msgid "For information on how to customise the shortcuts please visit %s"
msgstr "Информацию по настройке сочетаний можно получить, посетив %s"
msgid "Shortcuts are not available in CLI mode."
msgstr "Ярлыки недоступны в режиме командной строки."
@@ -243,7 +240,7 @@ msgstr ""
"элемент."
msgid "To move from one pane to another, press Tab or Shift+Tab."
msgstr "Чтобы переключаться между панелями, нажимайте Tab или Shift+Tab"
msgstr "Чтобы переключаться между панелями, нажимайте Tab или Shift+Tab."
msgid ""
"Use the arrows and page up/down to scroll the lists and text areas "
@@ -262,29 +259,21 @@ msgid "To exit command line mode, press ESCAPE"
msgstr "Чтобы выйти из режима командной строки, нажмите ESCAPE"
msgid ""
"For the complete list of available keyboard shortcuts, type `help shortcuts`"
"For the list of keyboard shortcuts and config options, type `help keymap`"
msgstr ""
"Для просмотра списка доступных клавиатурных сочетаний введите `help "
"shortcuts`."
"Для просмотра списка клавиатурных сочетаний и настроек конфигурации введите "
"`help keymap`"
msgid "Imports an Evernote notebook file (.enex file)."
msgstr "Импортирует файл блокнотов Evernote (.enex-файл)."
msgid "Imports data into Joplin."
msgstr "Импортирует данные в Joplin."
#, javascript-format
msgid "Source format: %s"
msgstr "Исходный формат: %s"
msgid "Do not ask for confirmation."
msgstr "Не запрашивать подтверждение."
#, javascript-format
msgid "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
msgstr "Файл «%s» будет импортирован в существующий блокнот «%s». Продолжить?"
#, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into "
"it. Continue?"
msgstr ""
"Будет создан новый блокнот «%s» и в него будет импортирован файл «%s». "
"Продолжить?"
#, javascript-format
msgid "Found: %d."
msgstr "Найдено: %d."
@@ -421,6 +410,15 @@ msgstr ""
"Синхронизация с заданной целью (по умолчанию — значение конфигурации sync."
"target)"
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr "Аутентификация не была завершена (не получен токен аутентификации)."
#, javascript-format
msgid "Not authentified with %s. Please provide any missing credentials."
msgstr ""
"Не аутентифицировано с %s. Пожалуйста, предоставьте все недостающие данные."
msgid "Synchronisation is already in progress."
msgstr "Синхронизация уже выполняется."
@@ -434,10 +432,6 @@ msgstr ""
"производится, вы можете удалить файл блокировки в «%s» и возобновить "
"операцию."
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr "Аутентификация не была завершена (не получен токен аутентификации)."
#, javascript-format
msgid "Synchronisation target: %s (%s)"
msgstr "Цель синхронизации: %s (%s)"
@@ -511,6 +505,9 @@ msgstr "По умолчанию: %s"
msgid "Possible keys/values:"
msgstr "Возможные ключи/значения:"
msgid "Type `joplin help` for usage information."
msgstr "Введите `joplin help` для получения информации об использовании."
msgid "Fatal error:"
msgstr "Фатальная ошибка:"
@@ -553,6 +550,28 @@ msgstr ""
"Например, для создания блокнота нужно ввести `mb`, для создания заметки — "
"`mn`."
msgid ""
"One or more items are currently encrypted and you may need to supply a "
"master password. To do so please type `e2ee decrypt`. If you have already "
"supplied the password, the encrypted items are being decrypted in the "
"background and will be available soon."
msgstr ""
"Один или несколько элементов сейчас зашифрованы и может потребоваться, чтобы "
"вы предоставили мастер-пароль. Для этого введите, пожалуйста, «e2ee "
"decrypt». Если пароль уже был вами предоставлен, зашифрованные элементы "
"расшифруются в фоновом режиме и вскоре станут доступны."
#, javascript-format
msgid "Exporting to \"%s\" as \"%s\" format. Please wait..."
msgstr "Экспорт в «%s» в формате «%s». Пожалуйста, ожидайте..."
#, javascript-format
msgid "Importing from \"%s\" as \"%s\" format. Please wait..."
msgstr "Импорт из «%s» в формате «%s». Пожалуйста, ожидайте..."
msgid "PDF File"
msgstr "PDF-файл"
msgid "File"
msgstr "Файл"
@@ -565,17 +584,24 @@ msgstr "Новая задача"
msgid "New notebook"
msgstr "Новый блокнот"
msgid "Import Evernote notes"
msgstr "Импортировать заметки из Evernote"
msgid "Import"
msgstr "Импорт"
msgid "Evernote Export Files"
msgstr "Файлы экспорта Evernote"
msgid "Export"
msgstr "Экспорт"
msgid "Print"
msgstr "Печать"
#, javascript-format
msgid "Hide %s"
msgstr "Скрыть %s"
msgid "Quit"
msgstr "Выход"
msgid "Edit"
msgstr "Редактировать"
msgstr "Правка"
msgid "Copy"
msgstr "Копировать"
@@ -589,14 +615,23 @@ msgstr "Вставить"
msgid "Search in all the notes"
msgstr "Поиск во всех заметках"
msgid "View"
msgstr "Вид"
msgid "Toggle editor layout"
msgstr "Переключить вид редактора"
msgid "Tools"
msgstr "Инструменты"
msgid "Synchronisation status"
msgstr "Статус синхронизации"
msgid "Options"
msgstr "Настройки"
msgid "Encryption options"
msgstr "Настройки шифрования"
msgid "General Options"
msgstr "Основные настройки"
msgid "Help"
msgstr "Помощь"
@@ -604,6 +639,12 @@ msgstr "Помощь"
msgid "Website and documentation"
msgstr "Сайт и документация"
msgid "Make a donation"
msgstr "Сделать пожертвование"
msgid "Check for updates..."
msgstr "Проверить обновления..."
msgid "About Joplin"
msgstr "О Joplin"
@@ -611,12 +652,34 @@ msgstr "О Joplin"
msgid "%s %s (%s, %s)"
msgstr "%s %s (%s, %s)"
#, javascript-format
msgid "Open %s"
msgstr "Открыть %s"
msgid "Exit"
msgstr "Выход"
msgid "OK"
msgstr "OK"
msgid "Cancel"
msgstr "Отмена"
msgid "Current version is up-to-date."
msgstr "Вы используете самую свежую версию."
msgid "An update is available, do you want to download it now?"
msgstr "Доступно обновление. Желаете скачать его сейчас?"
msgid "Yes"
msgstr "Да"
msgid "No"
msgstr "Нет"
msgid "Check synchronisation configuration"
msgstr "Проверить настройки синхронизации"
#, javascript-format
msgid "Notes and settings are stored in: %s"
msgstr "Заметки и настройки сохранены в: %s"
@@ -629,6 +692,9 @@ msgid ""
"re-synchronised and sent unencrypted to the sync target. Do you wish to "
"continue?"
msgstr ""
"Отключение шифрования означает, что *все* ваши заметки и вложения будут "
"пересинхронизированы и отправлены в расшифрованном виде к цели "
"синхронизации. Желаете продолжить?"
msgid ""
"Enabling encryption means *all* your notes and attachments are going to be "
@@ -636,18 +702,23 @@ msgid ""
"password as, for security purposes, this will be the *only* way to decrypt "
"the data! To enable encryption, please enter your password below."
msgstr ""
"Включение шифрования означает, что *все* ваши заметки и вложения будут "
"пересинхронизированы и отправлены в зашифрованном виде к цели синхронизации. "
"Не теряйте пароль, так как в целях безопасности *только* с его помощью можно "
"будет расшифровать данные! Чтобы включить шифрование, введите ваш пароль "
"ниже."
msgid "Disable encryption"
msgstr ""
msgstr "Отключить шифрование"
msgid "Enable encryption"
msgstr ""
msgstr "Включить шифрование"
msgid "Master Keys"
msgstr ""
msgstr "Мастер-ключи"
msgid "Active"
msgstr ""
msgstr "Активен"
msgid "ID"
msgstr "ID"
@@ -656,35 +727,44 @@ msgid "Source"
msgstr "Источник"
msgid "Created"
msgstr "Создана"
msgstr "Создан"
msgid "Updated"
msgstr "Обновлена"
msgstr "Обновлён"
msgid "Password"
msgstr ""
msgstr "Пароль"
msgid "Password OK"
msgstr ""
msgstr "Пароль OK"
msgid ""
"Note: Only one master key is going to be used for encryption (the one marked "
"as \"active\"). Any of the keys might be used for decryption, depending on "
"how the notes or notebooks were originally encrypted."
msgstr ""
"Внимание: Для шифрования может быть использован только один мастер-ключ "
"(отмеченный как «активный»). Для расшифровки может использоваться любой из "
"ключей, в зависимости от того, как изначально были зашифрованы заметки или "
"блокноты."
msgid "Missing Master Keys"
msgstr "Недостающие мастер-ключи"
msgid ""
"The master keys with these IDs are used to encrypt some of your items, "
"however the application does not currently have access to them. It is likely "
"they will eventually be downloaded via synchronisation."
msgstr ""
"Мастер-ключи с такими ID используются для шифрования некоторых из ваших "
"элементов, однако у приложения сейчас нет к ним доступа. Скорее всего, они "
"загрузятся при синхронизации."
msgid "Status"
msgstr "Статус"
msgid "Encryption is:"
msgstr ""
#, fuzzy
msgid "Enabled"
msgstr "Отключена"
msgid "Disabled"
msgstr "Отключена"
msgstr "Шифрование:"
msgid "Back"
msgstr "Назад"
@@ -697,15 +777,9 @@ msgstr "Будет создан новый блокнот «%s» и в него
msgid "Please create a notebook first."
msgstr "Сначала создайте блокнот."
msgid "Note title:"
msgstr "Название заметки:"
msgid "Please create a notebook first"
msgstr "Сначала создайте блокнот"
msgid "To-do title:"
msgstr "Название задачи:"
msgid "Notebook title:"
msgstr "Название блокнота:"
@@ -721,6 +795,9 @@ msgstr "Переименовать блокнот:"
msgid "Set alarm:"
msgstr "Установить напоминание:"
msgid "Search"
msgstr "Поиск"
msgid "Layout"
msgstr "Вид"
@@ -730,12 +807,11 @@ msgstr "Некоторые элементы не могут быть синхр
msgid "View them now"
msgstr "Просмотреть их сейчас"
#, fuzzy
msgid "Some items cannot be decrypted."
msgstr "Некоторые элементы не могут быть синхронизированы."
msgstr "Некоторые элементы не могут быть расшифрованы."
msgid "Set the password"
msgstr ""
msgstr "Установить пароль"
msgid "Add or remove tags"
msgstr "Добавить или удалить теги"
@@ -756,6 +832,12 @@ msgid ""
"There is currently no notebook. Create one by clicking on \"New notebook\"."
msgstr "Сейчас здесь нет блокнотов. Создайте новый нажав «Новый блокнот»."
msgid "Open..."
msgstr "Открыть..."
msgid "Save as..."
msgstr "Сохранить как..."
#, javascript-format
msgid "Unsupported link or message: %s"
msgstr "Неподдерживаемая ссыка или сообщение: %s"
@@ -763,9 +845,30 @@ msgstr "Неподдерживаемая ссыка или сообщение: %
msgid "Attach file"
msgstr "Прикрепить файл"
msgid "Tags"
msgstr "Теги"
msgid "Set alarm"
msgstr "Установить напоминание"
#, javascript-format
msgid ""
"This note has no content. Click on \"%s\" to toggle the editor and edit the "
"note."
msgstr ""
"Заметка пуста. Нажмите на «%s», чтобы переключиться в редактор и "
"отредактировать её."
msgid "to-do"
msgstr "задача"
msgid "note"
msgstr "заметка"
#, javascript-format
msgid "Creating new %s..."
msgstr "Создание новой %s..."
msgid "Refresh"
msgstr "Обновить"
@@ -775,14 +878,14 @@ msgstr "Очистить"
msgid "OneDrive Login"
msgstr "Вход в OneDrive"
msgid "Import"
msgstr "Импорт"
msgid "Options"
msgstr "Настройки"
msgid "Synchronisation Status"
msgstr "Статус синхронизации"
msgid "Encryption Options"
msgstr ""
msgstr "Настройки шифрования"
msgid "Remove this tag from all the notes?"
msgstr "Убрать этот тег со всех заметок?"
@@ -799,9 +902,6 @@ msgstr "Синхронизировать"
msgid "Notebooks"
msgstr "Блокноты"
msgid "Tags"
msgstr "Теги"
msgid "Searches"
msgstr "Запросы"
@@ -819,12 +919,18 @@ msgstr "Неизвестный флаг: %s"
msgid "File system"
msgstr "Файловая система"
msgid "Nextcloud"
msgstr "Nextcloud"
msgid "OneDrive"
msgstr "OneDrive"
msgid "OneDrive Dev (For testing only)"
msgstr "OneDrive Dev (только для тестирования)"
msgid "WebDAV"
msgstr "WebDAV"
#, javascript-format
msgid "Unknown log level: %s"
msgstr "Неизвестный уровень лога: %s"
@@ -883,6 +989,10 @@ msgstr "Удалено локальных элементов: %d."
msgid "Deleted remote items: %d."
msgstr "Удалено удалённых элементов: %d."
#, javascript-format
msgid "Fetched items: %d/%d."
msgstr "Получено элементов: %d/%d."
#, javascript-format
msgid "State: \"%s\"."
msgstr "Статус: «%s»."
@@ -894,10 +1004,26 @@ msgstr "Отмена..."
msgid "Completed: %s"
msgstr "Завершено: %s"
#, javascript-format
msgid "Last error: %s"
msgstr "Последняя ошибка: %s"
msgid "Idle"
msgstr "Простой"
msgid "In progress"
msgstr "Выполнение"
#, javascript-format
msgid "Synchronisation is already in progress. State: %s"
msgstr "Синхронизация уже выполняется. Статус: %s"
msgid "Encrypted"
msgstr "Зашифровано"
msgid "Encrypted items cannot be modified"
msgstr "Зашифрованные элементы не могут быть изменены"
msgid "Conflicts"
msgstr "Конфликты"
@@ -951,12 +1077,49 @@ msgstr "Светлая"
msgid "Dark"
msgstr "Тёмная"
msgid "Show uncompleted todos on top of the lists"
msgstr "Показывать незавершённые задачи вверху списков"
msgid "Uncompleted to-dos on top"
msgstr "Незавершённые задачи сверху"
msgid "Sort notes by"
msgstr "Сортировать заметки по"
msgid "Reverse sort order"
msgstr "Обратный порядок сортировки"
msgid "Save geo-location with notes"
msgstr "Сохранять информацию о геолокации в заметках"
msgid "When creating a new to-do:"
msgstr "При создании новой задачи:"
msgid "Focus title"
msgstr "Фокус на названии"
msgid "Focus body"
msgstr "Фокус на содержимом"
msgid "When creating a new note:"
msgstr "При создании новой заметки:"
msgid "Show tray icon"
msgstr "Показывать иконку в панели задач"
msgid "Global zoom percentage"
msgstr "Глобальный масштаб в процентах"
msgid "Editor font family"
msgstr "Семейство шрифтов редактора"
msgid ""
"The font name will not be checked. If incorrect or empty, it will default to "
"a generic monospace font."
msgstr ""
"Название шрифта не проверяется. Если оно указано некорректно или не задано, "
"будет использоваться стандартный моноширинный шрифт."
msgid "Automatically update the application"
msgstr "Автоматически обновлять приложение"
msgid "Synchronisation interval"
msgstr "Интервал синхронизации"
@@ -972,9 +1135,6 @@ msgstr "%d час"
msgid "%d hours"
msgstr "%d часов"
msgid "Automatically update the application"
msgstr "Автоматически обновлять приложение"
msgid "Show advanced options"
msgstr "Показывать расширенные настройки"
@@ -982,11 +1142,11 @@ msgid "Synchronisation target"
msgstr "Цель синхронизации"
msgid ""
"The target to synchonise to. If synchronising with the file system, set "
"`sync.2.path` to specify the target directory."
"The target to synchonise to. Each sync target may have additional parameters "
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
"То, с чем будет осуществляться синхронизация. При синхронизации с файловой "
"системой в `sync.2.path` указывается целевой каталог."
"Цель синхронизации. Каждая цель синхронизации может иметь дополнительные "
"параметры, именованные как «sync.NUM.NAME» (все описаны ниже)."
msgid "Directory to synchronise with (absolute path)"
msgstr "Каталог синхронизации (абсолютный путь)"
@@ -998,16 +1158,81 @@ msgstr ""
"Путь для синхронизации при включённой синхронизации с файловой системой. См. "
"`sync.target`."
msgid "Nextcloud WebDAV URL"
msgstr "Nextcloud WebDAV URL"
msgid "Nextcloud username"
msgstr "Имя пользователя Nextcloud"
msgid "Nextcloud password"
msgstr "Пароль Nextcloud"
msgid "WebDAV URL"
msgstr "URL WebDAV"
msgid "WebDAV username"
msgstr "Имя пользователя WebDAV"
msgid "WebDAV password"
msgstr "Пароль WebDAV"
#, javascript-format
msgid "Invalid option value: \"%s\". Possible values are: %s."
msgstr "Неверное значение параметра: «%s». Доступные значения: %s."
msgid "Joplin Export File"
msgstr "Файл экспорта Joplin"
msgid "Markdown"
msgstr "Markdown"
msgid "Joplin Export Directory"
msgstr "Папка экспорта Joplin"
msgid "Evernote Export File"
msgstr "Файл экспорта Evernote"
msgid "Directory"
msgstr "Директория"
#, javascript-format
msgid "Cannot load \"%s\" module for format \"%s\""
msgstr "Не удалось загрузить модуль «%s» для формата «%s»"
#, javascript-format
msgid "Please specify import format for %s"
msgstr "Пожалуйста, укажите формат импорта для %s"
#, javascript-format
msgid ""
"This item is currently encrypted: %s \"%s\". Please wait for all items to be "
"decrypted and try again."
msgstr ""
"Этот элемент сейчас зашифрован: %s «%s». Пожалуйста, дождитесь расшифровки "
"всех элементов и попробуйте снова."
msgid "There is no data to export."
msgstr "Нет данных для экспорта."
msgid "Please specify the notebook where the notes should be imported to."
msgstr ""
"Пожалуйста, укажите блокнот, в который должны быть импортированы заметки."
msgid "Items that cannot be synchronised"
msgstr "Элементы, которые не могут быть синхронизированы"
#, javascript-format
msgid "\"%s\": \"%s\""
msgstr "«%s»: «%s»"
msgid "%s (%s): %s"
msgstr "%s (%s): %s"
msgid ""
"These items will remain on the device but will not be uploaded to the sync "
"target. In order to find these items, either search for the title or the ID "
"(which is displayed in brackets above)."
msgstr ""
"Эти элементы будут оставаться на устройстве, но не будут загружены в целевой "
"объект синхронизации. Чтобы найти эти элементы, воспользуйтесь поиском по "
"названию или ID (который указывается в скобках выше)."
msgid "Sync status (synced items / total items)"
msgstr "Статус синхронизации (элементов синхронизировано/всего)"
@@ -1054,6 +1279,9 @@ msgstr "Лог"
msgid "Export Debug Report"
msgstr "Экспортировать отладочный отчёт"
msgid "Encryption Config"
msgstr "Конфигурация шифрования"
msgid "Configuration"
msgstr "Конфигурация"
@@ -1064,6 +1292,9 @@ msgstr "Переместить в блокнот..."
msgid "Move %d notes to notebook \"%s\"?"
msgstr "Переместить %d заметок в блокнот «%s»?"
msgid "Press to set the decryption password."
msgstr "Нажмите, чтобы установить пароль для расшифровки."
msgid "Select date"
msgstr "Выбрать дату"
@@ -1073,6 +1304,26 @@ msgstr "Подтвердить"
msgid "Cancel synchronisation"
msgstr "Отменить синхронизацию"
msgid "Joplin website"
msgstr "Сайт Joplin"
#, javascript-format
msgid "Master Key %s"
msgstr "Мастер-ключ %s"
#, javascript-format
msgid "Created: %s"
msgstr "Создано: %s"
msgid "Password:"
msgstr "Пароль:"
msgid "Password cannot be empty"
msgstr "Пароль не может быть пустым"
msgid "Enable"
msgstr "Включено"
#, javascript-format
msgid "The notebook could not be saved: %s"
msgstr "Не удалось сохранить блокнот: %s"
@@ -1080,6 +1331,12 @@ msgstr "Не удалось сохранить блокнот: %s"
msgid "Edit notebook"
msgstr "Редактировать блокнот"
msgid "Show all"
msgstr "Показать всё"
msgid "Errors only"
msgstr "Только ошибки"
msgid "This note has been modified:"
msgstr "Эта заметка была изменена:"
@@ -1132,3 +1389,103 @@ msgstr "У вас сейчас нет блокнота. Создайте его
msgid "Welcome"
msgstr "Добро пожаловать"
#, fuzzy
#~ msgid ""
#~ "Release notes:\n"
#~ "\n"
#~ "%s"
#~ msgstr "Удалить заметки?"
#~ msgid "Imports an Evernote notebook file (.enex file)."
#~ msgstr "Импортирует файл блокнотов Evernote (.enex-файл)."
#~ msgid ""
#~ "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
#~ msgstr ""
#~ "Файл «%s» будет импортирован в существующий блокнот «%s». Продолжить?"
#~ msgid ""
#~ "New notebook \"%s\" will be created and file \"%s\" will be imported into "
#~ "it. Continue?"
#~ msgstr ""
#~ "Будет создан новый блокнот «%s» и в него будет импортирован файл «%s». "
#~ "Продолжить?"
#~ msgid "Import Evernote notes"
#~ msgstr "Импортировать заметки из Evernote"
#~ msgid "Give focus to next pane"
#~ msgstr "Переключиться на следующую панель"
#~ msgid "Give focus to previous pane"
#~ msgstr "Переключиться на предыдущую панель"
#~ msgid "Enter command line mode"
#~ msgstr "Войти в режим командной строки"
#~ msgid "Exit command line mode"
#~ msgstr "Выйти из режима командной строки"
#~ msgid "Edit the selected note"
#~ msgstr "Редактировать выбранную заметку"
#~ msgid "Cancel the current command."
#~ msgstr "Отменить текущую команду."
#~ msgid "Exit the application."
#~ msgstr "Выйти из приложения."
#~ msgid "Delete the currently selected note or notebook."
#~ msgstr "Удалить текущую выбранную заметку или блокнот."
#~ msgid "Set a to-do as completed / not completed"
#~ msgstr "Отметить задачу как завершённую/незавершённую"
#~ msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
#~ msgstr ""
#~ "[tc] переключить консоль между развёрнутой/свёрнутой/скрытой/видимой."
#~ msgid "[t]oggle note [m]etadata."
#~ msgstr "[tm] переключить отображение метаданных заметки."
#~ msgid "[M]ake a new [n]ote"
#~ msgstr "[mn] создать новую заметку"
#~ msgid "[M]ake a new [t]odo"
#~ msgstr "[mt] создать новую задачу"
#~ msgid "[M]ake a new note[b]ook"
#~ msgstr "[mb] создать новый блокнот"
#~ msgid "Copy ([Y]ank) the [n]ote to a notebook."
#~ msgstr "[yn] копировать заметку в блокнот."
#~ msgid "Move the note to a notebook."
#~ msgstr "Переместить заметку в блокнот."
#~ msgid "Error"
#~ msgstr "Ошибка"
#~ msgid "Could not download the update: %s"
#~ msgstr "Не удалось загрузить обновление: %s"
#~ msgid "New version downloaded - application will quit now and update..."
#~ msgstr ""
#~ "Новая версия загружена — приложение сейчас будет закрыто и обновлено..."
#~ msgid "Could not install the update: %s"
#~ msgstr "Не удалось установить обновление: %s"
#~ msgid ""
#~ "The target to synchonise to. If synchronising with the file system, set "
#~ "`sync.2.path` to specify the target directory."
#~ msgstr ""
#~ "То, с чем будет осуществляться синхронизация. При синхронизации с "
#~ "файловой системой в `sync.2.path` указывается целевой каталог."
#~ msgid "To-do title:"
#~ msgstr "Название задачи:"
#~ msgid "\"%s\": \"%s\""
#~ msgstr "«%s»: «%s»"

View File

@@ -2,7 +2,7 @@
# Copyright (C) YEAR Laurent Cozic
# This file is distributed under the same license as the Joplin-CLI package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#
#, fuzzy
msgid ""
msgstr ""
@@ -15,63 +15,12 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Give focus to next pane"
msgstr "聚焦于下个面板"
msgid "Give focus to previous pane"
msgstr "聚焦于上个面板"
msgid "Enter command line mode"
msgstr "进入命令行模式"
msgid "Exit command line mode"
msgstr "退出命令行模式"
msgid "Edit the selected note"
msgstr "编辑所选笔记"
msgid "Cancel the current command."
msgstr "取消当前命令。"
msgid "Exit the application."
msgstr "退出程序。"
msgid "Delete the currently selected note or notebook."
msgstr "删除当前所选笔记或笔记本。"
msgid "To delete a tag, untag the associated notes."
msgstr "移除相关笔记的标签后才可删除此标签。"
msgid "Please select the note or notebook to be deleted first."
msgstr "请选择最先删除的笔记或笔记本。"
msgid "Set a to-do as completed / not completed"
msgstr "设置待办事项为已完成或未完成"
msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
msgstr "在最大化/最小化/隐藏/显示间切换[t]控制台[c]。"
msgid "Search"
msgstr "搜索"
msgid "[t]oggle note [m]etadata."
msgstr "切换[t]笔记元数据[m]。"
msgid "[M]ake a new [n]ote"
msgstr "创建[M]新笔记[n]"
msgid "[M]ake a new [t]odo"
msgstr "创建[M]新待办事项[t]"
msgid "[M]ake a new note[b]ook"
msgstr "创建[M]新笔记本[b]"
msgid "Copy ([Y]ank) the [n]ote to a notebook."
msgstr "复制[Y]笔记[n]至笔记本。"
msgid "Move the note to a notebook."
msgstr "移动笔记至笔记本。"
msgid "Press Ctrl+D or type \"exit\" to exit the application"
msgstr "按Ctrl+D或输入\"exit\"退出程序"
@@ -108,6 +57,9 @@ msgstr "无以下命令:%s"
msgid "The command \"%s\" is only available in GUI mode"
msgstr "命令\"%s\"仅在GUI模式下可用"
msgid "Cannot change encrypted item"
msgstr ""
#, javascript-format
msgid "Missing required argument: %s"
msgstr "缺失所需参数:%s"
@@ -168,6 +120,36 @@ msgstr "标记待办事项为完成。"
msgid "Note is not a to-do: \"%s\""
msgstr "笔记非待办事项:\"%s\""
msgid ""
"Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`, "
"`status` and `target-status`."
msgstr ""
msgid "Enter master password:"
msgstr ""
msgid "Operation cancelled"
msgstr ""
msgid ""
"Starting decryption... Please wait as it may take several minutes depending "
"on how much there is to decrypt."
msgstr ""
msgid "Completed decryption."
msgstr ""
#, fuzzy
msgid "Enabled"
msgstr "已禁止"
msgid "Disabled"
msgstr "已禁止"
#, javascript-format
msgid "Encryption is: %s"
msgstr ""
msgid "Edit note."
msgstr "编辑笔记。"
@@ -185,19 +167,28 @@ msgstr "此笔记不存在:\"%s\"。是否创建?"
msgid "Starting to edit note. Close the editor to get back to the prompt."
msgstr "开始编辑笔记。关闭编辑器则返回提示。"
#, javascript-format
msgid "Error opening note in editor: %s"
msgstr ""
msgid "Note has been saved."
msgstr "笔记已被保存。"
msgid "Exits the application."
msgstr "退出程序。"
#, fuzzy
msgid ""
"Exports Joplin data to the given directory. By default, it will export the "
"Exports Joplin data to the given path. By default, it will export the "
"complete database including notebooks, notes, tags and resources."
msgstr ""
"导出Joplin数据至给定文件目录。默认为导出所有的数据库,包含笔记本、笔记、标签"
"及资源。"
#, fuzzy, javascript-format
msgid "Destination format: %s"
msgstr "日期格式"
msgid "Exports only the given note."
msgstr "仅导出给定笔记。"
@@ -210,6 +201,10 @@ msgstr "显示此笔记的地理定位URL地址。"
msgid "Displays usage information."
msgstr "显示使用信息。"
#, javascript-format
msgid "For information on how to customise the shortcuts please visit %s"
msgstr ""
msgid "Shortcuts are not available in CLI mode."
msgstr "快捷键在CLI模式下不可用。"
@@ -247,26 +242,21 @@ msgstr "按\":\"键进入命令行模式"
msgid "To exit command line mode, press ESCAPE"
msgstr "按ESC键退出命令行模式"
#, fuzzy
msgid ""
"For the complete list of available keyboard shortcuts, type `help shortcuts`"
"For the list of keyboard shortcuts and config options, type `help keymap`"
msgstr "输入`help shortcuts`显示全部可用的快捷键列表。"
msgid "Imports an Evernote notebook file (.enex file)."
msgstr "导入Evernote笔记本文件(.enex文件)。"
msgid "Imports data into Joplin."
msgstr ""
#, fuzzy, javascript-format
msgid "Source format: %s"
msgstr "无以下命令:%s"
msgid "Do not ask for confirmation."
msgstr "不再要求确认。"
#, javascript-format
msgid "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
msgstr "文件\"%s\"将会被导入至现有笔记本\"%s\"。是否继续?"
#, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into "
"it. Continue?"
msgstr "将创建新笔记本\"%s\"并将文件\"%s\"导入至其中。是否继续?"
#, javascript-format
msgid "Found: %d."
msgstr "已找到:%d条。"
@@ -393,6 +383,14 @@ msgstr "与远程储存空间同步。"
msgid "Sync to provided target (defaults to sync.target config value)"
msgstr "同步至所提供的目标(默认为同步目标配置值)"
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr "认证未完成(未收到认证令牌)。"
#, javascript-format
msgid "Not authentified with %s. Please provide any missing credentials."
msgstr ""
msgid "Synchronisation is already in progress."
msgstr "同步正在进行中。"
@@ -405,10 +403,6 @@ msgstr ""
"锁定文件已被保留。若当前没有任何正在进行的同步,您可以在\"%s\"删除锁定文件并"
"继续操作。"
msgid ""
"Authentication was not completed (did not receive an authentication token)."
msgstr "认证未完成(未收到认证令牌)。"
#, javascript-format
msgid "Synchronisation target: %s (%s)"
msgstr "同步目标:%s (%s)"
@@ -477,6 +471,10 @@ msgstr "默认值: %s"
msgid "Possible keys/values:"
msgstr "可用键/值:"
#, fuzzy
msgid "Type `joplin help` for usage information."
msgstr "显示使用信息。"
msgid "Fatal error:"
msgstr "严重错误:"
@@ -510,6 +508,25 @@ msgid ""
"For example, to create a notebook press `mb`; to create a note press `mn`."
msgstr ""
msgid ""
"One or more items are currently encrypted and you may need to supply a "
"master password. To do so please type `e2ee decrypt`. If you have already "
"supplied the password, the encrypted items are being decrypted in the "
"background and will be available soon."
msgstr ""
#, javascript-format
msgid "Exporting to \"%s\" as \"%s\" format. Please wait..."
msgstr ""
#, javascript-format
msgid "Importing from \"%s\" as \"%s\" format. Please wait..."
msgstr ""
#, fuzzy
msgid "PDF File"
msgstr "文件"
msgid "File"
msgstr "文件"
@@ -522,11 +539,19 @@ msgstr "新待办事项"
msgid "New notebook"
msgstr "新笔记本"
msgid "Import Evernote notes"
msgstr "导入Evernote笔记"
msgid "Import"
msgstr "导入"
msgid "Evernote Export Files"
msgstr "Evernote导出文件"
#, fuzzy
msgid "Export"
msgstr "导入"
msgid "Print"
msgstr ""
#, javascript-format
msgid "Hide %s"
msgstr ""
msgid "Quit"
msgstr "退出"
@@ -546,13 +571,23 @@ msgstr "粘贴"
msgid "Search in all the notes"
msgstr "在所有笔记内搜索"
msgid "View"
msgstr ""
msgid "Toggle editor layout"
msgstr ""
msgid "Tools"
msgstr "工具"
msgid "Synchronisation status"
msgstr "同步状态"
msgid "Options"
msgid "Encryption options"
msgstr ""
#, fuzzy
msgid "General Options"
msgstr "选项"
msgid "Help"
@@ -561,6 +596,13 @@ msgstr "帮助"
msgid "Website and documentation"
msgstr "网站与文档"
#, fuzzy
msgid "Make a donation"
msgstr "网站与文档"
msgid "Check for updates..."
msgstr ""
msgid "About Joplin"
msgstr "关于Joplin"
@@ -568,12 +610,36 @@ msgstr "关于Joplin"
msgid "%s %s (%s, %s)"
msgstr "%s %s (%s, %s)"
#, fuzzy, javascript-format
msgid "Open %s"
msgstr "%s:%s"
msgid "Exit"
msgstr ""
msgid "OK"
msgstr "确认"
msgid "Cancel"
msgstr "取消"
msgid "Current version is up-to-date."
msgstr ""
msgid "An update is available, do you want to download it now?"
msgstr ""
msgid "Yes"
msgstr ""
#, fuzzy
msgid "No"
msgstr "否"
#, fuzzy
msgid "Check synchronisation configuration"
msgstr "取消同步"
#, javascript-format
msgid "Notes and settings are stored in: %s"
msgstr ""
@@ -632,19 +698,21 @@ msgid ""
"how the notes or notebooks were originally encrypted."
msgstr ""
msgid "Missing Master Keys"
msgstr ""
msgid ""
"The master keys with these IDs are used to encrypt some of your items, "
"however the application does not currently have access to them. It is likely "
"they will eventually be downloaded via synchronisation."
msgstr ""
msgid "Status"
msgstr "状态"
msgid "Encryption is:"
msgstr ""
#, fuzzy
msgid "Enabled"
msgstr "已禁止"
msgid "Disabled"
msgstr "已禁止"
msgid "Back"
msgstr "返回"
@@ -656,15 +724,9 @@ msgstr "将创建新笔记本\"%s\"并将文件\"%s\"导入至其中"
msgid "Please create a notebook first."
msgstr "请先创建笔记本。"
msgid "Note title:"
msgstr "笔记标题:"
msgid "Please create a notebook first"
msgstr "请先创建笔记本"
msgid "To-do title:"
msgstr "待办事项标题:"
msgid "Notebook title:"
msgstr "笔记本标题:"
@@ -680,6 +742,9 @@ msgstr "重命名笔记本:"
msgid "Set alarm:"
msgstr "设置提醒:"
msgid "Search"
msgstr "搜索"
msgid "Layout"
msgstr "布局"
@@ -716,6 +781,13 @@ msgid ""
"There is currently no notebook. Create one by clicking on \"New notebook\"."
msgstr "当前无笔记。点击(+)创建新笔记。"
msgid "Open..."
msgstr ""
#, fuzzy
msgid "Save as..."
msgstr "保存更改"
#, javascript-format
msgid "Unsupported link or message: %s"
msgstr "不支持的链接或信息:%s"
@@ -723,9 +795,30 @@ msgstr "不支持的链接或信息:%s"
msgid "Attach file"
msgstr "附加文件"
msgid "Tags"
msgstr "标签"
msgid "Set alarm"
msgstr "设置提醒"
#, javascript-format
msgid ""
"This note has no content. Click on \"%s\" to toggle the editor and edit the "
"note."
msgstr ""
#, fuzzy
msgid "to-do"
msgstr "新待办事项"
#, fuzzy
msgid "note"
msgstr "新笔记"
#, fuzzy, javascript-format
msgid "Creating new %s..."
msgstr "正在导入笔记..."
msgid "Refresh"
msgstr "刷新"
@@ -735,8 +828,8 @@ msgstr "清除"
msgid "OneDrive Login"
msgstr "登陆OneDrive"
msgid "Import"
msgstr "导入"
msgid "Options"
msgstr "选项"
msgid "Synchronisation Status"
msgstr "同步状态"
@@ -759,9 +852,6 @@ msgstr "同步"
msgid "Notebooks"
msgstr "笔记本"
msgid "Tags"
msgstr "标签"
msgid "Searches"
msgstr "搜索历史"
@@ -780,12 +870,18 @@ msgstr "未知标记:%s"
msgid "File system"
msgstr "文件系统"
msgid "Nextcloud"
msgstr ""
msgid "OneDrive"
msgstr "OneDrive"
msgid "OneDrive Dev (For testing only)"
msgstr "OneDrive开发员(仅测试用)"
msgid "WebDAV"
msgstr ""
#, javascript-format
msgid "Unknown log level: %s"
msgstr "未知日志level:%s"
@@ -841,6 +937,10 @@ msgstr "已删除本地项目: %d。"
msgid "Deleted remote items: %d."
msgstr "已删除远程项目: %d。"
#, fuzzy, javascript-format
msgid "Fetched items: %d/%d."
msgstr "已新建本地项目: %d。"
#, javascript-format
msgid "State: \"%s\"."
msgstr "状态:\"%s\"。"
@@ -852,10 +952,27 @@ msgstr "正在取消..."
msgid "Completed: %s"
msgstr "已完成:\"%s\""
#, fuzzy, javascript-format
msgid "Last error: %s"
msgstr "严重错误:"
msgid "Idle"
msgstr ""
msgid "In progress"
msgstr ""
#, javascript-format
msgid "Synchronisation is already in progress. State: %s"
msgstr "同步正在进行中。状态:%s"
msgid "Encrypted"
msgstr ""
#, fuzzy
msgid "Encrypted items cannot be modified"
msgstr "一些项目无法被同步。"
msgid "Conflicts"
msgstr "冲突"
@@ -907,12 +1024,52 @@ msgstr "浅色"
msgid "Dark"
msgstr "深色"
msgid "Show uncompleted todos on top of the lists"
#, fuzzy
msgid "Uncompleted to-dos on top"
msgstr "在列表上方显示未完成的待办事项"
msgid "Sort notes by"
msgstr ""
#, fuzzy
msgid "Reverse sort order"
msgstr "反转排序顺序。"
msgid "Save geo-location with notes"
msgstr "保存笔记时同时保存地理定位信息"
#, fuzzy
msgid "When creating a new to-do:"
msgstr "创建新待办事项。"
#, fuzzy
msgid "Focus title"
msgstr "笔记标题:"
msgid "Focus body"
msgstr ""
#, fuzzy
msgid "When creating a new note:"
msgstr "创建新笔记。"
msgid "Show tray icon"
msgstr ""
msgid "Global zoom percentage"
msgstr ""
msgid "Editor font family"
msgstr ""
msgid ""
"The font name will not be checked. If incorrect or empty, it will default to "
"a generic monospace font."
msgstr ""
msgid "Automatically update the application"
msgstr "自动更新此程序"
msgid "Synchronisation interval"
msgstr "同步间隔"
@@ -928,9 +1085,6 @@ msgstr "%d小时"
msgid "%d hours"
msgstr "%d小时"
msgid "Automatically update the application"
msgstr "自动更新此程序"
msgid "Show advanced options"
msgstr "显示高级选项"
@@ -938,9 +1092,9 @@ msgid "Synchronisation target"
msgstr "同步目标"
msgid ""
"The target to synchonise to. If synchronising with the file system, set "
"`sync.2.path` to specify the target directory."
msgstr "同步的目标。若与文件系统同步,设置`sync.2.path`为指定目标目录。"
"The target to synchonise to. Each sync target may have additional parameters "
"which are named as `sync.NUM.NAME` (all documented below)."
msgstr ""
msgid "Directory to synchronise with (absolute path)"
msgstr ""
@@ -950,16 +1104,78 @@ msgid ""
"See `sync.target`."
msgstr "当文件系统同步开启时的同步路径。参考`sync.target`。"
msgid "Nextcloud WebDAV URL"
msgstr ""
msgid "Nextcloud username"
msgstr ""
msgid "Nextcloud password"
msgstr ""
msgid "WebDAV URL"
msgstr ""
msgid "WebDAV username"
msgstr ""
msgid "WebDAV password"
msgstr ""
#, javascript-format
msgid "Invalid option value: \"%s\". Possible values are: %s."
msgstr "无效的选项值:\"%s\"。可用值为:%s。"
#, fuzzy
msgid "Joplin Export File"
msgstr "Evernote导出文件"
msgid "Markdown"
msgstr ""
msgid "Joplin Export Directory"
msgstr ""
#, fuzzy
msgid "Evernote Export File"
msgstr "Evernote导出文件"
msgid "Directory"
msgstr ""
#, javascript-format
msgid "Cannot load \"%s\" module for format \"%s\""
msgstr ""
#, javascript-format
msgid "Please specify import format for %s"
msgstr ""
#, javascript-format
msgid ""
"This item is currently encrypted: %s \"%s\". Please wait for all items to be "
"decrypted and try again."
msgstr ""
msgid "There is no data to export."
msgstr ""
#, fuzzy
msgid "Please specify the notebook where the notes should be imported to."
msgstr "请选择最先删除的笔记或笔记本。"
msgid "Items that cannot be synchronised"
msgstr "项目无法被同步。"
#, javascript-format
msgid "\"%s\": \"%s\""
msgstr "\"%s\": \"%s\""
#, fuzzy, javascript-format
msgid "%s (%s): %s"
msgstr "%s %s (%s)"
msgid ""
"These items will remain on the device but will not be uploaded to the sync "
"target. In order to find these items, either search for the title or the ID "
"(which is displayed in brackets above)."
msgstr ""
msgid "Sync status (synced items / total items)"
msgstr "同步状态(已同步项目/项目总数)"
@@ -1006,6 +1222,9 @@ msgstr "日志"
msgid "Export Debug Report"
msgstr "导出调试报告"
msgid "Encryption Config"
msgstr ""
msgid "Configuration"
msgstr "配置"
@@ -1016,6 +1235,9 @@ msgstr "移动至笔记本..."
msgid "Move %d notes to notebook \"%s\"?"
msgstr "移动%d条笔记至笔记本\"%s\"?"
msgid "Press to set the decryption password."
msgstr ""
msgid "Select date"
msgstr "选择日期"
@@ -1025,6 +1247,27 @@ msgstr "确认"
msgid "Cancel synchronisation"
msgstr "取消同步"
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr ""
#, fuzzy, javascript-format
msgid "Created: %s"
msgstr "已创建:%d条。"
msgid "Password:"
msgstr ""
msgid "Password cannot be empty"
msgstr ""
#, fuzzy
msgid "Enable"
msgstr "已禁止"
#, javascript-format
msgid "The notebook could not be saved: %s"
msgstr "此笔记本无法保存:%s"
@@ -1032,6 +1275,12 @@ msgstr "此笔记本无法保存:%s"
msgid "Edit notebook"
msgstr "编辑笔记本"
msgid "Show all"
msgstr ""
msgid "Errors only"
msgstr ""
msgid "This note has been modified:"
msgstr "此笔记已被修改:"
@@ -1083,6 +1332,87 @@ msgstr "您当前没有任何笔记本。点击(+)按钮创建新笔记本。"
msgid "Welcome"
msgstr "欢迎"
#, fuzzy
#~ msgid ""
#~ "Release notes:\n"
#~ "\n"
#~ "%s"
#~ msgstr "是否删除笔记?"
#~ msgid "Imports an Evernote notebook file (.enex file)."
#~ msgstr "导入Evernote笔记本文件(.enex文件)。"
#~ msgid ""
#~ "File \"%s\" will be imported into existing notebook \"%s\". Continue?"
#~ msgstr "文件\"%s\"将会被导入至现有笔记本\"%s\"。是否继续?"
#~ msgid ""
#~ "New notebook \"%s\" will be created and file \"%s\" will be imported into "
#~ "it. Continue?"
#~ msgstr "将创建新笔记本\"%s\"并将文件\"%s\"导入至其中。是否继续?"
#~ msgid "Import Evernote notes"
#~ msgstr "导入Evernote笔记"
#~ msgid "Give focus to next pane"
#~ msgstr "聚焦于下个面板"
#~ msgid "Give focus to previous pane"
#~ msgstr "聚焦于上个面板"
#~ msgid "Enter command line mode"
#~ msgstr "进入命令行模式"
#~ msgid "Exit command line mode"
#~ msgstr "退出命令行模式"
#~ msgid "Edit the selected note"
#~ msgstr "编辑所选笔记"
#~ msgid "Cancel the current command."
#~ msgstr "取消当前命令。"
#~ msgid "Exit the application."
#~ msgstr "退出程序。"
#~ msgid "Delete the currently selected note or notebook."
#~ msgstr "删除当前所选笔记或笔记本。"
#~ msgid "Set a to-do as completed / not completed"
#~ msgstr "设置待办事项为已完成或未完成"
#~ msgid "[t]oggle [c]onsole between maximized/minimized/hidden/visible."
#~ msgstr "在最大化/最小化/隐藏/显示间切换[t]控制台[c]。"
#~ msgid "[t]oggle note [m]etadata."
#~ msgstr "切换[t]笔记元数据[m]。"
#~ msgid "[M]ake a new [n]ote"
#~ msgstr "创建[M]新笔记[n]"
#~ msgid "[M]ake a new [t]odo"
#~ msgstr "创建[M]新待办事项[t]"
#~ msgid "[M]ake a new note[b]ook"
#~ msgstr "创建[M]新笔记本[b]"
#~ msgid "Copy ([Y]ank) the [n]ote to a notebook."
#~ msgstr "复制[Y]笔记[n]至笔记本。"
#~ msgid "Move the note to a notebook."
#~ msgstr "移动笔记至笔记本。"
#~ msgid ""
#~ "The target to synchonise to. If synchronising with the file system, set "
#~ "`sync.2.path` to specify the target directory."
#~ msgstr "同步的目标。若与文件系统同步,设置`sync.2.path`为指定目标目录。"
#~ msgid "To-do title:"
#~ msgstr "待办事项标题:"
#~ msgid "\"%s\": \"%s\""
#~ msgstr "\"%s\": \"%s\""
#~ msgid "Delete notebook \"%s\"?"
#~ msgstr "删除笔记本\"%s\"?"

View File

@@ -1,13 +1,13 @@
{
"name": "joplin",
"version": "0.10.85",
"version": "1.0.101",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"ajv": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.3.0.tgz",
"integrity": "sha1-RBT/dKUIecII7l/cgm4ywwNUnto=",
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"requires": {
"co": "4.6.0",
"fast-deep-equal": "1.0.0",
@@ -64,6 +64,11 @@
}
}
},
"async-mutex": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.1.3.tgz",
"integrity": "sha1-Cq0hEjaXlas/F+M3RFVtLs9UdWY="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@@ -85,6 +90,11 @@
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"base-64": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz",
"integrity": "sha1-eAqZyE59YAJgNhURxId2E78k9rs="
},
"bcrypt-pbkdf": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
@@ -197,6 +207,11 @@
"delayed-stream": "1.0.0"
}
},
"compare-version": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz",
"integrity": "sha1-AWLsLZNR9d3VmpICy6k1NmpyUIA="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -420,6 +435,14 @@
"universalify": "0.1.1"
}
},
"fs-minipass": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
"integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
"requires": {
"minipass": "2.2.1"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -437,7 +460,7 @@
"ndarray": "1.0.18",
"ndarray-pack": "1.2.1",
"node-bitmap": "0.0.1",
"omggif": "1.0.8",
"omggif": "1.0.9",
"parse-data-uri": "0.2.0",
"pngjs": "2.3.1",
"request": "2.83.0",
@@ -489,7 +512,7 @@
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
"requires": {
"ajv": "5.3.0",
"ajv": "5.5.2",
"har-schema": "2.0.0"
}
},
@@ -843,9 +866,9 @@
}
},
"minizlib": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.0.4.tgz",
"integrity": "sha512-sN4U9tIJtBRwKbwgFh9qJfrPIQ/GGTRr1MGqkgOeMTLy8/lM0FcWU//FqlnZ3Vb7gJ+Mxh3FOg1EklibdajbaQ==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz",
"integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==",
"requires": {
"minipass": "2.2.1"
}
@@ -948,9 +971,9 @@
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"omggif": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.8.tgz",
"integrity": "sha1-F483sqsLPXtG7ToORr0HkLWNNTA="
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.9.tgz",
"integrity": "sha1-3LcCTazVDFK00wPwSALJHAV8dl8="
},
"once": {
"version": "1.4.0",
@@ -1045,6 +1068,11 @@
"strict-uri-encode": "1.1.0"
}
},
"querystringify": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz",
"integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs="
},
"readable-stream": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
@@ -1099,6 +1127,11 @@
"uuid": "3.1.0"
}
},
"requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
},
"retry": {
"version": "0.10.1",
"resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz",
@@ -1136,6 +1169,20 @@
"semver": "5.4.1",
"simple-get": "2.7.0",
"tar": "3.2.1"
},
"dependencies": {
"tar": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz",
"integrity": "sha512-ZSzds1E0IqutvMU8HxjMaU8eB7urw2fGwTq88ukDOVuUIh0656l7/P7LiVPxhO5kS4flcRJQk8USG+cghQbTUQ==",
"requires": {
"chownr": "1.0.1",
"minipass": "2.2.1",
"minizlib": "1.1.0",
"mkdirp": "0.5.1",
"yallist": "3.0.2"
}
}
}
},
"simple-concat": {
@@ -1915,9 +1962,9 @@
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
},
"string-kit": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/string-kit/-/string-kit-0.6.3.tgz",
"integrity": "sha512-G2T92klsuE+S9mqdKQyWurFweNQV5X+FRzSKTqYHRdaVUN/4dL6urbYJJ+xb9ep/4XWm+4RNT8j3acncNhFRBg==",
"version": "0.6.4",
"resolved": "https://registry.npmjs.org/string-kit/-/string-kit-0.6.4.tgz",
"integrity": "sha512-imrOojdsXlL6xzfERCxvc/iA9Zwpzbfs+qeP6VB0s0rQVnMc3Nwkyhge0e8Uoayph7PVAwPNmLpohox27G3fgA==",
"requires": {
"xregexp": "3.2.0"
}
@@ -1980,13 +2027,14 @@
"integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0="
},
"tar": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz",
"integrity": "sha512-ZSzds1E0IqutvMU8HxjMaU8eB7urw2fGwTq88ukDOVuUIh0656l7/P7LiVPxhO5kS4flcRJQk8USG+cghQbTUQ==",
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.0.tgz",
"integrity": "sha512-gJlTiiErwo96K904FnoYWl+5+FBgS+FimU6GMh66XLdLa55al8+d4jeDfPoGwSNHdtWI5FJP6xurmVqhBuGJpQ==",
"requires": {
"chownr": "1.0.1",
"fs-minipass": "1.2.5",
"minipass": "2.2.1",
"minizlib": "1.0.4",
"minizlib": "1.1.0",
"mkdirp": "0.5.1",
"yallist": "3.0.2"
}
@@ -2014,15 +2062,15 @@
}
},
"terminal-kit": {
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/terminal-kit/-/terminal-kit-1.14.0.tgz",
"integrity": "sha512-ir0I2QtcBDSg2w0UvohlqdDpGlS3S2UYBG4NnYKnK/4VywgnbfxgdpXN3el0uCH3OeH6fG38luW7RmDM96FqUw==",
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/terminal-kit/-/terminal-kit-1.14.3.tgz",
"integrity": "sha512-ZHtuElnBhK0IXOYNvQ7eYgaArwEoOv7saQc4Q0Z9p02JeC7iajC20/odV77BKB3jw/Qthvf9mpASf8gNDYv7xQ==",
"requires": {
"async-kit": "2.2.3",
"get-pixels": "3.3.0",
"ndarray": "1.0.18",
"nextgen-events": "0.10.2",
"string-kit": "0.6.3",
"string-kit": "0.6.4",
"tree-kit": "0.5.26"
}
},
@@ -2032,16 +2080,16 @@
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
},
"tkwidgets": {
"version": "0.5.20",
"resolved": "https://registry.npmjs.org/tkwidgets/-/tkwidgets-0.5.20.tgz",
"integrity": "sha512-9wGsMrrFJvE/6TKUc0dEFFhwxvZLeNsYOxnpy1JCwyk/hYCEF70nuvk7VvJeG4TPaQBaGKPj6c7pCgdREvz4Jw==",
"version": "0.5.25",
"resolved": "https://registry.npmjs.org/tkwidgets/-/tkwidgets-0.5.25.tgz",
"integrity": "sha512-f+12QbxNCLg9Jou5JoPJxATGLmzpDAQeM7QRTXvuqdEB/QvPD9+UlPUL7eYJP1QJv2zzT6EIWWbdpDkXPEtzCQ==",
"requires": {
"chalk": "2.3.0",
"emphasize": "1.5.0",
"node-emoji": "git+https://github.com/laurent22/node-emoji.git#9fa01eac463e94dde1316ef8c53089eeef4973b5",
"slice-ansi": "1.0.0",
"string-width": "2.1.1",
"terminal-kit": "1.14.0",
"terminal-kit": "1.14.3",
"wrap-ansi": "3.0.1"
},
"dependencies": {
@@ -2095,6 +2143,15 @@
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz",
"integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc="
},
"url-parse": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz",
"integrity": "sha512-DT1XbYAfmQP65M/mE6OALxmXzZ/z1+e5zk2TcSKe/KiYbNGZxgtttzC0mR/sjopbpOXcbniq7eIKmocJnUWlEw==",
"requires": {
"querystringify": "1.0.0",
"requires-port": "1.0.0"
}
},
"url-to-options": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz",
@@ -2139,6 +2196,20 @@
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"xml2js": {
"version": "0.4.19",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
"integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
"requires": {
"sax": "1.2.4",
"xmlbuilder": "9.0.4"
}
},
"xmlbuilder": {
"version": "9.0.4",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz",
"integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8="
},
"xregexp": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.2.0.tgz",

View File

@@ -19,7 +19,7 @@
],
"owner": "Laurent Cozic"
},
"version": "0.10.85",
"version": "1.0.101",
"bin": {
"joplin": "./main.js"
},
@@ -28,6 +28,9 @@
},
"dependencies": {
"app-module-path": "^2.2.0",
"async-mutex": "^0.1.3",
"base-64": "^0.1.0",
"compare-version": "^0.1.2",
"follow-redirects": "^1.2.4",
"form-data": "^2.1.4",
"fs-extra": "^5.0.0",
@@ -41,7 +44,6 @@
"node-emoji": "^1.8.1",
"node-fetch": "^1.7.1",
"node-persist": "^2.1.0",
"os-tmpdir": "^1.0.2",
"promise": "^7.1.1",
"proper-lockfile": "^2.0.1",
"query-string": "4.3.4",
@@ -54,10 +56,13 @@
"string-padding": "^1.0.2",
"string-to-stream": "^1.1.0",
"strip-ansi": "^4.0.0",
"tar": "^4.4.0",
"tcp-port-used": "^0.1.2",
"tkwidgets": "^0.5.20",
"tkwidgets": "^0.5.25",
"url-parse": "^1.2.0",
"uuid": "^3.0.1",
"word-wrap": "^1.2.3",
"xml2js": "^0.4.19",
"yargs-parser": "^7.0.0"
},
"devDependencies": {

View File

@@ -9,4 +9,10 @@ bash $SCRIPT_DIR/build.sh
cp "$SCRIPT_DIR/package.json" build/
cp "$SCRIPT_DIR/../README.md" build/
cd "$SCRIPT_DIR/build"
npm publish
npm publish
NEW_VERSION=$(cat package.json | jq -r .version)
git add -A
git commit -m "CLI v$NEW_VERSION"
git tag "cli-v$NEW_VERSION"
git push && git push --tags

View File

@@ -9,9 +9,7 @@ rsync -a "$ROOT_DIR/build/locales/" "$BUILD_DIR/locales/"
mkdir -p "$BUILD_DIR/data"
if [[ $TEST_FILE == "" ]]; then
(cd "$ROOT_DIR" && npm test tests-build/synchronizer.js)
(cd "$ROOT_DIR" && npm test tests-build/encryption.js)
(cd "$ROOT_DIR" && npm test tests-build/ArrayUtils.js)
(cd "$ROOT_DIR" && npm test tests-build/synchronizer.js tests-build/encryption.js tests-build/ArrayUtils.js tests-build/models_Setting.js tests-build/services_InteropService.js)
else
(cd "$ROOT_DIR" && npm test tests-build/$TEST_FILE.js)
fi

View File

@@ -8,7 +8,7 @@ process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
describe('Encryption', function() {
describe('ArrayUtils', function() {
beforeEach(async (done) => {
done();
@@ -29,4 +29,19 @@ describe('Encryption', function() {
done();
});
it('should find items using binary search', async (done) => {
let items = ['aaa', 'ccc', 'bbb'];
expect(ArrayUtils.binarySearch(items, 'bbb')).toBe(-1); // Array not sorted!
items.sort();
expect(ArrayUtils.binarySearch(items, 'bbb')).toBe(1);
expect(ArrayUtils.binarySearch(items, 'ccc')).toBe(2);
expect(ArrayUtils.binarySearch(items, 'oops')).toBe(-1);
expect(ArrayUtils.binarySearch(items, 'aaa')).toBe(0);
items = [];
expect(ArrayUtils.binarySearch(items, 'aaa')).toBe(-1);
done();
});
});

View File

@@ -0,0 +1,32 @@
require('app-module-path').addPath(__dirname);
const { time } = require('lib/time-utils.js');
const { asyncTest, fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js');
const Setting = require('lib/models/Setting.js');
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
describe('models_Setting', function() {
beforeEach(async (done) => {
done();
});
it('should return only sub-values', asyncTest(async () => {
const settings = {
'sync.5.path': 'http://example.com',
'sync.5.username': 'testing',
}
let output = Setting.subValues('sync.5', settings);
expect(output['path']).toBe('http://example.com');
expect(output['username']).toBe('testing');
output = Setting.subValues('sync.4', settings);
expect('path' in output).toBe(false);
expect('username' in output).toBe(false);
}));
});

View File

@@ -0,0 +1,252 @@
require('app-module-path').addPath(__dirname);
const { time } = require('lib/time-utils.js');
const { asyncTest, fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js');
const InteropService = require('lib/services/InteropService.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const Tag = require('lib/models/Tag.js');
const NoteTag = require('lib/models/NoteTag.js');
const Resource = require('lib/models/Resource.js');
const fs = require('fs-extra');
const ArrayUtils = require('lib/ArrayUtils');
const ObjectUtils = require('lib/ObjectUtils');
const { shim } = require('lib/shim.js');
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
function exportDir() {
return __dirname + '/export';
}
function fieldsEqual(model1, model2, fieldNames) {
for (let i = 0; i < fieldNames.length; i++) {
const f = fieldNames[i];
expect(model1[f]).toBe(model2[f], 'For key ' + f);
}
}
describe('services_InteropService', function() {
beforeEach(async (done) => {
await setupDatabaseAndSynchronizer(1);
await switchClient(1);
const dir = exportDir();
await fs.remove(dir);
await fs.mkdirp(dir);
done();
});
it('should export and import folders', asyncTest(async () => {
const service = new InteropService();
let folder1 = await Folder.save({ title: "folder1" });
folder1 = await Folder.load(folder1.id);
const filePath = exportDir() + '/test.jex';
await service.export({ path: filePath });
await Folder.delete(folder1.id);
await service.import({ path: filePath });
// Check that a new folder, with a new ID, has been created
expect(await Folder.count()).toBe(1);
let folder2 = (await Folder.all())[0];
expect(folder2.id).not.toBe(folder1.id);
expect(folder2.title).toBe(folder1.title);
await service.import({ path: filePath });
// As there was already a folder with the same title, check that the new one has been renamed
await Folder.delete(folder2.id);
let folder3 = (await Folder.all())[0];
expect(await Folder.count()).toBe(1);
expect(folder3.title).not.toBe(folder2.title);
let fieldNames = Folder.fieldNames();
fieldNames = ArrayUtils.removeElement(fieldNames, 'id');
fieldNames = ArrayUtils.removeElement(fieldNames, 'title');
fieldsEqual(folder3, folder1, fieldNames);
}));
it('should export and import folders and notes', asyncTest(async () => {
const service = new InteropService();
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
note1 = await Note.load(note1.id);
const filePath = exportDir() + '/test.jex';
await service.export({ path: filePath });
await Folder.delete(folder1.id);
await Note.delete(note1.id);
await service.import({ path: filePath });
expect(await Note.count()).toBe(1);
let note2 = (await Note.all())[0];
let folder2 = (await Folder.all())[0];
expect(note1.parent_id).not.toBe(note2.parent_id);
expect(note1.id).not.toBe(note2.id);
expect(note2.parent_id).toBe(folder2.id);
let fieldNames = Note.fieldNames();
fieldNames = ArrayUtils.removeElement(fieldNames, 'id');
fieldNames = ArrayUtils.removeElement(fieldNames, 'parent_id');
fieldsEqual(note1, note2, fieldNames);
await service.import({ path: filePath });
note2 = (await Note.all())[0];
let note3 = (await Note.all())[1];
expect(note2.id).not.toBe(note3.id);
expect(note2.parent_id).not.toBe(note3.parent_id);
fieldsEqual(note2, note3, fieldNames);
}));
it('should export and import notes to specific folder', asyncTest(async () => {
const service = new InteropService();
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
note1 = await Note.load(note1.id);
const filePath = exportDir() + '/test.jex';
await service.export({ path: filePath });
await Note.delete(note1.id);
await service.import({ path: filePath, destinationFolderId: folder1.id });
expect(await Note.count()).toBe(1);
expect(await Folder.count()).toBe(1);
expect(await checkThrowAsync(async () => await service.import({ path: filePath, destinationFolderId: 'oops' }))).toBe(true);
}));
it('should export and import tags', asyncTest(async () => {
const service = new InteropService();
const filePath = exportDir() + '/test.jex';
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
let tag1 = await Tag.save({ title: 'mon tag' });
tag1 = await Tag.load(tag1.id);
await Tag.addNote(tag1.id, note1.id);
await service.export({ path: filePath });
await Folder.delete(folder1.id);
await Note.delete(note1.id);
await Tag.delete(tag1.id);
await service.import({ path: filePath });
expect(await Tag.count()).toBe(1);
let tag2 = (await Tag.all())[0];
let note2 = (await Note.all())[0];
expect(tag1.id).not.toBe(tag2.id);
let fieldNames = Note.fieldNames();
fieldNames = ArrayUtils.removeElement(fieldNames, 'id');
fieldsEqual(tag1, tag2, fieldNames);
let noteIds = await Tag.noteIds(tag2.id);
expect(noteIds.length).toBe(1);
expect(noteIds[0]).toBe(note2.id);
await service.import({ path: filePath });
// If importing again, no new tag should be created as one with
// the same name already existed. The newly imported note should
// however go under that already existing tag.
expect(await Tag.count()).toBe(1);
noteIds = await Tag.noteIds(tag2.id);
expect(noteIds.length).toBe(2);
}));
it('should export and import resources', asyncTest(async () => {
const service = new InteropService();
const filePath = exportDir() + '/test.jex';
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
await shim.attachFileToNote(note1, __dirname + '/../tests/support/photo.jpg');
note1 = await Note.load(note1.id);
let resourceIds = Note.linkedResourceIds(note1.body);
let resource1 = await Resource.load(resourceIds[0]);
await service.export({ path: filePath });
await Note.delete(note1.id);
await service.import({ path: filePath });
expect(await Resource.count()).toBe(2);
let note2 = (await Note.all())[0];
expect(note2.body).not.toBe(note1.body);
resourceIds = Note.linkedResourceIds(note2.body);
expect(resourceIds.length).toBe(1);
let resource2 = await Resource.load(resourceIds[0]);
expect(resource2.id).not.toBe(resource1.id);
let fieldNames = Note.fieldNames();
fieldNames = ArrayUtils.removeElement(fieldNames, 'id');
fieldsEqual(resource1, resource2, fieldNames);
const resourcePath1 = Resource.fullPath(resource1);
const resourcePath2 = Resource.fullPath(resource2);
expect(resourcePath1).not.toBe(resourcePath2);
expect(fileContentEqual(resourcePath1, resourcePath2)).toBe(true);
}));
it('should export and import single notes', asyncTest(async () => {
const service = new InteropService();
const filePath = exportDir() + '/test.jex';
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
await service.export({ path: filePath, sourceNoteIds: [note1.id] });
await Note.delete(note1.id);
await Folder.delete(folder1.id);
await service.import({ path: filePath });
expect(await Note.count()).toBe(1);
expect(await Folder.count()).toBe(1);
let folder2 = (await Folder.all())[0];
expect(folder2.title).toBe('test');
}));
it('should export and import single folders', asyncTest(async () => {
const service = new InteropService();
const filePath = exportDir() + '/test.jex';
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
await service.export({ path: filePath, sourceFolderIds: [folder1.id] });
await Note.delete(note1.id);
await Folder.delete(folder1.id);
await service.import({ path: filePath });
expect(await Note.count()).toBe(1);
expect(await Folder.count()).toBe(1);
let folder2 = (await Folder.all())[0];
expect(folder2.title).toBe('folder1');
}));
});

View File

@@ -0,0 +1,72 @@
require('app-module-path').addPath(__dirname);
const { time } = require('lib/time-utils.js');
const { asyncTest, fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js');
const InteropService = require('lib/services/InteropService.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const Tag = require('lib/models/Tag.js');
const NoteTag = require('lib/models/NoteTag.js');
const Resource = require('lib/models/Resource.js');
const ResourceService = require('lib/services/ResourceService.js');
const fs = require('fs-extra');
const ArrayUtils = require('lib/ArrayUtils');
const ObjectUtils = require('lib/ObjectUtils');
const { shim } = require('lib/shim.js');
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
function exportDir() {
return __dirname + '/export';
}
function fieldsEqual(model1, model2, fieldNames) {
for (let i = 0; i < fieldNames.length; i++) {
const f = fieldNames[i];
expect(model1[f]).toBe(model2[f], 'For key ' + f);
}
}
describe('services_ResourceService', function() {
beforeEach(async (done) => {
await setupDatabaseAndSynchronizer(1);
await switchClient(1);
done();
});
it('should delete orphaned resources', asyncTest(async () => {
const service = new ResourceService();
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
note1 = await shim.attachFileToNote(note1, __dirname + '/../tests/support/photo.jpg');
let resource1 = (await Resource.all())[0];
const resourcePath = Resource.fullPath(resource1);
await service.indexNoteResources();
await service.deleteOrphanResources(0);
expect(!!(await Resource.load(resource1.id))).toBe(true);
await Note.delete(note1.id);
await service.deleteOrphanResources(0);
expect(!!(await Resource.load(resource1.id))).toBe(true);
await service.indexNoteResources();
await service.deleteOrphanResources(1000 * 60);
expect(!!(await Resource.load(resource1.id))).toBe(true);
await service.deleteOrphanResources(0);
expect(!!(await Resource.load(resource1.id))).toBe(false);
expect(await shim.fsDriver().exists(resourcePath)).toBe(false);
}));
});

View File

@@ -19,7 +19,7 @@ process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; // The first test is slow because the database needs to be built
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000 + 30000; // The first test is slow because the database needs to be built
async function allItems() {
let folders = await Folder.all();
@@ -60,6 +60,7 @@ async function allSyncTargetItemsEncrypted() {
}
async function localItemsSameAsRemote(locals, expect) {
let error = null;
try {
let files = await fileApi().list();
files = files.items;
@@ -74,19 +75,22 @@ async function localItemsSameAsRemote(locals, expect) {
expect(!!remote).toBe(true);
if (!remote) continue;
if (syncTargetId() == SyncTargetRegistry.nameToId('filesystem')) {
expect(remote.updated_time).toBe(Math.floor(dbItem.updated_time / 1000) * 1000);
} else {
expect(remote.updated_time).toBe(dbItem.updated_time);
}
// if (syncTargetId() == SyncTargetRegistry.nameToId('filesystem')) {
// expect(remote.updated_time).toBe(Math.floor(dbItem.updated_time / 1000) * 1000);
// } else {
// expect(remote.updated_time).toBe(dbItem.updated_time);
// }
let remoteContent = await fileApi().get(path);
remoteContent = dbItem.type_ == BaseModel.TYPE_NOTE ? await Note.unserialize(remoteContent) : await Folder.unserialize(remoteContent);
expect(remoteContent.title).toBe(dbItem.title);
}
} catch (error) {
console.error(error);
} catch (e) {
error = e;
}
expect(error).toBe(null);
}
let insideBeforeEach = false;
@@ -115,7 +119,7 @@ describe('Synchronizer', function() {
await localItemsSameAsRemote(all, expect);
}));
it('should update remote item', asyncTest(async () => {
it('should update remote items', asyncTest(async () => {
let folder = await Folder.save({ title: "folder1" });
let note = await Note.save({ title: "un", parent_id: folder.id });
await synchronizer().start();
@@ -268,7 +272,7 @@ describe('Synchronizer', function() {
expect(deletedItems.length).toBe(0);
}));
it('should delete local notes', asyncTest(async () => {
it('should not created deleted_items entries for items deleted via sync', asyncTest(async () => {
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: "un", parent_id: folder1.id });
await synchronizer().start();
@@ -276,17 +280,42 @@ describe('Synchronizer', function() {
await switchClient(2);
await synchronizer().start();
await Note.delete(note1.id);
await Folder.delete(folder1.id);
await synchronizer().start();
await switchClient(1);
await synchronizer().start();
let items = await allItems();
expect(items.length).toBe(1);
let deletedItems = await BaseItem.deletedItems(syncTargetId());
expect(deletedItems.length).toBe(0);
}));
}));
it('should delete local notes', asyncTest(async () => {
// For these tests we pass the context around for each user. This is to make sure that the "deletedItemsProcessed"
// property of the basicDelta() function is cleared properly at the end of a sync operation. If it is not cleared
// it means items will no longer be deleted locally via sync.
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: "un", parent_id: folder1.id });
let note2 = await Note.save({ title: "deux", parent_id: folder1.id });
let context1 = await synchronizer().start();
await switchClient(2);
let context2 = await synchronizer().start();
await Note.delete(note1.id);
context2 = await synchronizer().start({ context: context2 });
await switchClient(1);
context1 = await synchronizer().start({ context: context1 });
let items = await allItems();
expect(items.length).toBe(2);
let deletedItems = await BaseItem.deletedItems(syncTargetId());
expect(deletedItems.length).toBe(0);
await Note.delete(note2.id);
context1 = await synchronizer().start({ context: context1 });
}));
it('should delete remote folder', asyncTest(async () => {
let folder1 = await Folder.save({ title: "folder1" });
@@ -304,8 +333,8 @@ describe('Synchronizer', function() {
await synchronizer().start();
let all = await allItems();
localItemsSameAsRemote(all, expect);
}));
await localItemsSameAsRemote(all, expect);
}));
it('should delete local folder', asyncTest(async () => {
let folder1 = await Folder.save({ title: "folder1" });
@@ -327,8 +356,8 @@ describe('Synchronizer', function() {
await synchronizer().start();
let items = await allItems();
localItemsSameAsRemote(items, expect);
}));
await localItemsSameAsRemote(items, expect);
}));
it('should resolve conflict if remote folder has been deleted, but note has been added to folder locally', asyncTest(async () => {
let folder1 = await Folder.save({ title: "folder1" });
@@ -370,8 +399,8 @@ describe('Synchronizer', function() {
expect(items.length).toBe(1);
expect(items[0].title).toBe('folder');
localItemsSameAsRemote(items, expect);
}));
await localItemsSameAsRemote(items, expect);
}));
it('should cross delete all folders', asyncTest(async () => {
// If client1 and 2 have two folders, client 1 deletes item 1 and client
@@ -441,7 +470,7 @@ describe('Synchronizer', function() {
let unconflictedNotes = await Note.unconflictedNotes();
expect(unconflictedNotes.length).toBe(0);
}));
}));
it('should handle conflict when remote folder is deleted then local folder is renamed', asyncTest(async () => {
let folder1 = await Folder.save({ title: "folder1" });
@@ -471,7 +500,7 @@ describe('Synchronizer', function() {
let items = await allItems();
expect(items.length).toBe(1);
}));
}));
it('should allow duplicate folder titles', asyncTest(async () => {
let localF1 = await Folder.save({ title: "folder" });
@@ -557,10 +586,12 @@ describe('Synchronizer', function() {
}
it('should sync tags', asyncTest(async () => {
await shoudSyncTagTest(false); }));
await shoudSyncTagTest(false);
}));
it('should sync encrypted tags', asyncTest(async () => {
await shoudSyncTagTest(true); }));
await shoudSyncTagTest(true);
}));
it('should not sync notes with conflicts', asyncTest(async () => {
let f1 = await Folder.save({ title: "folder" });
@@ -665,12 +696,12 @@ describe('Synchronizer', function() {
await switchClient(2);
synchronizer().debugFlags_ = ['cancelDeltaLoop2'];
synchronizer().testingHooks_ = ['cancelDeltaLoop2'];
let context = await synchronizer().start();
let notes = await Note.all();
expect(notes.length).toBe(0);
synchronizer().debugFlags_ = [];
synchronizer().testingHooks_ = [];
await synchronizer().start({ context: context });
notes = await Note.all();
expect(notes.length).toBe(1);
@@ -684,9 +715,9 @@ describe('Synchronizer', function() {
let disabledItems = await BaseItem.syncDisabledItems(syncTargetId());
expect(disabledItems.length).toBe(0);
await Note.save({ id: noteId, title: "un mod", });
synchronizer().debugFlags_ = ['rejectedByTarget'];
synchronizer().testingHooks_ = ['rejectedByTarget'];
await synchronizer().start();
synchronizer().debugFlags_ = [];
synchronizer().testingHooks_ = [];
await synchronizer().start(); // Another sync to check that this item is now excluded from sync
await switchClient(2);
@@ -830,6 +861,8 @@ describe('Synchronizer', function() {
}));
it('should sync resources', asyncTest(async () => {
while (insideBeforeEach) await time.msleep(500);
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
await shim.attachFileToNote(note1, __dirname + '/../tests/support/photo.jpg');
@@ -850,6 +883,37 @@ describe('Synchronizer', function() {
expect(fileContentEqual(resourcePath1, resourcePath1_2)).toBe(true);
}));
it('should delete resources', asyncTest(async () => {
while (insideBeforeEach) await time.msleep(500);
let folder1 = await Folder.save({ title: "folder1" });
let note1 = await Note.save({ title: 'ma note', parent_id: folder1.id });
await shim.attachFileToNote(note1, __dirname + '/../tests/support/photo.jpg');
let resource1 = (await Resource.all())[0];
let resourcePath1 = Resource.fullPath(resource1);
await synchronizer().start();
await switchClient(2);
await synchronizer().start();
let allResources = await Resource.all();
expect(allResources.length).toBe(1);
let all = await fileApi().list();
expect(all.items.length).toBe(3);
await Resource.delete(resource1.id);
await synchronizer().start();
all = await fileApi().list();
expect(all.items.length).toBe(2);
await switchClient(1);
expect(await shim.fsDriver().exists(resourcePath1)).toBe(true);
await synchronizer().start();
allResources = await Resource.all();
expect(allResources.length).toBe(0);
expect(await shim.fsDriver().exists(resourcePath1)).toBe(false);
}));
it('should encryt resources', asyncTest(async () => {
Setting.setValue('encryption.enabled', true);
const masterKey = await loadEncryptionMasterKey();
@@ -963,4 +1027,39 @@ describe('Synchronizer', function() {
expect(resource1.encryption_blob_encrypted).toBe(0);
}));
});
it('should create remote items with UTF-8 content', asyncTest(async () => {
let folder = await Folder.save({ title: "Fahrräder" });
await Note.save({ title: "Fahrräder", body: "Fahrräder", parent_id: folder.id });
let all = await allItems();
await synchronizer().start();
await localItemsSameAsRemote(all, expect);
}));
it("should update remote items but not pull remote changes", asyncTest(async () => {
let folder = await Folder.save({ title: "folder1" });
let note = await Note.save({ title: "un", parent_id: folder.id });
await synchronizer().start();
await switchClient(2);
await synchronizer().start();
await Note.save({ title: "deux", parent_id: folder.id });
await synchronizer().start();
await switchClient(1);
await Note.save({ title: "un UPDATE", id: note.id });
await synchronizer().start({ syncSteps: ["update_remote"] });
let all = await allItems();
expect(all.length).toBe(2);
await switchClient(2);
await synchronizer().start();
let note2 = await Note.load(note.id);
expect(note2.title).toBe("un UPDATE");
}));
});

View File

@@ -15,6 +15,8 @@ const { Synchronizer } = require('lib/synchronizer.js');
const { FileApi } = require('lib/file-api.js');
const { FileApiDriverMemory } = require('lib/file-api-driver-memory.js');
const { FileApiDriverLocal } = require('lib/file-api-driver-local.js');
const { FileApiDriverWebDav } = require('lib/file-api-driver-webdav.js');
const BaseService = require('lib/services/BaseService.js');
const { FsDriverNode } = require('lib/fs-driver-node.js');
const { time } = require('lib/time-utils.js');
const { shimInit } = require('lib/shim-init-node.js');
@@ -22,8 +24,10 @@ const SyncTargetRegistry = require('lib/SyncTargetRegistry.js');
const SyncTargetMemory = require('lib/SyncTargetMemory.js');
const SyncTargetFilesystem = require('lib/SyncTargetFilesystem.js');
const SyncTargetOneDrive = require('lib/SyncTargetOneDrive.js');
const SyncTargetNextcloud = require('lib/SyncTargetNextcloud.js');
const EncryptionService = require('lib/services/EncryptionService.js');
const DecryptionWorker = require('lib/services/DecryptionWorker.js');
const WebDavApi = require('lib/WebDavApi');
let databases_ = [];
let synchronizers_ = [];
@@ -38,6 +42,7 @@ const fsDriver = new FsDriverNode();
Logger.fsDriver_ = fsDriver;
Resource.fsDriver_ = fsDriver;
EncryptionService.fsDriver_ = fsDriver;
FileApiDriverLocal.fsDriver_ = fsDriver;
const logDir = __dirname + '/../tests/logs';
fs.mkdirpSync(logDir, 0o755);
@@ -45,17 +50,21 @@ fs.mkdirpSync(logDir, 0o755);
SyncTargetRegistry.addClass(SyncTargetMemory);
SyncTargetRegistry.addClass(SyncTargetFilesystem);
SyncTargetRegistry.addClass(SyncTargetOneDrive);
SyncTargetRegistry.addClass(SyncTargetNextcloud);
//const syncTargetId_ = SyncTargetRegistry.nameToId('memory');
const syncTargetId_ = SyncTargetRegistry.nameToId('filesystem');
// const syncTargetId_ = SyncTargetRegistry.nameToId("nextcloud");
const syncTargetId_ = SyncTargetRegistry.nameToId("memory");
//const syncTargetId_ = SyncTargetRegistry.nameToId('filesystem');
const syncDir = __dirname + '/../tests/sync';
const sleepTime = syncTargetId_ == SyncTargetRegistry.nameToId('filesystem') ? 1001 : 400;
const sleepTime = syncTargetId_ == SyncTargetRegistry.nameToId('filesystem') ? 1001 : 100;//400;
console.info('Testing with sync target: ' + SyncTargetRegistry.idToName(syncTargetId_));
const logger = new Logger();
logger.addTarget('console');
logger.addTarget('file', { path: logDir + '/log.txt' });
logger.setLevel(Logger.LEVEL_WARN); // Set to INFO to display sync process in console
logger.setLevel(Logger.LEVEL_WARN); // Set to DEBUG to display sync process in console
BaseItem.loadClass('Note', Note);
BaseItem.loadClass('Folder', Folder);
@@ -67,6 +76,10 @@ BaseItem.loadClass('MasterKey', MasterKey);
Setting.setConstant('appId', 'net.cozic.joplin-cli');
Setting.setConstant('appType', 'cli');
BaseService.logger_ = logger;
Setting.autoSaveEnabled = false;
function syncTargetId() {
return syncTargetId_;
}
@@ -108,8 +121,9 @@ async function clearDatabase(id = null) {
'DELETE FROM tags',
'DELETE FROM note_tags',
'DELETE FROM master_keys',
'DELETE FROM settings',
'DELETE FROM item_changes',
'DELETE FROM note_resources',
'DELETE FROM settings',
'DELETE FROM deleted_items',
'DELETE FROM sync_items',
];
@@ -142,25 +156,6 @@ async function setupDatabase(id = null) {
BaseModel.db_ = databases_[id];
await Setting.load();
//return setupDatabase(id);
// return databases_[id].open({ name: filePath }).then(() => {
// BaseModel.db_ = databases_[id];
// return setupDatabase(id);
// });
// return fs.unlink(filePath).catch(() => {
// // Don't care if the file doesn't exist
// }).then(() => {
// databases_[id] = new JoplinDatabase(new DatabaseDriverNode());
// return databases_[id].open({ name: filePath }).then(() => {
// BaseModel.db_ = databases_[id];
// return setupDatabase(id);
// });
// });
}
function resourceDir(id = null) {
@@ -192,12 +187,7 @@ async function setupDatabaseAndSynchronizer(id = null) {
decryptionWorkers_[id] = new DecryptionWorker();
decryptionWorkers_[id].setEncryptionService(encryptionServices_[id]);
if (syncTargetId_ == SyncTargetRegistry.nameToId('filesystem')) {
fs.removeSync(syncDir)
fs.mkdirpSync(syncDir, 0o755);
} else {
await fileApi().format();
}
await fileApi().clearRoot();
}
function db(id = null) {
@@ -248,7 +238,17 @@ function fileApi() {
fileApi_ = new FileApi(syncDir, new FileApiDriverLocal());
} else if (syncTargetId_ == SyncTargetRegistry.nameToId('memory')) {
fileApi_ = new FileApi('/root', new FileApiDriverMemory());
} else if (syncTargetId_ == SyncTargetRegistry.nameToId('nextcloud')) {
const options = {
baseUrl: () => 'http://nextcloud.local/remote.php/dav/files/admin/JoplinTest',
username: () => 'admin',
password: () => '123456',
};
const api = new WebDavApi(options);
fileApi_ = new FileApi('', new FileApiDriverWebDav(api));
}
// } else if (syncTargetId == Setting.SYNC_TARGET_ONEDRIVE) {
// let auth = require('./onedrive-auth.json');
// if (!auth) {
@@ -268,6 +268,7 @@ function fileApi() {
fileApi_.setLogger(logger);
fileApi_.setSyncTargetId(syncTargetId_);
fileApi_.requestRepeatCount_ = 0;
return fileApi_;
}

View File

@@ -1,9 +1,11 @@
const { _ } = require('lib/locale.js');
const { BrowserWindow } = require('electron');
const { BrowserWindow, Menu, Tray } = require('electron');
const { shim } = require('lib/shim');
const url = require('url')
const path = require('path')
const urlUtils = require('lib/urlUtils.js');
const { dirname, basename } = require('lib/path-utils');
const fs = require('fs-extra');
class ElectronAppWrapper {
@@ -12,6 +14,8 @@ class ElectronAppWrapper {
this.env_ = env;
this.win_ = null;
this.willQuitApp_ = false;
this.tray_ = null;
this.buildDir_ = null;
}
electronApp() {
@@ -37,13 +41,14 @@ class ElectronAppWrapper {
const windowState = windowStateKeeper({
defaultWidth: 800,
defaultHeight: 600,
file: 'window-state-' + this.env_ + '.json',
});
const windowOptions = {
'x': windowState.x,
'y': windowState.y,
'width': windowState.width,
'height': windowState.height,
x: windowState.x,
y: windowState.y,
width: windowState.width,
height: windowState.height,
};
// Linux icon workaround for bug https://github.com/electron-userland/electron-builder/issues/2098
@@ -59,14 +64,30 @@ class ElectronAppWrapper {
}))
// Uncomment this to view errors if the application does not start
if (this.env_ === 'dev') this.win_.webContents.openDevTools();
// if (this.env_ === 'dev') this.win_.webContents.openDevTools();
this.win_.on('close', (event) => {
if (this.willQuitApp_ || process.platform !== 'darwin') {
this.win_ = null;
// If it's on macOS, the app is completely closed only if the user chooses to close the app (willQuitApp_ will be true)
// otherwise the window is simply hidden, and will be re-open once the app is "activated" (which happens when the
// user clicks on the icon in the task bar).
// On Windows and Linux, the app is closed when the window is closed *except* if the tray icon is used. In which
// case the app must be explicitely closed with Ctrl+Q or by right-clicking on the tray icon and selecting "Exit".
if (process.platform === 'darwin') {
if (this.willQuitApp_) {
this.win_ = null;
} else {
event.preventDefault();
this.hide();
}
} else {
event.preventDefault();
this.win_.hide();
if (this.trayShown() && !this.willQuitApp_) {
event.preventDefault();
this.win_.hide();
} else {
this.win_ = null;
}
}
})
@@ -89,15 +110,97 @@ class ElectronAppWrapper {
});
}
async exit() {
async quit() {
this.electronApp_.quit();
}
exit(errorCode = 0) {
this.electronApp_.exit(errorCode);
}
trayShown() {
return !!this.tray_;
}
// This method is used in macOS only to hide the whole app (and not just the main window)
// including the menu bar. This follows the macOS way of hidding an app.
hide() {
this.electronApp_.hide();
}
buildDir() {
if (this.buildDir_) return this.buildDir_;
let dir = __dirname + '/build';
if (!fs.pathExistsSync(dir)) {
dir = dirname(__dirname) + '/build';
if (!fs.pathExistsSync(dir)) throw new Error('Cannot find build dir');
}
this.buildDir_ = dir;
return dir;
}
trayIconFilename_() {
let output = '';
if (process.platform === 'darwin') {
output = 'macos-16x16Template.png'; // Electron Template Image format
} else {
output = '16x16.png';
}
if (this.env_ === 'dev') output = '16x16-dev.png'
return output;
}
// Note: this must be called only after the "ready" event of the app has been dispatched
createTray(contextMenu) {
try {
this.tray_ = new Tray(this.buildDir() + '/icons/' + this.trayIconFilename_())
this.tray_.setToolTip(this.electronApp_.getName())
this.tray_.setContextMenu(contextMenu)
this.tray_.on('click', () => {
this.window().show();
});
} catch (error) {
console.error("Cannot create tray", error);
}
}
destroyTray() {
if (!this.tray_) return;
this.tray_.destroy();
this.tray_ = null;
}
ensureSingleInstance() {
if (this.env_ === 'dev') return false;
return new Promise((resolve, reject) => {
const alreadyRunning = this.electronApp_.makeSingleInstance((commandLine, workingDirectory) => {
const win = this.window();
if (!win) return;
if (win.isMinimized()) win.restore();
win.show();
win.focus();
});
if (alreadyRunning) this.electronApp_.quit();
resolve(alreadyRunning);
});
}
async start() {
// Since we are doing other async things before creating the window, we might miss
// the "ready" event. So we use the function below to make sure that the app is ready.
await this.waitForElectronAppReady();
const alreadyRunning = await this.ensureSingleInstance();
if (alreadyRunning) return;
this.createWindow();
this.electronApp_.on('before-quit', () => {

View File

@@ -0,0 +1,51 @@
const { _ } = require('lib/locale');
const { bridge } = require('electron').remote.require('./bridge');
const InteropService = require('lib/services/InteropService');
class InteropServiceHelper {
static async export(dispatch, module, options = null) {
if (!options) options = {};
let path = null;
if (module.target === 'file') {
path = bridge().showSaveDialog({
filters: [{ name: module.description, extensions: [module.fileExtension]}]
});
} else {
path = bridge().showOpenDialog({
properties: ['openDirectory', 'createDirectory'],
});
}
if (!path || (Array.isArray(path) && !path.length)) return;
if (Array.isArray(path)) path = path[0];
dispatch({
type: 'WINDOW_COMMAND',
name: 'showModalMessage',
message: _('Exporting to "%s" as "%s" format. Please wait...', path, module.format),
});
const exportOptions = {};
exportOptions.path = path;
exportOptions.format = module.format;
if (options.sourceFolderIds) exportOptions.sourceFolderIds = options.sourceFolderIds;
if (options.sourceNoteIds) exportOptions.sourceNoteIds = options.sourceNoteIds;
const service = new InteropService();
const result = await service.export(exportOptions);
console.info('Export result: ', result);
dispatch({
type: 'WINDOW_COMMAND',
name: 'hideModalMessage',
});
}
}
module.exports = InteropServiceHelper;

View File

@@ -20,6 +20,9 @@ const packageInfo = require('./packageInfo.js');
const AlarmService = require('lib/services/AlarmService.js');
const AlarmServiceDriverNode = require('lib/services/AlarmServiceDriverNode');
const DecryptionWorker = require('lib/services/DecryptionWorker');
const InteropService = require('lib/services/InteropService');
const InteropServiceHelper = require('./InteropServiceHelper.js');
const ResourceService = require('lib/services/ResourceService');
const { bridge } = require('electron').remote.require('./bridge');
const Menu = bridge().Menu;
@@ -49,6 +52,10 @@ class Application extends BaseApplication {
return true;
}
checkForUpdateLoggerPath() {
return Setting.value('profileDir') + '/log-autoupdater.txt';
}
reducer(state = appDefaultState, action) {
let newState = state;
@@ -136,8 +143,16 @@ class Application extends BaseApplication {
this.refreshMenu();
}
if (['NOTE_UPDATE_ONE', 'NOTE_DELETE', 'FOLDER_UPDATE_ONE', 'FOLDER_DELETE'].indexOf(action.type) >= 0) {
if (!await reg.syncTarget().syncStarted()) reg.scheduleSync();
if (action.type == 'SETTING_UPDATE_ONE' && action.key == 'showTrayIcon' || action.type == 'SETTING_UPDATE_ALL') {
this.updateTray();
}
if (action.type == 'SETTING_UPDATE_ONE' && action.key == 'style.editor.fontFamily' || action.type == 'SETTING_UPDATE_ALL') {
this.updateEditorFont();
}
if (["NOTE_UPDATE_ONE", "NOTE_DELETE", "FOLDER_UPDATE_ONE", "FOLDER_DELETE"].indexOf(action.type) >= 0) {
if (!await reg.syncTarget().syncStarted()) reg.scheduleSync(5, { syncSteps: ["update_remote", "delete_remote"] });
}
if (['EVENT_NOTE_ALARM_FIELD_CHANGE', 'NOTE_DELETE'].indexOf(action.type) >= 0) {
@@ -167,6 +182,101 @@ class Application extends BaseApplication {
updateMenu(screen) {
if (this.lastMenuScreen_ === screen) return;
const sortNoteItems = [];
const sortNoteOptions = Setting.enumOptions('notes.sortOrder.field');
for (let field in sortNoteOptions) {
if (!sortNoteOptions.hasOwnProperty(field)) continue;
sortNoteItems.push({
label: sortNoteOptions[field],
screens: ['Main'],
type: 'checkbox',
checked: Setting.value('notes.sortOrder.field') === field,
click: () => {
Setting.setValue('notes.sortOrder.field', field);
this.refreshMenu();
}
});
}
const importItems = [];
const exportItems = [];
const ioService = new InteropService();
const ioModules = ioService.modules();
for (let i = 0; i < ioModules.length; i++) {
const module = ioModules[i];
if (module.type === 'exporter') {
exportItems.push({
label: module.fullLabel(),
screens: ['Main'],
click: async () => {
await InteropServiceHelper.export(this.dispatch.bind(this), module);
}
});
} else {
for (let j = 0; j < module.sources.length; j++) {
const moduleSource = module.sources[j];
importItems.push({
label: module.fullLabel(moduleSource),
screens: ['Main'],
click: async () => {
let path = null;
const selectedFolderId = this.store().getState().selectedFolderId;
if (moduleSource === 'file') {
path = bridge().showOpenDialog({
filters: [{ name: module.description, extensions: [module.fileExtension]}]
});
} else {
path = bridge().showOpenDialog({
properties: ['openDirectory', 'createDirectory'],
});
}
if (!path || (Array.isArray(path) && !path.length)) return;
if (Array.isArray(path)) path = path[0];
this.dispatch({
type: 'WINDOW_COMMAND',
name: 'showModalMessage',
message: _('Importing from "%s" as "%s" format. Please wait...', path, module.format),
});
const importOptions = {};
importOptions.path = path;
importOptions.format = module.format;
importOptions.destinationFolderId = !module.isNoteArchive && moduleSource === 'file' ? selectedFolderId : null;
const service = new InteropService();
try {
const result = await service.import(importOptions);
console.info('Import result: ', result);
} catch (error) {
bridge().showErrorMessageBox(error.message);
}
this.dispatch({
type: 'WINDOW_COMMAND',
name: 'hideModalMessage',
});
}
});
}
}
}
exportItems.push({
label: 'PDF - ' + _('PDF File'),
screens: ['Main'],
click: async () => {
this.dispatch({
type: 'WINDOW_COMMAND',
name: 'exportPdf',
});
}
});
const template = [
{
label: _('File'),
@@ -192,6 +302,7 @@ class Application extends BaseApplication {
}
}, {
label: _('New notebook'),
accelerator: 'CommandOrControl+B',
screens: ['Main'],
click: () => {
this.dispatch({
@@ -202,46 +313,53 @@ class Application extends BaseApplication {
}, {
type: 'separator',
}, {
label: _('Import Evernote notes'),
label: _('Import'),
submenu: importItems,
}, {
label: _('Export'),
submenu: exportItems,
}, {
type: 'separator',
}, {
label: _('Print'),
accelerator: 'CommandOrControl+P',
screens: ['Main'],
click: () => {
const filePaths = bridge().showOpenDialog({
properties: ['openFile', 'createDirectory'],
filters: [
{ name: _('Evernote Export Files'), extensions: ['enex'] },
]
});
if (!filePaths || !filePaths.length) return;
this.dispatch({
type: 'NAV_GO',
routeName: 'Import',
props: {
filePath: filePaths[0],
},
type: 'WINDOW_COMMAND',
name: 'print',
});
}
}, {
type: 'separator',
platforms: ['darwin'],
}, {
label: _('Hide %s', 'Joplin'),
platforms: ['darwin'],
accelerator: 'CommandOrControl+H',
click: () => { bridge().electronApp().hide() }
}, {
type: 'separator',
}, {
label: _('Quit'),
accelerator: 'CommandOrControl+Q',
click: () => { bridge().electronApp().exit() }
click: () => { bridge().electronApp().quit() }
}]
}, {
label: _('Edit'),
submenu: [{
label: _('Copy'),
screens: ['Main', 'OneDriveLogin'],
screens: ['Main', 'OneDriveLogin', 'Config', 'EncryptionConfig'],
role: 'copy',
accelerator: 'CommandOrControl+C',
}, {
label: _('Cut'),
screens: ['Main', 'OneDriveLogin'],
screens: ['Main', 'OneDriveLogin', 'Config', 'EncryptionConfig'],
role: 'cut',
accelerator: 'CommandOrControl+X',
}, {
label: _('Paste'),
screens: ['Main', 'OneDriveLogin'],
screens: ['Main', 'OneDriveLogin', 'Config', 'EncryptionConfig'],
role: 'paste',
accelerator: 'CommandOrControl+V',
}, {
@@ -258,6 +376,42 @@ class Application extends BaseApplication {
});
},
}],
}, {
label: _('View'),
submenu: [{
label: _('Toggle editor layout'),
screens: ['Main'],
accelerator: 'CommandOrControl+L',
click: () => {
this.dispatch({
type: 'WINDOW_COMMAND',
name: 'toggleVisiblePanes',
});
}
}, {
type: 'separator',
screens: ['Main'],
}, {
label: Setting.settingMetadata('notes.sortOrder.field').label(),
screens: ['Main'],
submenu: sortNoteItems,
}, {
label: Setting.settingMetadata('notes.sortOrder.reverse').label(),
type: 'checkbox',
checked: Setting.value('notes.sortOrder.reverse'),
screens: ['Main'],
click: () => {
Setting.setValue('notes.sortOrder.reverse', !Setting.value('notes.sortOrder.reverse'));
},
}, {
label: Setting.settingMetadata('uncompletedTodosOnTop').label(),
type: 'checkbox',
checked: Setting.value('uncompletedTodosOnTop'),
screens: ['Main'],
click: () => {
Setting.setValue('uncompletedTodosOnTop', !Setting.value('uncompletedTodosOnTop'));
},
}],
}, {
label: _('Tools'),
submenu: [{
@@ -281,6 +435,7 @@ class Application extends BaseApplication {
}
},{
label: _('General Options'),
accelerator: 'CommandOrControl+,',
click: () => {
this.dispatch({
type: 'NAV_GO',
@@ -294,6 +449,17 @@ class Application extends BaseApplication {
label: _('Website and documentation'),
accelerator: 'F1',
click () { bridge().openExternal('http://joplin.cozic.net') }
}, {
label: _('Make a donation'),
click () { bridge().openExternal('http://joplin.cozic.net/donate') }
}, {
label: _('Check for updates...'),
click: () => {
bridge().checkForUpdates(false, bridge().window(), this.checkForUpdateLoggerPath());
}
}, {
type: 'separator',
screens: ['Main'],
}, {
label: _('About Joplin'),
click: () => {
@@ -304,8 +470,8 @@ class Application extends BaseApplication {
'Copyright © 2016-2018 Laurent Cozic',
_('%s %s (%s, %s)', p.name, p.version, Setting.value('env'), process.platform),
];
bridge().showMessageBox({
message: message.join('\n'),
bridge().showInfoMessageBox(message.join('\n'), {
icon: bridge().electronApp().buildDir() + '/icons/32x32.png',
});
}
}]
@@ -321,10 +487,13 @@ class Application extends BaseApplication {
}
function removeUnwantedItems(template, screen) {
const platform = shim.platformName();
let output = [];
for (let i = 0; i < template.length; i++) {
const t = Object.assign({}, template[i]);
if (t.screens && t.screens.indexOf(screen) < 0) continue;
if (t.platforms && t.platforms.indexOf(platform) < 0) continue;
if (t.submenu) t.submenu = removeUnwantedItems(t.submenu, screen);
if (('submenu' in t) && isEmptyMenu(t.submenu)) continue;
output.push(t);
@@ -340,6 +509,43 @@ class Application extends BaseApplication {
this.lastMenuScreen_ = screen;
}
updateTray() {
// Tray icon (called AppIndicator) doesn't work in Ubuntu
// http://www.webupd8.org/2017/04/fix-appindicator-not-working-for.html
// Might be fixed in Electron 18.x but no non-beta release yet.
if (!shim.isWindows() && !shim.isMac()) return;
const app = bridge().electronApp();
if (app.trayShown() === Setting.value('showTrayIcon')) return;
if (!Setting.value('showTrayIcon')) {
app.destroyTray();
} else {
const contextMenu = Menu.buildFromTemplate([
{ label: _('Open %s', app.electronApp().getName()), click: () => { app.window().show(); } },
{ type: 'separator' },
{ label: _('Exit'), click: () => { app.quit() } },
])
app.createTray(contextMenu);
}
}
updateEditorFont() {
const fontFamilies = [];
if (Setting.value('style.editor.fontFamily')) fontFamilies.push('"' + Setting.value('style.editor.fontFamily') + '"');
fontFamilies.push('monospace');
// The '*' and '!important' parts are necessary to make sure Russian text is displayed properly
// https://github.com/laurent22/joplin/issues/155
const css = '.ace_editor * { font-family: ' + fontFamilies.join(', ') + ' !important; }';
const styleTag = document.createElement('style');
styleTag.type = 'text/css';
styleTag.appendChild(document.createTextNode(css));
document.head.appendChild(styleTag);
}
async start(argv) {
argv = await super.start(argv);
@@ -385,21 +591,30 @@ class Application extends BaseApplication {
// Note: Auto-update currently doesn't work in Linux: it downloads the update
// but then doesn't install it on exit.
if (shim.isWindows() || shim.isMac()) {
const runAutoUpdateCheck = function() {
const runAutoUpdateCheck = () => {
if (Setting.value('autoUpdateEnabled')) {
bridge().checkForUpdatesAndNotify(Setting.value('profileDir') + '/log-autoupdater.txt');
bridge().checkForUpdates(true, bridge().window(), this.checkForUpdateLoggerPath());
}
}
// Initial check on startup
setTimeout(() => { runAutoUpdateCheck() }, 5000);
// For those who leave the app always open
setInterval(() => { runAutoUpdateCheck() }, 2 * 60 * 60 * 1000);
// Then every x hours
setInterval(() => { runAutoUpdateCheck() }, 12 * 60 * 60 * 1000);
}
this.updateTray();
setTimeout(() => {
AlarmService.garbageCollect();
}, 1000 * 60 * 60);
const resourceService = new ResourceService();
resourceService.maintenance();
setInterval(() => {
resourceService.maintenance();
}, 1000 * 60 * 60 * 4);
if (Setting.value('env') === 'dev') {
AlarmService.updateAllNotifications();
} else {

View File

@@ -43,7 +43,7 @@ class Bridge {
const {dialog} = require('electron');
if (!options) options = {};
if (!('defaultPath' in options) && this.lastSelectedPath_) options.defaultPath = this.lastSelectedPath_;
const filePath = dialog.showSaveDialog(options);
const filePath = dialog.showSaveDialog(this.window(), options);
if (filePath) {
this.lastSelectedPath_ = filePath;
}
@@ -55,27 +55,30 @@ class Bridge {
if (!options) options = {};
if (!('defaultPath' in options) && this.lastSelectedPath_) options.defaultPath = this.lastSelectedPath_;
if (!('createDirectory' in options)) options.createDirectory = true;
const filePaths = dialog.showOpenDialog(options);
const filePaths = dialog.showOpenDialog(this.window(), options);
if (filePaths && filePaths.length) {
this.lastSelectedPath_ = dirname(filePaths[0]);
}
return filePaths;
}
showMessageBox(options) {
// Don't use this directly - call one of the showXxxxxxxMessageBox() instead
showMessageBox_(window, options) {
const {dialog} = require('electron');
return dialog.showMessageBox(options);
const nativeImage = require('electron').nativeImage
if (!window) window = this.window();
return dialog.showMessageBox(window, options);
}
showErrorMessageBox(message) {
return this.showMessageBox({
return this.showMessageBox_(this.window(), {
type: 'error',
message: message,
});
}
showConfirmMessageBox(message) {
const result = this.showMessageBox({
const result = this.showMessageBox_(this.window(), {
type: 'question',
message: message,
buttons: [_('OK'), _('Cancel')],
@@ -83,12 +86,12 @@ class Bridge {
return result === 0;
}
showInfoMessageBox(message) {
const result = this.showMessageBox({
showInfoMessageBox(message, options = {}) {
const result = this.showMessageBox_(this.window(), Object.assign({}, {
type: 'info',
message: message,
buttons: [_('OK')],
});
}, options));
return result === 0;
}
@@ -108,21 +111,9 @@ class Bridge {
return require('electron').shell.openItem(fullPath)
}
async checkForUpdatesAndNotify(logFilePath) {
if (!this.autoUpdater_) {
this.autoUpdateLogger_ = new Logger();
this.autoUpdateLogger_.addTarget('file', { path: logFilePath });
this.autoUpdateLogger_.setLevel(Logger.LEVEL_DEBUG);
this.autoUpdateLogger_.info('checkForUpdatesAndNotify: Initializing...');
this.autoUpdater_ = require("electron-updater").autoUpdater;
this.autoUpdater_.logger = this.autoUpdateLogger_;
}
try {
await this.autoUpdater_.checkForUpdatesAndNotify();
} catch (error) {
this.autoUpdateLogger_.error(error);
}
checkForUpdates(inBackground, window, logFilePath) {
const { checkForUpdates } = require('./checkForUpdates.js');
checkForUpdates(inBackground, window, logFilePath);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

View File

@@ -0,0 +1,110 @@
const { dialog } = require('electron')
const { Logger } = require('lib/logger.js');
const { _ } = require('lib/locale.js');
const fetch = require('node-fetch');
const packageInfo = require('./packageInfo.js');
const compareVersions = require('compare-versions');
let autoUpdateLogger_ = new Logger();
let checkInBackground_ = false;
let isCheckingForUpdate_ = false;
let parentWindow_ = null;
function showErrorMessageBox(message) {
return dialog.showMessageBox(parentWindow_, {
type: 'error',
message: message,
});
}
function onCheckStarted() {
autoUpdateLogger_.info('checkForUpdates: Starting...');
isCheckingForUpdate_ = true;
}
function onCheckEnded() {
autoUpdateLogger_.info('checkForUpdates: Done.');
isCheckingForUpdate_ = false;
}
async function fetchLatestRelease() {
const response = await fetch('https://api.github.com/repos/laurent22/joplin/releases/latest');
if (!response.ok) {
const responseText = await response.text();
throw new Error('Cannot get latest release info: ' + responseText.substr(0,500));
}
const json = await response.json();
const version = json.tag_name.substr(1);
let downloadUrl = null;
const platform = process.platform;
for (let i = 0; i < json.assets.length; i++) {
const asset = json.assets[i];
let found = false;
if (platform === 'win32' && asset.name.indexOf('.exe') >= 0) {
found = true;
} else if (platform === 'darwin' && asset.name.indexOf('.dmg') >= 0) {
found = true;
} else if (platform === 'linux' && asset.name.indexOf('.AppImage') >= 0) {
found = true;
}
if (found) {
downloadUrl = asset.browser_download_url;
break;
}
}
if (!downloadUrl) throw new Error('Cannot find download Url: ' + JSON.stringify(json).substr(0,500));
return {
version: version,
downloadUrl: downloadUrl,
notes: json.body,
};
}
function checkForUpdates(inBackground, window, logFilePath) {
if (isCheckingForUpdate_) {
autoUpdateLogger_.info('checkForUpdates: Skipping check because it is already running');
return;
}
parentWindow_ = window;
onCheckStarted();
if (logFilePath && !autoUpdateLogger_.targets().length) {
autoUpdateLogger_ = new Logger();
autoUpdateLogger_.addTarget('file', { path: logFilePath });
autoUpdateLogger_.setLevel(Logger.LEVEL_DEBUG);
autoUpdateLogger_.info('checkForUpdates: Initializing...');
}
checkInBackground_ = inBackground;
fetchLatestRelease().then(release => {
if (compareVersions(release.version, packageInfo.version) <= 0) {
if (!checkInBackground_) dialog.showMessageBox({ message: _('Current version is up-to-date.') })
} else {
const releaseNotes = release.notes.trim() ? "\n\n" + release.notes.trim() : '';
const buttonIndex = dialog.showMessageBox(parentWindow_, {
type: 'info',
message: _('An update is available, do you want to download it now?' + releaseNotes),
buttons: [_('Yes'), _('No')]
});
if (buttonIndex === 0) require('electron').shell.openExternal(release.downloadUrl);
}
}).catch(error => {
autoUpdateLogger_.error(error);
if (!checkInBackground_) showErrorMessageBox(error.message);
}).then(() => {
onCheckEnded();
});
}
module.exports.checkForUpdates = checkForUpdates

View File

@@ -0,0 +1,3 @@
owner: laurent22
repo: joplin
provider: github

View File

@@ -7,14 +7,22 @@ const { Header } = require('./Header.min.js');
const { themeStyle } = require('../theme.js');
const pathUtils = require('lib/path-utils.js');
const { _ } = require('lib/locale.js');
const SyncTargetRegistry = require('lib/SyncTargetRegistry');
const shared = require('lib/components/shared/config-shared.js');
class ConfigScreenComponent extends React.Component {
constructor() {
super();
this.state = {
settings: {},
shared.init(this);
this.checkSyncConfig_ = async () => {
await shared.checkSyncConfig(this, this.state.settings);
}
this.rowStyle_ = {
marginBottom: 10,
};
}
@@ -32,10 +40,6 @@ class ConfigScreenComponent extends React.Component {
});
}
output.sort((a, b) => {
return a.label.toLowerCase() < b.label.toLowerCase() ? -1 : +1;
});
return output;
}
@@ -44,9 +48,7 @@ class ConfigScreenComponent extends React.Component {
let output = null;
const rowStyle = {
marginBottom: 10,
};
const rowStyle = this.rowStyle_;
const labelStyle = Object.assign({}, theme.textStyle, {
display: 'inline-block',
@@ -57,16 +59,27 @@ class ConfigScreenComponent extends React.Component {
display: 'inline-block',
};
const descriptionStyle = Object.assign({}, theme.textStyle, {
color: theme.colorFaded,
marginTop: 5,
fontStyle: 'italic',
});
const updateSettingValue = (key, value) => {
const settings = Object.assign({}, this.state.settings);
settings[key] = value;
this.setState({ settings: settings });
return shared.updateSettingValue(this, key, value);
}
// Component key needs to be key+value otherwise it doesn't update when the settings change.
const md = Setting.settingMetadata(key);
const descriptionText = Setting.keyDescription(key, 'desktop');
const descriptionComp = descriptionText ? (
<div style={descriptionStyle}>
{descriptionText}
</div>
) : null;
if (md.isEnum) {
let items = [];
const settingOptions = md.options();
@@ -82,6 +95,7 @@ class ConfigScreenComponent extends React.Component {
<select value={value} style={controlStyle} onChange={(event) => { updateSettingValue(key, event.target.value) }}>
{items}
</select>
{ descriptionComp }
</div>
);
} else if (md.type === Setting.TYPE_BOOL) {
@@ -89,24 +103,42 @@ class ConfigScreenComponent extends React.Component {
updateSettingValue(key, !value)
}
// Hack: The {key+value.toString()} is needed as otherwise the checkbox doesn't update when the state changes.
// There's probably a better way to do this but can't figure it out.
return (
<div key={key} style={rowStyle}>
<div key={key+value.toString()} style={rowStyle}>
<div style={controlStyle}>
<input id={'setting_checkbox_' + key} type="checkbox" checked={!!value} onChange={(event) => { onCheckboxClick(event) }}/><label onClick={(event) => { onCheckboxClick(event) }} style={labelStyle} htmlFor={'setting_checkbox_' + key}>{md.label()}</label>
<input id={'setting_checkbox_' + key} type="checkbox" checked={!!value} onChange={(event) => { onCheckboxClick(event) }}/><label onClick={(event) => { onCheckboxClick(event) }} style={labelStyle} htmlFor={'setting_checkbox_' + key}>{md.label()}</label>
{ descriptionComp }
</div>
</div>
);
} else if (md.type === Setting.TYPE_STRING) {
const onTextChange = (event) => {
const settings = Object.assign({}, this.state.settings);
settings[key] = event.target.value;
this.setState({ settings: settings });
updateSettingValue(key, event.target.value);
}
const inputStyle = Object.assign({}, controlStyle, { width: '50%', minWidth: '20em' });
const inputType = md.secure === true ? 'password' : 'text';
return (
<div key={key} style={rowStyle}>
<div style={labelStyle}><label>{md.label()}</label></div>
<input type="text" style={controlStyle} value={this.state.settings[key]} onChange={(event) => {onTextChange(event)}} />
<input type={inputType} style={inputStyle} value={this.state.settings[key]} onChange={(event) => {onTextChange(event)}} />
{ descriptionComp }
</div>
);
} else if (md.type === Setting.TYPE_INT) {
const onNumChange = (event) => {
updateSettingValue(key, event.target.value);
};
return (
<div key={key} style={rowStyle}>
<div style={labelStyle}><label>{md.label()}</label></div>
<input type="number" style={controlStyle} value={this.state.settings[key]} onChange={(event) => {onNumChange(event)}} min={md.minimum} max={md.maximum} step={md.step}/>
{ descriptionComp }
</div>
);
} else {
@@ -117,10 +149,7 @@ class ConfigScreenComponent extends React.Component {
}
onSaveClick() {
for (let n in this.state.settings) {
if (!this.state.settings.hasOwnProperty(n)) continue;
Setting.setValue(n, this.state.settings[n]);
}
shared.saveSettings(this);
this.props.dispatch({ type: 'NAV_BACK' });
}
@@ -130,7 +159,7 @@ class ConfigScreenComponent extends React.Component {
render() {
const theme = themeStyle(this.props.theme);
const style = this.props.style;
const style = Object.assign({}, this.props.style, { overflow: 'auto' });
const settings = this.state.settings;
const headerStyle = {
@@ -142,23 +171,28 @@ class ConfigScreenComponent extends React.Component {
};
const buttonStyle = {
display: this.state.settings === this.props.settings ? 'none' : 'inline-block',
display: this.state.changedSettingKeys.length ? 'inline-block' : 'none',
marginRight: 10,
}
let settingComps = [];
let keys = Setting.keys(true, 'desktop');
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
if (!(key in settings)) {
console.warn('Missing setting: ' + key);
continue;
}
const md = Setting.settingMetadata(key);
if (md.show && !md.show(settings)) continue;
const comp = this.settingToComponent(key, settings[key]);
if (!comp) continue;
settingComps.push(comp);
const settingComps = shared.settingsToComponents(this, 'desktop', settings);
const syncTargetMd = SyncTargetRegistry.idToMetadata(settings['sync.target']);
if (syncTargetMd.supportsConfigCheck) {
const messages = shared.checkSyncConfigMessages(this);
const statusStyle = Object.assign({}, theme.textStyle, { marginTop: 10 });
const statusComp = !messages.length ? null : (
<div style={statusStyle}>
{messages[0]}
{messages.length >= 1 ? (<p>{messages[1]}</p>) : null}
</div>);
settingComps.push(
<div key="check_sync_config_button" style={this.rowStyle_}>
<button disabled={this.state.checkSyncConfigResult === 'checking'} onClick={this.checkSyncConfig_}>{_('Check synchronisation configuration')}</button>
{ statusComp }
</div>);
}
return (

View File

@@ -92,10 +92,14 @@ class EncryptionConfigScreenComponent extends React.Component {
};
const mkComps = [];
let nonExistingMasterKeyIds = this.props.notLoadedMasterKeys.slice();
for (let i = 0; i < masterKeys.length; i++) {
const mk = masterKeys[i];
mkComps.push(this.renderMasterKey(mk));
const idx = nonExistingMasterKeyIds.indexOf(mk.id);
if (idx >= 0) nonExistingMasterKeyIds.splice(idx, 1);
}
const onToggleButtonClick = async () => {
@@ -121,7 +125,7 @@ class EncryptionConfigScreenComponent extends React.Component {
}
}
const decryptedItemsInfo = this.props.encryptionEnabled ? <p style={theme.textStyle}>{shared.decryptedStatText(this)}</p> : null;
const decryptedItemsInfo = <p style={theme.textStyle}>{shared.decryptedStatText(this)}</p>;
const toggleButton = <button onClick={() => { onToggleButtonClick() }}>{this.props.encryptionEnabled ? _('Disable encryption') : _('Enable encryption')}</button>
let masterKeySection = null;
@@ -149,11 +153,36 @@ class EncryptionConfigScreenComponent extends React.Component {
);
}
let nonExistingMasterKeySection = null;
if (nonExistingMasterKeyIds.length) {
const rows = [];
for (let i = 0; i < nonExistingMasterKeyIds.length; i++) {
const id = nonExistingMasterKeyIds[i];
rows.push(<tr key={id}><td style={theme.textStyle}>{id}</td></tr>);
}
nonExistingMasterKeySection = (
<div>
<h1 style={theme.h1Style}>{_('Missing Master Keys')}</h1>
<p style={theme.textStyle}>{_('The master keys with these IDs are used to encrypt some of your items, however the application does not currently have access to them. It is likely they will eventually be downloaded via synchronisation.')}</p>
<table>
<tbody>
<tr>
<th style={theme.textStyle}>{_('ID')}</th>
</tr>
{ rows }
</tbody>
</table>
</div>
);
}
return (
<div>
<Header style={headerStyle} />
<div style={containerStyle}>
<div style={{backgroundColor: theme.warningBackgroundColor, paddingLeft: 10, paddingRight: 10, paddingTop: 2, paddingBottom: 2 }}>
{/*<div style={{backgroundColor: theme.warningBackgroundColor, paddingLeft: 10, paddingRight: 10, paddingTop: 2, paddingBottom: 2 }}>
<p style={theme.textStyle}>
Important: This is a <b>beta</b> feature. It has been extensively tested and is already in use by some users, but it is possible that some bugs remain.
</p>
@@ -163,12 +192,13 @@ class EncryptionConfigScreenComponent extends React.Component {
<p style={theme.textStyle}>
For more information about End-To-End Encryption (E2EE) and how it is going to work, please check the documentation: <a onClick={() => {bridge().openExternal('http://joplin.cozic.net/help/e2ee.html')}} href="#">http://joplin.cozic.net/help/e2ee.html</a>
</p>
</div>
</div>*/}
<h1 style={theme.h1Style}>{_('Status')}</h1>
<p style={theme.textStyle}>{_('Encryption is:')} <strong>{this.props.encryptionEnabled ? _('Enabled') : _('Disabled')}</strong></p>
{decryptedItemsInfo}
{toggleButton}
{masterKeySection}
{nonExistingMasterKeySection}
</div>
</div>
);
@@ -183,6 +213,7 @@ const mapStateToProps = (state) => {
passwords: state.settings['encryption.passwordCache'],
encryptionEnabled: state.settings['encryption.enabled'],
activeMasterKeyId: state.settings['encryption.activeMasterKeyId'],
notLoadedMasterKeys: state.notLoadedMasterKeys,
};
};

View File

@@ -25,9 +25,7 @@ class ImportScreenComponent extends React.Component {
doImport: true,
filePath: newProps.filePath,
messages: [],
});
this.doImport();
}, () => { this.doImport() });
}
}

View File

@@ -22,6 +22,10 @@ class MainScreenComponent extends React.Component {
componentWillMount() {
this.setState({
promptOptions: null,
modalLayer: {
visible: false,
message: '',
},
});
}
@@ -44,16 +48,14 @@ class MainScreenComponent extends React.Component {
const folderId = Setting.value('activeFolderId');
if (!folderId) return;
const note = await Note.save({
title: title,
const newNote = {
parent_id: folderId,
is_todo: isTodo ? 1 : 0,
});
Note.updateGeolocation(note.id);
};
this.props.dispatch({
type: 'NOTE_SELECT',
id: note.id,
type: 'NOTE_SET_NEW_ONE',
item: newNote,
});
}
@@ -65,30 +67,14 @@ class MainScreenComponent extends React.Component {
return;
}
this.setState({
promptOptions: {
label: _('Note title:'),
onClose: async (answer) => {
if (answer) await createNewNote(answer, false);
this.setState({ promptOptions: null });
}
},
});
await createNewNote(null, false);
} else if (command.name === 'newTodo') {
if (!this.props.folders.length) {
bridge().showErrorMessageBox(_('Please create a notebook first'));
return;
}
this.setState({
promptOptions: {
label: _('To-do title:'),
onClose: async (answer) => {
if (answer) await createNewNote(answer, true);
this.setState({ promptOptions: null });
}
},
});
await createNewNote(null, true);
} else if (command.name === 'newNotebook') {
this.setState({
promptOptions: {
@@ -181,6 +167,12 @@ class MainScreenComponent extends React.Component {
}
},
});
} else if (command.name === 'toggleVisiblePanes') {
this.toggleVisiblePanes();
} else if (command.name === 'showModalMessage') {
this.setState({ modalLayer: { visible: true, message: command.message } });
} else if (command.name === 'hideModalMessage') {
this.setState({ modalLayer: { visible: false, message: '' } });
} else if (command.name === 'editAlarm') {
const note = await Note.load(command.noteId);
@@ -281,6 +273,17 @@ class MainScreenComponent extends React.Component {
height: height,
};
this.styles_.modalLayer = Object.assign({}, theme.textStyle, {
zIndex: 10000,
position: 'absolute',
top: 0,
left: 0,
backgroundColor: theme.backgroundColorTransparent,
width: width - 20,
height: height - 20,
padding: 10,
});
return this.styles_;
}
@@ -292,20 +295,22 @@ class MainScreenComponent extends React.Component {
const messageBoxVisible = this.props.hasDisabledSyncItems || this.props.showMissingMasterKeyMessage;
const styles = this.styles(this.props.theme, style.width, style.height, messageBoxVisible);
const theme = themeStyle(this.props.theme);
const selectedFolderId = this.props.selectedFolderId;
const onConflictFolder = this.props.selectedFolderId === Folder.conflictFolderId();
const headerButtons = [];
headerButtons.push({
title: _('New note'),
iconName: 'fa-file-o',
enabled: !!folders.length,
enabled: !!folders.length && !onConflictFolder,
onClick: () => { this.doCommand({ name: 'newNote' }) },
});
headerButtons.push({
title: _('New to-do'),
iconName: 'fa-check-square-o',
enabled: !!folders.length,
enabled: !!folders.length && !onConflictFolder,
onClick: () => { this.doCommand({ name: 'newTodo' }) },
});
@@ -325,9 +330,7 @@ class MainScreenComponent extends React.Component {
title: _('Layout'),
iconName: 'fa-columns',
enabled: !!notes.length,
onClick: () => {
this.toggleVisiblePanes();
},
onClick: () => { this.doCommand({ name: 'toggleVisiblePanes' }) },
});
if (!this.promptOnClose_) {
@@ -369,8 +372,12 @@ class MainScreenComponent extends React.Component {
);
}
const modalLayerStyle = Object.assign({}, styles.modalLayer, { display: this.state.modalLayer.visible ? 'block' : 'none' });
return (
<div style={style}>
<div style={modalLayerStyle}>{this.state.modalLayer.message}</div>
<PromptDialog
autocomplete={promptOptions && ('autocomplete' in promptOptions) ? promptOptions.autocomplete : null}
defaultValue={promptOptions && promptOptions.value ? promptOptions.value : ''}
@@ -402,6 +409,7 @@ const mapStateToProps = (state) => {
notes: state.notes,
hasDisabledSyncItems: state.hasDisabledSyncItems,
showMissingMasterKeyMessage: state.notLoadedMasterKeys.length && state.masterKeys.length,
selectedFolderId: state.selectedFolderId,
};
};

View File

@@ -9,6 +9,8 @@ const { bridge } = require('electron').remote.require('./bridge');
const Menu = bridge().Menu;
const MenuItem = bridge().MenuItem;
const eventManager = require('../eventManager');
const InteropService = require('lib/services/InteropService');
const InteropServiceHelper = require('../InteropServiceHelper.js');
class NoteListComponent extends React.Component {
@@ -54,7 +56,16 @@ class NoteListComponent extends React.Component {
}
itemContextMenu(event) {
const noteIds = this.props.selectedNoteIds;
const currentItemId = event.currentTarget.getAttribute('data-id');
if (!currentItemId) return;
let noteIds = [];
if (this.props.selectedNoteIds.indexOf(currentItemId) < 0) {
noteIds = [currentItemId];
} else {
noteIds = this.props.selectedNoteIds;
}
if (!noteIds.length) return;
const notes = noteIds.map((id) => BaseModel.byId(this.props.notes, id));
@@ -82,6 +93,23 @@ class NoteListComponent extends React.Component {
eventManager.emit('noteTypeToggle', { noteId: note.id });
}
}}));
const exportMenu = new Menu();
const ioService = new InteropService();
const ioModules = ioService.modules();
for (let i = 0; i < ioModules.length; i++) {
const module = ioModules[i];
if (module.type !== 'exporter') continue;
exportMenu.append(new MenuItem({ label: module.fullLabel() , click: async () => {
await InteropServiceHelper.export(this.props.dispatch.bind(this), module, { sourceNoteIds: noteIds });
}}));
}
const exportMenuItem = new MenuItem({label: _('Export'), submenu: exportMenu});
menu.append(exportMenuItem);
}
menu.append(new MenuItem({label: _('Delete'), click: async () => {
@@ -137,7 +165,10 @@ class NoteListComponent extends React.Component {
const hPadding = 10;
let style = Object.assign({ width: width }, this.style().listItem);
if (this.props.selectedNoteIds.indexOf(item.id) >= 0) style = Object.assign(style, this.style().listItemSelected);
if (this.props.selectedNoteIds.indexOf(item.id) >= 0) {
style = Object.assign(style, this.style().listItemSelected);
}
// Setting marginBottom = 1 because it makes the checkbox looks more centered, at least on Windows
// but don't know how it will look in other OSes.
@@ -163,6 +194,7 @@ class NoteListComponent extends React.Component {
style={listItemTitleStyle}
onClick={(event) => { onTitleClick(event, item) }}
onDragStart={(event) => onDragStart(event) }
data-id={item.id}
>
{Note.displayTitle(item)}
</a>
@@ -172,8 +204,9 @@ class NoteListComponent extends React.Component {
render() {
const theme = themeStyle(this.props.theme);
const style = this.props.style;
let notes = this.props.notes.slice();
if (!this.props.notes.length) {
if (!notes.length) {
const padding = 10;
const emptyDivStyle = Object.assign({
padding: padding + 'px',
@@ -192,7 +225,7 @@ class NoteListComponent extends React.Component {
itemHeight={this.style().listItem.height}
style={style}
className={"note-list"}
items={this.props.notes}
items={notes}
itemRenderer={ (item) => { return this.itemRenderer(item, theme, style.width) } }
></ItemList>
);

View File

@@ -16,6 +16,7 @@ const Menu = bridge().Menu;
const MenuItem = bridge().MenuItem;
const { shim } = require('lib/shim.js');
const eventManager = require('../eventManager');
const fs = require('fs-extra');
require('brace/mode/markdown');
// https://ace.c9.io/build/kitchen-sink.html
@@ -36,7 +37,13 @@ class NoteTextComponent extends React.Component {
isLoading: true,
webviewReady: false,
scrollHeight: null,
editorScrollTop: 0
editorScrollTop: 0,
newNote: null,
// If the current note was just created, and the title has never been
// changed by the user, this variable contains that note ID. Used
// to automatically set the title.
newAndNoTitleChangeNoteId: null,
};
this.lastLoadedNoteId_ = null;
@@ -75,7 +82,10 @@ class NoteTextComponent extends React.Component {
async componentWillMount() {
let note = null;
if (this.props.noteId) {
if (this.props.newNote) {
note = Object.assign({}, this.props.newNote);
} else if (this.props.noteId) {
note = await Note.load(this.props.noteId);
}
@@ -106,15 +116,26 @@ class NoteTextComponent extends React.Component {
eventManager.removeListener('todoToggle', this.onTodoToggle_);
}
async saveIfNeeded() {
async saveIfNeeded(saveIfNewNote = false) {
const forceSave = saveIfNewNote && (this.state.note && !this.state.note.id);
if (this.scheduleSaveTimeout_) clearTimeout(this.scheduleSaveTimeout_);
this.scheduleSaveTimeout_ = null;
if (!shared.isModified(this)) return;
if (!forceSave) {
if (!shared.isModified(this)) return;
}
await shared.saveNoteButton_press(this);
}
async saveOneProperty(name, value) {
await shared.saveOneProperty(this, name, value);
if (this.state.note && !this.state.note.id) {
const note = Object.assign({}, this.state.note);
note[name] = value;
this.setState({ note: note });
this.scheduleSave();
} else {
await shared.saveOneProperty(this, name, value);
}
}
scheduleSave() {
@@ -128,17 +149,32 @@ class NoteTextComponent extends React.Component {
if (!options) options = {};
if (!('noReloadIfLocalChanges' in options)) options.noReloadIfLocalChanges = false;
const noteId = props.noteId;
this.lastLoadedNoteId_ = noteId;
const note = noteId ? await Note.load(noteId) : null;
if (noteId !== this.lastLoadedNoteId_) return; // Race condition - current note was changed while this one was loading
if (!options.noReloadIfLocalChanges && this.isModified()) return;
await this.saveIfNeeded();
// If the note hasn't been changed, exit now
if (this.state.note && note) {
let diff = Note.diffObjects(this.state.note, note);
delete diff.type_;
if (!Object.getOwnPropertyNames(diff).length) return;
const previousNote = this.state.note ? Object.assign({}, this.state.note) : null;
const stateNoteId = this.state.note ? this.state.note.id : null;
let noteId = null;
let note = null;
let loadingNewNote = true;
if (props.newNote) {
note = Object.assign({}, props.newNote);
this.lastLoadedNoteId_ = null;
} else {
noteId = props.noteId;
loadingNewNote = stateNoteId !== noteId;
this.lastLoadedNoteId_ = noteId;
note = noteId ? await Note.load(noteId) : null;
if (noteId !== this.lastLoadedNoteId_) return; // Race condition - current note was changed while this one was loading
if (options.noReloadIfLocalChanges && this.isModified()) return;
// If the note hasn't been changed, exit now
if (this.state.note && note) {
let diff = Note.diffObjects(this.state.note, note);
delete diff.type_;
if (!Object.getOwnPropertyNames(diff).length) return;
}
}
this.mdToHtml_ = null;
@@ -146,38 +182,68 @@ class NoteTextComponent extends React.Component {
// If we are loading nothing (noteId == null), make sure to
// set webviewReady to false too because the webview component
// is going to be removed in render().
const webviewReady = this.webview_ && this.state.webviewReady && noteId;
const webviewReady = this.webview_ && this.state.webviewReady && (noteId || props.newNote);
this.editorMaxScrollTop_ = 0;
// Scroll back to top when loading new note
if (loadingNewNote) {
this.editorMaxScrollTop_ = 0;
// HACK: To go around a bug in Ace editor, we first set the scroll position to 1
// and then (in the renderer callback) to the value we actually need. The first
// operation helps clear the scroll position cache. See:
// https://github.com/ajaxorg/ace/issues/2195
this.editorSetScrollTop(1);
this.restoreScrollTop_ = 0;
// HACK: To go around a bug in Ace editor, we first set the scroll position to 1
// and then (in the renderer callback) to the value we actually need. The first
// operation helps clear the scroll position cache. See:
// https://github.com/ajaxorg/ace/issues/2195
this.editorSetScrollTop(1);
this.restoreScrollTop_ = 0;
this.setState({
note: note,
lastSavedNote: Object.assign({}, note),
webviewReady: webviewReady,
});
}
if (note) {
const focusSettingName = !!note.is_todo ? 'newTodoFocus' : 'newNoteFocus';
async componentWillReceiveProps(nextProps) {
if ('noteId' in nextProps && nextProps.noteId !== this.props.noteId) {
await this.reloadNote(nextProps);
if(this.editor_){
if (Setting.value(focusSettingName) === 'title') {
if (this.titleField_) this.titleField_.focus();
} else {
if (this.editor_) this.editor_.editor.focus();
}
}
if (this.editor_) {
const session = this.editor_.editor.getSession();
const undoManager = session.getUndoManager();
undoManager.reset();
session.setUndoManager(undoManager);
this.editor_.editor.clearSelection();
this.editor_.editor.moveCursorTo(0,0);
}
}
let newState = {
note: note,
lastSavedNote: Object.assign({}, note),
webviewReady: webviewReady,
};
if (!note) {
newState.newAndNoTitleChangeNoteId = null;
} else if (note.id !== this.state.newAndNoTitleChangeNoteId) {
newState.newAndNoTitleChangeNoteId = null;
}
this.setState(newState);
}
async componentWillReceiveProps(nextProps) {
if (nextProps.newNote) {
await this.reloadNote(nextProps);
} else if ('noteId' in nextProps && nextProps.noteId !== this.props.noteId) {
await this.reloadNote(nextProps);
}
if ('syncStarted' in nextProps && !nextProps.syncStarted && !this.isModified()) {
await this.reloadNote(nextProps, { noReloadIfLocalChanges: true });
}
if (nextProps.windowCommand) {
this.doCommand(nextProps.windowCommand);
}
}
isModified() {
@@ -190,6 +256,7 @@ class NoteTextComponent extends React.Component {
title_changeText(event) {
shared.noteComponent_change(this, 'title', event.target.value);
this.setState({ newAndNoTitleChangeNoteId: null });
this.scheduleSave();
}
@@ -202,7 +269,7 @@ class NoteTextComponent extends React.Component {
shared.showMetadata_onPress(this);
}
webview_ipcMessage(event) {
async webview_ipcMessage(event) {
const msg = event.channel ? event.channel : '';
const args = event.args;
const arg0 = args && args.length >= 1 ? args[0] : null;
@@ -224,6 +291,32 @@ class NoteTextComponent extends React.Component {
} else if (msg === 'percentScroll') {
this.ignoreNextEditorScroll_ = true;
this.setEditorPercentScroll(arg0);
} else if (msg === 'contextMenu') {
const itemType = arg0 && arg0.type;
const menu = new Menu()
if (itemType === "image" || itemType === "link") {
const resource = await Resource.load(arg0.resourceId);
const resourcePath = Resource.fullPath(resource);
menu.append(new MenuItem({label: _('Open...'), click: async () => {
bridge().openExternal(resourcePath);
}}));
menu.append(new MenuItem({label: _('Save as...'), click: async () => {
const filePath = bridge().showSaveDialog({
defaultPath: resource.filename ? resource.filename : resource.title,
});
if (!filePath) return;
await fs.copy(resourcePath, filePath);
}}));
} else {
reg.logger().error('Unhandled item type: ' + itemType);
return;
}
menu.popup(bridge().window());
} else if (msg.indexOf('joplin://') === 0) {
const resourceId = msg.substr('joplin://'.length);
Resource.load(resourceId).then((resource) => {
@@ -231,10 +324,7 @@ class NoteTextComponent extends React.Component {
bridge().openItem(filePath);
});
} else {
bridge().showMessageBox({
type: 'error',
message: _('Unsupported link or message: %s', msg),
});
bridge().showErrorMessageBox(_('Unsupported link or message: %s', msg));
}
}
@@ -340,18 +430,47 @@ class NoteTextComponent extends React.Component {
this.scheduleSave();
}
async doCommand(command) {
if (!command) return;
let commandProcessed = true;
if (command.name === 'exportPdf' && this.webview_) {
const path = bridge().showSaveDialog({
filters: [{ name: _('PDF File'), extensions: ['pdf']}]
});
if (path) {
this.webview_.printToPDF({}, (error, data) => {
if (error) {
bridge().showErrorMessageBox(error.message);
} else {
shim.fsDriver().writeFile(path, data, 'buffer');
}
});
}
} else if (command.name === 'print' && this.webview_) {
this.webview_.print();
} else {
commandProcessed = false;
}
if (commandProcessed) {
this.props.dispatch({
type: 'WINDOW_COMMAND',
name: null,
});
}
}
async commandAttachFile() {
const noteId = this.props.noteId;
if (!noteId) return;
const filePaths = bridge().showOpenDialog({
properties: ['openFile', 'createDirectory', 'multiSelections'],
});
if (!filePaths || !filePaths.length) return;
await this.saveIfNeeded();
let note = await Note.load(noteId);
await this.saveIfNeeded(true);
let note = await Note.load(this.state.note.id);
for (let i = 0; i < filePaths.length; i++) {
const filePath = filePaths[i];
@@ -369,20 +488,29 @@ class NoteTextComponent extends React.Component {
}
}
commandSetAlarm() {
const noteId = this.props.noteId;
if (!noteId) return;
async commandSetAlarm() {
await this.saveIfNeeded(true);
this.props.dispatch({
type: 'WINDOW_COMMAND',
name: 'editAlarm',
noteId: noteId,
noteId: this.state.note.id,
});
}
async commandSetTags() {
await this.saveIfNeeded(true);
this.props.dispatch({
type: 'WINDOW_COMMAND',
name: 'setTags',
noteId: this.state.note.id,
});
}
itemContextMenu(event) {
const noteId = this.props.noteId;
if (!noteId) return;
const note = this.state.note;
if (!note) return;
const menu = new Menu()
@@ -390,29 +518,26 @@ class NoteTextComponent extends React.Component {
return this.commandAttachFile();
}}));
menu.append(new MenuItem({label: _('Set alarm'), click: async () => {
return this.commandSetAlarm();
menu.append(new MenuItem({label: _('Tags'), click: async () => {
return this.commandSetTags();
}}));
if (!!note.is_todo) {
menu.append(new MenuItem({label: _('Set alarm'), click: async () => {
return this.commandSetAlarm();
}}));
}
menu.popup(bridge().window());
}
// shouldComponentUpdate(nextProps, nextState) {
// //console.info('NEXT PROPS', JSON.stringify(nextProps));
// console.info('NEXT STATE ====================');
// for (var n in nextProps) {
// if (!nextProps.hasOwnProperty(n)) continue;
// console.info(n + ' = ' + (nextProps[n] === this.props[n]));
// }
// return true;
// }
render() {
const style = this.props.style;
const note = this.state.note;
const body = note ? note.body : '';
const body = note && note.body ? note.body : '';
const theme = themeStyle(this.props.theme);
const visiblePanes = this.props.visiblePanes || ['editor', 'viewer'];
const isTodo = note && !!note.is_todo;
const borderWidth = 1;
@@ -508,7 +633,14 @@ class NoteTextComponent extends React.Component {
},
postMessageSyntax: 'ipcRenderer.sendToHost',
};
const html = this.mdToHtml().render(body, theme, mdOptions);
let bodyToRender = body;
if (!bodyToRender.trim() && visiblePanes.indexOf('viewer') >= 0 && visiblePanes.indexOf('editor') < 0) {
// Fixes https://github.com/laurent22/joplin/issues/217
bodyToRender = '*' + _('This note has no content. Click on "%s" to toggle the editor and edit the note.', _('Layout')) + '*';
}
const html = this.mdToHtml().render(bodyToRender, theme, mdOptions);
this.webview_.send('setHtml', html);
}
@@ -520,6 +652,12 @@ class NoteTextComponent extends React.Component {
onClick: () => { return this.commandAttachFile(); },
});
toolbarItems.push({
title: _('Tags'),
iconName: 'fa-tags',
onClick: () => { return this.commandSetTags(); },
});
if (note.is_todo) {
toolbarItems.push({
title: Note.needAlarm(note) ? time.formatMsToLocal(note.todo_due) : _('Set alarm'),
@@ -536,9 +674,11 @@ class NoteTextComponent extends React.Component {
const titleEditor = <input
type="text"
ref={(elem) => { this.titleField_ = elem; } }
style={titleEditorStyle}
value={note ? note.title : ''}
value={note && note.title ? note.title : ''}
onChange={(event) => { this.title_changeText(event); }}
placeholder={ this.props.newNote ? _('Creating new %s...', isTodo ? _('to-do') : _('note')) : '' }
/>
const titleBarMenuButton = <IconButton style={{
@@ -605,6 +745,8 @@ const mapStateToProps = (state) => {
theme: state.settings.theme,
showAdvancedOptions: state.settings.showAdvancedOptions,
syncStarted: state.syncStarted,
newNote: state.newNote,
windowCommand: state.windowCommand,
};
};

View File

@@ -54,10 +54,7 @@ class OneDriveLoginScreenComponent extends React.Component {
this.props.dispatch({ type: 'NAV_BACK' });
reg.scheduleSync(0);
} catch (error) {
bridge().showMessageBox({
type: 'error',
message: 'Could not login to OneDrive. Please try again.\n\n' + error.message + "\n\n" + url.match(/.{1,64}/g).join('\n'),
});
bridge().showErrorMessageBox('Could not login to OneDrive. Please try again.\n\n' + error.message + "\n\n" + url.match(/.{1,64}/g).join('\n'));
}
this.authCode_ = null;

View File

@@ -42,17 +42,20 @@ class PromptDialog extends React.Component {
this.styles_ = {};
const paddingTop = 20;
this.styles_.modalLayer = {
zIndex: 9999,
position: 'absolute',
top: 0,
left: 0,
width: width,
height: height,
height: height - paddingTop,
backgroundColor: 'rgba(0,0,0,0.6)',
display: visible ? 'flex' : 'none',
alignItems: 'center',
alignItems: 'flex-start',
justifyContent: 'center',
paddingTop: paddingTop + 'px',
};
this.styles_.promptDialog = {
@@ -88,24 +91,6 @@ class PromptDialog extends React.Component {
return this.styles_;
}
// shouldComponentUpdate(nextProps, nextState) {
// console.info(JSON.stringify(nextProps)+JSON.stringify(nextState));
// console.info('NEXT PROPS ====================');
// for (var n in nextProps) {
// if (!nextProps.hasOwnProperty(n)) continue;
// console.info(n + ' = ' + (nextProps[n] === this.props[n]));
// }
// console.info('NEXT STATE ====================');
// for (var n in nextState) {
// if (!nextState.hasOwnProperty(n)) continue;
// console.info(n + ' = ' + (nextState[n] === this.state[n]));
// }
// return true;
// }
render() {
const style = this.props.style;
const theme = themeStyle(this.props.theme);

View File

@@ -1,19 +1,19 @@
const React = require('react');
const { connect } = require('react-redux');
const shared = require('lib/components/shared/side-menu-shared.js');
const { Synchronizer } = require('lib/synchronizer.js');
const BaseModel = require('lib/BaseModel.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const Tag = require('lib/models/Tag.js');
const { _ } = require('lib/locale.js');
const { themeStyle } = require('../theme.js');
const { bridge } = require('electron').remote.require('./bridge');
const React = require("react");
const { connect } = require("react-redux");
const shared = require("lib/components/shared/side-menu-shared.js");
const { Synchronizer } = require("lib/synchronizer.js");
const BaseModel = require("lib/BaseModel.js");
const Folder = require("lib/models/Folder.js");
const Note = require("lib/models/Note.js");
const Tag = require("lib/models/Tag.js");
const { _ } = require("lib/locale.js");
const { themeStyle } = require("../theme.js");
const { bridge } = require("electron").remote.require("./bridge");
const Menu = bridge().Menu;
const MenuItem = bridge().MenuItem;
const InteropServiceHelper = require("../InteropServiceHelper.js");
class SideBarComponent extends React.Component {
style() {
const theme = themeStyle(this.props.theme);
@@ -27,62 +27,65 @@ class SideBarComponent extends React.Component {
height: itemHeight,
fontFamily: theme.fontFamily,
fontSize: theme.fontSize,
textDecoration: 'none',
boxSizing: 'border-box',
textDecoration: "none",
boxSizing: "border-box",
color: theme.color2,
paddingLeft: 14,
display: 'flex',
alignItems: 'center',
cursor: 'default',
display: "flex",
alignItems: "center",
cursor: "default",
opacity: 0.8,
whiteSpace: "nowrap",
},
listItemSelected: {
backgroundColor: theme.selectedColor2,
},
conflictFolder: {
color: theme.colorError2,
fontWeight: 'bold',
fontWeight: "bold",
},
header: {
height: itemHeight * 1.8,
fontFamily: theme.fontFamily,
fontSize: theme.fontSize * 1.3,
textDecoration: 'none',
boxSizing: 'border-box',
textDecoration: "none",
boxSizing: "border-box",
color: theme.color2,
paddingLeft: 8,
display: 'flex',
alignItems: 'center',
display: "flex",
alignItems: "center",
},
button: {
padding: 6,
fontFamily: theme.fontFamily,
fontSize: theme.fontSize,
textDecoration: 'none',
boxSizing: 'border-box',
textDecoration: "none",
boxSizing: "border-box",
color: theme.color2,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
alignItems: "center",
justifyContent: "center",
border: "1px solid rgba(255,255,255,0.2)",
marginTop: 10,
marginLeft: 5,
marginRight: 5,
cursor: 'default',
cursor: "default",
},
syncReport: {
fontFamily: theme.fontFamily,
fontSize: Math.round(theme.fontSize * .9),
fontSize: Math.round(theme.fontSize * 0.9),
color: theme.color2,
opacity: .5,
display: 'flex',
alignItems: 'left',
justifyContent: 'top',
flexDirection: 'column',
opacity: 0.5,
display: "flex",
alignItems: "left",
justifyContent: "top",
flexDirection: "column",
marginTop: 10,
marginLeft: 5,
marginRight: 5,
minHeight: 70,
wordWrap: "break-word",
width: "100%",
},
};
@@ -90,19 +93,19 @@ class SideBarComponent extends React.Component {
}
itemContextMenu(event) {
const itemId = event.target.getAttribute('data-id');
const itemId = event.target.getAttribute("data-id");
if (itemId === Folder.conflictFolderId()) return;
const itemType = Number(event.target.getAttribute('data-type'));
if (!itemId || !itemType) throw new Error('No data on element');
let deleteMessage = '';
const itemType = Number(event.target.getAttribute("data-type"));
if (!itemId || !itemType) throw new Error("No data on element");
let deleteMessage = "";
if (itemType === BaseModel.TYPE_FOLDER) {
deleteMessage = _('Delete notebook? All notes within this notebook will also be deleted.');
deleteMessage = _("Delete notebook? All notes within this notebook will also be deleted.");
} else if (itemType === BaseModel.TYPE_TAG) {
deleteMessage = _('Remove this tag from all the notes?');
deleteMessage = _("Remove this tag from all the notes?");
} else if (itemType === BaseModel.TYPE_SEARCH) {
deleteMessage = _('Remove this search from the sidebar?');
deleteMessage = _("Remove this search from the sidebar?");
}
const menu = new Menu();
@@ -112,30 +115,55 @@ class SideBarComponent extends React.Component {
item = BaseModel.byId(this.props.folders, itemId);
}
menu.append(new MenuItem({label: _('Delete'), click: async () => {
const ok = bridge().showConfirmMessageBox(deleteMessage);
if (!ok) return;
menu.append(
new MenuItem({
label: _("Delete"),
click: async () => {
const ok = bridge().showConfirmMessageBox(deleteMessage);
if (!ok) return;
if (itemType === BaseModel.TYPE_FOLDER) {
await Folder.delete(itemId);
} else if (itemType === BaseModel.TYPE_TAG) {
await Tag.untagAll(itemId);
} else if (itemType === BaseModel.TYPE_SEARCH) {
this.props.dispatch({
type: 'SEARCH_DELETE',
id: itemId,
});
}
}}))
if (itemType === BaseModel.TYPE_FOLDER) {
await Folder.delete(itemId);
} else if (itemType === BaseModel.TYPE_TAG) {
await Tag.untagAll(itemId);
} else if (itemType === BaseModel.TYPE_SEARCH) {
this.props.dispatch({
type: "SEARCH_DELETE",
id: itemId,
});
}
},
})
);
if (itemType === BaseModel.TYPE_FOLDER && !item.encryption_applied) {
menu.append(new MenuItem({label: _('Rename'), click: async () => {
this.props.dispatch({
type: 'WINDOW_COMMAND',
name: 'renameFolder',
id: itemId,
});
}}))
menu.append(
new MenuItem({
label: _("Rename"),
click: async () => {
this.props.dispatch({
type: "WINDOW_COMMAND",
name: "renameFolder",
id: itemId,
});
},
})
);
menu.append(new MenuItem({ type: "separator" }));
const InteropService = require("lib/services/InteropService.js");
menu.append(
new MenuItem({
label: _("Export"),
click: async () => {
const ioService = new InteropService();
const module = ioService.moduleByFormat_("exporter", "jex");
await InteropServiceHelper.export(this.props.dispatch.bind(this), module, { sourceFolderIds: [itemId] });
},
})
);
}
menu.popup(bridge().window());
@@ -143,21 +171,21 @@ class SideBarComponent extends React.Component {
folderItem_click(folder) {
this.props.dispatch({
type: 'FOLDER_SELECT',
type: "FOLDER_SELECT",
id: folder ? folder.id : null,
});
}
tagItem_click(tag) {
this.props.dispatch({
type: 'TAG_SELECT',
type: "TAG_SELECT",
id: tag ? tag.id : null,
});
}
searchItem_click(search) {
this.props.dispatch({
type: 'SEARCH_SELECT',
type: "SEARCH_SELECT",
id: search ? search.id : null,
});
}
@@ -172,105 +200,180 @@ class SideBarComponent extends React.Component {
if (folder.id === Folder.conflictFolderId()) style = Object.assign(style, this.style().conflictFolder);
const onDragOver = (event, folder) => {
if (event.dataTransfer.types.indexOf('text/x-jop-note-ids') >= 0) event.preventDefault();
}
if (event.dataTransfer.types.indexOf("text/x-jop-note-ids") >= 0) event.preventDefault();
};
const onDrop = async (event, folder) => {
if (event.dataTransfer.types.indexOf('text/x-jop-note-ids') < 0) return;
if (event.dataTransfer.types.indexOf("text/x-jop-note-ids") < 0) return;
event.preventDefault();
const noteIds = JSON.parse(event.dataTransfer.getData('text/x-jop-note-ids'));
const noteIds = JSON.parse(event.dataTransfer.getData("text/x-jop-note-ids"));
for (let i = 0; i < noteIds.length; i++) {
await Note.moveToFolder(noteIds[i], folder.id);
}
}
};
const itemTitle = Folder.displayTitle(folder);
return <a
className="list-item"
onDragOver={(event) => { onDragOver(event, folder) } }
onDrop={(event) => { onDrop(event, folder) } }
href="#"
data-id={folder.id}
data-type={BaseModel.TYPE_FOLDER}
onContextMenu={(event) => this.itemContextMenu(event)}
key={folder.id}
style={style} onClick={() => {this.folderItem_click(folder)}}>{itemTitle}
</a>
return (
<a
className="list-item"
onDragOver={event => {
onDragOver(event, folder);
}}
onDrop={event => {
onDrop(event, folder);
}}
href="#"
data-id={folder.id}
data-type={BaseModel.TYPE_FOLDER}
onContextMenu={event => this.itemContextMenu(event)}
key={folder.id}
style={style}
onClick={() => {
this.folderItem_click(folder);
}}
>
{itemTitle}
</a>
);
}
tagItem(tag, selected) {
let style = Object.assign({}, this.style().listItem);
if (selected) style = Object.assign(style, this.style().listItemSelected);
return <a className="list-item" href="#" data-id={tag.id} data-type={BaseModel.TYPE_TAG} onContextMenu={(event) => this.itemContextMenu(event)} key={tag.id} style={style} onClick={() => {this.tagItem_click(tag)}}>{Tag.displayTitle(tag)}</a>
return (
<a
className="list-item"
href="#"
data-id={tag.id}
data-type={BaseModel.TYPE_TAG}
onContextMenu={event => this.itemContextMenu(event)}
key={tag.id}
style={style}
onClick={() => {
this.tagItem_click(tag);
}}
>
{Tag.displayTitle(tag)}
</a>
);
}
searchItem(search, selected) {
let style = Object.assign({}, this.style().listItem);
if (selected) style = Object.assign(style, this.style().listItemSelected);
return <a className="list-item" href="#" data-id={search.id} data-type={BaseModel.TYPE_SEARCH} onContextMenu={(event) => this.itemContextMenu(event)} key={search.id} style={style} onClick={() => {this.searchItem_click(search)}}>{search.title}</a>
return (
<a
className="list-item"
href="#"
data-id={search.id}
data-type={BaseModel.TYPE_SEARCH}
onContextMenu={event => this.itemContextMenu(event)}
key={search.id}
style={style}
onClick={() => {
this.searchItem_click(search);
}}
>
{search.title}
</a>
);
}
makeDivider(key) {
return <div style={{height:2, backgroundColor:'blue' }} key={key}></div>
return <div style={{ height: 2, backgroundColor: "blue" }} key={key} />;
}
makeHeader(key, label, iconName) {
const style = this.style().header;
const icon = <i style={{fontSize: style.fontSize * 1.2, marginRight: 5}} className={"fa " + iconName}></i>
return <div style={style} key={key}>{icon}{label}</div>
const icon = <i style={{ fontSize: style.fontSize * 1.2, marginRight: 5 }} className={"fa " + iconName} />;
return (
<div style={style} key={key}>
{icon}
{label}
</div>
);
}
synchronizeButton(type) {
const style = this.style().button;
const iconName = type === 'sync' ? 'fa-refresh' : 'fa-times';
const label = type === 'sync' ? _('Synchronise') : _('Cancel');
const icon = <i style={{fontSize: style.fontSize, marginRight: 5}} className={"fa " + iconName}></i>
return <a className="synchronize-button" style={style} href="#" key="sync_button" onClick={() => {this.sync_click()}}>{icon}{label}</a>
const iconName = type === "sync" ? "fa-refresh" : "fa-times";
const label = type === "sync" ? _("Synchronise") : _("Cancel");
const icon = <i style={{ fontSize: style.fontSize, marginRight: 5 }} className={"fa " + iconName} />;
return (
<a
className="synchronize-button"
style={style}
href="#"
key="sync_button"
onClick={() => {
this.sync_click();
}}
>
{icon}
{label}
</a>
);
}
render() {
const theme = themeStyle(this.props.theme);
const style = Object.assign({}, this.style().root, this.props.style, {
overflowX: 'hidden',
overflowY: 'auto',
overflowX: "hidden",
overflowY: "auto",
});
let items = [];
items.push(this.makeHeader('folderHeader', _('Notebooks'), 'fa-folder-o'));
items.push(this.makeHeader("folderHeader", _("Notebooks"), "fa-folder-o"));
if (this.props.folders.length) {
const folderItems = shared.renderFolders(this.props, this.folderItem.bind(this));
items = items.concat(folderItems);
}
items.push(this.makeHeader('tagHeader', _('Tags'), 'fa-tags'));
items.push(this.makeHeader("tagHeader", _("Tags"), "fa-tags"));
if (this.props.tags.length) {
const tagItems = shared.renderTags(this.props, this.tagItem.bind(this));
items.push(<div className="tags" key="tag_items">{tagItems}</div>);
items.push(
<div className="tags" key="tag_items">
{tagItems}
</div>
);
}
if (this.props.searches.length) {
items.push(this.makeHeader('searchHeader', _('Searches'), 'fa-search'));
items.push(this.makeHeader("searchHeader", _("Searches"), "fa-search"));
const searchItems = shared.renderSearches(this.props, this.searchItem.bind(this));
items.push(<div className="searches" key="search_items">{searchItems}</div>);
items.push(
<div className="searches" key="search_items">
{searchItems}
</div>
);
}
let lines = Synchronizer.reportToLines(this.props.syncReport);
const syncReportText = [];
for (let i = 0; i < lines.length; i++) {
syncReportText.push(<div key={i}>{lines[i]}</div>);
syncReportText.push(
<div key={i} style={{ wordWrap: "break-word", width: "100%" }}>
{lines[i]}
</div>
);
}
items.push(this.synchronizeButton(this.props.syncStarted ? 'cancel' : 'sync'));
items.push(this.synchronizeButton(this.props.syncStarted ? "cancel" : "sync"));
items.push(<div style={this.style().syncReport} key='sync_report'>{syncReportText}</div>);
items.push(
<div style={this.style().syncReport} key="sync_report">
{syncReportText}
</div>
);
return (
<div className="side-bar" style={style}>
@@ -278,10 +381,9 @@ class SideBarComponent extends React.Component {
</div>
);
}
}
const mapStateToProps = (state) => {
const mapStateToProps = state => {
return {
folders: state.folders,
tags: state.tags,
@@ -299,4 +401,4 @@ const mapStateToProps = (state) => {
const SideBar = connect(mapStateToProps)(SideBarComponent);
module.exports = { SideBar };
module.exports = { SideBar };

View File

@@ -1,179 +1,219 @@
<style>
body {
overflow: hidden;
}
#content {
overflow-y: auto;
height: 100%;
padding-left: 10px;
padding-right: 10px;
}
</style>
<div id="hlScriptContainer"></div>
<div id="content" ondragstart="return false;" ondrop="return false;"></div>
<script>
const { ipcRenderer } = require('electron');
const contentElement = document.getElementById('content');
// ----------------------------------------------------------------------
// Handle dynamically loading HLJS when a code element is present
// ----------------------------------------------------------------------
let hljsScriptAdded = false;
let hljsLoaded = false;
function loadHljs(callback) {
hljsScriptAdded = true;
const script = document.createElement('script');
script.onload = function () {
hljsLoaded = true;
applyHljs();
};
script.src = 'highlight/highlight.pack.js';
document.getElementById('hlScriptContainer').appendChild(script);
const link = document.createElement('link');
link.rel = 'stylesheet';
// https://ace.c9.io/build/kitchen-sink.html
// https://highlightjs.org/static/demo/
link.href = 'highlight/styles/atom-one-light.css';
document.getElementById('hlScriptContainer').appendChild(link);
}
function loadAndApplyHljs() {
var codeElements = document.getElementsByClassName('code');
if (!codeElements.length) return;
if (!hljsScriptAdded) {
this.loadHljs();
return;
}
// If HLJS is not loaded yet, no need to do anything. When it loads
// it will automatically apply the style to all the code elements.
if (hljsLoaded) applyHljs(codeElements);
}
function applyHljs(codeElements) {
if (typeof codeElements === 'undefined') codeElements = document.getElementsByClassName('code');
for (var i = 0; i < codeElements.length; i++) {
hljs.highlightBlock(codeElements[i]);
}
}
// ----------------------------------------------------------------------
// / Handle dynamically loading HLJS when a code element is present
// ----------------------------------------------------------------------
// Note: the scroll position source of truth is "percentScroll_". This is easier to manage than scrollTop because
// the scrollTop value depends on the images being loaded or not. For example, if the scrollTop is saved while
// images are being displayed then restored while images are being reloaded, the new scrollTop might be changed
// so that it is not greater than contentHeight. On the other hand, with percentScroll it is possible to restore
// it at any time knowing that it's not going to be changed because the content height has changed.
// To restore percentScroll the "checkScrollIID" interval is used. It constantly resets the scroll position during
// one second after the content has been updated.
//
// ignoreNextScroll is used to differentiate between scroll event from the users and those that are the result
// of programmatically changing scrollTop. We only want to respond to events initiated by the user.
let percentScroll_ = 0;
let checkScrollIID_ = null;
function setPercentScroll(percent) {
percentScroll_ = percent;
contentElement.scrollTop = percentScroll_ * maxScrollTop();
}
function percentScroll() {
return percentScroll_;
}
function restorePercentScroll() {
setPercentScroll(percentScroll_);
}
ipcRenderer.on('setHtml', (event, html) => {
contentElement.innerHTML = html;
loadAndApplyHljs();
// Remove the bullet from "ul" for checkbox lists and extra padding
const checkboxes = document.getElementsByClassName('checkbox');
for (let i = 0; i < checkboxes.length; i++) {
const cb = checkboxes[i];
const ul = cb.parentElement.parentElement;
if (!ul) {
console.warn('Unexpected layout for checkbox');
continue;
<!DOCTYPE html>
<html>
<head>
<style>
body {
overflow: hidden;
}
ul.style.listStyleType = 'none';
ul.style.paddingLeft = 0;
#content {
overflow-y: auto;
height: 100%;
padding-left: 10px;
padding-right: 10px;
}
.katex { font-size: 1.3em; } /* This controls the global Katex font size*/
</style>
</head>
<body id="body">
<div id="hlScriptContainer"></div>
<div id="content" ondragstart="return false;" ondrop="return false;"></div>
<script>
const { ipcRenderer } = require('electron');
const contentElement = document.getElementById('content');
// ----------------------------------------------------------------------
// Handle dynamically loading HLJS when a code element is present
// ----------------------------------------------------------------------
let hljsScriptAdded = false;
let hljsLoaded = false;
function loadHljs(callback) {
hljsScriptAdded = true;
const script = document.createElement('script');
script.onload = function () {
hljsLoaded = true;
applyHljs();
};
script.src = 'highlight/highlight.pack.js';
document.getElementById('hlScriptContainer').appendChild(script);
const link = document.createElement('link');
link.rel = 'stylesheet';
// https://ace.c9.io/build/kitchen-sink.html
// https://highlightjs.org/static/demo/
link.href = 'highlight/styles/atom-one-light.css';
document.getElementById('hlScriptContainer').appendChild(link);
}
let previousContentHeight = contentElement.scrollHeight;
let startTime = Date.now();
ignoreNextScrollEvent = true;
restorePercentScroll();
function loadAndApplyHljs() {
var codeElements = document.getElementsByClassName('code');
if (!codeElements.length) return;
if (!checkScrollIID_) {
checkScrollIID_ = setInterval(() => {
const h = contentElement.scrollHeight;
if (h !== previousContentHeight) {
previousContentHeight = h;
ignoreNextScrollEvent = true;
restorePercentScroll();
if (!hljsScriptAdded) {
this.loadHljs();
return;
}
// If HLJS is not loaded yet, no need to do anything. When it loads
// it will automatically apply the style to all the code elements.
if (hljsLoaded) applyHljs(codeElements);
}
function applyHljs(codeElements) {
if (typeof codeElements === 'undefined') codeElements = document.getElementsByClassName('code');
for (var i = 0; i < codeElements.length; i++) {
try {
hljs.highlightBlock(codeElements[i]);
} catch (error) {
console.warn('Cannot highlight code', error);
}
if (Date.now() - startTime >= 1000) {
clearInterval(checkScrollIID_);
checkScrollIID_ = null;
}
}
// ----------------------------------------------------------------------
// / Handle dynamically loading HLJS when a code element is present
// ----------------------------------------------------------------------
// Note: the scroll position source of truth is "percentScroll_". This is easier to manage than scrollTop because
// the scrollTop value depends on the images being loaded or not. For example, if the scrollTop is saved while
// images are being displayed then restored while images are being reloaded, the new scrollTop might be changed
// so that it is not greater than contentHeight. On the other hand, with percentScroll it is possible to restore
// it at any time knowing that it's not going to be changed because the content height has changed.
// To restore percentScroll the "checkScrollIID" interval is used. It constantly resets the scroll position during
// one second after the content has been updated.
//
// ignoreNextScroll is used to differentiate between scroll event from the users and those that are the result
// of programmatically changing scrollTop. We only want to respond to events initiated by the user.
let percentScroll_ = 0;
let checkScrollIID_ = null;
function setPercentScroll(percent) {
percentScroll_ = percent;
contentElement.scrollTop = percentScroll_ * maxScrollTop();
}
function percentScroll() {
return percentScroll_;
}
function restorePercentScroll() {
setPercentScroll(percentScroll_);
}
ipcRenderer.on('setHtml', (event, html) => {
updateBodyHeight();
contentElement.innerHTML = html;
loadAndApplyHljs();
// Remove the bullet from "ul" for checkbox lists and extra padding
const checkboxes = document.getElementsByClassName('checkbox');
for (let i = 0; i < checkboxes.length; i++) {
const cb = checkboxes[i];
const ul = cb.parentElement.parentElement;
if (!ul) {
console.warn('Unexpected layout for checkbox');
continue;
}
}, 1);
}
});
ul.style.listStyleType = 'none';
ul.style.paddingLeft = 0;
}
let ignoreNextScrollEvent = false;
ipcRenderer.on('setPercentScroll', (event, percent) => {
if (checkScrollIID_) {
clearInterval(checkScrollIID_);
checkScrollIID_ = null;
let previousContentHeight = contentElement.scrollHeight;
let startTime = Date.now();
ignoreNextScrollEvent = true;
restorePercentScroll();
if (!checkScrollIID_) {
checkScrollIID_ = setInterval(() => {
const h = contentElement.scrollHeight;
if (h !== previousContentHeight) {
previousContentHeight = h;
ignoreNextScrollEvent = true;
restorePercentScroll();
}
if (Date.now() - startTime >= 1000) {
clearInterval(checkScrollIID_);
checkScrollIID_ = null;
}
}, 1);
}
});
let ignoreNextScrollEvent = false;
ipcRenderer.on('setPercentScroll', (event, percent) => {
if (checkScrollIID_) {
clearInterval(checkScrollIID_);
checkScrollIID_ = null;
}
ignoreNextScrollEvent = true;
setPercentScroll(percent);
});
function maxScrollTop() {
return Math.max(0, contentElement.scrollHeight - contentElement.clientHeight);
}
ignoreNextScrollEvent = true;
setPercentScroll(percent);
});
function maxScrollTop() {
return Math.max(0, contentElement.scrollHeight - contentElement.clientHeight);
}
contentElement.addEventListener('scroll', function(e) {
if (ignoreNextScrollEvent) {
ignoreNextScrollEvent = false;
return;
// The body element needs to have a fixed height for the content to be scrollable
function updateBodyHeight() {
document.getElementById('body').style.height = window.innerHeight + 'px';
}
const m = maxScrollTop();
const percent = m ? contentElement.scrollTop / m : 0;
setPercentScroll(percent);
ipcRenderer.sendToHost('percentScroll', percent);
});
// Disable drag and drop otherwise it's possible to drop a URL
// on it and it will open in the view as a website.
document.addEventListener('drop', function(e) {
e.preventDefault();
e.stopPropagation();
});
document.addEventListener('dragover', function(e) {
e.preventDefault();
e.stopPropagation();
});
document.addEventListener('dragover', function(e) {
e.preventDefault();
});
</script>
contentElement.addEventListener('scroll', function(e) {
if (ignoreNextScrollEvent) {
ignoreNextScrollEvent = false;
return;
}
const m = maxScrollTop();
const percent = m ? contentElement.scrollTop / m : 0;
setPercentScroll(percent);
ipcRenderer.sendToHost('percentScroll', percent);
});
document.addEventListener('contextmenu', function(event) {
let element = event.target;
// To handle right clicks on resource icons
if (element && !element.getAttribute('data-resource-id')) element = element.parentElement;
if (element && element.getAttribute('data-resource-id')) {
ipcRenderer.sendToHost('contextMenu', {
type: element.getAttribute('src') ? 'image' : 'link',
resourceId: element.getAttribute('data-resource-id'),
});
}
});
// Disable drag and drop otherwise it's possible to drop a URL
// on it and it will open in the view as a website.
document.addEventListener('drop', function(e) {
e.preventDefault();
e.stopPropagation();
});
document.addEventListener('dragover', function(e) {
e.preventDefault();
e.stopPropagation();
});
document.addEventListener('dragover', function(e) {
e.preventDefault();
});
window.addEventListener('resize', function() {
updateBodyHeight();
});
updateBodyHeight();
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,12 +1,13 @@
var locales = {};
locales['en_GB'] = require('./en_GB.json');
locales['de_DE'] = require('./de_DE.json');
locales['es_CR'] = require('./es_CR.json');
locales['es_ES'] = require('./es_ES.json');
locales['eu'] = require('./eu.json');
locales['fr_FR'] = require('./fr_FR.json');
locales['hr_HR'] = require('./hr_HR.json');
locales['it_IT'] = require('./it_IT.json');
locales['ja_JP'] = require('./ja_JP.json');
locales['nl_BE'] = require('./nl_BE.json');
locales['pt_BR'] = require('./pt_BR.json');
locales['ru_RU'] = require('./ru_RU.json');
locales['zh_CN'] = require('./zh_CN.json');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -3,6 +3,15 @@
// Make it possible to require("/lib/...") without specifying full path
require('app-module-path').addPath(__dirname);
// Disable React message in console "Download the React DevTools for a better development experience"
// https://stackoverflow.com/questions/42196819/disable-hide-download-the-react-devtools#42196820
__REACT_DEVTOOLS_GLOBAL_HOOK__ = {
supportsFiber: true,
inject: function() {},
onCommitFiberRoot: function() {},
onCommitFiberUnmount: function() {},
};
const { app } = require('./app.js');
const Folder = require('lib/models/Folder.js');
const Resource = require('lib/models/Resource.js');
@@ -17,11 +26,13 @@ const { FsDriverNode } = require('lib/fs-driver-node.js');
const { shimInit } = require('lib/shim-init-node.js');
const EncryptionService = require('lib/services/EncryptionService');
const { bridge } = require('electron').remote.require('./bridge');
const { FileApiDriverLocal } = require('lib/file-api-driver-local.js');
const fsDriver = new FsDriverNode();
Logger.fsDriver_ = fsDriver;
Resource.fsDriver_ = fsDriver;
EncryptionService.fsDriver_ = fsDriver;
FileApiDriverLocal.fsDriver_ = fsDriver;
// That's not good, but it's to avoid circular dependency issues
// in the BaseItem class.
@@ -53,11 +64,17 @@ document.addEventListener('click', (event) => event.preventDefault());
app().start(bridge().processArgv()).then(() => {
require('./gui/Root.min.js');
}).catch((error) => {
// If something goes wrong at this stage we don't have a console or a log file
// so display the error in a message box.
let msg = ['Fatal error:', error.message];
if (error.fileName) msg.push(error.fileName);
if (error.lineNumber) msg.push(error.lineNumber);
if (error.stack) msg.push(error.stack);
bridge().showErrorMessageBox(msg.join('\n'));
if (error.code == 'flagError') {
bridge().showErrorMessageBox(error.message);
} else {
// If something goes wrong at this stage we don't have a console or a log file
// so display the error in a message box.
let msg = ['Fatal error:', error.message];
if (error.fileName) msg.push(error.fileName);
if (error.lineNumber) msg.push(error.lineNumber);
if (error.stack) msg.push(error.stack);
bridge().showErrorMessageBox(msg.join('\n\n'));
}
bridge().electronApp().exit(1);
});

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "Joplin",
"version": "0.10.41",
"version": "1.0.75",
"description": "Joplin for Desktop",
"main": "main.js",
"scripts": {
@@ -8,8 +8,8 @@
"pack": "node_modules/.bin/electron-builder --dir",
"dist": "node_modules/.bin/electron-builder",
"publish": "build -p always",
"postinstall": "node compile-jsx.js && node compile-package-info.js",
"compile": "node compile-jsx.js && node compile-package-info.js"
"postinstall": "node compile-jsx.js && node compile-package-info.js && node ../../Tools/copycss.js --copy-fonts",
"compile": "node compile-jsx.js && node compile-package-info.js && node ../../Tools/copycss.js --copy-fonts"
},
"repository": {
"type": "git",
@@ -22,6 +22,9 @@
},
"build": {
"appId": "net.cozic.joplin-desktop",
"extraResources": [
"build/icons/*"
],
"win": {
"icon": "../../Assets/Joplin.ico"
},
@@ -34,15 +37,18 @@
"asar": false
},
"linux": {
"asar": false
"asar": false,
"category": "Office"
}
},
"homepage": "https://github.com/laurent22/joplin#readme",
"devDependencies": {
"ajv": "^6.2.0",
"app-builder-bin": "^1.5.0",
"babel-cli": "^6.26.0",
"babel-preset-react": "^6.24.1",
"electron": "^1.7.9",
"electron-builder": "^19.45.4"
"electron": "^1.7.11",
"electron-builder": "^20.5.1"
},
"optionalDependencies": {
"7zip-bin-mac": "^1.0.1",
@@ -51,9 +57,10 @@
},
"dependencies": {
"app-module-path": "^2.2.0",
"async-mutex": "^0.1.3",
"base-64": "^0.1.0",
"compare-versions": "^3.1.0",
"electron-context-menu": "^0.9.1",
"electron-log": "^2.2.11",
"electron-updater": "^2.16.1",
"electron-window-state": "^4.1.1",
"follow-redirects": "^1.2.5",
"form-data": "^2.3.1",
@@ -61,9 +68,11 @@
"highlight.js": "^9.12.0",
"html-entities": "^1.2.1",
"jssha": "^2.3.1",
"katex": "^0.9.0-beta1",
"levenshtein": "^1.0.5",
"lodash": "^4.17.4",
"markdown-it": "^8.4.0",
"markdown-it-katex": "^2.0.3",
"md5": "^2.2.1",
"mime": "^2.0.3",
"moment": "^2.19.1",
@@ -77,13 +86,16 @@
"react-dom": "^16.0.0",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"sharp": "^0.18.4",
"sharp": "^0.17.3",
"smalltalk": "^2.5.1",
"sprintf-js": "^1.1.1",
"sqlite3": "^3.1.13",
"string-padding": "^1.0.2",
"string-to-stream": "^1.1.0",
"tar": "^4.4.0",
"tcp-port-used": "^0.1.2",
"uuid": "^3.1.0"
"url-parse": "^1.2.0",
"uuid": "^3.1.0",
"xml2js": "^0.4.19"
}
}

View File

@@ -1,12 +1,13 @@
const Setting = require('lib/models/Setting.js');
const globalStyle = {
fontSize: 12,
fontSize: 12 * Setting.value('style.zoom')/100,
fontFamily: 'sans-serif',
margin: 15, // No text and no interactive component should be within this margin
itemMarginTop: 10,
itemMarginBottom: 10,
backgroundColor: "#ffffff",
backgroundColorTransparent: 'rgba(255,255,255,0.9)',
oddBackgroundColor: "#dddddd",
color: "#222222", // For regular text
colorError: "red",

View File

@@ -79,6 +79,10 @@ async function main(argv) {
const macOsUrl = downloadUrl(release, 'macos');
const linuxUrl = downloadUrl(release, 'linux');
console.info('Windows: ', winUrl);
console.info('macOS: ', macOsUrl);
console.info('Linux: ', linuxUrl);
let content = readmeContent();
if (winUrl) content = content.replace(/(https:\/\/github.com\/laurent22\/joplin\/releases\/download\/.*?\.exe)/, winUrl);
@@ -86,6 +90,8 @@ async function main(argv) {
if (linuxUrl) content = content.replace(/(https:\/\/github.com\/laurent22\/joplin\/releases\/download\/.*?\.AppImage)/, linuxUrl);
setReadmeContent(content);
console.info("git pull && git add -A && git commit -m 'Update readme downloads' && git push")
}
main(process.argv).catch((error) => {

20
LICENSE
View File

@@ -1,7 +1,21 @@
MIT License
Copyright (c) 2016-2018 Laurent Cozic
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,7 +0,0 @@
Copyright (c) 2016-2018 Laurent Cozic
L'autorisation est accordée, gracieusement, à toute personne acquérant une copie de ce logiciel et des fichiers de documentation associés (le "Logiciel"), de commercialiser le Logiciel sans restriction, notamment les droits d'utiliser, de copier, de modifier, de fusionner, de publier, de distribuer, de sous-licencier et/ou de vendre des copies du Logiciel, ainsi que d'autoriser les personnes auxquelles le Logiciel est fourni à le faire, sous réserve des conditions suivantes :
La déclaration de copyright ci-dessus et la présente autorisation doivent être incluses dans toutes copies ou parties substantielles du Logiciel.
LE LOGICIEL EST FOURNI "TEL QUEL", SANS GARANTIE D'AUCUNE SORTE, EXPLICITE OU IMPLICITE, NOTAMMENT SANS GARANTIE DE QUALITÉ MARCHANDE, D’ADÉQUATION À UN USAGE PARTICULIER ET D'ABSENCE DE CONTREFAÇON. EN AUCUN CAS, LES AUTEURS OU TITULAIRES DU DROIT D'AUTEUR NE SERONT RESPONSABLES DE TOUT DOMMAGE, RÉCLAMATION OU AUTRE RESPONSABILITÉ, QUE CE SOIT DANS LE CADRE D'UN CONTRAT, D'UN DÉLIT OU AUTRE, EN PROVENANCE DE, CONSÉCUTIF À OU EN RELATION AVEC LE LOGICIEL OU SON UTILISATION, OU AVEC D'AUTRES ÉLÉMENTS DU LOGICIEL.

178
README.md
View File

@@ -1,12 +1,12 @@
# Joplin
Joplin 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 [Markdown format](https://daringfireball.net/projects/markdown/basics).
Joplin 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 [Markdown format](#markdown).
Notes exported from Evernote via .enex files [can be imported](#importing-notes-from-evernote) into Joplin, including the formatted content (which is converted to Markdown), resources (images, attachments, etc.) and complete metadata (geolocation, updated time, created time, etc.).
Notes exported from Evernote via .enex files [can be imported](#importing) 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.
The notes can be [synchronised](#synchronisation) with various targets including the file system (for example with a network directory) or with Microsoft OneDrive. When synchronising the notes, notebooks, tags and other metadata are saved to plain text files which can be easily inspected, backed up and moved around.
The notes can be [synchronised](#synchronisation) with various targets including [Nextcloud](https://nextcloud.com/), the file system (for example with a network directory) or with Microsoft OneDrive. When synchronising the notes, notebooks, tags and other metadata are saved to plain text files which can be easily inspected, backed up and moved around.
Joplin is still under development but is out of Beta and should be suitable for every day use. The UI of the terminal client is built on top of the great [terminal-kit](https://github.com/cronvel/terminal-kit) library, the desktop client using [Electron](https://electronjs.org/), and the Android client front end is done using [React Native](https://facebook.github.io/react-native/).
The UI of the terminal client is built on top of the great [terminal-kit](https://github.com/cronvel/terminal-kit) library, the desktop client using [Electron](https://electronjs.org/), and the Android client front end is done using [React Native](https://facebook.github.io/react-native/).
<div class="top-screenshot"><img src="https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/AllClients.jpg" style="max-width: 100%; max-height: 35em;"></div>
@@ -18,16 +18,16 @@ Three types of applications are available: for the **desktop** (Windows, macOS a
Operating System | Download
-----------------|--------
Windows | <a href='https://github.com/laurent22/joplin/releases/download/v0.10.40/Joplin-Setup-0.10.40.exe'><img alt='Get it on Windows' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeWindows.png'/></a>
macOS | <a href='https://github.com/laurent22/joplin/releases/download/v0.10.40/Joplin-0.10.40.dmg'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeMacOS.png'/></a>
Linux | <a href='https://github.com/laurent22/joplin/releases/download/v0.10.40/Joplin-0.10.40-x86_64.AppImage'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeLinux.png'/></a>
Windows | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.70/Joplin-Setup-1.0.70.exe'><img alt='Get it on Windows' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeWindows.png'/></a>
macOS | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.70/Joplin-1.0.70.dmg'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeMacOS.png'/></a>
Linux | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.70/Joplin-1.0.70-x86_64.AppImage'><img alt='Get it on Linux' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeLinux.png'/></a>
## Mobile applications
Operating System | Download
-----------------|--------
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeAndroid.png'/></a>
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeIOS.png'/></a>
Operating System | Download | Alt. Download
-----------------|----------|----------------
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeAndroid.png'/></a> | or [Download APK File](https://github.com/laurent22/joplin-android/releases/download/android-v1.0.107/joplin-v1.0.107.apk)
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeIOS.png'/></a> | -
## Terminal application
@@ -51,18 +51,23 @@ For usage information, please refer to the full [Joplin Terminal Application Doc
# Features
- Desktop, mobile and terminal applications.
- End To End Encryption (E2EE)
- Synchronisation with various services, including NextCloud, WebDAV and OneDrive. Dropbox is planned.
- Import Enex files (Evernote export format) and Markdown files.
- Export JEX files (Joplin Export format) and raw files.
- Support notes, to-dos, tags and notebooks.
- Sort notes by multiple criteria - title, updated time, etc.
- Support for alarms (notifications) in mobile and desktop applications.
- Offline first, so the entire data is always available on the device even without an internet connection.
- Ability to synchronise with multiple targets, including the file system and OneDrive (NextCloud and Dropbox are planned).
- Synchronises to a plain text format, which can be easily manipulated, backed up, or exported to a different format.
- Markdown notes, which are rendered with images and formatting in the desktop and mobile applications.
- Tag support
- File attachment support (images are displayed, and other files are linked and can be opened in the relevant application).
- Markdown notes, which are rendered with images and formatting in the desktop and mobile applications. Support for extra features such as math notation and checkboxes.
- File attachment support - images are displayed, and other files are linked and can be opened in the relevant application.
- Search functionality.
- Geo-location support.
- Supports multiple languages
# Importing notes from Evernote
# Importing
## Importing from Evernote
Joplin was designed as a replacement for Evernote and so can import complete Evernote notebooks, as well as notes, tags, resources (attached files) and note metadata (such as author, geo-location, etc.) via ENEX files. In terms of data, the only two things that might slightly differ are:
@@ -72,29 +77,77 @@ Joplin was designed as a replacement for Evernote and so can import complete Eve
To import Evernote data, first export your Evernote notebooks to ENEX files as described [here](https://help.evernote.com/hc/en-us/articles/209005557-How-to-back-up-export-and-restore-import-notes-and-notebooks). Then follow these steps:
On the **desktop application**, open the "File" menu, click "Import Evernote notes" and select your ENEX file. This will open a new screen which will display the import progress. The notes will be imported into a new separate notebook (so that, in case of a mistake, the notes are not mixed up with any existing notes). If needed then can then be moved to a different notebook, or the notebook can be renamed, etc.
On the **desktop application**, open File > Import > ENEX and select your file. The notes will be imported into a new separate notebook. If needed they can then be moved to a different notebook, or the notebook can be renamed, etc.
On the **terminal application**, in [command-line mode](/terminal#command-line-mode), type `import-enex /path/to/file.enex`. This will import the notes into a new notebook named after the filename.
On the **terminal application**, in [command-line mode](/terminal#command-line-mode), type `import /path/to/file.enex`. This will import the notes into a new notebook named after the filename.
# Importing notes from other applications
## Importing from Markdown files
Joplin can import notes from plain Markdown file. You can either import a complete directory of Markdown files or individual files.
On the **desktop application**, open File > Import > MD and select your Markdown file or directory.
On the **terminal application**, in [command-line mode](/terminal#command-line-mode), type `import --format md /path/to/file.md` or `import --format md /path/to/directory/`.
## Importing from other applications
In general the way to import notes from any application into Joplin is to convert the notes to ENEX files (Evernote format) and to import these ENEX files into Joplin using the method above. Most note-taking applications support ENEX files so it should be relatively straightforward. For help about specific applications, see below:
* Standard Notes: Please see [this tutorial](https://programadorwebvalencia.com/migrate-notes-from-standard-notes-to-joplin/)
* Tomboy Notes: Export the notes to ENEX files [as described here](https://askubuntu.com/questions/243691/how-can-i-export-my-tomboy-notes-into-evernote/608551) for example, and import these ENEX files into Joplin.
# Exporting
Joplin can export to the JEX format (Joplin Export file), which is a tar file that can contain multiple notes, notebooks, etc. This is a lossless format in that all the notes, but also metadata such as geo-location, updated time, tags, etc. are preserved. This format is convenient for backup purposes and can be re-imported into Joplin. A "raw" format is also available. This is the same as the JEX format except that the data is saved to a directory and each item represented by a single file.
# Synchronisation
One of the goals of Joplin was to avoid being tied to any particular company or service, whether it is Evernote, Google or Microsoft. As such the synchronisation is designed without any hard dependency to any particular service. Most of the synchronisation process is done at an abstract level and access to external services, such as OneDrive or Dropbox, is done via lightweight drivers. It is easy to support new services by creating simple drivers that provide a filesystem-like interface, i.e. the ability to read, write, delete and list items. It is also simple to switch from one service to another or to even sync to multiple services at once. Each note, notebook, tags, as well as the relation between items is transmitted as plain text files during synchronisation, which means the data can also be moved to a different application, can be easily backed up, inspected, etc.
One of the goals of Joplin was to avoid being tied to any particular company or service, whether it is Evernote, Google or Microsoft. As such the synchronisation is designed without any hard dependency to any particular service. Most of the synchronisation process is done at an abstract level and access to external services, such as Nextcloud or OneDrive, is done via lightweight drivers. It is easy to support new services by creating simple drivers that provide a filesystem-like interface, i.e. the ability to read, write, delete and list items. It is also simple to switch from one service to another or to even sync to multiple services at once. Each note, notebook, tags, as well as the relation between items is transmitted as plain text files during synchronisation, which means the data can also be moved to a different application, can be easily backed up, inspected, etc.
Currently, synchronisation is possible with OneDrive (by default) or the local filesystem. A NextCloud driver, and a Dropbox one will also be available once [this React Native bug](https://github.com/facebook/react-native/issues/14445) is fixed. When syncing with OneDrive, Joplin creates a sub-directory in OneDrive, in /Apps/Joplin and read/write the notes and notebooks from it. The application does not have access to anything outside this directory.
Currently, synchronisation is possible with Nextcloud and OneDrive (by default) or the local filesystem. A Dropbox one will also be available once [this React Native bug](https://github.com/facebook/react-native/issues/14445) is fixed. To setup synchronisation please follow the instructions below. After that, the application will synchronise in the background whenever it is running, or you can click on "Synchronise" to start a synchronisation manually.
On the **desktop application**, to initiate the synchronisation process, click on the "Synchronise" button in the sidebar. You will be asked to login to OneDrive to authorise the application (simply input your Microsoft credentials - you do not need to register with OneDrive). After that, the application will synchronise in the background whenever it is running, or you can click on "Synchronise" to start a synchronisation manually.
## Nextcloud synchronisation
On the **terminal application**, to initiate the synchronisation process, type `:sync`. You will be asked to follow a link to authorise the application (simply input your Microsoft credentials - you do not need to register with OneDrive). After that, the application will synchronise in the background whenever it is running. It is possible to also synchronise outside of the user interface by typing `joplin sync` from the terminal. This can be used to setup a cron script to synchronise at regular interval. For example, this would do it every 30 minutes:
On the **desktop application** or **mobile application**, go to the config screen and select Nextcloud as the synchronisation target. Then input [the WebDAV URL](https://docs.nextcloud.com/server/9/user_manual/files/access_webdav.html), this is normally `https://example.com/nextcloud/remote.php/dav/files/USERNAME/Joplin` (make sure to create the "Joplin" directory in Nextcloud and to replace USERNAME by your Nextcloud username), and set the username and password.
On the **terminal application**, you will need to set the `sync.target` config variable and all the `sync.5.path`, `sync.5.username` and `sync.5.password` config variables to, respectively the Nextcloud WebDAV URL, your username and your password. This can be done from the command line mode using:
:config sync.5.path https://example.com/nextcloud/remote.php/dav/files/USERNAME/Joplin
:config sync.5.username YOUR_USERNAME
:config sync.5.password YOUR_PASSWORD
:config sync.target 5
If synchronisation does not work, please consult the logs in the app profile directory - it is often due to a misconfigured URL or password. The log should indicate what the exact issue is.
## WebDAV synchronisation
Select the "WebDAV" synchronisation target and follow the same instructions as for Nextcloud above.
WebDAV-compatible services that are known to work with Joplin:
- [Box.com](https://www.box.com/)
- [DriveHQ](https://www.drivehq.com)
- [OwnCloud](https://owncloud.org/)
- [Seafile](https://www.seafile.com/)
- [Stack](https://www.transip.nl/stack/)
- [Zimbra](https://www.zimbra.com/)
## OneDrive synchronisation
When syncing with OneDrive, Joplin creates a sub-directory in OneDrive, in /Apps/Joplin and read/write the notes and notebooks from it. The application does not have access to anything outside this directory.
On the **desktop application** or **mobile application**, select "OneDrive" as the synchronisation target in the config screen (it is selected by default). Then, to initiate the synchronisation process, click on the "Synchronise" button in the sidebar. You will be asked to login to OneDrive to authorise the application (simply input your Microsoft credentials - you do not need to register with OneDrive).
On the **terminal application**, to initiate the synchronisation process, type `:sync`. You will be asked to follow a link to authorise the application (simply input your Microsoft credentials - you do not need to register with OneDrive). It is possible to also synchronise outside of the user interface by typing `joplin sync` from the terminal. This can be used to setup a cron script to synchronise at regular interval. For example, this would do it every 30 minutes:
*/30 * * * * /path/to/joplin sync
# Encryption
Joplin supports end-to-end encryption (E2EE) on all the applications. E2EE is a system where only the owner of the notes, notebooks, tags or resources can read them. It prevents potential eavesdroppers - including telecom providers, internet providers, and even the developers of Joplin from being able to access the data. Please see the [End-To-End Encryption Tutorial](http://joplin.cozic.net/help/e2ee) for more information about this feature and how to enable it.
For a more technical description, mostly relevant for development or to review the method being used, please see the [Encryption specification](http://joplin.cozic.net/help/spec).
# Attachments / Resources
Any kind of file can be attached to a note. In Markdown, links to these files are represented as a simple ID to the resource. In the note viewer, these files, if they are images, will be displayed or, if they are other files (PDF, text files, etc.) they will be displayed as links. Clicking on this link will open the file in the default application.
@@ -107,15 +160,59 @@ On the desktop and mobile apps, an alarm can be associated with any to-do. It wi
- **macOS**: >= 10.8 or Growl if earlier.
- **Linux**: `notify-osd` or `libnotify-bin` installed (Ubuntu should have this by default). Growl otherwise
See [documentation and flow chart for reporter choice](./DECISION_FLOW.md)
See [documentation and flow chart for reporter choice](https://github.com/mikaelbr/node-notifier/blob/master/DECISION_FLOW.md)
On mobile, the alarms will be displayed using the built-in notification system.
If for any reason the notifications do not work, please [open an issue](https://github.com/laurent22/joplin/issues).
# Markdown
Joplin uses and renders [Github-flavoured Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) with a few variations and additions. In particular:
## Math notation
Math expressions can be added using the [Katex notation](https://khan.github.io/KaTeX/). To add an inline equation, wrap the expression in `$EXPRESSION$`, eg. `$\sqrt{3x-1}+(1+x)^2$`. To create an expression block, wrap it as follow:
$$
EXPRESSION
$$
For example:
$$
f(x) = \int_{-\infty}^\infty
\hat f(\xi)\,e^{2 \pi i \xi x}
\,d\xi
$$
Here is an example with the Markdown and rendered result side by side:
<img src="https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/Katex.png" style="max-width: 100%; max-height: 35em;">
## Checkboxes
Checkboxes can be added like so:
- [ ] Milk
- [ ] Rice
- [ ] Eggs
The checkboxes can then be ticked in the mobile and desktop applications.
# Donations
Donations to Joplin support the development of the project. Developing quality applications mostly takes time, but there are also some expenses, such as digital certificates to sign the applications, app store fees, hosting, etc. Most of all, your donation will make it possible to keep up the current development standard.
Please see the [donation page](http://joplin.cozic.net/donate/) for information on how to support the development of Joplin.
# Contributing
Please see the guide for information on how to contribute to the development of Joplin: https://github.com/laurent22/joplin/blob/master/CONTRIBUTING.md
# Localisation
Joplin is currently available in English, French, Spanish, German, Portuguese, Chinese, Japanese, Russian, Croatian and Italian. If you would like to contribute a translation, it is quite straightforward, please follow these steps:
Joplin is currently available in the languages below. If you would like to contribute a **new translation**, it is quite straightforward, please follow these steps:
- [Download Poedit](https://poedit.net/), the translation editor, and install it.
- [Download the file to be translated](https://raw.githubusercontent.com/laurent22/joplin/master/CliClient/locales/joplin.pot).
@@ -124,23 +221,36 @@ Joplin is currently available in English, French, Spanish, German, Portuguese, C
This translation will apply to the three applications - desktop, mobile and terminal.
# Coming features
To **update a translation**, follow the same steps as above but instead of getting the .pot file, get the .po file for your language from the table below.
- NextCloud support
- All: End to end encryption
- Windows: Tray icon
- Desktop apps: Tag auto-complete
- Desktop apps: Dark theme
- Linux: Enable auto-update for desktop app
Current translations:
<!-- LOCALE-TABLE-AUTO-GENERATED -->
&nbsp; | Language | Po File | Last translator | Percent done
---|---|---|---|---
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/es/basque_country.png) | Basque | [eu](https://github.com/laurent22/joplin/blob/master/CliClient/locales/eu.po) | juan.abasolo@ehu.eus | 80%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/hr.png) | Croatian | [hr_HR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/hr_HR.po) | Hrvoje Mandić <trbuhom@net.hr> | 65%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/de.png) | Deutsch | [de_DE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/de_DE.po) | Tobias Strobel <git@strobeltobias.de> | 97%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/gb.png) | English | [en_GB](https://github.com/laurent22/joplin/blob/master/CliClient/locales/en_GB.po) | | 100%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/es.png) | Español | [es_ES](https://github.com/laurent22/joplin/blob/master/CliClient/locales/es_ES.po) | Fernando Martín <f@mrtn.es> | 100%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/fr.png) | Français | [fr_FR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/fr_FR.po) | Laurent Cozic | 100%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/it.png) | Italiano | [it_IT](https://github.com/laurent22/joplin/blob/master/CliClient/locales/it_IT.po) | | 66%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/be.png) | Nederlands | [nl_BE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nl_BE.po) | | 80%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/br.png) | Português (Brasil) | [pt_BR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/pt_BR.po) | Renato Nunes Bastos <rnbastos@gmail.com> | 98%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/ru.png) | Русский | [ru_RU](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ru_RU.po) | Artyom Karlov <artyom.karlov@gmail.com> | 100%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/cn.png) | 中文 (简体) | [zh_CN](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_CN.po) | RCJacH <RCJacH@outlook.com> | 66%
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/jp.png) | 日本語 | [ja_JP](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ja_JP.po) | | 65%
<!-- LOCALE-TABLE-AUTO-GENERATED -->
# Known bugs
- Non-alphabetical characters such as Chinese or Arabic might create glitches in the terminal on Windows. This is a limitation of the current Windows console.
- Auto-update is not working in the Linux desktop application.
- While the mobile can sync and load tags, it is not currently possible to create new ones. The desktop and terminal apps can create, delete and edit tags.
# License
MIT License
Copyright (c) 2016-2018 Laurent Cozic
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@@ -1,368 +0,0 @@
# Joplin
Joplin 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 with your own text editor.
Notes exported from Evernote via .enex files [can be imported](#importing-notes-from-evernote) into Joplin, including the formatted content (which is converted to markdown), resources (images, attachments, etc.) and complete metadata (geolocation, updated time, created time, etc.).
The notes can be [synchronised](#synchronisation) with various targets including the file system (for example with a network directory) or with Microsoft OneDrive. When synchronising the notes, notebooks, tags and other metadata are saved to plain text files which can be easily inspected, backed up and moved around.
<img src="https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/ScreenshotTerminal.png" style="max-width: 60%">
# Installation
On macOS:
brew install joplin
On Linux or Windows (via [WSL](https://msdn.microsoft.com/en-us/commandline/wsl/faq?f=255&MSPPError=-2147217396)):
**Important:** First, [install Node 8+](https://nodejs.org/en/download/package-manager/). Node 8 is LTS but not yet available everywhere so you might need to manually install it.
NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin
sudo ln -s ~/.joplin-bin/bin/joplin /usr/bin/joplin
By default, the application binary will be installed under `~/.joplin-bin`. You may change this directory if needed. Alternatively, if your npm permissions are setup as described [here](https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory) (Option 2) then simply running `npm -g install joplin` would work.
To start it, type `joplin`.
# Demo
The demo application shows various Wikipedia articles converted to Markdown and organised into notebooks, as well as an example to-do list, in order to test and demonstrate the application. The demo application and its settings will be installed in a separate directory so as not to interfere with any existing Joplin application.
npm install -g demo-joplin
To start it, type `demo-joplin`.
# Usage
To start the application type `joplin`. This will open the user interface, which has three main panes: Notebooks, Notes and the text of the current note. There are also additional panels that can be toggled on and off via [shortcuts](#available-shortcuts).
<img src="https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/ScreenshotTerminalCaptions.png" height="450px">
## Input modes
Joplin user interface is partly based on the text editor Vim and offers two different modes to interact with the notes and notebooks:
### Normal mode
Allows moving from one pane to another using the `Tab` and `Shift-Tab` keys, and to select/view notes using the arrow keys. Text area can be scrolled using the arrow keys too. Press `Enter` to edit a note. Various other [shortcuts](#available-shortcuts) are available.
### Command-line mode
Press `:` to enter command line mode. From there, the Joplin commands such as `mknote` or `search` are available. See the [full list of commands](#available-commands).
It is possible to refer to a note or notebook by title or ID. However the simplest way is to refer to the currently selected item using one of these shortcuts:
Shortcut | Description
---------|------------
`$n` | Refers to the currently selected note
`$b` | Refers to the currently selected notebook
`$c` | Refers to the currently selected item. For example, if the note list is current active, `$c` will refer to the currently selected note.
**Examples:**
Create a new note with title "Wednesday's meeting":
mknote "Wednesday's meeting"
Create a new to-do:
mktodo "Buy bread"
Move the currently selected note ($n) to the notebook with title "Personal"
mv $n "Personal"
Rename the currently selected notebook ($b) to "Something":
ren $b "Something"
Attach a local file to the currently selected note ($n):
attach $n /home/laurent/pictures/Vacation12.jpg
The configuration can also be changed from command-line mode. For example, to change the current editor to Sublime Text:
config editor "subl -w"
## Editing a note
To edit a note, select it and press `ENTER`. Or, in command-line mode, type `edit $n` to edit the currently selected note, or `edit "Note title"` to edit a particular note.
## Getting help
The complete usage information is available from command-line mode, by typing one of these commands:
Command | Description
--------|-------------------
`help` | General help information
`help shortcuts` | Lists the available shortcuts
`help [command]` | Displays information about a particular command
If the help is not fully visible, press `Tab` multiple times till the console is in focus and use the arrow keys or page up/down to scroll the text.
# Importing notes from Evernote
To import Evernote data, follow these steps:
* First, export your Evernote notebooks to ENEX files as described [here](https://help.evernote.com/hc/en-us/articles/209005557-How-to-back-up-export-and-restore-import-notes-and-notebooks).
* In Joplin, in [command-line mode](#command-line-mode), type `import-enex /path/to/file.enex`. This will import the notes into a new notebook named after the filename.
* Then repeat the process for each notebook that needs to be imported.
# Synchronisation
One of the goals of Joplin was to avoid being tied to any particular company or service, whether it is Evernote, Google or Microsoft. As such the synchronisation is designed without any hard dependency to any particular service. Most of the synchronisation process is done at an abstract level and access to external services, such as OneDrive or Dropbox, is done via lightweight drivers. It is easy to support new services by creating simple drivers that provide a filesystem-like interface, i.e. the ability to read, write, delete and list items. It is also simple to switch from one service to another or to even sync to multiple services at once. Each note, notebook, tags, as well as the relation between items is transmitted as plain text files during synchronisation, which means the data can also be moved to a different application, can be easily backed up, inspected, etc.
Currently, synchronisation is possible with OneDrive (by default) or the local filesystem. A Dropbox driver will also be available once [this React Native bug](https://github.com/facebook/react-native/issues/14445) is fixed. When syncing with OneDrive, Joplin creates a sub-directory in OneDrive, in /Apps/Joplin and read/write the notes and notebooks from it. The application does not have access to anything outside this directory.
To initiate the synchronisation process, type `:sync`. You will be asked to follow a link to authorise the application (simply input your Microsoft credentials - you do not need to register with OneDrive). After that, the application will synchronise in the background whenever it is running. It is possible to also synchronise outside of the user interface by typing `joplin sync` from the terminal. This can be used to setup a cron script to synchronise at regular interval. For example, this would do it every 30 minutes:
*/30 * * * * /path/to/joplin sync
# URLs
When Ctrl+Clicking a URL, most terminals will open that URL in the default browser. However, one issue, especially with long URLs, is that they can end up like this:
<img src="https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/UrlCut.png" width="300px">
Not only it makes the text hard to read, but the link, being cut in two, will also not be clickable.
As a solution Joplin tries to start a mini-server in the background and, if successful, all the links will be converted to a much shorter URL:
<img src="https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/UrlNoCut.png" width="300px">
Since this is still an actual URL, the terminal will still make it clickable. And with shorter URLs, the text is more readable and the links unlikely to be cut. Both resources (files that are attached to notes) and external links are handled in this way.
# Attachments / Resources
In Markdown, links to resources are represented as a simple ID to the resource. In order to give access to these resources, they will be, like links, converted to local URLs. Clicking this link will then open a browser, which will handle the file - i.e. display the image, open the PDF file, etc.
# Shell mode
Commands can also be used directly from a shell. To view the list of available commands, type `joplin help all`. To reference a note, notebook or tag you can either use the ID (type `joplin ls -l` to view the ID) or by title.
For example, this will create a new note "My note" in the notebook "My notebook":
$ joplin mkbook "My notebook"
$ joplin use "My notebook"
$ joplin mknote "My note"
To view the newly created note:
$ joplin ls -l
fe889 07/12/2017 17:57 My note
Give a new title to the note:
$ joplin set fe889 title "New title"
# Available shortcuts
There are two types of shortcuts: those that manipulate the user interface directly, such as `TAB` to move from one pane to another, and those that are simply shortcuts to actual commands. In a way similar to Vim, these shortcuts are generally a verb followed by an object. For example, typing `mn` ([m]ake [n]ote), is used to create a new note: it will switch the interface to command line mode and pre-fill it with `mknote ""` from where the title of the note can be entered. See below for the full list of shortcuts:
Tab Give focus to next pane
Shift+Tab Give focus to previous pane
: Enter command line mode
ESC Exit command line mode
ENTER Edit the selected note
Ctrl+C Cancel the current command.
Ctrl+D Exit the application.
DELETE Delete the currently selected note or notebook.
SPACE Set a to-do as completed / not completed
tc [t]oggle [c]onsole between maximized/minimized/hidden/visible.
/ Search
tm [t]oggle note [m]etadata.
mn [M]ake a new [n]ote
mt [M]ake a new [t]odo
mb [M]ake a new note[b]ook
yn Copy ([Y]ank) the [n]ote to a notebook.
dn Move the note to a notebook.
# Available commands
The following commands are available in [command-line mode](#command-line-mode):
attach <note> <file>
Attaches the given file to the note.
config [name] [value]
Gets or sets a config value. If [value] is not provided, it will show the
value of [name]. If neither [name] nor [value] is provided, it will list
the current configuration.
-v, --verbose Also displays unset and hidden config variables.
Possible keys/values:
sync.2.path File system synchronisation target directory.
The path to synchronise with when file system
synchronisation is enabled. See `sync.target`.
Type: string.
editor Text editor.
The editor that will be used to open a note. If
none is provided it will try to auto-detect the
default editor.
Type: string.
locale Language.
Type: Enum.
Possible values: en_GB (English), es_CR (Español),
fr_FR (Français).
Default: "en_GB"
dateFormat Date format.
Type: Enum.
Possible values: DD/MM/YYYY (30/01/2017), DD/MM/YY
(30/01/17), MM/DD/YYYY (01/30/2017), MM/DD/YY
(01/30/17), YYYY-MM-DD (2017-01-30).
Default: "DD/MM/YYYY"
timeFormat Time format.
Type: Enum.
Possible values: HH:mm (20:30), h:mm A (8:30 PM).
Default: "HH:mm"
uncompletedTodosOnTop Show uncompleted todos on top of the lists.
Type: bool.
Default: true
trackLocation Save geo-location with notes.
Type: bool.
Default: true
sync.interval Synchronisation interval.
Type: Enum.
Possible values: 0 (Disabled), 300 (5 minutes), 600
(10 minutes), 1800 (30 minutes), 3600 (1 hour),
43200 (12 hours), 86400 (24 hours).
Default: 300
sync.target Synchronisation target.
The target to synchonise to. If synchronising with
the file system, set `sync.2.path` to specify the
target directory.
Type: Enum.
Possible values: 2 (File system), 3 (OneDrive), 4
(OneDrive Dev (For testing only)).
Default: 3
cp <note> [notebook]
Duplicates the notes matching <note> to [notebook]. If no notebook is
specified the note is duplicated in the current notebook.
done <note>
Marks a to-do as done.
edit <note>
Edit note.
exit
Exits the application.
export <directory>
Exports Joplin data to the given directory. By default, it will export the
complete database including notebooks, notes, tags and resources.
--note <note> Exports only the given note.
--notebook <notebook> Exports only the given notebook.
geoloc <note>
Displays a geolocation URL for the note.
help [command]
Displays usage information.
import-enex <file> [notebook]
Imports an Evernote notebook file (.enex file).
-f, --force Do not ask for confirmation.
mkbook <new-notebook>
Creates a new notebook.
mknote <new-note>
Creates a new note.
mktodo <new-todo>
Creates a new to-do.
mv <note> [notebook]
Moves the notes matching <note> to [notebook].
ren <item> <name>
Renames the given <item> (note or notebook) to <name>.
rmbook <notebook>
Deletes the given notebook.
-f, --force Deletes the notebook without asking for confirmation.
rmnote <note-pattern>
Deletes the notes matching <note-pattern>.
-f, --force Deletes the notes without asking for confirmation.
search <pattern> [notebook]
Searches for the given <pattern> in all the notes.
status
Displays summary about the notes and notebooks.
sync
Synchronises with remote storage.
--target <target> Sync to provided target (defaults to sync.target config
value)
--random-failures For debugging purposes. Do not use.
tag <tag-command> [tag] [note]
<tag-command> can be "add", "remove" or "list" to assign or remove [tag]
from [note], or to list the notes associated with [tag]. The command `tag
list` can be used to list all the tags.
todo <todo-command> <note-pattern>
<todo-command> can either be "toggle" or "clear". Use "toggle" to toggle
the given to-do between completed and uncompleted state (If the target is
a regular note it will be converted to a to-do). Use "clear" to convert
the to-do back to a regular note.
undone <note>
Marks a to-do as non-completed.
version
Displays version information
# License
Copyright (c) 2016-2018 Laurent Cozic
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -75,7 +75,7 @@ apply from: "../../node_modules/react-native/react.gradle"
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = true
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
@@ -90,8 +90,8 @@ android {
applicationId "net.cozic.joplin"
minSdkVersion 16
targetSdkVersion 22
versionCode 84
versionName "0.10.69"
versionCode 2097285
versionName "1.0.107"
ndk {
abiFilters "armeabi-v7a", "x86"
}
@@ -137,11 +137,11 @@ android {
}
dependencies {
compile project(':react-native-securerandom')
compile project(':react-native-push-notification')
compile project(':react-native-fs')
compile project(':react-native-image-picker')
compile project(':react-native-vector-icons')
compile project(':react-native-securerandom')
compile project(':react-native-push-notification')
compile project(':react-native-fs')
compile project(':react-native-image-picker')
compile project(':react-native-vector-icons')
compile project(':react-native-fs')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"

View File

@@ -1,51 +1,3 @@
const { main } = require('./main.js');
main();
// const React = require('react'); const Component = React.Component;
// import {
// AppRegistry,
// StyleSheet,
// Text,
// View
// } from 'react-native';
// module.exports = default class Joplin extends Component {;
// render() {
// return (
// <View style={styles.container}>
// <Text style={styles.welcome}>
// Welcome to React Native!
// </Text>
// <Text style={styles.instructions}>
// To get started, edit index.ios.js
// </Text>
// <Text style={styles.instructions}>
// Press Cmd+R to reload,{'\n'}
// Cmd+D or shake for dev menu
// </Text>
// </View>
// );
// }
// }
// const styles = StyleSheet.create({
// container: {
// flex: 1,
// justifyContent: 'center',
// alignItems: 'center',
// backgroundColor: '#F5FCFF',
// },
// welcome: {
// fontSize: 20,
// textAlign: 'center',
// margin: 10,
// },
// instructions: {
// textAlign: 'center',
// color: '#333333',
// marginBottom: 5,
// },
// });
// AppRegistry.registerComponent('Joplin', () => Joplin);
main();

View File

@@ -5,6 +5,7 @@
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
@@ -41,8 +42,8 @@
E8DD8252C0DD4CF1B53590E9 /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 69B8EE98BFBC4AABA4885BB0 /* SimpleLineIcons.ttf */; };
EA501DCDCF4745E9B63ECE98 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7D46CBDF8846409890AD7A84 /* Octicons.ttf */; };
EC11356C90E9419799A2626F /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 51BCEC3BC28046C8BB19531F /* EvilIcons.ttf */; };
FBF57CE2F0F448FA9A8985E2 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EB8BCAEA9AA41CAAE460443 /* libsqlite3.0.tbd */; };
F3D0BB525E6C490294D73075 /* libRNSecureRandom.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22647ACF9A4C45918C44C599 /* libRNSecureRandom.a */; };
FBF57CE2F0F448FA9A8985E2 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EB8BCAEA9AA41CAAE460443 /* libsqlite3.0.tbd */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -123,6 +124,13 @@
remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
remoteInfo = jschelpers;
};
4D2A44E7200015A2001CA388 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 252BD7B86BF7435B960DA901 /* RNSecureRandom.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RNSecureRandom;
};
4D2A85A91FBCE3AC0028537D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
@@ -370,6 +378,8 @@
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
15FD7D2C8F0A445BBA807A9D /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = "<group>"; };
1F79F2CD7CED446B986A6252 /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = "<group>"; };
22647ACF9A4C45918C44C599 /* libRNSecureRandom.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSecureRandom.a; sourceTree = "<group>"; };
252BD7B86BF7435B960DA901 /* RNSecureRandom.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSecureRandom.xcodeproj; path = "../node_modules/react-native-securerandom/ios/RNSecureRandom.xcodeproj"; sourceTree = "<group>"; };
381C047F2739439CB3E6452A /* libRNVectorIcons.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNVectorIcons.a; sourceTree = "<group>"; };
3FFC0F5EFDC54862B1F998DD /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = "<group>"; };
44A39642217548C8ADA91CBA /* libRNImagePicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNImagePicker.a; sourceTree = "<group>"; };
@@ -398,8 +408,6 @@
F5E37D05726A4A08B2EE323A /* libRNFetchBlob.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNFetchBlob.a; sourceTree = "<group>"; };
FD370E24D76E461D960DD85D /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = "<group>"; };
FF411B45E68B4A8CBCC35777 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = "<group>"; };
252BD7B86BF7435B960DA901 /* RNSecureRandom.xcodeproj */ = {isa = PBXFileReference; name = "RNSecureRandom.xcodeproj"; path = "../node_modules/react-native-securerandom/ios/RNSecureRandom.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
22647ACF9A4C45918C44C599 /* libRNSecureRandom.a */ = {isa = PBXFileReference; name = "libRNSecureRandom.a"; path = "libRNSecureRandom.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -540,6 +548,14 @@
name = Products;
sourceTree = "<group>";
};
4D2A44E4200015A2001CA388 /* Products */ = {
isa = PBXGroup;
children = (
4D2A44E8200015A2001CA388 /* libRNSecureRandom.a */,
);
name = Products;
sourceTree = "<group>";
};
4D2A85911FBCE3950028537D /* Recovered References */ = {
isa = PBXGroup;
children = (
@@ -550,6 +566,7 @@
87BABCF4ED0A406B9546CCE9 /* libSQLite.a */,
381C047F2739439CB3E6452A /* libRNVectorIcons.a */,
44A39642217548C8ADA91CBA /* libRNImagePicker.a */,
22647ACF9A4C45918C44C599 /* libRNSecureRandom.a */,
);
name = "Recovered References";
sourceTree = "<group>";
@@ -853,6 +870,10 @@
ProductGroup = 4DA7F8091FC1DA9C00353191 /* Products */;
ProjectRef = A4716DB8654B431D894F89E1 /* RNImagePicker.xcodeproj */;
},
{
ProductGroup = 4D2A44E4200015A2001CA388 /* Products */;
ProjectRef = 252BD7B86BF7435B960DA901 /* RNSecureRandom.xcodeproj */;
},
{
ProductGroup = 4D2A85B71FBCE3AC0028537D /* Products */;
ProjectRef = 711CBD21F0894B83A2D8E234 /* RNVectorIcons.xcodeproj */;
@@ -947,6 +968,13 @@
remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4D2A44E8200015A2001CA388 /* libRNSecureRandom.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNSecureRandom.a;
remoteRef = 4D2A44E7200015A2001CA388 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4D2A85AA1FBCE3AC0028537D /* libfishhook.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -1257,10 +1285,14 @@
"$(SRCROOT)/../node_modules/react-native-sqlite-storage/src/ios",
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)..\node_modules\neact-native-image-pickerios",
"$(SRCROOT)\..\node_modules\react-native-securerandom\ios",
"$(SRCROOT)..\node_modules\neact-native-securerandomios",
);
INFOPLIST_FILE = Joplin/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Joplin\"",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -1270,12 +1302,8 @@
PRODUCT_NAME = Joplin;
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = 1;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Joplin\"",
);
};
name = Debug;
};
@@ -1297,10 +1325,14 @@
"$(SRCROOT)/../node_modules/react-native-sqlite-storage/src/ios",
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)..\node_modules\neact-native-image-pickerios",
"$(SRCROOT)\..\node_modules\react-native-securerandom\ios",
"$(SRCROOT)..\node_modules\neact-native-securerandomios",
);
INFOPLIST_FILE = Joplin/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Joplin\"",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -1310,12 +1342,8 @@
PRODUCT_NAME = Joplin;
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = 1;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Joplin\"",
);
};
name = Release;
};

View File

@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.10.6</string>
<string>1.0.13</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>6</string>
<string>13</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>

View File

@@ -13,4 +13,36 @@ ArrayUtils.removeElement = function(array, element) {
return array;
}
// https://stackoverflow.com/a/10264318/561309
ArrayUtils.binarySearch = function(items, value) {
var startIndex = 0,
stopIndex = items.length - 1,
middle = Math.floor((stopIndex + startIndex)/2);
while(items[middle] != value && startIndex < stopIndex){
//adjust search area
if (value < items[middle]){
stopIndex = middle - 1;
} else if (value > items[middle]){
startIndex = middle + 1;
}
//recalculate middle
middle = Math.floor((stopIndex + startIndex)/2);
}
//make sure it's the right value
return (items[middle] != value) ? -1 : middle;
}
ArrayUtils.findByKey = function(array, key, value) {
for (let i = 0; i < array.length; i++) {
const o = array[i];
if (typeof o !== 'object') continue;
if (o[key] === value) return o;
}
return null;
}
module.exports = ArrayUtils;

View File

@@ -1,5 +1,5 @@
const { createStore, applyMiddleware } = require('redux');
const { reducer, defaultState } = require('lib/reducer.js');
const { reducer, defaultState, stateUtils } = require('lib/reducer.js');
const { JoplinDatabase } = require('lib/joplin-database.js');
const { Database } = require('lib/database.js');
const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
@@ -21,17 +21,23 @@ const { shim } = require('lib/shim.js');
const { _, setLocale, defaultLocale, closestSupportedLocale } = require('lib/locale.js');
const os = require('os');
const fs = require('fs-extra');
const JoplinError = require('lib/JoplinError');
const EventEmitter = require('events');
const SyncTargetRegistry = require('lib/SyncTargetRegistry.js');
const SyncTargetFilesystem = require('lib/SyncTargetFilesystem.js');
const SyncTargetOneDrive = require('lib/SyncTargetOneDrive.js');
const SyncTargetOneDriveDev = require('lib/SyncTargetOneDriveDev.js');
const SyncTargetNextcloud = require('lib/SyncTargetNextcloud.js');
const SyncTargetWebDAV = require('lib/SyncTargetWebDAV.js');
const EncryptionService = require('lib/services/EncryptionService');
const DecryptionWorker = require('lib/services/DecryptionWorker');
const BaseService = require('lib/services/BaseService');
SyncTargetRegistry.addClass(SyncTargetFilesystem);
SyncTargetRegistry.addClass(SyncTargetOneDrive);
SyncTargetRegistry.addClass(SyncTargetOneDriveDev);
SyncTargetRegistry.addClass(SyncTargetNextcloud);
SyncTargetRegistry.addClass(SyncTargetWebDAV);
class BaseApplication {
@@ -91,14 +97,14 @@ class BaseApplication {
let nextArg = argv.length >= 2 ? argv[1] : null;
if (arg == '--profile') {
if (!nextArg) throw new Error(_('Usage: %s', '--profile <dir-path>'));
if (!nextArg) throw new JoplinError(_('Usage: %s', '--profile <dir-path>'), 'flagError');
matched.profileDir = nextArg;
argv.splice(0, 2);
continue;
}
if (arg == '--env') {
if (!nextArg) throw new Error(_('Usage: %s', '--env <dev|prod>'));
if (!nextArg) throw new JoplinError(_('Usage: %s', '--env <dev|prod>'), 'flagError');
matched.env = nextArg;
argv.splice(0, 2);
continue;
@@ -129,14 +135,14 @@ class BaseApplication {
}
if (arg == '--log-level') {
if (!nextArg) throw new Error(_('Usage: %s', '--log-level <none|error|warn|info|debug>'));
if (!nextArg) throw new JoplinError(_('Usage: %s', '--log-level <none|error|warn|info|debug>'), 'flagError');
matched.logLevel = Logger.levelStringToId(nextArg);
argv.splice(0, 2);
continue;
}
if (arg.length && arg[0] == '-') {
throw new Error(_('Unknown flag: %s', arg));
throw new JoplinError(_('Unknown flag: %s', arg), 'flagError');
} else {
break;
}
@@ -180,8 +186,9 @@ class BaseApplication {
this.logger().debug('Refreshing notes:', parentType, parentId);
let options = {
order: state.notesOrder,
order: stateUtils.notesOrder(state.settings),
uncompletedTodosOnTop: Setting.value('uncompletedTodosOnTop'),
caseInsensitive: true,
};
const source = JSON.stringify({
@@ -251,14 +258,31 @@ class BaseApplication {
const result = next(action);
const newState = store.getState();
let refreshNotes = false;
if (action.type == 'FOLDER_SELECT' || action.type === 'FOLDER_DELETE') {
Setting.setValue('activeFolderId', newState.selectedFolderId);
this.currentFolder_ = newState.selectedFolderId ? await Folder.load(newState.selectedFolderId) : null;
await this.refreshNotes(newState);
refreshNotes = true;
}
if (this.hasGui() && action.type == 'SETTING_UPDATE_ONE' && action.key == 'uncompletedTodosOnTop' || action.type == 'SETTING_UPDATE_ALL') {
if (this.hasGui() && ((action.type == 'SETTING_UPDATE_ONE' && action.key == 'uncompletedTodosOnTop') || action.type == 'SETTING_UPDATE_ALL')) {
refreshNotes = true;
}
if (this.hasGui() && ((action.type == 'SETTING_UPDATE_ONE' && action.key.indexOf('notes.sortOrder') === 0) || action.type == 'SETTING_UPDATE_ALL')) {
refreshNotes = true;
}
if (action.type == 'TAG_SELECT' || action.type === 'TAG_DELETE') {
refreshNotes = true;
}
if (action.type == 'SEARCH_SELECT' || action.type === 'SEARCH_DELETE') {
refreshNotes = true;
}
if (refreshNotes) {
await this.refreshNotes(newState);
}
@@ -277,17 +301,13 @@ class BaseApplication {
type: 'MASTERKEY_REMOVE_NOT_LOADED',
ids: loadedMasterKeyIds,
});
// Schedule a sync operation so that items that need to be encrypted
// are sent to sync target.
reg.scheduleSync();
}
}
if (action.type == 'TAG_SELECT' || action.type === 'TAG_DELETE') {
await this.refreshNotes(newState);
}
if (action.type == 'SEARCH_SELECT' || action.type === 'SEARCH_DELETE') {
await this.refreshNotes(newState);
}
if (action.type === 'NOTE_UPDATE_ONE') {
// If there is a conflict, we refresh the folders so as to display "Conflicts" folder
if (action.note && action.note.is_conflict) {
@@ -295,11 +315,6 @@ class BaseApplication {
}
}
// if (action.type === 'NOTE_DELETE') {
// // Update folders if a note is deleted in case the deleted note was a conflict
// await FoldersScreenUtils.refreshFolders();
// }
if (this.hasGui() && action.type == 'SETTING_UPDATE_ONE' && action.key == 'sync.interval' || action.type == 'SETTING_UPDATE_ALL') {
reg.setupRecurrentSync();
}
@@ -412,6 +427,7 @@ class BaseApplication {
setLocale(Setting.value('locale'));
}
BaseService.logger_ = this.logger_;
EncryptionService.instance().setLogger(this.logger_);
BaseItem.encryptionService_ = EncryptionService.instance();
DecryptionWorker.instance().setLogger(this.logger_);

View File

@@ -1,7 +1,7 @@
const { Log } = require('lib/log.js');
const { Database } = require('lib/database.js');
const { uuid } = require('lib/uuid.js');
const { time } = require('lib/time-utils.js');
const Mutex = require('async-mutex').Mutex;
class BaseModel {
@@ -44,6 +44,14 @@ class BaseModel {
return null;
}
static modelTypeToName(type) {
for (let i = 0; i < BaseModel.typeEnum_.length; i++) {
const e = BaseModel.typeEnum_[i];
if (e[1] === type) return e[0].substr(5).toLowerCase();
}
throw new Error('Unknown model type: ' + type);
}
static hasField(name) {
let fields = this.fieldNames();
return fields.indexOf(name) >= 0;
@@ -113,15 +121,6 @@ class BaseModel {
return id.substr(0, 5);
}
// static minimalPartialId(id) {
// let length = 2;
// while (true) {
// const partialId = id.substr(0, length);
// const r = await this.db().selectOne('SELECT count(*) as total FROM `' + this.tableName() + '` WHERE `id` LIKE ?', [partialId + '%']);
// if (r['total'] <= 1) return partialId;
// }
// }
static loadByPartialId(partialId) {
return this.modelSelectAll('SELECT * FROM `' + this.tableName() + '` WHERE `id` LIKE ?', [partialId + '%']);
}
@@ -193,8 +192,12 @@ class BaseModel {
});
}
static loadByField(fieldName, fieldValue) {
return this.modelSelectOne('SELECT * FROM `' + this.tableName() + '` WHERE `' + fieldName + '` = ?', [fieldValue]);
static loadByField(fieldName, fieldValue, options = null) {
if (!options) options = {};
if (!('caseInsensitive' in options)) options.caseInsensitive = false;
let sql = 'SELECT * FROM `' + this.tableName() + '` WHERE `' + fieldName + '` = ?';
if (options.caseInsensitive) sql += ' COLLATE NOCASE';
return this.modelSelectOne(sql, [fieldValue]);
}
static loadByTitle(fieldValue) {
@@ -209,20 +212,6 @@ class BaseModel {
}
if ('type_' in newModel) output.type_ = newModel.type_;
return output;
// let output = {};
// let type = null;
// for (let n in newModel) {
// if (!newModel.hasOwnProperty(n)) continue;
// if (n == 'type_') {
// type = newModel[n];
// continue;
// }
// if (!(n in oldModel) || newModel[n] !== oldModel[n]) {
// output[n] = newModel[n];
// }
// }
// if (type !== null) output.type_ = type;
// return output;
}
static diffObjectsFields(oldModel, newModel) {
@@ -243,6 +232,40 @@ class BaseModel {
return !Object.getOwnPropertyNames(diff).length;
}
static saveMutex(modelOrId) {
const noLockMutex = {
acquire: function() { return null; }
};
if (!modelOrId) return noLockMutex;
let modelId = typeof modelOrId === 'string' ? modelOrId : modelOrId.id;
if (!modelId) return noLockMutex;
let mutex = BaseModel.saveMutexes_[modelId];
if (mutex) return mutex;
mutex = new Mutex();
BaseModel.saveMutexes_[modelId] = mutex;
return mutex;
}
static releaseSaveMutex(modelOrId, release) {
if (!release) return;
if (!modelOrId) return release();
let modelId = typeof modelOrId === 'string' ? modelOrId : modelOrId.id;
if (!modelId) return release();
let mutex = BaseModel.saveMutexes_[modelId];
if (!mutex) return release();
delete BaseModel.saveMutexes_[modelId];
release();
}
static saveQuery(o, options) {
let temp = {}
let fieldNames = this.fieldNames();
@@ -250,10 +273,25 @@ class BaseModel {
let n = fieldNames[i];
if (n in o) temp[n] = o[n];
}
// Remove fields that are not in the `fields` list, if provided.
// Note that things like update_time, user_update_time will still
// be part of the final list of fields if autoTimestamp is on.
// id also will stay.
if (!options.isNew && options.fields) {
const filtered = {};
for (let k in temp) {
if (!temp.hasOwnProperty(k)) continue;
if (k !== 'id' && options.fields.indexOf(k) < 0) continue;
filtered[k] = temp[k];
}
temp = filtered;
}
o = temp;
let modelId = temp.id;
let query = {};
let modelId = o.id;
const timeNow = time.unixMs();
@@ -292,15 +330,6 @@ class BaseModel {
let temp = Object.assign({}, o);
delete temp.id;
if (options.fields) {
let filtered = {};
for (let i = 0; i < options.fields.length; i++) {
const f = options.fields[i];
filtered[f] = o[f];
}
temp = filtered;
}
query = Database.updateQuery(this.tableName(), temp, where);
}
@@ -310,7 +339,16 @@ class BaseModel {
return query;
}
static save(o, options = null) {
static async save(o, options = null) {
// When saving, there's a mutex per model ID. This is because the model returned from this function
// is basically its input `o` (instead of being read from the database, for performance reasons).
// This works well in general except if that model is saved simultaneously in two places. In that
// case, the output won't be up-to-date and would cause for example display issues with out-dated
// notes being displayed. This was an issue when notes were being synchronised while being decrypted
// at the same time.
const mutexRelease = await this.saveMutex(o).acquire();
options = this.modOptions(options);
options.isNew = this.isNew(o, options);
@@ -338,7 +376,11 @@ class BaseModel {
queries = queries.concat(options.nextQueries);
}
return this.db().transactionExecBatch(queries).then(() => {
let output = null;
try {
await this.db().transactionExecBatch(queries);
o = Object.assign({}, o);
if (modelId) o.id = modelId;
if ('updated_time' in saveQuery.modObject) o.updated_time = saveQuery.modObject.updated_time;
@@ -355,10 +397,14 @@ class BaseModel {
}
}
return this.filter(o);
}).catch((error) => {
Log.error('Cannot save model', error);
});
output = this.filter(o);
} catch (error) {
this.logger().error('Cannot save model', error);
}
this.releaseSaveMutex(o, mutexRelease);
return output;
}
static isNew(object, options) {
@@ -425,17 +471,27 @@ class BaseModel {
}
BaseModel.TYPE_NOTE = 1;
BaseModel.TYPE_FOLDER = 2;
BaseModel.TYPE_SETTING = 3;
BaseModel.TYPE_RESOURCE = 4;
BaseModel.TYPE_TAG = 5;
BaseModel.TYPE_NOTE_TAG = 6;
BaseModel.TYPE_SEARCH = 7;
BaseModel.TYPE_ALARM = 8;
BaseModel.TYPE_MASTER_KEY = 9;
BaseModel.typeEnum_ = [
['TYPE_NOTE', 1],
['TYPE_FOLDER', 2],
['TYPE_SETTING', 3],
['TYPE_RESOURCE', 4],
['TYPE_TAG', 5],
['TYPE_NOTE_TAG', 6],
['TYPE_SEARCH', 7],
['TYPE_ALARM', 8],
['TYPE_MASTER_KEY', 9],
['TYPE_ITEM_CHANGE', 10],
['TYPE_NOTE_RESOURCE', 11],
];
for (let i = 0; i < BaseModel.typeEnum_.length; i++) {
const e = BaseModel.typeEnum_[i];
BaseModel[e[0]] = e[1];
}
BaseModel.db_ = null;
BaseModel.dispatch = function(o) {};
BaseModel.saveMutexes_ = {};
module.exports = BaseModel;

View File

@@ -10,6 +10,10 @@ class BaseSyncTarget {
this.options_ = options;
}
static supportsConfigCheck() {
return false;
}
option(name, defaultValue = null) {
return this.options_ && (name in this.options_) ? this.options_[name] : defaultValue;
}
@@ -30,6 +34,10 @@ class BaseSyncTarget {
return false;
}
authRouteName() {
return null;
}
static id() {
throw new Error('id() not implemented');
}

View File

@@ -0,0 +1,35 @@
class Cache {
async getItem(name) {
let output = null;
try {
const storage = await Cache.storage();
output = await storage.getItem(name);
} catch (error) {
console.info(error);
// Defaults to returning null
}
return output;
}
async setItem(name, value, ttl = null) {
try {
const storage = await Cache.storage();
const options = {};
if (ttl !== null) options.ttl = ttl;
await storage.setItem(name, value, options);
} catch (error) {
// Defaults to not saving to cache
}
}
}
Cache.storage = async function() {
if (Cache.storage_) return Cache.storage_;
Cache.storage_ = require('node-persist');
await Cache.storage_.init({ dir: require('os').tmpdir() + '/joplin-cache', ttl: 1000 * 60 });
return Cache.storage_;
}
module.exports = Cache;

View File

@@ -2,11 +2,7 @@ class JoplinError extends Error {
constructor(message, code = null) {
super(message);
this.code_ = code;
}
get code() {
return this.code_;
this.code = code;
}
}

View File

@@ -5,6 +5,7 @@ const Resource = require('lib/models/Resource.js');
const ModelCache = require('lib/ModelCache');
const { shim } = require('lib/shim.js');
const md5 = require('md5');
const MdToHtml_Katex = require('lib/MdToHtml_Katex');
class MdToHtml {
@@ -28,7 +29,7 @@ class MdToHtml {
const r = resources[n];
k.push(r.id);
}
k.push(md5(body));
k.push(md5(escape(body))); // https://github.com/pvorb/node-md5/issues/41
k.push(md5(JSON.stringify(style)));
k.push(md5(JSON.stringify(options)));
return k.join('_');
@@ -73,7 +74,7 @@ class MdToHtml {
renderImage_(attrs, options) {
const loadResource = async (id) => {
console.info('Loading resource: ' + id);
// console.info('Loading resource: ' + id);
// Initially set to to an empty object to make
// it clear that it is being loaded. Otherwise
@@ -116,7 +117,7 @@ class MdToHtml {
if (mime == 'image/png' || mime == 'image/jpg' || mime == 'image/jpeg' || mime == 'image/gif') {
let src = './' + Resource.filename(resource);
if (this.resourceBaseUrl_ !== null) src = this.resourceBaseUrl_ + src;
let output = '<img title="' + htmlentities(title) + '" src="' + src + '"/>';
let output = '<img data-resource-id="' + resource.id + '" title="' + htmlentities(title) + '" src="' + src + '"/>';
return output;
}
@@ -125,22 +126,26 @@ class MdToHtml {
renderOpenLink_(attrs, options) {
let href = this.getAttr_(attrs, 'href');
const title = this.getAttr_(attrs, 'title');
const text = this.getAttr_(attrs, 'text');
const isResourceUrl = Resource.isResourceUrl(href);
const title = isResourceUrl ? this.getAttr_(attrs, 'title') : href;
if (isResourceUrl && !this.supportsResourceLinks_) {
// In mobile, links to local resources, such as PDF, etc. currently aren't supported.
// Ideally they should be opened in the user's browser.
return '<span style="opacity: 0.5">(Resource not yet supported: '; //+ htmlentities(text) + ']';
} else {
let resourceIdAttr = "";
let icon = "";
if (isResourceUrl) {
const resourceId = Resource.pathToId(href);
href = 'joplin://' + resourceId;
href = "joplin://" + resourceId;
resourceIdAttr = "data-resource-id='" + resourceId + "'";
icon = '<span class="resource-icon"></span>';
}
const js = options.postMessageSyntax + "(" + JSON.stringify(href) + "); return false;";
let output = "<a title='" + htmlentities(title) + "' href='#' onclick='" + js + "'>";
let output = "<a " + resourceIdAttr + " title='" + htmlentities(title) + "' href='#' onclick='" + js + "'>" + icon;
return output;
}
}
@@ -156,27 +161,59 @@ class MdToHtml {
}
}
renderTokens_(tokens, options) {
rendererPlugin_(language) {
if (!language) return null;
const handlers = {};
handlers['katex'] = new MdToHtml_Katex();
return language in handlers ? handlers[language] : null;
}
parseInlineCodeLanguage_(content) {
const m = content.match(/^\{\.([a-zA-Z0-9]+)\}/);
if (m && m.length >= 2) {
const language = m[1];
return {
language: language,
newContent: content.substr(language.length + 3),
};
}
return null;
}
renderTokens_(markdownIt, tokens, options) {
let output = [];
let previousToken = null;
let anchorAttrs = [];
let extraCssBlocks = {};
for (let i = 0; i < tokens.length; i++) {
const t = tokens[i];
let t = tokens[i];
const nextToken = i < tokens.length ? tokens[i+1] : null;
let tag = t.tag;
let openTag = null;
let closeTag = null;
let attrs = t.attrs ? t.attrs : [];
let tokenContent = t.content ? t.content : '';
const isCodeBlock = tag === 'code' && t.block;
const isInlineCode = t.type === 'code_inline';
const codeBlockLanguage = t && t.info ? t.info : null;
let rendererPlugin = null;
let rendererPluginOptions = { tagType: 'inline' };
// if (t.map) attrs.push(['data-map', t.map.join(':')]);
if (isCodeBlock) rendererPlugin = this.rendererPlugin_(codeBlockLanguage);
if (previousToken && previousToken.tag === 'li' && tag === 'p') {
// Markdown-it render list items as <li><p>Text<p></li> which makes it
// complicated to style and layout the HTML, so we remove this extra
// <p> here and below in closeTag.
openTag = null;
} else if (isInlineCode) {
openTag = null;
} else if (tag && t.type.indexOf('html_inline') >= 0) {
openTag = null;
} else if (tag && t.type.indexOf('_open') >= 0) {
openTag = tag;
} else if (tag && t.type.indexOf('_close') >= 0) {
@@ -186,7 +223,11 @@ class MdToHtml {
} else if (t.type === 'link_open') {
openTag = 'a';
} else if (isCodeBlock) {
openTag = 'pre';
if (rendererPlugin) {
openTag = null;
} else {
openTag = 'pre';
}
}
if (openTag) {
@@ -201,24 +242,55 @@ class MdToHtml {
if (isCodeBlock) {
const codeAttrs = ['code'];
if (t.info) codeAttrs.push(t.info); // t.info contains the language when the token is a codeblock
output.push('<code class="' + codeAttrs.join(' ') + '">');
if (!rendererPlugin) {
if (codeBlockLanguage) codeAttrs.push(t.info); // t.info contains the language when the token is a codeblock
output.push('<code class="' + codeAttrs.join(' ') + '">');
}
} else if (isInlineCode) {
const result = this.parseInlineCodeLanguage_(tokenContent);
if (result) {
rendererPlugin = this.rendererPlugin_(result.language);
tokenContent = result.newContent;
}
if (!rendererPlugin) {
output.push('<code>');
}
}
if (t.type === 'math_inline' || t.type === 'math_block') {
rendererPlugin = this.rendererPlugin_('katex');
rendererPluginOptions = { tagType: t.type === 'math_block' ? 'block' : 'inline' };
}
if (rendererPlugin) {
rendererPlugin.loadAssets().catch((error) => {
console.warn('MdToHtml: Error loading assets for ' + rendererPlugin.name() + ': ', error.message);
});
}
if (t.type === 'image') {
if (t.content) attrs.push(['title', t.content]);
if (tokenContent) attrs.push(['title', tokenContent]);
output.push(this.renderImage_(attrs, options));
} else if (t.type === 'html_inline') {
output.push(t.content);
} else if (t.type === 'softbreak') {
output.push('<br/>');
} else if (t.type === 'hr') {
output.push('<hr/>');
} else {
if (t.children) {
const parsedChildren = this.renderTokens_(t.children, options);
const parsedChildren = this.renderTokens_(markdownIt, t.children, options);
output = output.concat(parsedChildren);
} else {
if (t.content) {
output.push(htmlentities(t.content));
if (tokenContent) {
if ((isCodeBlock || isInlineCode) && rendererPlugin) {
output = rendererPlugin.processContent(output, tokenContent, isCodeBlock ? 'block' : 'inline');
} else if (rendererPlugin) {
output = rendererPlugin.processContent(output, tokenContent, rendererPluginOptions.tagType);
} else {
output.push(htmlentities(tokenContent));
}
}
}
}
@@ -230,10 +302,18 @@ class MdToHtml {
} else if (tag && t.type.indexOf('inline') >= 0) {
closeTag = openTag;
} else if (isCodeBlock) {
closeTag = openTag;
if (!rendererPlugin) closeTag = openTag;
}
if (isCodeBlock) output.push('</code>');
if (isCodeBlock) {
if (!rendererPlugin) {
output.push('</code>');
}
} else if (isInlineCode) {
if (!rendererPlugin) {
output.push('</code>');
}
}
if (closeTag) {
if (closeTag === 'a') {
@@ -243,8 +323,28 @@ class MdToHtml {
}
}
if (rendererPlugin) {
const extraCss = rendererPlugin.extraCss();
const name = rendererPlugin.name();
if (extraCss && !(name in extraCssBlocks)) {
extraCssBlocks[name] = extraCss;
}
}
previousToken = t;
}
// Insert the extra CSS at the top of the HTML
const temp = ['<style>'];
for (let n in extraCssBlocks) {
if (!extraCssBlocks.hasOwnProperty(n)) continue;
temp.push(extraCssBlocks[n]);
}
temp.push('</style>');
output = temp.concat(output);
return output.join('');
}
@@ -259,8 +359,15 @@ class MdToHtml {
const md = new MarkdownIt({
breaks: true,
linkify: true,
html: true,
});
const env = {};
// This is currently used only so that the $expression$ and $$\nexpression\n$$ blocks are translated
// to math_inline and math_block blocks. These blocks are then processed directly with the Katex
// library. It is better this way as then it is possible to conditionally load the CSS required by
// Katex and use an up-to-date version of Katex (as of 2018, the plugin is still using 0.6, which is
// buggy instead of 0.9).
md.use(require('markdown-it-katex'));
// Hack to make checkboxes clickable. Ideally, checkboxes should be parsed properly in
// renderTokens_(), but for now this hack works. Marking it with HORRIBLE_HACK so
@@ -278,18 +385,19 @@ class MdToHtml {
}
}
const env = {};
const tokens = md.parse(body, env);
let renderedBody = this.renderTokens_(md, tokens, options);
// console.info(body);
// console.info(tokens);
let renderedBody = this.renderTokens_(tokens, options);
// console.info(renderedBody);
if (HORRIBLE_HACK) {
let loopCount = 0;
while (renderedBody.indexOf('mJOPm') >= 0) {
renderedBody = renderedBody.replace(/mJOPmCHECKBOXm([A-Z]+)m(\d+)m/, function(v, type, index) {
const js = options.postMessageSyntax + "('checkboxclick:" + type + ':' + index + "'); this.classList.contains('tick') ? this.classList.remove('tick') : this.classList.add('tick'); return false;";
return '<a href="#" onclick="' + js + '" class="checkbox ' + (type == 'NOTICK' ? '' : 'tick') + '"><span>' + '' + '</span></a>';
});
@@ -305,13 +413,15 @@ class MdToHtml {
b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}
`;
const fontFamily = 'sans-serif';
const css = `
body {
font-size: ` + style.htmlFontSize + `;
color: ` + style.htmlColor + `;
line-height: ` + style.htmlLineHeight + `;
background-color: ` + style.htmlBackgroundColor + `;
font-family: sans-serif;
font-family: ` + fontFamily + `;
padding-bottom: ` + options.paddingBottom + `;
}
p, h1, h2, h3, h4, h5, h6, ul, table {
@@ -336,6 +446,18 @@ class MdToHtml {
ul {
padding-left: 1.3em;
}
.resource-icon {
display: inline-block;
position: relative;
top: .5em;
text-decoration: none;
width: 1.15em;
height: 1.5em;
margin-right: 0.4em;
background-color: ` + style.htmlColor + `;
/* Awesome Font file */
-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'><path d='M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z'/></svg>");
}
a.checkbox {
display: inline-block;
position: relative;
@@ -359,6 +481,10 @@ class MdToHtml {
td, th {
border: 1px solid silver;
padding: .5em 1em .5em 1em;
font-size: ` + style.htmlFontSize + `;
color: ` + style.htmlColor + `;
background-color: ` + style.htmlBackgroundColor + `;
font-family: ` + fontFamily + `;
}
hr {
border: none;
@@ -368,6 +494,32 @@ class MdToHtml {
width: auto;
max-width: 100%;
}
@media print {
body {
height: auto !important;
}
a.checkbox {
border: 1pt solid ` + style.htmlColor + `;
border-radius: 2pt;
width: 1em;
height: 1em;
line-height: 1em;
text-align: center;
top: .4em;
}
a.checkbox.tick:after {
content: "X";
}
a.checkbox.tick {
top: 0;
left: -0.02em;
color: ` + style.htmlColor + `;
}
}
`;
const styleHtml = '<style>' + normalizeCss + "\n" + css + '</style>';

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