1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-24 20:19:10 +02:00

Compare commits

...

1101 Commits

Author SHA1 Message Date
Laurent Cozic
37a12326dc CLI v1.0.158 2020-03-07 01:00:46 +00:00
Laurent Cozic
5516b3284c Cli: Fix build 2020-03-07 01:00:11 +00:00
Laurent Cozic
ed0fae36ad CLI v1.0.157 2020-03-07 00:57:10 +00:00
Laurent Cozic
35d27f03bd Cli: Fix build 2020-03-07 00:55:59 +00:00
Laurent Cozic
1600d27db4 CLI v1.0.156 2020-03-07 00:33:12 +00:00
Laurent Cozic
0feca7ee7f Android release v1.0.319-rc1 2020-03-07 00:00:15 +00:00
Laurent Cozic
6e0bb6cf8b Merge branch 'master' of github.com:laurent22/joplin 2020-03-06 23:45:14 +00:00
Laurent Cozic
e6d66eba7d Tools: Adding support for Android release candidates 2020-03-06 23:45:07 +00:00
Runo Saduwa
bd6e77bf32 Desktop: Fixes #2628: Disable Toggle Editor Layout Shortcut and Button in Empty Notebook (#2628)
* added toggleLayout logic

* added id

* improved code
2020-03-06 23:27:32 +00:00
Siddhant Sehgal
9027f3fb10 Desktop : Fixes #2659: Do not wrap tag title in tag bar (#2668)
* No change

* Fixed Tag Wrap
2020-03-06 23:24:28 +00:00
Isham Mahajan
95eb302a62 Android: Enable debugging of WebView on browser (#2586)
Enables debugging for the android plugin which
`react-native-webview` uses. This method is mentioned in their guide
for the same.
https://github.com/react-native-community/react-native-webview/blob/master/docs/Debugging.md

Unfortunately the call requires API version >= 19 (After Kitkat),
which is fine because this will be disabled in production builds
anyways.
2020-03-06 23:01:10 +00:00
Runo Saduwa
0be982c798 Desktop: Fixes #2467: Menu items were not disabled in viewer-only mode (#2576)
* preview mode fix

* preview-edit mode fixed

* remove unecessary white space

* improved logic and removed empty line

* improved code and removed comment

* improved code again

* changed note type check logic

* improved code
2020-03-06 22:58:52 +00:00
Mohammed Rabeeh
67e5451c7c Desktop: Fixes #2560: Add toggling functionality for bold, italics and code in Editor Toolbar (#2565)
* Add toggling functionality for bold, italics and code in Editor toolbar

* Shorten code
2020-03-06 22:50:49 +00:00
Laurent Cozic
b31721b836 Electron release v1.0.192 2020-03-06 22:33:47 +00:00
Laurent Cozic
03146ed85f All: Security: Changed default encryption method to CCM 2020-03-06 22:33:33 +00:00
Laurent Cozic
3007918647 Electron release v1.0.191 2020-03-06 22:24:16 +00:00
Laurent Cozic
c6c4e950db All: Fixes #2591: Handle invalid UTF-8 data when encrypting 2020-03-06 19:11:51 +00:00
Laurent Cozic
40eba9e95e All: Fixed top margin issue on note rendering 2020-03-06 18:57:46 +00:00
Laurent Cozic
51ce7c939d Mobile: Fixed handling of provisional notes 2020-03-06 18:49:30 +00:00
Laurent Cozic
972e5aed8a All: Regression: Fixed issue with style embeded in notes 2020-03-06 18:22:40 +00:00
Laurent Cozic
8ba9e9efd8 Electron release v1.0.190 2020-03-06 00:55:09 +00:00
Laurent Cozic
63ca925786 Merge branch 'master' of github.com:laurent22/joplin 2020-03-06 00:54:42 +00:00
Laurent Cozic
71d1e6eb82 All: Fixes #2667: Fixed sanitize function so that it does not break HTML 2020-03-06 00:54:21 +00:00
Laurent Cozic
8641f69dae Docs: Add documentation about Joplin privacy. (#2650)
* Add documentation about privacy.

* Fix welcome assets.

* Cosmetic.

* Cosmetic.
2020-03-05 23:36:28 +00:00
Laurent Cozic
120aa066c2 Merge branch 'master' of github.com:laurent22/joplin 2020-03-04 19:42:23 +00:00
Laurent Cozic
27bcf6badb Desktop: Fixes #2660: Templates when creating note were broken 2020-03-04 19:41:57 +00:00
Gen NK
465691d5c9 Translation: Update ja_JP.po (#2657)
* Translate new strings

* Make existing translations for 'title' consistent
2020-03-04 12:36:20 -05:00
Laurent Cozic
48eb115cb9 Electron release v1.0.189 2020-03-04 16:53:57 +00:00
Laurent Cozic
51ee872179 All: Add more context to encryption errors 2020-03-04 16:53:45 +00:00
Laurent Cozic
c617f43e42 Electron release v1.0.188 2020-03-04 16:38:52 +00:00
Laurent Cozic
4920f64816 Desktop: Fixes #2656: Fix creation of new notes 2020-03-04 16:36:53 +00:00
Laurent Cozic
880134ce80 Desktop, Mobile: Fixes #2638: Improved Mermaid rendering on small viewports 2020-03-04 01:55:48 +00:00
Laurent Cozic
6e47652566 Desktop, Mobile: Fixes #2652: Fixed auto-title feature 2020-03-04 01:13:10 +00:00
Laurent Cozic
cb2df32d91 All: Fixes #2640: HTML code within Markdown was rendered incorrectly in some cases 2020-03-04 00:54:27 +00:00
Helmut K. C. Tessarek
80fff62b34 update de_DE.po 2020-03-03 03:20:09 -05:00
Helmut K. C. Tessarek
0f6867662c Update translations 2020-03-03 02:56:10 -05:00
Laurent Cozic
3bb431f18e Clipper release v1.0.22 2020-03-02 18:28:45 +00:00
Laurent Cozic
91a3adf2a2 Tools: Fix clipper release script 2020-03-02 18:28:28 +00:00
Laurent Cozic
e27d059376 Clipper release v1.0.21 2020-03-02 18:23:08 +00:00
Laurent Cozic
22c61ba603 Tools: Fix clipper release script 2020-03-02 18:22:51 +00:00
Laurent Cozic
6807f7e07b Tools: Fix clipper release script 2020-03-02 18:21:35 +00:00
Laurent Cozic
8632ef34eb Tools: Fix clipper release script 2020-03-02 18:19:17 +00:00
Laurent Cozic
47c0d9500a Tools: Fix clipper release script 2020-03-02 18:18:06 +00:00
Laurent Cozic
ee01d26915 Tools: Fix clipper release script 2020-03-02 18:06:57 +00:00
Laurent Cozic
0910dc4e54 Tools: Fix clipper release script 2020-03-02 18:03:49 +00:00
RAJPRAKASH
96cf42fb06 DESKTOP: Improve code css for Solarized Dark (#2626)
* Code border was not prominent

* Update theme.js
2020-03-01 16:33:57 -05:00
Jeremy Robertson
8b22f03c09 Desktop: Empty note body has 0 line count (#2623)
Empty note body has 0 line count
2020-03-01 15:39:10 +00:00
Laurent Cozic
299604838d Update website 2020-03-01 12:37:54 +00:00
Laurent Cozic
e9e4a0d0db Resize Mermaid image 2020-03-01 12:37:01 +00:00
Laurent Cozic
c2049b21fc Electron release v1.0.187 2020-03-01 11:44:23 +00:00
Laurent Cozic
a415b9d7ae Electron release v1.0.186 2020-03-01 11:43:47 +00:00
Laurent Cozic
cb4fd1ebf9 Tools: Build tools on initial install, and removed build warnings 2020-03-01 11:42:44 +00:00
Anjula Karunarathne
a28b790256 Desktop: Fixes #2615: Fix issue with disappearing button labels in toolbar (#2619)
* Fix undefined showButtonLabels

* Add showButtonLabels to the state; Removed conditional statement checking if state is undefined
2020-03-01 11:12:22 +00:00
Laurent Cozic
55847fa22f Fixed regression 2020-02-29 12:59:10 +00:00
Laurent Cozic
6ca0e6adcc All: Added concept of provisional note to simplify creation and handling of newly created notes 2020-02-29 12:39:23 +00:00
Caleb John
6542a60d61 Merge pull request #2612 from Ullas-Aithal/patch-3
Fixed a typo in faq :)
2020-02-28 14:43:23 -07:00
Ullas Aithal
ef4e1c53b7 Fixed a typo :) 2020-02-28 14:52:46 -06:00
Daulet Amirkhanov
ec64bf2f0f Desktop: Fixes #2476: Fix window dimensions and position when the application starts (#2514)
* ElectronClient window minimum size set

Hardcoded minimum width and height of 100 px.

Signed-off-by: daukadolt <daulet.amirkhanov.official@gmail.com>

* Set Electron window position if outside displays

Set Electron window at the center of primaryDisplay if BrowserWindow is not on any displays.

Signed-off-by: daukadolt <daulet.amirkhanov.official@gmail.com>

* Set Electron window default size dependent on screen

Set Electron window defaultWidth, defaultHeight to 80% of primary display workArea width, height, respectively.

Signed-off-by: daukadolt <daulet.amirkhanov.official@gmail.com>

* Hotfixing Electron defaultHeight depending on width, not height

Hotfix of a typo that calculates Electron app's default height at first run using primary screen's width, not height.

Signed-off-by: daukadolt <daulet.amirkhanov.official@gmail.com>

* Refactoring Electron app defaultWidth/defaultHeight setup

Setting defaultWidth/defaultHeight directly without extra variables.
Rounding defaultWidth/defaultHeight.

Signed-off-by: daukadolt <daulet.amirkhanov.official@gmail.com>
2020-02-27 18:38:08 +00:00
mic704b
54dc2219fe Tests: Integration harness fixes and refactors. (#2569)
* Test harness fixes and integration test refactor and addition.

* Clean up.

* Address review comments.

* Improve method names.
2020-02-27 18:25:42 +00:00
Helmut K. C. Tessarek
a576ad2a39 All: Change geolocation service to freegeoip.app to improve privacy (#2503)
removed unnecessary request to `api.ipify.org`

closes #2469
2020-02-27 09:48:22 +00:00
Runo Saduwa
25a246b6ae Tools: Resolves #2579: Add support for Rule of Hooks plugin (#2579) (#2585)
* installed eslint-plugin-react-hooks and set up rules of hooks

* fixed linter error

* changed react-hooks/exhaustive-deps option to error

* changed spaces to tabs in eslint config
2020-02-27 00:20:55 +00:00
Rishabh Malhotra
4840671f0e Desktop: Fixes #2573: Improved detection of selected text when applying formatting (#2582)
* fixes #2573 

This fixes the bug with spaces

* Update NoteText.jsx
2020-02-27 00:18:57 +00:00
WisdomCode
1d284a3528 Desktop: Fixes #1023: Speed up WebDAV and Nextcloud Sync on Linux (#2577)
* Speed up Linux Sync with KeepAlive Client

* Tidying up

* eslint

* Fix Breaking of building mobile client

* Refactor to make building on android possible

* Coding Convention

* Update shim-init-node.js

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-27 00:14:40 +00:00
Amit singh
721dd17686 Mobile: Fixes #2496: Allow loading images from plain HTTP urls (#2562) 2020-02-26 23:45:26 +00:00
mic704b
3830f5ee46 Desktop: Fix to update tag list when note is deleted. (#2554)
* Ensure tag list updated when note is deleted.

Add integration tests.

* Revert whitespace changes.
2020-02-26 23:42:14 +00:00
R-L-T-Y
ef8af13500 Desktop: Use asar packing to improve performances (#2531)
* Use the strongly recommended asar packing on linux

* Use asar for macOS packaging

* Update package.json

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-26 23:39:24 +00:00
Brandon D
16fb1bda53 Doc: Added Styling Information To CONTRIBUTING.md (#2474)
* Added Styling Information To CONTRIBUTING.md

* Typo Fix + Section Movement

* Coding Style Guidelines Init

* Fixes as per requested by devs
2020-02-25 14:06:56 +00:00
Laurent Cozic
e8fcb0cc87 Update CONTRIBUTING.md 2020-02-25 13:47:44 +00:00
Jeremy Robertson
0e23ea5284 Desktop: Resolves #160: Add word counter feature to notes (#2444)
* Add word counter logic

Fix errant whitespace changes

* update to using react hooks
Use React hooks
remove extra theme set
Update styling function

* correct linting and package lock issues

* WIP: update button functionality

* Add line count and update styling from feedback

* corrected file location to fit new build
2020-02-25 09:43:31 +00:00
Pavel Moiseenko
f9143ad817 Improve ISSUE_TEMPLATE.md (#2571) 2020-02-24 19:43:08 -05:00
Helmut K. C. Tessarek
925c03acca Update website 2020-02-24 17:12:27 -05:00
Laurent Cozic
421d7a947f Tools: Added back RN bundler command and cleaned up files 2020-02-24 17:30:11 +00:00
Devon Zuegel
7104d5b480 Doc: Add docs for auto-reloading the Electron client (#2564) 2020-02-24 11:27:26 +00:00
Laurent Cozic
ddb631d800 Merge branch 'refactor_clipper_build' 2020-02-23 21:31:30 +00:00
PackElend
6107af625f change path to GSoC live blog 2020-02-24 11:43:44 +01:00
Laurent Cozic
2ce40e0390 Finished fixing clipper build 2020-02-23 21:15:37 +00:00
Laurent Cozic
3f267f3774 Clean up unusued files 2020-02-23 21:04:14 +00:00
Laurent Cozic
91ef985353 Moved clipper files one level down 2020-02-23 20:51:04 +00:00
PackElend
cc759afe16 added RTFM and ask for structured writting
- added RTFM 
- added to watch the live blog
- added "in a structured manner" to Recommended steps
- Changed [Development  category] to [GSoC category]
2020-02-23 20:05:00 +01:00
StarFang208
fd405457e4 Translation: Update it_IT.po (#2551)
Translated the missing lines.
2020-02-22 17:53:25 -05:00
Sem
65706980a2 Translation: Update de_DE.po (#2557) 2020-02-22 15:48:24 -05:00
Laurent Cozic
04851284ca Merge branch 'master' of github.com:laurent22/joplin 2020-02-22 18:09:17 +00:00
mic704b
fbedc6b29b Desktop: Resolves #262: Implement "show all notes" (#2472)
* Implement "show all notes" feature.

* Ensure middleware is completely flushed and shutdown before continuing tests.
2020-02-22 11:25:16 +00:00
Laurent Cozic
d228ff9fbd Tools: Improve tsc watch 2020-02-22 11:20:41 +00:00
saif elhak awainia
0f28060795 Mobile: Fixing mobile plateform detection in settings (#2549) 2020-02-22 09:03:49 +00:00
PackElend
1df8509e4d escaped < in ## Recommended steps 2020-02-21 23:12:42 +01:00
PackElend
1229b772fe specified introduction topic subject
The subject of the topic shall contain your username, e.g. _Introducing <username>_.
2020-02-21 23:10:47 +01:00
Laurent Cozic
3cf3cd1598 Cli: Fixes #2536: Fixed issue when a notebook does not have a parent 2020-02-21 18:01:15 +00:00
Laurent Cozic
c5f1f11f2d Update stale.yml 2020-02-21 16:31:35 +00:00
Laurent Cozic
b4b424bf8a Tools: Moved testing under "npm run test" and clean-up no longer used shell scripts 2020-02-21 12:15:06 +00:00
mic704b
2d1aa27955 Doc: Update CONTRIBUTING.md (#2543)
Fix instruction to build unit tests.
2020-02-21 11:52:35 +00:00
mic704b
1f803662d3 Tools: Improve test building (#2546) 2020-02-21 11:48:53 +00:00
Laurent Cozic
2cbbc7100a Update BUILD.md 2020-02-21 11:06:00 +00:00
Laurent Cozic
ed2a6f15fd Update BUILD.md 2020-02-21 11:04:56 +00:00
Laurent Cozic
1aa806df85 Update BUILD.md
Typo
2020-02-21 11:00:02 +00:00
Laurent Cozic
17aa5ae243 Update BUILD.md
Removed non-breaking space
2020-02-21 10:55:09 +00:00
Laurent Cozic
1a96ee4c6b Tools: Fixed auto-ignored files and updated BUILD.md 2020-02-21 07:16:03 +00:00
Anjula Karunarathne
0d9ff26d51 Update BUILD.md (#2542) 2020-02-21 00:53:08 -05:00
Helmut K. C. Tessarek
ce40813bcf Desktop: fix Resources menu item on macOS (#2530)
* fix Resources menu item

On macOS the menu item `Resources` never showed up under `Tools`.

* var -> let
2020-02-21 00:33:48 -05:00
genneko
ea1db84fcc Translation: Fix an sprintf format error in ja (#2541) 2020-02-20 23:10:21 -05:00
Laurent Cozic
c79ee74b4c Electron release v1.0.185 2020-02-20 23:00:14 +00:00
Laurent Cozic
3407a31cf6 Tools: Improve and simplify how to build the apps (#2538)
* Improving CLI build

* Improving CLI build

* Remove requirement to build the tools

* Moved Electron app one level down

* Clean up Electron build

* Moved tools to sub-dir

* Updated root script

* update root

* update root

* update root

* update root

* update root

* update root

* Updated build

* Added doc

* Update CI config

* Should not lint index.js

* Fixing jetify

* Fixed linter errors

* Fixed pod build

* Fixed Windows build
2020-02-20 22:59:18 +00:00
PackElend
2dfe693564 added: share your GitHub username
added "share your GitHub username" to recommended steps to track PR more easily
2020-02-20 20:17:38 +01:00
PackElend
e99edd4af9 added: share your GitHub username
added "share your GitHub username" to recommended steps to track PR more easily
2020-02-20 20:06:47 +01:00
genneko
8d43e1215a Translation: Update ja_JP.po (#2537) 2020-02-20 12:02:59 -05:00
Ji-Hyeon Gim
6449289147 Translation: Update ko.po (#2534)
Signed-off-by: Ji-Hyeon Gim <potatogim@potatogim.net>
2020-02-20 12:00:52 -05:00
zaoyifan
5a33dcaf07 Translation: Update zh_CN.po (#2525)
* Improve Simplified Chinese translation

* Improve Simplified Chinese translation
2020-02-20 02:52:59 -05:00
TheoDutch
2e804086eb Translation: Update nl_NL .po (#2526) 2020-02-19 19:02:30 -05:00
Georg Grab
5bbedc7e3c Desktop: Resolves #592: Create a screen that list all the resouces (#2189)
* Add a Basic Resource Screen

Implement "Open in External Viewer"

Add @types/lodash as a devDependency, prettyBytes for pretty printing bytes

Implement display of Orphaned Resources

Implement deletion of Resources

Implement sorting logic

Minor Styling

Remove Compiled js

Review - No more Orphan display, LIMIT resources

ResourceScreen - use DB for sorting

Database - Version 28 (Index on Resource size)

Add compiled JS with eslint --fix

Add ResourceScreen to ignore files, delete from repo

Disable enforce-react-hooks

* Second review round

* Update ResourceScreen.tsx

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-19 10:13:33 +00:00
Laurent Cozic
9455936f19 Merge branch 'master' of github.com:laurent22/joplin 2020-02-19 00:45:46 +00:00
Helmut K. C. Tessarek
9af4ec7b04 Mobile: Update react-native-version-info to 1.0.1 (#2522) 2020-02-19 00:45:22 +00:00
Laurent Cozic
fb619a0099 Fixed TypeScript issues 2020-02-19 00:41:49 +00:00
Laurent Cozic
35e369ff1a Merge branch 'master' into improve-build 2020-02-19 00:18:38 +00:00
Laurent Cozic
2fa8e2ff09 Fix build 2020-02-19 00:09:19 +00:00
Devon Zuegel
eeb9999334 Mobile: Add quick actions (#2247)
* Super basic QuickAction is working!

* QuickAction successfully creates notes

* Update icons

* Update icons and support new to-do

* Update icons and support new to-do

* Fixed

* Extract QuickActions

* It works as long as you go out of the edit screen (saving is not sufficient)

* working? but still kinda buggy...

* Cleanup

* Cleanup

* Cleanup

* Use the same pattern as onJoplinLinkClick_

* Cleanup

* Cleanup

* Remove pluginAssets/index.js change

* manual Andoid linking

* Transition QuickActions.js to .ts

* Unstage QuickActions.js in favor of .ts

* Move QuickActions out of lib/

* Add comment about userInfo in QuickActions

* Remove redundant QuickActions file

* Remove pluginAssets/index to resolve conflict

* Update CONTRIBUTING.md to include test runner troubleshooting

* Add `npm run tsc` to Unit Tests docs

Co-authored-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
2020-02-18 23:52:36 +00:00
Helmut K. C. Tessarek
e6cbd8c8f8 Update translations 2020-02-18 15:01:29 -05:00
Mario
5a40204cb3 Translation: add Estonian language (et_EE.po) (#2512)
* Estonian lang

* correction of mistakes
2020-02-18 14:58:13 -05:00
Laurent Cozic
805cf06af7 Merge branch 'master' of github.com:laurent22/joplin 2020-02-18 16:19:25 +00:00
mic704b
bdce832fee Desktop: Ensure tabs act like tabs and spaces act like spaces in editor. (#2508) 2020-02-17 23:28:55 +00:00
Laurent Cozic
4c97aa8542 Improving build 2020-02-17 20:55:09 +00:00
Laurent Cozic
ca9102d4f5 Tools: Move Cli compiles locales under git to simplify build 2020-02-17 20:41:11 +00:00
Laurent Cozic
4f8e7b0e2b Clipper release v1.0.20 2020-02-15 15:22:38 +00:00
Laurent Cozic
9e92c9230b Merge branch 'master' of github.com:laurent22/joplin 2020-02-15 15:22:13 +00:00
Laurent Cozic
2fef4a0c09 Fixing CRA 2020-02-15 15:21:58 +00:00
Helmut K. C. Tessarek
00dc711ffa change clipper manifest to correct version - it will be changed by the release script 2020-02-14 22:48:19 -05:00
Laurent Cozic
a52c261d95 Fixed tests 2020-02-14 09:43:22 +00:00
Laurent Cozic
c63d8a70b8 Desktop: Fixed search bar text not visible in dark mode 2020-02-14 00:57:20 +00:00
Laurent Cozic
79f5bcd2fc All: Fixes #2485: Better handling of rare error in WebDAV server 2020-02-14 00:53:51 +00:00
Laurent Cozic
675ef8aefd Mobile: Fixes #2141: Fixed links not working within TOC 2020-02-14 00:36:11 +00:00
Laurent Cozic
f97bae0b27 iOS: Fixes #2384: Improve support for dark mode 2020-02-14 00:17:09 +00:00
Laurent Cozic
3361901cd8 Merge branch 'master' of github.com:laurent22/joplin 2020-02-13 23:59:34 +00:00
Laurent Cozic
3db47b575b All: Security: Fixed potential Arbitrary File Read via XSS 2020-02-13 23:59:23 +00:00
Helmut K. C. Tessarek
b1ab59b2e6 Desktop: Update Electron to 7.1.12 (#2500)
This is only a minor bump but several issues have been fixed since 7.1.9:

- Fixed an issue where sending complex objects over IPC could in some cases cause the renderer process to be terminated. electron/electron#21922
- Fixed crash with Date.toLocaleString for invalid locale and locale of the format aa@BB. electron/electron#21969
- Fixed flash plugin not working. electron/electron#22109
- Fixed issue where renderers could crash during GC when using the contextBridge module. electron/electron#22112
- Fixed netLog.stopLogging returning undefined instead of the path to the log. electron/electron#21988
- Fixed an edge case in checkbox logic on Windows. electron/electron#21860
- Fixed an issue where window.print() only worked once on a single BrowserWindow. electron/electron#21911
- Fixed an issue where the credits set in About Panel credits were not dark mode aware on macOS. electron/electron#21924
- Fixed error thrown when importing powerMonitor on Linux before app's 'ready' event. electron/electron#21941
- Fixed fuzzy font rendering when hot-plugging displays on macOS Catalina. electron/electron#21872
- Fixed BrowserWindow.setFocusable(true) not working on Windows. electron/electron#21855
- Fixed set-cookie header not passed in net module. electron/electron#21770
- Fixed an issue where custom stream protocols would sometimes not complete responses when the data stream ended. electron/electron#21758
- Fixed crash when restoring minimized hidden window on Windows. electron/electron#21820
- Fixed issue where non-zero size pixels in CSS styles could be rounded down to zero size pixels. electron/electron#21857
- Fixed memory leak when using javascript generator functions. electron/electron#21773
- Fixed potential hang when sending synchronous IPC messages on process shutdown. electron/electron#21776
2020-02-13 00:49:52 +00:00
Bailey
652b852f6d Translation: Update nl_NL.po (#2498)
I felt like improving some of the Dutch translation work for Joplin so here are some more and improved translations

(not all that many but more may come)
2020-02-12 18:03:28 -05:00
Fernando Pindado
54fd2049a8 Translation: Update es_ES.po (#2497)
Updated some already translated messages and translated new ones
2020-02-12 16:28:28 -05:00
Laurent Cozic
06d807d9ff Clipper: Fixes #2489: Fixed clipping of pages that contain images without sources (YouTube), and improved support for SVG graphics 2020-02-12 18:15:16 +00:00
Laurent Cozic
b66b1ba9e6 Clipper: Upgrade create-react-app to remove need for unsafe-eval CSP flag 2020-02-12 17:46:42 +00:00
Laurent Cozic
06f71cea24 Desktop: Resolves #2162: Added zoom controls to the application menu
commit 2285000a6ac09eed12d4215d71b4f88f1660411a
Author: Laurent Cozic <laurent@cozic.net>
Date:   Tue Feb 11 22:25:12 2020 +0000

    Deprecate style.zoom

commit 3a6da4ffee280dd93eee1f4ae8891a72ecaea8e3
Author: Laurent Cozic <laurent@cozic.net>
Date:   Tue Feb 11 22:13:01 2020 +0000

    Fix zoom branch

commit c46c080a06
Author: Elizabeth Schafer <elizabeth.schafer.wenk@gmail.com>
Date:   Sun Dec 15 10:37:10 2019 -0500

    Using componentDidUpdate rather than deprecated componentWillRecieveProps

    https://github.com/laurent22/joplin/pull/2165#discussion_r357441917

commit 069444fd02
Author: Elizabeth Schafer <elizabeth.schafer.wenk@gmail.com>
Date:   Sun Dec 15 10:33:23 2019 -0500

    Zoom factor is saved to private setting

    https://github.com/laurent22/joplin/pull/2165#issuecomment-565258704

commit 34a1b2dc3e
Author: Elizabeth Schafer <elizabeth.schafer.wenk@gmail.com>
Date:   Sun Dec 15 10:30:29 2019 -0500

    Basing new zoom value off redux state

    https://github.com/laurent22/joplin/pull/2165#discussion_r357441406
    https://github.com/laurent22/joplin/pull/2165#discussion_r357441512

commit 7ec15ff4c4
Author: Elizabeth Schafer <elizabeth.schafer.wenk@gmail.com>
Date:   Fri Dec 13 12:50:11 2019 -0500

    Reducer shouldn't have any side effects

    https://github.com/laurent22/joplin/pull/2165#discussion_r357440767

commit 9e676ece13
Author: Elizabeth Schafer <elizabeth.schafer.wenk@gmail.com>
Date:   Sun Dec 8 11:11:28 2019 -0500

    Added zoom options to the view menu
2020-02-12 12:41:32 +00:00
Laurent Cozic
88eed12c78 Merge branch 'master' of github.com:laurent22/joplin 2020-02-12 11:20:46 +00:00
Laurent Cozic
ea75f65e35 Desktop, Mobile: Fixed note renderer asset caching issue 2020-02-12 10:17:15 +00:00
axq
b1a9b448a6 Documentation: Extend copyright date range to 2020 (#2495)
* Minor English improvements in README.md

* Update LICENSE

* Update License.txt

* Update terminal.md

* Extend copyright date range to 2020

Minor housekeeping on copyright date range, so the app doesn't look stale in 2020
2020-02-12 05:14:08 -05:00
Helmut K. C. Tessarek
c27c3c48ba commit files added by buildAssets.js 2020-02-11 22:29:37 -05:00
saif elhak awainia
fdf28c3513 Mobile: Added OLED dark theme (#2368)
* Android: Adding Oled dark theme

* Mobile: Fixing coding style issues

* Making oled dark mode only reachable in mobile app

* Fixing eslint errors

* Update Setting.js

* Update Setting.js

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-11 23:32:15 +00:00
Helmut K. C. Tessarek
018222a1f4 Desktop, Mobile: Fixes #2477: Add new Katex fonts to improve rendering (#2478)
* add katex font KaTeX_Size4-Regular.woff2

fixes #2477

* deleted:    ElectronClient/app/gui/note-viewer/pluginAssets/katex/fonts/KaTeX_Size4-Regular.woff2

* add font to buildAssets.js

* register font in katex.js

* prepare files in case we need other fonts in the future

* use all fonts
2020-02-11 22:53:12 +00:00
Brandon Wulf
ca5d6c5cfe Desktop: Fix .desktop file & force refresh (#2479) 2020-02-11 22:33:10 +00:00
Laurent Cozic
d02488f00c Merge branch 'master' of github.com:laurent22/joplin 2020-02-11 22:29:02 +00:00
Laurent Cozic
1d14c8a706 Desktop, Mobile: Resolves #2001: Added Mermaid diagrams support
commit ae8a0641ab3681a3b25f6dc4ac40f20d52aaeb4d
Author: Laurent Cozic <laurent@cozic.net>
Date:   Tue Feb 11 17:58:08 2020 +0000

    Fixed plugin asset

commit 03adf7fc7c878f82f6a43515d37fd5e3dd59390f
Author: Laurent Cozic <laurent@cozic.net>
Date:   Mon Feb 10 22:09:18 2020 +0000

    Desktop: Adding Mermaid support
2020-02-11 22:28:43 +00:00
mic704b
573b744293 Desktop: Support export of multiple notes to PDF files. (#2468)
* Support export of multiple notes to pdf files.

* Update in response to review comments.

Find unique filenames when exporting multiple pdfs.
Simplify delay.

* Eliminate redundant retries and fix error message in fs shim unique filename search.

* Make output filenames consistent between single and multi pdf export.

* Remove unnecessary white space.

* Remove legacy sleep in pdf export and add a little more variability to unique filename search.
2020-02-11 14:14:04 +00:00
Marcus Hill
4bd326f72c Clipper: Add ability to launch clipper window with shortcut (#2272)
* Clipper: Add ability to launch clipper window with shortcut

This change adds a command to the manifest.json file for the web clipper
which launches the webclipper rather than clicking on it.
Because this is a WebExtensions feature and not something homegrown,
 users are able to change (or remove) the shortcut using native browser functionality.

* Add commands for all clipping options

* Remove empty suggestedKeys property from extension manifest

* Add ability to focus the webclipper buttons

* Remove debug log

* Change sendClipMessage warning to error

* Refactor to add a sendContentToJoplin command

* Update index.js

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-11 10:49:07 +00:00
Anjula Karunarathne
d278809659 Desktop: Fixed incorect location format (#2480) 2020-02-11 09:49:48 +00:00
Helmut K. C. Tessarek
8053e11b9a minor improvements of wording
There's no word `toggle-able`. It does not exist.
functionality is a mass noun. There's no plural form. (same as `data` or `information`)
2020-02-10 19:17:02 -05:00
Laurent Cozic
5f544fba8a Update markdown.md 2020-02-11 00:08:29 +00:00
Laurent Cozic
8ee0d8a73e Doc: More info about Markdown plugins and standards 2020-02-11 00:05:43 +00:00
Laurent Cozic
b56352cb4e Updated buildAssets script 2020-02-10 22:26:25 +00:00
Laurent Cozic
6d0cc97635 Removed auto-generated assets 2020-02-10 22:21:43 +00:00
Laurent Cozic
384c7cd831 Merge branch 'master' of github.com:laurent22/joplin 2020-02-10 21:51:18 +00:00
Laurent Cozic
9ec1e84ed0 Desktop, Cli: Fix importing of very large attachments (150MB+) from Evernote ENEX files 2020-02-10 21:50:45 +00:00
Laurent Cozic
691521c5b9 ios-v10.0.44 2020-02-10 21:44:27 +00:00
PackElend
a1e77b4ccd Rename lessons learned to lessons learned.md 2020-02-10 18:08:09 +01:00
PackElend
f90da61a85 Create lessons learned 2020-02-10 18:07:54 +01:00
Helmut K. C. Tessarek
0b0ff15dde Desktop: Use current year in About box (in the copyright text) (#2466) 2020-02-10 15:54:53 +00:00
Laurent Cozic
9b157c7ac3 Android release v1.0.318 2020-02-09 22:25:18 +00:00
Laurent Cozic
525ba12fc8 Merge branch 'master' of github.com:laurent22/joplin 2020-02-09 22:17:10 +00:00
Laurent Cozic
2785b8ffc5 Mobile: Upgrading to React Native to 0.61.5 - fixed Android build 2020-02-09 22:15:36 +00:00
mic704b
cd9d5db3c2 Desktop: Fix to update the note list if the selected tag is deleted. (#2398)
* Refresh the note list if the selected tag is deleted.

* Handle case where last note is untagged (by following the note)

* Corrections.

* Correct call to asynchronous function.
2020-02-09 22:08:24 +00:00
Laurent Cozic
d8ef15a1e2 Mobile: Upgrading to React Native to 0.61.5 2020-02-09 20:21:52 +00:00
Laurent Cozic
f1015ca73d Android release v1.0.317 2020-02-09 17:50:51 +00:00
Laurent Cozic
e865a5d7c6 RN upgrade: Fixing Android app 2020-02-09 17:42:19 +00:00
Laurent Cozic
cd6e5ccfb8 RN upgrade: Fix sidebar dark overlay 2020-02-09 16:41:30 +00:00
Laurent Cozic
46ca24cf9d RN upgrade: Restore iOS notification feature 2020-02-09 16:29:46 +00:00
Laurent Cozic
813137efc9 RN upgrade: Fix SafeAreaView on iOS 2020-02-09 15:48:09 +00:00
Laurent Cozic
4235288c55 Mobile: Upgrading to RN 60 2020-02-09 14:51:12 +00:00
Laurent Cozic
7fd445173d Desktop, Mobile: Fixes #2277: Fix alignment of checkboxes and other list items in rendered note 2020-02-08 17:15:22 +00:00
Laurent Cozic
1e190bbe70 Clipper: Fixes #2294: Clipping selection in some cases would not work, when that selection contains multiple code blocks 2020-02-08 12:16:49 +00:00
Laurent Cozic
0229686203 iOS: Fixes #2301: Removed filesystem sync option, which was not supported 2020-02-08 11:59:19 +00:00
Laurent Cozic
1606076b4e Mobile: Fixes #2401: Fixed code syntax highlighting on dark theme 2020-02-08 11:31:22 +00:00
Laurent Cozic
cd630e9516 Removed auto-copied assets 2020-02-08 11:20:44 +00:00
Laurent Cozic
3b200e5c92 Desktop, Mobile: Fixes #2357: Fix slow rendering and memory leak issues with Katex notes 2020-02-08 11:11:04 +00:00
Helmut K. C. Tessarek
639712c003 Merge branch 'master' of github.com:laurent22/joplin 2020-02-07 20:06:57 -05:00
Helmut K. C. Tessarek
1abff212f9 CLI v1.0.155 2020-02-07 20:06:29 -05:00
Helmut K. C. Tessarek
cfb59f2f19 Desktop: show master instead of HEAD as branch in about box (#2465)
Builds in CI are done from a 'detached HEAD' state. Thus `git rev-parse --abbrev-ref HEAD` always returns HEAD, which is not master.
Releases are always created from the master branch, thus HEAD -> master.
2020-02-08 01:02:10 +00:00
Helmut K. C. Tessarek
df63572b7c Update translations 2020-02-07 19:47:39 -05:00
Laurent Cozic
d89071dc03 Merge branch 'master' of github.com:laurent22/joplin 2020-02-08 00:16:16 +00:00
Laurent Cozic
95e0e8d459 Desktop, Mobile: Fixes #2374: Fix rendering of certain letters in Katex. Fixed printing when note contains Katex code 2020-02-08 00:15:56 +00:00
mic704b
6973952892 Desktop, Cli: Fixes #2455: Fix markdown export (#2463)
* Ensure directory exists when export md file.

* Add tests.
2020-02-07 23:36:25 +00:00
Laurent Cozic
56cf5271a2 Electron release v1.0.184 2020-02-07 23:30:00 +00:00
Laurent Cozic
d679ceeb9b Removed postinstall for joplin-renderer 2020-02-07 23:29:53 +00:00
Laurent Cozic
49cb391486 Electron release v1.0.183 2020-02-07 23:27:27 +00:00
Laurent Cozic
cfdde4c2ce Removed package.json comments as it breaks CI 2020-02-07 23:27:16 +00:00
Laurent Cozic
57864a388a Electron release v1.0.182 2020-02-07 23:24:00 +00:00
Laurent Cozic
74c8a38d48 CLI v1.0.154 2020-02-07 23:23:30 +00:00
Laurent Cozic
cd19cedd46 Moved joplin-renderer dependencies to client package.json as a workaround to electron-builder bug
Due to this bug:

https://github.com/electron-userland/electron-builder/issues/3185
2020-02-07 23:21:16 +00:00
Helmut K. C. Tessarek
3f23d8ed06 Desktop, Cli: Fixes #2085: Fix escaping of title when generating a markdown link (#2456)
Previously a title with brackets was escaped incorrectly. The brackets were replaced by underscores.

The following title `title [square] (round)` looked like this:

[title _square_ _round_](:/c54794f53e5e4b1aa558699e255d5f95)

Now it looks like this:

[title \[square\] (round)](:/c54794f53e5e4b1aa558699e255d5f95)

fixes #2085
2020-02-07 22:15:41 +00:00
Helmut K. C. Tessarek
8cbb0d03e8 fix de_DE.po 2020-02-07 16:31:47 -05:00
Tomáš Bambas
52b99a1520 Translation: Update cs_CZ.po (#2462) 2020-02-07 16:07:22 -05:00
Helmut K. C. Tessarek
7eabe74402 Cli: Fix console messages being displayed in GUI (#2457)
see https://discourse.joplinapp.org/t/joplin-terminal-question-sync/5700?u=tessus
2020-02-07 09:49:47 +00:00
Laurent Cozic
10cf80d6ca Merge branch 'master' of github.com:laurent22/joplin 2020-02-06 11:55:35 +00:00
Helmut K. C. Tessarek
bccfd0bcbd Desktop: Sort tags in drop-down list (when adding tags) (#2453)
see https://discourse.joplinapp.org/t/request-better-tag-organisation/5662?u=tessus
2020-02-06 10:51:24 +00:00
mic704b
fa9e2bd6dd Desktop: Support scrolling in the note list using keys (eg page up, page down) (#2404)
* Implement note list navigation: page up/down and home/end.

* Adjust key code mappings.

* Refactor.

* Add comments to clarify key codes.

* Fix formatting.
2020-02-06 09:38:33 +00:00
mic704b
b15b3d6ac5 Desktop: Do not select pasted text no matter the paste method (#2431) 2020-02-06 01:38:17 -05:00
Laurent Cozic
c4fb5b72cd Electron release v1.0.181 2020-02-05 22:34:21 +00:00
Laurent Cozic
fd706c3dbc Trying to revert to electron-builder 20.15.0 to go around build issue 2020-02-05 22:34:13 +00:00
mic704b
5128190942 Desktop: Resolves #2330: Fix rendering of tabs in code blocks (#2446)
* Add renderer plugin to handle tabs in code blocks.

* Add plugin to renderer package list.

* Attempt to fix unrelated linter issues.

* Fix unrelated linter problems.

The problems exist on master prior to the branch.

* Fix more inherited linter problems.
2020-02-05 22:15:40 +00:00
mic704b
c6f127b48e Desktop: Fixes #2407: Do not show "could not print" warning dialog after cancelling print. (#2410)
* Do not show "failed to print" warning dialog after cancelling print.

* Add reason to error string.

* Reform message string.

* Ensure OK button is displayed on error dialog.
2020-02-05 21:50:05 +00:00
mic704b
011d66356f Desktop: Resolves #1014: Support list creation on multi-line selections (#2408)
* Support multi-line selections for creating ordered lists, unordered lists, checkboxes.

* Modify to maintain previous behaviour wrt insertion of new line if not on empty line.

* Review update: rename variables (or eliminate them).

* Review update: variable naming.
2020-02-05 21:38:55 +00:00
Amit singh
d24a974219 Desktop: fixes long lines warpped (#2447) 2020-02-05 21:35:37 +00:00
mic704b
82f5e26ef4 Desktop: Resolves #539: Add "add or remove tags" for multiple notes. (#2386)
* Add `add or remove tags` for multiple notes.

* Fix test.

* Handle invalid argument.

* Enable "Edit > Tag" menu item.

* Clean up variable naming.
2020-02-05 21:24:12 +00:00
0xCLOVER
247182edbf Desktop: Fix #2365: Ensure the main window is hidden when Joplin starts (#2432)
* Ensure window is hidden when application launches

* Update ElectronAppWrapper.js

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-05 11:26:57 +00:00
Vaidotas Simkus
69fc518e39 Desktop: Allow --no-sandbox flag to go around AppImage limitation (#2436) 2020-02-05 11:24:09 +00:00
Andrey Dolgov
aef4a88d7f All: Reset time fields when duplicating a note (#2428) 2020-02-05 11:18:14 +00:00
mic704b
69e70d88f4 Desktop: Improved Note search bar UI (#2329)
* Add colour hints to the local search bar.

* Refactor.

* Refactor.

* Fix annoying flicker when entering first query character.

* Refactor in response to review comments.

Cache the information at the source, remove state updates during render.

* Move cached data into searchbar component.

* Refactor.

* Show number of matches and disable prev/next buttons when no matches.

* Improve no matches message.

* More note searchbar enhancements.

Indicate selected match
Fade search result text
Ctrl-F selects input content upon repeat

* Update following review.

Modify message to remove need for translation.
Flatten properties structure.

* Made tweaks to avoid having two queries in the state

* Cache searchbox background colour to stop compoenent flashing.

* Update NoteSearchBar.jsx

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-05 10:45:24 +00:00
Laurent Cozic
aac0a45beb Merge branch 'enhance-note-searchbox' of https://github.com/mic704b/joplin 2020-02-05 10:38:16 +00:00
mic704b
d04d89d622 Desktop: Emphasise note title (#2311)
* Emphasise note title and de-emphasise note toolbar.

* Remove redundant titles from pre-packaged notes.

* Revert additions to theme.

* Revert de-emphasis of note toolbar icons.

* Revert bolding of title.

* Undo change to theme

* Use h1 style as basis for title editor style.

Times a factor to make up for html scaling.

* Use text style as basis for editor title style, scaled to match html h1.
2020-02-05 10:37:26 +00:00
Laurent Cozic
0f1633dfbf Tools: Linter: Enforce array-bracket-spacing - never 2020-02-04 22:11:35 +00:00
Laurent Cozic
737c3f62db Tools: Linter: Enforce object-curly-spacing - always 2020-02-04 22:09:34 +00:00
fab4x
49701fbc55 Translation: update de_DE.po (#2443)
* update de_DE.po

Added some translations

* Update German translation 

Added some translations

* deletion
2020-02-04 16:56:11 -05:00
mic704b
5395d57df8 Desktop: Support "select all" in the note list (#2403)
* Select all notes in note list, block select all in folder and tags lists.

* Adjust key mappings.

* Adjust key mappings.
2020-02-04 21:55:05 +00:00
Laurent Cozic
8a7e3fe36f Update website 2020-02-04 12:49:21 +00:00
Laurent Cozic
7bc0a52cc9 Doc: GSoC: Added Roeland Jago Douma from Nextcloud as mentor 2020-02-04 12:48:34 +00:00
mic704b
f428cc26a2 All: More info for "unknown profile version" error message (#2361)
* Add version info to profile error message. Add profile version to desktop About Box.

* Add profile error to log.

* Use shim to retrive version number.

* Refactor to use registry instead of BaseModel to get database.

* Remove call to logger.

* Improve code readability.
2020-02-03 21:40:48 +00:00
Diego Betto
cf6c141e57 version attribute inside joplin.desktop is X-AppImage-Version (#2393)
- version attribute inside `joplin.desktop` is `X-AppImage-Version` and not `X-AppImage-BuildId`
- format is `X-AppImage-Version=X.Y.Z" so we need to change `cut` parameters (split on '=' and get 2nd value)
2020-02-03 21:38:52 +00:00
mic704b
3a29b5f321 Update tools build command to end in directory from which it started. (#2434) 2020-02-03 19:59:12 +00:00
chenlhlinux
ffdae41605 Translation: Update zh_CN.po (#2421) 2020-01-31 18:41:04 -05:00
Laurent Cozic
688edd4b32 Moved the Joplin renderer back to the main repository to make development easier 2020-01-30 21:05:23 +00:00
Laurent Cozic
d687ef5c09 Merge branch 'master' of github.com:laurent22/joplin 2020-01-31 09:48:54 +00:00
Marton Paulo
59c8a87047 Remove personal e-mail address eo.po pt_BR.po (#2414)
* Remove personal e-mail address

* Remove personal e-mail address

* Remove personal e-mail address

* Revert "Remove personal e-mail address"

This reverts commit 7a66c4a5b6.

* Remove space

* Remove space
2020-01-30 15:55:23 -05:00
Laurent Cozic
759d59c2e6 Tools: Ignore existing components for react-hook rule 2020-01-29 18:03:55 +00:00
Laurent Cozic
73d12e1ed5 Tools: Enforce React hooks on linter 2020-01-29 17:54:25 +00:00
Kirtan Purohit
fcda843778 All: Resolves #2279: Handle Thai language in search (#2387)
* Update SearchEngine.js

use basicSearch if thai string

* Update string-utils.js

added thai regex support

* Update services_SearchEngine.js

added thai language test

* Update services_SearchEngine.js

remove trailing spaces
2020-01-29 12:50:52 +00:00
Helmut K. C. Tessarek
dcbd8aed30 clarify 2 paragraphs in CONTRIBUTING.md 2020-01-27 19:49:36 -05:00
Helmut K. C. Tessarek
154c838e9f dynamically retrieve copyright year in web site generation 2020-01-27 19:25:10 -05:00
Helmut K. C. Tessarek
f90f688299 fix the 'Improve this doc' link on the index (main) page
The 'improve this doc' link results in a 404 on the main page, because no filename is actually given for the index page.
2020-01-27 19:06:54 -05:00
Helmut K. C. Tessarek
fca9b57af5 Update website 2020-01-27 19:00:52 -05:00
Helmut K. C. Tessarek
59eed8395d fix copyright year in web site generation 2020-01-27 18:56:33 -05:00
Helmut K. C. Tessarek
a4ccd2d43a fix print function in installer script
fixes #2379
2020-01-27 03:40:29 -05:00
Helmut K. C. Tessarek
5136e7a0e0 Merge branch 'master' of github.com:laurent22/joplin 2020-01-27 03:30:09 -05:00
Helmut K. C. Tessarek
423243c84b clarify bug reports and feature requests in the community section 2020-01-27 03:29:52 -05:00
Runo Saduwa
2042deb2bf Documentation: Edit build instructions to avoid confusion (#2376)
* Edits build instructions to avoid confusion

When i was trying to build the Electron Project, i was a bit confused about which commands to follow for building in the projects on my OS (Windows).
there was two header  **Building the Electron application** and   **Building the Electron application for windows**, the former can lead a beginner to confusion because it seems to be "a generalized statement", unlike the latter that was more specific. In order to improve the developers experience, i had to change the former heading to "Building the Electron application for Linux and macOS" to help them understand easily.

* Implemented advises from Reviewer (tessus) to further improve  the documentation instructions for building the Electron App on Linux, macOS and Windows
2020-01-27 03:16:12 -05:00
Helmut K. C. Tessarek
e1216dce4b Update en_US.po 2020-01-26 23:19:54 -05:00
Helmut K. C. Tessarek
3839c7818e Update de_DE.po 2020-01-26 23:19:37 -05:00
abonte
90652e40b4 Translation: Update it_IT.po (#2366)
* Update Italian translations

* fix double quotes
2020-01-26 19:56:06 -05:00
mic704b
83c1c20ce3 Desktop: Fix hang when selecting tag when multiple notes are selected (also for search) (#2372)
* Fix hang when tag clicked while multiple notes selected.

* Fix hang when search changed while multiple notes selected from previous search.
2020-01-26 17:46:19 +00:00
Helmut K. C. Tessarek
0bb1484b2d Deskop: Fix deprecation of getName() in Electron (#2367)
This change fixes the following deprecation:
(electron) 'getName function' is deprecated and will be removed. Please use 'name property' instead.
2020-01-26 17:32:00 +00:00
XSAkos
5881cee167 All: Added new date format YYYY.MM.DD (#2318)
* Added new date format YYYY.MM.DD.

* revert change as this file is autogenerated

Co-authored-by: Akos Keresztes <60130238+keresztesa@users.noreply.github.com>
2020-01-26 17:26:50 +00:00
Laurent Cozic
101935e594 Tools: Allow creating simplified changelog for app stores 2020-01-25 10:42:36 +00:00
Laurent Cozic
9dda65de20 Merge branch 'master' of github.com:laurent22/joplin 2020-01-25 10:28:57 +00:00
Laurent Cozic
a00e35fb57 ios-v10.0.43 2020-01-25 10:28:22 +00:00
mic074b
2c85b55ff8 Cache searchbox background colour to stop compoenent flashing. 2020-01-25 15:30:57 +11:00
Laurent Cozic
d1b51b409a Made tweaks to avoid having two queries in the state 2020-01-25 15:29:48 +11:00
Laurent Cozic
c3d5463589 Tools: Improved CLI release script 2020-01-24 23:18:46 +00:00
Laurent Cozic
710447f879 Merge branch 'master' of github.com:laurent22/joplin 2020-01-24 23:18:02 +00:00
Laurent Cozic
c61e4cae4d CLI v1.0.153 2020-01-24 23:17:46 +00:00
Laurent Cozic
333aebf32c Tools: Removed debugging code 2020-01-24 23:15:05 +00:00
Laurent Cozic
2657c8736e Tools: Fixes #2256: Better handling of git failure when building package-info 2020-01-24 23:10:24 +00:00
Laurent Cozic
5b28f6b25f Tools: Improved git changelog 2020-01-24 22:43:55 +00:00
Laurent Cozic
715253da2f Android release v1.0.316 2020-01-24 22:34:02 +00:00
Laurent Cozic
66356d83ab Electron release v1.0.179 2020-01-24 22:29:17 +00:00
Laurent Cozic
8e531ca87a Update translations 2020-01-24 22:28:54 +00:00
Laurent Cozic
18c46851fd Desktop: Fixes #2324: Apply userstyle again when exporting to PDF or printing 2020-01-24 21:46:48 +00:00
Laurent Cozic
5456dbbf16 Merge branch 'master' of github.com:laurent22/joplin 2020-01-24 21:16:33 +00:00
Laurent Cozic
5c54b83108 Desktop: Fixed update message box 2020-01-24 21:16:25 +00:00
Laurent Cozic
cbf7f03bff Desktop: Improve appearance of note Info dialog 2020-01-24 21:16:18 +00:00
mic704b
ea05fea234 Desktop: Fix identification of note in pdf export from main menu. (#2323) 2020-01-24 20:57:11 +00:00
mic704b
f78729ad1f Cross-platform version number retrieval (#2355)
* Add shim to retrieve application version.

* Create shim to retrieve app version number.

* Add a fall through handler to throw an error.
2020-01-24 20:56:44 +00:00
genneko
4ec9492f7c Update ja_JP.po (#2358) 2020-01-24 15:19:57 +00:00
bedwardly-down
f86b953420 Tools: Updated Request to v2.88.0 to remove dependency on Outdated and Insecure Hawk and Cryptiles Dependencies (#2353)
* Updated Cryptiles dependency to 3.1.4

The maintainer is no longer supporting any version of cryptiles before
v4.2.0 on npm; npm's older versions stop at 3.1.2 and a high security
vulnerability was thrown during a build on linux: https://npmjs.com/advisories/720

The maintainer still has 3.1.4 tagged in his repo and this commit
updates cryptiles to solve that issue without breaking compatibility
since it was primarily bug fixes for a code freeze.

* Updated Request Dependency to 2.86.0

* Updated Reqiest to 2.88.0
2020-01-24 15:19:22 +00:00
mic074b
d8f91a2ece Update following review.
Modify message to remove need for translation.
Flatten properties structure.
2020-01-24 19:23:01 +11:00
Laurent Cozic
6563606799 Merge branch 'master' of github.com:laurent22/joplin 2020-01-23 17:43:16 +00:00
Laurent Cozic
c01bc1c363 All: Added new, more secure encryption methods, so that they can be switched to at a later time 2020-01-22 22:01:58 +00:00
Laurent Cozic
6f8c634756 Tools: Add developer names to changelog 2020-01-22 20:33:43 +00:00
Alexander Pankratov
22a93994aa Translation: Update ru_RU.po (#2347) 2020-01-23 01:07:12 -05:00
Xaris Ar
e0013858c4 Translation: Update el_GR.po (#2340)
* Create el_GR.po (part1)

* Update el_GR.po

* Update el_GR.po (part 2)

* Update el_GR.po

* Finished Greek(el_GR) translation

Finished translating all texts.
Update el_GR.po (beta)

* Update el_GR.po

to meet requirements for Joplin 1.0.173

* Update locale.js

* Delete el_GR.po

* Create el_GR.po

* Update Greek Translation

* Update Greek Translation
2020-01-22 22:31:19 -05:00
Laurent Cozic
b6e0df57eb Desktop: Fixes #2352: undefined text was being displayed on top of notes in revision viewer 2020-01-22 17:32:21 +00:00
Laurent Cozic
be210233be Desktop, Mobile: Fixes #2339, Fixes #2343, Fixes #2345: Fixed issues with Katex and MultiMd table plugin 2020-01-22 17:16:37 +00:00
Carl Bordum Hansen
1a1a1d3841 Desktop: Fix Linux installation script (#2333) 2020-01-22 13:47:20 +00:00
Laurent Cozic
4283bbde7f Doc: Fixed changelog generation for API 2020-01-21 10:40:29 +00:00
Laurent Cozic
fba325f60e Doc: Fixed APIdoc 2020-01-21 09:44:46 +00:00
Laurent Cozic
fcd76dabac Update website 2020-01-21 09:42:27 +00:00
mic074b
f661cad6a3 More note searchbar enhancements.
Indicate selected match
Fade search result text
Ctrl-F selects input content upon repeat
2020-01-21 20:06:28 +11:00
mic074b
1faac68441 Merge branch 'enhance-search-box' into enhance-search-box-extras 2020-01-21 18:45:08 +11:00
Helmut K. C. Tessarek
e9366a0d41 Update translations 2020-01-20 19:11:57 -05:00
Laurent Cozic
953aa5d0b5 Electron release v1.0.178 2020-01-20 18:44:23 +00:00
mic074b
fc5782990f Improve no matches message. 2020-01-20 22:27:38 +11:00
mic074b
01163783ef Show number of matches and disable prev/next buttons when no matches. 2020-01-20 22:13:02 +11:00
mic074b
be19a92f59 Refactor. 2020-01-20 21:25:28 +11:00
Laurent Cozic
3fed1abc36 API: Add ability to search by folder or tag title 2020-01-20 02:19:57 +00:00
Alexander Teterkin
6973bf9331 Documentation: Added 'Yandex Disk' to the list of WebDAV-compatible services known to work with Joplin. (#2285)
* Add Yandex Disk to the list of WebDAV-compatible services

Yandex Disk (cloud storage by Yandex) supports WebDAV access and is known to work with Joplin.

* Add Yandex Disk to the list of WebDAV-compatible services

Added 'Yandex Disk' to the list of WebDAV-compatible services known to work with Joplin (now in correct alphabetical order).
2020-01-20 01:02:54 -05:00
Laurent Cozic
e8867fa0f1 Doc: Added CalebJohn as mentor on three ideas 2020-01-19 16:24:13 +00:00
Bart
d9c15b84d0 Desktop: when importing MD files create resources for local linked files (#2262)
* md importer: first pass import attachment resources with markdown files

* md importer: import resources from md - no unneeded saves, check if files exist, regex name

* md importer: test import of local files as resources, separate method for importing linked files, comment regex matching md tags

* md importer: move stateful regex to method scope, remove spurius await

* md importer: lint

* md importer: respond to PR comments: remove test nesting, test sample, check if path is dir, use shim.fsDriver

* md importer: use file-path methods for getting attachment path

* md importer: use extractImageUrls helper, test for file with zero links

* md importer: try catch around importLocalImages, improve test

* md importer: importing attached images cover case where link also appears elsewhere in doc

* md importer: only create 1 resource if note contains duplicate links, test

* md importer: remove log

* md importer: remove use of lodash
2020-01-19 15:39:38 +00:00
Helmut K. C. Tessarek
81876c7bf3 Desktop: Update Electron to 7.1.9 (#2314)
This is only a minor bump but several issues have been fixed since 7.1.5.

The most pressing one that we've experienced for a long time:

default button in dialog not working on macOS
https://github.com/electron/electron/issues/21633
2020-01-19 15:34:45 +00:00
mic074b
ce6c7c8783 Move cached data into searchbar component. 2020-01-19 11:18:52 +11:00
mic074b
fad2ff674e Refactor in response to review comments.
Cache the information at the source, remove state updates during render.
2020-01-19 10:51:15 +11:00
Laurent Cozic
1dd7727e97 Doc: Fixed GitHub icon 2020-01-18 15:06:35 +00:00
Laurent Cozic
fe0318584e Update website 2020-01-18 14:54:10 +00:00
Laurent Cozic
8508fe737b Doc: Added GitHub Sponsor icon 2020-01-18 14:53:49 +00:00
Laurent Cozic
c7a9e5f656 Merge branch 'master' of github.com:laurent22/joplin 2020-01-18 14:27:26 +00:00
Laurent Cozic
3e43fbce13 Doc: Fix GSoC doc 2020-01-18 14:27:21 +00:00
mic704b
b304e2ae1f Desktop: Fix bug in note tags display due to error in comparison of tag lists. (#2302) 2020-01-18 13:55:35 +00:00
lightray22
35f4ede11a Desktop: show completed date in note properties (#2292) 2020-01-18 13:53:59 +00:00
mic704b
65cbb6e388 Desktop: Maintain selection when non-selected note is deleted (#2290)
* Fix jump of focus following deletion action.

Applies to notes, folders and tags.

* Add tests for reducer item delete handling.

* Add comments.

* Clean up.
2020-01-18 13:53:00 +00:00
lightray22
960d7f84eb Desktop: Don't count completed to-dos in note counts when they are not shown (#2288)
* Desktop: don't count completed to-dos in note counts when they are not shown

* Desktop: review comments for commit 0383dcc

* Desktop: fix remaining lint issues with commit 1fe4685
2020-01-18 13:46:04 +00:00
mic704b
8a392e1c06 Desktop: Fixes #2254: Fix pdf export when mouse over non-selected note in notelist. (#2255) 2020-01-18 13:30:15 +00:00
Vaidotas Simkus
d9d75d6c71 Desktop, Cli: Replace note links with relative paths in MD Exporter (#2161)
* Replace linked Note ids by relative paths in MD Exporter.

* Added tests for the MD Exporter.

* Changed fs.readdirSync use for earlier Node version (v8)

In the previous commit the code used fs.readdirSync from Node v10 or
later. But since Joplin still uses v8, I changed the use of
fs.readdirSync to be in line with the earlier api.

* Updated readDirSync use for Node v10, which allows gets folder names too.

* Revert "Updated readDirSync use for Node v10, which allows gets folder names too."

This reverts commit 8f255db120861dd7773d99e1b63f4864d39594cf.
Because the Travis builds still use Node v8. This is fine as well, the
readdirSync returns the filenames in the directory.

* Added reservedNames param to findUniqueFilename
2020-01-18 13:16:14 +00:00
Laurent Cozic
69f9e38730 Doc: Improved test unit doc 2020-01-18 13:11:42 +00:00
Laurent Cozic
7f95186a97 Doc: Updated GSoC ideas and added section about abandoned pull requests 2020-01-18 13:08:23 +00:00
mic074b
b6db2bf2c5 Fix annoying flicker when entering first query character. 2020-01-18 14:16:12 +11:00
Laurent Cozic
6f976abf42 Doc: Added "Custom keyboard shortcuts" idea for GSoC 2020-01-17 10:53:53 +00:00
Laurent Cozic
d80ffeeba1 Doc: Update mentors for GSoC 2020-01-17 10:48:35 +00:00
mic074b
c856e8d9ac Refactor. 2020-01-17 17:13:28 +11:00
mic074b
6736bda429 Refactor. 2020-01-17 17:08:41 +11:00
mic074b
0a8f9163db Add colour hints to the local search bar. 2020-01-16 23:02:36 +11:00
zen-quo
e078de25f0 Translation: Update tr_TR.po (#2295) 2020-01-12 19:01:00 -05:00
Laurent Cozic
cd284f78ad Update website 2020-01-11 16:58:32 +00:00
Laurent Cozic
0a13c988fa Mobile: Fixes #1816: When creating a new note, it was not possible to focus the body text field 2020-01-08 17:42:28 +00:00
Laurent Cozic
b61bfd6ffe Android: Fixes #2270: Note files could become corrupted when using file system sync on certain Android versions 2020-01-08 18:57:40 +00:00
Laurent Cozic
fc61b474cd Clipper: Fixes #2252: Some pages that contain tables with only one cell would trigger an error 2020-01-08 18:35:41 +00:00
Laurent Cozic
bf25364333 Clipper: Fixes #2267: Fixed race condition when importing page that have multiple images with similar names 2020-01-08 18:21:13 +00:00
Laurent Cozic
bc7099d29b Desktop, Mobile: Fixed regression in HTML note rendering 2020-01-08 18:05:13 +00:00
Laurent Cozic
00c3ed715c Update PT translation 2020-01-07 15:44:54 +00:00
Caleb John
701b57de89 Fix casing typo for PluginAssetsLoader.js in gitignore (#2250)
* Fix casing typo for PluginAssetsLoader.js in gitignore

* Add change to eslintignore
2020-01-07 00:47:51 +00:00
Caleb John
e674d7d23b Desktop: Add option to disable auto-matching braces (#2251)
* Add option to disable auto-matching braces

* Only Make option desktop only
2020-01-06 22:27:37 +00:00
Devon Zuegel
4a2d9bb028 CLI: Upgrade sqlite (#2248)
* Upgrade sqlite

* Add info about sqlite installation to docs
2020-01-06 22:24:38 +00:00
Abijeet Patro
ae3a278ac4 Desktop: New: Display selected tags under a note title (#2217)
Follow up to #893

Now using middleware to set the tags when a note is selected

This avoids the ugly code in the NoteTextComponent where we determine
if tags are to be fetched, identify if they have been modified, fetch
them  and then dispatch an action to update the store which might
again re-render the component.

Also implements style related fixes from #1000

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
Fixes: #469
2020-01-06 21:23:22 +00:00
mic704b
42ada7123c Desktop: Add external editor actions to the note context menu. (#2214)
* Add external editor actions to the note context menu.

Also start up external editor on note double click.

These changes enhance user experience by placing the actions where
they feel natural.

* Remove double-click behaviour and change menu text.

Changes in response to review comments.

* Move handling of external editor actions to main screen from note text

This is to ensure correct behaviour even when the user launches the
action on a note in the list that is under the pointer, but not selected.

* Move external edit actions to NoteListUtils from MainScreen.

* Reconnect external edit action in main edit menu.
2020-01-06 21:16:39 +00:00
Laurent Cozic
6d9f73eef7 Improved integration of external renderer 2019-12-30 21:54:13 +01:00
Laurent Cozic
541372eb91 Merge branch 'master' of github.com:laurent22/joplin 2019-12-30 20:54:53 +01:00
Laurent Cozic
8d7d70bc13 Desktop: Fixed export to HTML, PDF and printing 2019-12-30 20:44:15 +01:00
Scott Bronson
e77cc18468 Documentation: Fix broken link (#2245)
The folder is `gsoc2020`, not just `gsoc`
2019-12-30 12:42:44 -05:00
Laurent Cozic
193978a8be Android release v1.0.315 2019-12-30 15:16:55 +01:00
Laurent Cozic
853ac0cca8 Electron release v1.0.177 2019-12-30 15:11:34 +01:00
Laurent Cozic
589f0803e6 Fixed Electron upgrade regressions 2019-12-30 15:10:43 +01:00
Laurent Cozic
fc67a44f95 Desktop: Fixed scrolling issue when clicking on anchor 2019-12-30 13:00:53 +01:00
Laurent Cozic
204365b2ae Tools: Fixed desktop build 2019-12-30 10:54:31 +01:00
Laurent Cozic
2a63ecef2a All: Extract note renderer to separate package (WIP) (#2206)
* Started updating to use external renderer package

* Added way to build renderer assets

* Done mobile compatilibty

* Upgrade joplin-renderer

* Added joplin-renderer package
2019-12-29 18:58:40 +01:00
2jaeyeol
1d660d7141 Translation: update ko.po (#2227)
* translate_korean

* translate_korean2
2019-12-29 11:20:54 +01:00
Ibrahim AHMED BACHA
69000c0fc5 Translation: update ar.po (#2231) 2019-12-29 08:52:41 +01:00
Rafael Cavalcanti
c8a0138b3b Desktop: Fixes #2122: Fix Goto Anything scrolling issue (#2199)
* Fix Goto scrolling (#2122)

* Better fix to Goto scrolling (#2122)

* Fix #2122: fix bottomItemIndex and top values
2019-12-28 22:53:21 +01:00
Marcus Hill
90de63e650 CLI: Add --export, --import, and --import-file flags to joplin config (#2179)
* Add --export, --import, and --import-file flags to joplin config

* Convert config --export/--import to work with JSON

* Remove unnecessary check in renderKeyValue
2019-12-28 22:48:34 +01:00
Laurent Cozic
6b6e17cbad Mobile: Display warning box when a resource cannot be downloaded 2019-12-28 20:50:06 +01:00
Laurent Cozic
071bd2b0ca Android release v1.0.314 2019-12-28 20:28:11 +01:00
Laurent Cozic
f74db06176 All: Better handling of resource download errors, and added resource info to sync status screen 2019-12-28 20:23:38 +01:00
Laurent Cozic
a6b3ddc7ed Android release v1.0.313 2019-12-28 18:58:04 +01:00
Laurent Cozic
4ff889d4ec Android: Added button to export profile to external SD card for debugging 2019-12-28 18:47:37 +01:00
Laurent Cozic
12b9f1b969 Merge branch 'master' of github.com:laurent22/joplin 2019-12-28 17:57:21 +01:00
Helmut K. C. Tessarek
59bb1015ab fix Nextcloud name (NextCloud -> Nextcloud) 2019-12-25 11:37:50 +01:00
oscaretu
f9c77171cf Translation: Update es_ES.po (#2211) 2019-12-23 12:32:23 +01:00
Ethan Chen
9628b64d3e Translation: Update zh_TW.po (#2215) 2019-12-23 12:30:41 +01:00
Laurent Cozic
d3f47a38b8 Update README.md 2019-12-20 21:47:06 +00:00
genneko
8111213691 Translation: Update ja_JP.po (#2210) 2019-12-20 11:46:32 +01:00
Laurent Cozic
a88ff902b4 Merge branch 'master' of github.com:laurent22/joplin 2019-12-19 15:19:29 +00:00
Helmut K. C. Tessarek
1e57e1e486 Translation: update es_ES.po
closes #2205
2019-12-19 12:59:17 +01:00
Joel Taylor
172afb0789 Cli: Update CliClient node dependency to 10+ (#2177) 2019-12-18 22:25:14 +00:00
Helmut K. C. Tessarek
5bfd1849c1 Desktop, Mobile: Update Katex to 0.11.1 (#2201)
* update Katex to 0.11.1

* add package-lock.json files
2019-12-18 22:23:32 +00:00
Helmut K. C. Tessarek
f61c9c93bb update firefox addon link
closes #2203
2019-12-18 18:02:58 +01:00
Laurent Cozic
b0efdb6ee8 Merge branch 'master' of github.com:laurent22/joplin 2019-12-18 16:05:02 +00:00
Laurent Cozic
888a9ddaf4 Desktop: Improved Nextcloud API error handling 2019-12-18 15:32:19 +00:00
Helmut K. C. Tessarek
d2482d6554 Translation: update de_DE.po 2019-12-18 14:55:43 +01:00
Helmut K. C. Tessarek
21cac248b3 Translation: update en_US.po 2019-12-18 14:09:08 +01:00
Laurent Cozic
ce7671151c Desktop: Remove useless React warnings from console 2019-12-18 11:49:44 +00:00
Helmut K. C. Tessarek
b77525e570 Update translations 2019-12-18 12:45:10 +01:00
Laurent Cozic
e93cc50d1c Translation: add Portuguese (pt_PT.po) (Thanks Diogo Caveiro) (#2194)
Author name: Diogo Caveiro
2019-12-18 12:42:49 +01:00
Laurent Cozic
c534305c7b Desktop: Fixes #2157: Prevent app from crashing when pressing focus shortcut from search bar 2019-12-18 11:16:13 +00:00
Laurent Cozic
797b71d903 Doc: Fixes #2187: Fixed API doc 2019-12-18 11:00:52 +00:00
Laurent Cozic
74fd9e1e9e All: Fixes #2091: Handle WebDAV servers that do not return a last modified date (fixes mail.ru) 2019-12-18 10:46:12 +00:00
Laurent Cozic
ff94a95589 Desktop: Fixes #2144: Fix notifications on Windows 7 2019-12-18 10:22:01 +00:00
Laurent Cozic
0f5192bf19 Tools: Display script line in translation files 2019-12-18 10:21:36 +00:00
Laurent Cozic
eabbbba0c7 Desktop: Fixed HTML export 2019-12-18 10:00:59 +00:00
Laurent Cozic
840cdf5512 Doc: Added troubleshooting section to BUILD.md for Windows development 2019-12-18 09:34:03 +00:00
Laurent Cozic
757a6854ab Desktop: Updated OneDrive login to remove webview dependency 2019-12-18 09:21:12 +00:00
Laurent Cozic
b16dd051f1 Merge branch 'master' of github.com:laurent22/joplin 2019-12-17 17:07:15 +00:00
Laurent Cozic
68e73b658a Desktop: Fixed dev tool support 2019-12-17 17:06:55 +00:00
Laurent Cozic
af5f301276 Update ideas.md 2019-12-17 14:51:25 +00:00
Laurent Cozic
2b9818a94d Merge branch 'master' of github.com:laurent22/joplin 2019-12-17 12:49:16 +00:00
Laurent Cozic
58200ecdb1 Desktop: Decrypt notes that are meant to be shared 2019-12-17 12:45:57 +00:00
Ladislav Benc
acaf22fa11 Doc: Fixing a couple typos (#2198) 2019-12-17 12:22:28 +00:00
Laurent Cozic
f60d6e0748 Desktop: Make it easier to view early errors when the app starts 2019-12-17 12:09:57 +00:00
Helmut K. C. Tessarek
ae9163e9bb add description for soft breaks to plugin section of markdown page
closes #2192
2019-12-17 12:55:46 +01:00
Laurent Cozic
cad6b7971f Desktop: Upgrade to Electron 7 2019-12-17 11:08:55 +00:00
Laurent Cozic
ee38590c35 Allow printing and creating PDF from iframe 2019-12-17 09:44:48 +00:00
Laurent Cozic
f10695fb8f Desktop: Render note using iframe instead of deprecated webview 2019-12-17 00:45:27 +00:00
Laurent Cozic
b44ecc1958 Tools: Added build scripts for Windows 2019-12-17 00:40:49 +00:00
Laurent Cozic
931e7a7795 Improved export to HTML when note is already HTML 2019-12-17 00:40:25 +00:00
Laurent Cozic
df85bb189d Update website 2019-12-16 23:22:46 +00:00
Laurent Cozic
27e1f53b5f Doc: More clean up for GSoC 2019-12-16 23:22:28 +00:00
Laurent Cozic
266ddedaef Update website 2019-12-16 23:19:45 +00:00
Laurent Cozic
44dd327d22 Doc: More clean up for GSoC 2019-12-16 23:18:23 +00:00
Laurent Cozic
13be56a2e3 Doc: Moved all GSoC ideas to single document 2019-12-16 22:53:45 +00:00
Laurent Cozic
5d0ba460ae Update website 2019-12-16 17:22:44 +00:00
Laurent Cozic
6988b3accb Doc: Added idea: Multi-profile support, for GSoC 2019-12-16 17:21:35 +00:00
Laurent Cozic
3e2676a8c6 Doc: Removed number from GSoC ideas 2019-12-16 16:51:36 +00:00
Laurent Cozic
0f88c947f1 Doc: Cleaned up GSoC projects and added spec for OCR 2019-12-16 16:47:06 +00:00
Laurent Cozic
07b175c2ee Revert "Desktop: Upgrade to Electron 5"
This reverts commit 37dbb81425.
2019-12-15 19:05:44 +00:00
Laurent Cozic
6132cf2128 Desktop, Cli: Allow exporting a note as HTML 2019-12-15 18:41:13 +00:00
Laurent Cozic
37dbb81425 Desktop: Upgrade to Electron 5 2019-12-14 23:43:34 +00:00
Laurent Cozic
c1028ec2cf Update website 2019-12-14 10:57:05 +00:00
Laurent Cozic
f98dc4e576 Update website 2019-12-14 10:56:13 +00:00
Laurent Cozic
da044960f9 Tools: Improved TypeScript config 2019-12-14 10:55:58 +00:00
Laurent Cozic
03522b48a5 CliClient: Fixed regression following recent PR 2019-12-14 10:55:42 +00:00
Laurent Cozic
1b31525773 Doc: Update Nextcloud app doc 2019-12-14 10:36:30 +00:00
Laurent Cozic
64a1408d6c Electron release v1.0.176 2019-12-14 01:28:50 +00:00
Laurent Cozic
3a5e68fca0 Minor changes for TypeScript 2019-12-14 01:28:37 +00:00
Laurent Cozic
48ce788118 Merge branch 'master' of github.com:laurent22/joplin 2019-12-13 22:38:39 +00:00
Laurent Cozic
34f0a2951a Desktop: Add ability to share a note publicly using Nextcloud (#2173)
* Moved button row to separate component file and started Sharing dialog

* Adding Sharing dialog

* Applied "npx react-codemod rename-unsafe-lifecycles"

* More UI

* Tools: Improved TypeScript integration

* Improved share dialog

* Tools Added support for translation validation in CI, and added support for plural translations

* Improved UI and sharing workflow

* Share workflow

* Cleaned up and improved sharing config error handling

* Fixed build scripts and doc for TypeScript

* Run linter
2019-12-13 01:16:34 +00:00
Laurent Cozic
66546418e3 Merge branch 'master' of github.com:laurent22/joplin 2019-12-13 00:53:57 +00:00
Devon Zuegel
611be7c0fa Desktop: Allow for custom Joplin theme and Ace editor styles (#2099)
* Delete unused file

* Implement CssUtils

* Inject custom CSS styles

* Add info about custom CSS styles to README

* Add note that ElectronClient/app/app.js is generated

* Add support for Setting.TYPE_BUTTON

* Add buttons in Preferences to open custom CSS files

* Swap custom CSS filenames

* Swap custom CSS filenames

* Wrap "Edit" with translation fn

* Incorporate PR feedback from @laurent22

* Add openOrCreateFile to Settings

* Move openOrCreateFile to shim

* Removing header for now - see https://github.com/laurent22/joplin/pull/2099#discussion_r353120915
2019-12-13 00:40:58 +00:00
Helmut K. C. Tessarek
4f3e031f4f Update website 2019-12-12 19:34:51 +01:00
Laurent Cozic
554c46182a Reverted sv translation update has it is invalid 2019-12-11 10:16:19 +00:00
Laurent Cozic
b5d5d02a9c Tools Added support for translation validation in CI, and added support for plural translations 2019-12-10 21:10:47 +00:00
Laurent Cozic
4640b65b85 finished renaming 2019-12-10 15:23:43 +00:00
Laurent Cozic
1615c6bdc8 renaming 2019-12-10 15:23:29 +00:00
Laurent Cozic
c003b8d32d iOS: Update application icon 2019-12-09 16:56:01 +00:00
Alexey
3a1f924fb1 Translation: Update ru_RU.po (#2164)
Filled untranslated string and correct some sentencies.
2019-12-09 06:38:57 -05:00
githubaccount073
583460c0a8 Translation: Update sv.po (#2163)
Added missing translations
Made adjustments to previous translations.
2019-12-09 06:38:03 -05:00
Laurent Cozic
1550a52002 iOS v10.0.41 2019-12-08 12:08:02 +00:00
Laurent Cozic
9bd3bc8404 Fixed clipper icons 2019-12-08 10:22:10 +00:00
Laurent Cozic
8c1d13b364 Android release v1.0.312 2019-12-08 10:09:25 +00:00
Laurent Cozic
7ad407a8c8 Electron release v1.0.175 2019-12-08 10:04:35 +00:00
Laurent Cozic
bd02704384 Merge branch 'master' of github.com:laurent22/joplin 2019-12-08 10:01:04 +00:00
Laurent Cozic
03831babcd Update README.md 2019-12-06 09:44:03 +00:00
Laurent Cozic
cfe61bbb9b Merge branch 'master' of github.com:laurent22/joplin 2019-12-05 10:06:17 +00:00
Helmut K. C. Tessarek
a3bfb19059 update JoplinLetter.svg (#2154) 2019-12-05 09:45:12 +00:00
Helmut K. C. Tessarek
e5f116fd2d Clipper: update icons (#2152)
* update clipper icons

* change dev color to grey
2019-12-05 09:44:46 +00:00
Helmut K. C. Tessarek
a7f3a70ba4 Desktop: Better icon for about window (#2150) 2019-12-05 09:44:16 +00:00
Helmut K. C. Tessarek
1607a57fb7 macOS: Update icons (#2147)
+---------------------+--------------------+--------------+
|      filename       | resolution, pixels | density, PPI |
+---------------------+--------------------+--------------+
| icon_16x16.png      | 16x16              |           72 |
| icon_16x16@2x.png   | 32x32              |          144 |
| icon_32x32.png      | 32x32              |           72 |
| icon_32x32@2x.png   | 64x64              |          144 |
| icon_128x128.png    | 128x128            |           72 |
| icon_128x128@2x.png | 256x256            |          144 |
| icon_256x256.png    | 256x256            |           72 |
| icon_256x256@2x.png | 512x512            |          144 |
| icon_512x512.png    | 512x512            |           72 |
| icon_512x512@2x.png | 1024x1024          |          144 |
+---------------------+--------------------+--------------+
2019-12-05 09:43:22 +00:00
Laurent Cozic
ecd7690743 Tools: Adding TypeScript config 2019-12-04 21:06:22 +00:00
Laurent Cozic
47a2087a91 Updating icons 2019-12-04 19:01:08 +00:00
Laurent Cozic
7653764403 Doc: box.com no longer supports WebDAV 2019-12-04 00:00:02 +00:00
Laurent Cozic
b7c8d5b9b1 Android: Updated icon and converted it to new Adaptive Icon format 2019-12-03 17:28:32 +00:00
Laurent Cozic
fdac132905 Updating icons 2019-12-02 21:23:30 +00:00
Laurent Cozic
60b993412e Doc: Updated website icon and cleaned up design a bit 2019-12-02 20:41:26 +00:00
Laurent Cozic
697c914c77 Merge branch 'master' of github.com:laurent22/joplin 2019-12-03 15:52:01 +00:00
Devon Zuegel
8c17ecb3d9 Desktop: Add highlight_mark token to Ace editor rules (#2100)
* Added highlight_mark token to Ace editor rules

* Fix edge case for highlight_mark Ace rule

* Add ==mark== rule only if plugin is enabled

* Rm temporary highlight class
2019-12-03 11:12:47 +00:00
Laurent Cozic
4c93121102 Added GSoC 2020 banner 2019-12-02 10:55:45 +00:00
Helmut K. C. Tessarek
5efe9b99c2 fix missing double quotes in nb_NO.po 2019-12-01 20:26:10 -05:00
Mats Estensen
3249763091 Translation: Update nb_NO.po (#2135)
* Update norwegian

* fix typo
2019-12-01 20:15:42 -05:00
Laurent Cozic
60964a4224 Tools: Removed uneeded untranslatedCount prop from translation index 2019-11-29 18:51:55 +00:00
Laurent Cozic
805a5399b5 All: Fixes #2126: Restaured translations that had been accidentally deleted 2019-11-29 15:47:12 +00:00
Laurent Cozic
0a39e4ccb0 Merge branch 'master' of github.com:laurent22/joplin 2019-11-29 15:40:20 +00:00
Laurent Cozic
f8cb908e0f Tools: Added check on translation builder to prevent it from deleting too many translations 2019-11-28 18:27:38 +00:00
Laurent Cozic
d2aceed34e Security: Upgraded packages to fix security issues on clipper 2019-11-28 17:33:54 +00:00
Laurent Cozic
e6d9d83d92 Desktop: Fixes #1826: Fixed warning boxes in solarized theme 2019-11-28 17:09:52 +00:00
Laurent Cozic
1a1c87b5c4 Update Turkish translation (Thanks Hüseyin Fahri Uzun) 2019-11-27 11:02:30 +00:00
exprez135
5bcec583bb Finish translation of es_ES.po and standardize quotation marks format to guillemets (#2125) 2019-11-26 17:39:40 -05:00
Christiaan de Die le Clercq
692606292f Translation: Update nl_NL.po (#2123)
Noticed a small typo when using the application
2019-11-26 17:38:51 -05:00
Helmut K. C. Tessarek
1782e55c66 update the resource icon (for internal/local links) 2019-11-22 18:12:39 -05:00
Laurent Cozic
707828ca76 All: Fixes #2117: Prevent synch from happening if target dir could not be created, in local sync 2019-11-21 19:54:09 +00:00
Laurent Cozic
5b0a817d69 Update stale.yml 2019-11-21 09:31:24 +00:00
Laurent Cozic
23e77efc83 Android release v1.0.311 2019-11-20 20:57:25 +00:00
Laurent Cozic
03c7368d71 iOS v10.0.40 2019-11-20 20:48:37 +00:00
Laurent Cozic
fdc80f0663 Update translations 2019-11-20 19:06:45 +00:00
Laurent Cozic
4e708ea021 Doc: More GSoC 2019-11-20 19:01:01 +00:00
Laurent Cozic
49898d01b5 Doc: Added GSoC to website 2019-11-20 18:47:32 +00:00
Laurent Cozic
8036923aca All: Added more logging for resource fetching to try to debug issue 2019-11-20 18:47:18 +00:00
Dominik Bamberger
76c8f777ca Move variable declaration before its first use. (#2109)
* Move variable declaration before its first use.

* Remove trailing whitespace
2019-11-20 18:19:33 +00:00
Marcus Hill
e84bafd034 All: Resolves #2097: Add warning message when user tries to upload a file 10MB or larger (#2102) 2019-11-20 18:18:58 +00:00
PackElend
37fc42eb73 Doc: GsoC first public draft of documentation (#2092)
* GSoC root file

This is the root file for the Google Summer of Code program

* Fixed TOC

* Introduction to GSoC with Joplin

The first draft cloned from https://community.kde.org/GSoC

* Joplin's Application at GSoC template

Cloned from https://wiki.openstreetmap.org/wiki/Google_Summer_of_Code/2019/Organisation_application

* GSoC 2019, idea #1: deeper Nextcloud integration

* GSoC 2019, idea #2: sharing notes

* GSoC 2019, idea #2: tag handling

* GSoC 2019, idea #4: search improvements

* GSoC 2019, idea #5: per note password protection

* Update GSoC_Idea#1.md

* Update GSoC_Idea#2.md

* Rename GSoC_Idea#2.md to GSoC_Idea#2_sharing.md

* Rename GSoC_Idea#1.md to GSoC2019_Idea#1_Nextcloud.md

* Rename GSoC_Idea#2_sharing.md to GSoC2019_Idea#2_sharing.md

* Update and rename GSoC_Idea#3.md to GSoC2019_Idea#3_tagging.md

* Rename GSoC_Idea#4.md to GSoC2019_Idea#4_Search.md

* Rename GSoC_Idea#5.md to GSoC2019_Idea#5_Password per Note.md

* Update GSoC2019_Idea#1_Nextcloud.md

* Create GSoC2019.md

cloned from https://community.kde.org/GSoC/2019/Ideas

* Rename Introduction.md to GSoCIntroduction.md

* Rename GSoCIntroduction.md to GSoC_Introduction.md

* Rename Application.md to GSoC_Application.md

* first draft of a public introduction and project idea page, plus first (filled) template for ideas

* added idea

* started to update org details

* Delete GSoC_Application.md

moved to forum

* Update summer_of_code.md

put the template in a <details> block. little improvements where to publish ideas and applications

* Update summer_of_code.md

put application in quote
2019-11-20 18:17:51 +00:00
Laurent Cozic
a0a89112bd Merge branch 'master' of github.com:laurent22/joplin 2019-11-20 18:17:08 +00:00
Laurent Cozic
4842f83aae All: Fixes #2088: Handle rare case when notebook has a parent that no longer exists, which causes a crash when sorting 2019-11-20 18:14:11 +00:00
taw00
69b185ff5e Documentation: correct and expand the markdown instructions for a link (#2106)
* correcting and expanding the markdown instructions for a link
- "some content" in `[some content](https://somelink/)` is called the
    content of an entity (or alt text for an image link)
- "some title" in this example is the the title element of the
    entity: `[some content](https://somelink/ "some title")`

* link description: Fixed a typo, restructured a line break I screwed up, and I cleaned up the language a bit
2019-11-20 12:09:03 -05:00
vicoutorama
d8c2f0cbba Translation: Update pt_BR.po (#2116)
Done some updates to pt BR translation. Hope it helps!
2019-11-19 21:03:29 -05:00
genneko
5b05f22476 Translation: Update ja_JP.po (#2115) 2019-11-19 21:02:27 -05:00
rikanotank1
8012d1fcfc Translation: Update zh_CN.po (#2108)
Translated some theme part into chinese
2019-11-19 15:19:02 -05:00
Laurent Cozic
40753296c4 iOS: Fixes #2103: Fix issue when WebDAV server redirects certain API calls 2019-11-19 09:09:01 +00:00
Laurent Cozic
7baeb223f3 Update markdown.md 2019-11-18 10:26:07 +00:00
Laurent Cozic
affacf472f Doc: Fix Esperanto flag 2019-11-18 08:55:23 +00:00
Laurent Cozic
896925ca49 Doc: Added link on website to improve doc 2019-11-18 08:49:01 +00:00
Laurent Cozic
78628c0f42 Doc: Switching to Fork Awesome 2019-11-18 08:39:37 +00:00
Laurent Cozic
ee650c1ef4 Doc: Switching to Fork Awesome 2019-11-18 08:31:17 +00:00
Laurent Cozic
5b65fae49d All: Improved logging during sync to allow finding bugs more easily 2019-11-13 18:54:54 +00:00
barbowza
2d5d8ceb1d Desktop: Allow Electron debugging flag (#2084)
* Add check for Electron's cli arg --remote-debugging-port and discard it to prevent cli arg parser raising Unknown flag exception.

* Jump to next iteration once arg processed

* Allow only the strict form of flag as --x=y
2019-11-13 21:38:09 +00:00
Tomáš Bambas
de214c8695 Translation: update Czech cs_CZ.po (#2086) 2019-11-13 16:33:44 -05:00
Laurent Cozic
ca2446aef0 Update website 2019-11-12 18:21:28 +00:00
Laurent Cozic
0ca96ee8be Electron release v1.0.174 2019-11-12 17:56:59 +00:00
Laurent Cozic
0c82c108ec Update translations 2019-11-12 17:55:58 +00:00
Laurent Cozic
15f09ef169 Revert "Desktop: Stop watching external edits when closing editor (#1981)"
Due to this issue:

https://discourse.joplinapp.org/t/joplin-version-1-0-173/4232/7

This reverts commit 0eb51e6bb0.
2019-11-12 17:51:57 +00:00
Laurent Cozic
45cca9e002 Desktop: Fixes #2079: Do not crash when a notebook parent does not exist 2019-11-12 17:50:48 +00:00
Laurent Cozic
76ecfd0234 Merge branch 'master' of github.com:laurent22/joplin 2019-11-12 16:16:52 +00:00
Laurent Cozic
927d46b2e4 Fix tests 2019-11-12 16:16:39 +00:00
Caleb John
3353598041 Desktop, Mobile: Fix scaling of inline svg resource icons (#2075)
* Fix scaling of inline svg resource icons

* prevent link icons from repeating
2019-11-12 16:02:42 +00:00
Xaris Ar
e0b7cbd70b Update Greek Translation (#2080)
* Create el_GR.po (part1)

* Update el_GR.po

* Update el_GR.po (part 2)

* Update el_GR.po

* Finished Greek(el_GR) translation

Finished translating all texts.
Update el_GR.po (beta)

* Update el_GR.po

to meet requirements for Joplin 1.0.173

* Update locale.js
2019-11-12 16:01:56 +00:00
barbowza
21d06ad9a6 Tools: Optional open dev tools in Developer Mode (#2083)
* Require --open-dev-tools along with --env dev in command line options to make opening of Dev Tools optional when in Developer mode.

* Restore original lines then comment out the call to openDevTools
2019-11-12 16:00:44 +00:00
Helmut K. C. Tessarek
9e227200af Clipper release v1.0.19 2019-11-11 14:29:30 -05:00
Helmut K. C. Tessarek
bac546c090 CLI v1.0.150 2019-11-11 14:21:07 -05:00
Laurent Cozic
058b6265a6 Merge branch 'master' of github.com:laurent22/joplin 2019-11-11 09:43:42 +00:00
Laurent Cozic
d4234b8921 ios-v10.0.39 2019-11-11 09:43:24 +00:00
Laurent Cozic
18762cd4d5 Desktop: Show note count by default 2019-11-11 08:44:54 +00:00
Laurent Cozic
9a2a223650 Update website 2019-11-11 08:33:56 +00:00
Laurent Cozic
a0ad2b24b1 Electron release v1.0.173 2019-11-11 08:22:48 +00:00
Laurent Cozic
211c02c7de Disable test units when releasing version 2019-11-11 08:22:31 +00:00
Laurent Cozic
a3279ab164 Electron release v1.0.172 2019-11-11 07:59:29 +00:00
Laurent Cozic
d0ce79d81b Update website 2019-11-11 07:57:33 +00:00
Laurent Cozic
e896be48f0 Android release v1.0.310 2019-11-11 07:22:20 +00:00
Laurent Cozic
a806d753c4 Electron release v1.0.171 2019-11-11 07:16:33 +00:00
Helmut K. C. Tessarek
ab4fd9ed53 Update translations 2019-11-11 01:46:03 -05:00
Diego Erdody
9c98fb5312 Desktop: Add new setting to show note counts for folders and tags (#2006)
* Adding node counts for folders and tags

* Add unit tests

* Fix count update when the tag list for a note is updated

* Right align note counts and remove from the settings screen

* Folder note count calculation update to include descendants

* Update Setting.js

* Change count style and fix click on counts

* Fix tag/folder count update on delete/add note

* Review updates
2019-11-11 06:14:56 +00:00
Laurent Cozic
c0dd8d0332 Merge branch 'master' of github.com:laurent22/joplin 2019-11-07 22:38:36 +00:00
Laurent Cozic
60a1f96b4f Desktop, Mobile: Fixes #2030: Fix handling of URLs that contain single quotes 2019-11-07 22:38:22 +00:00
Helmut K. C. Tessarek
40dfb730dc we do not want localization for logging output
/ref https://discourse.joplinapp.org/t/message-in-log-file-translated-by-mistake/4198?u=tessus
2019-11-07 16:35:04 -05:00
Laurent Cozic
4e72a8f3a5 Clipper: Fixes #2034: Better handling of HTML minifying error with fallback to non-minified HTML 2019-11-07 20:32:11 +00:00
Laurent Cozic
3da32f007e Clipper: Fixes #2015: Fix issue with certain PRE code blocks 2019-11-07 20:06:33 +00:00
Laurent Cozic
4af8bb8e8d Clipper: Fixes #1990: Clipper was not saving page URL when taking screenshot 2019-11-07 18:12:14 +00:00
Laurent Cozic
a6f190766c Clipper: Upgrade packages to fix security issue 2019-11-07 18:10:19 +00:00
Shane Kilkelly
fa3f0d2071 Desktop: Resolves #1298: Add keyboard modes to editor (vim, emacs) (#2056)
* Add keyboard modes to editor (vim, emacs, default)

This adds a new option to settings, and then sets the
appropriate keyboard handler in the ace editor.

The "default" option is equivalent to the old keyboard
behaviour.

* Remove stray console.log

* Move the keyboard-mode setting to the general section

* Change `keyboardMode` setting to `editor.keyboardMode`
2019-11-06 21:51:08 +00:00
boring10
8d6cfdc292 Desktop: Fixes #1570: Prevent horizontal scrolling on Linux when a scrollbar is present in note list (#2062)
* Prevent horizontal scrolling on Linux when a scrollbar is present in the note list.

* max-width usage specifically to target Linux horizontal scroll problem.
2019-11-06 21:46:26 +00:00
Helmut K. C. Tessarek
48f0c1c37b All: Resolves #2042: Set user-agent header to Joplin/1.0 (#2064)
closes #2042
2019-11-06 09:54:16 +00:00
Christian Moritz
17584b52af CLI: update sharp tp v0.23.2 (for node 13 compatibility) (#2063) 2019-11-06 09:52:48 +00:00
Caleb John
c05bc899eb Desktop, Mobile: Added link resource icon (#2035)
* Add forkawesome icons

* Add resource icon for specific filetypes

* Ignore resource link styling on mobile

* whtiespace

* render txt icons and adjust icon sizes

* Replace fork-awesome font with inline svg so icons work on mobile

* Add comment describing the source of resource icons
2019-11-05 21:41:36 +00:00
Laurent Cozic
c9f6ce7496 Merge branch 'master' of github.com:laurent22/joplin 2019-11-05 17:16:43 +00:00
Laurent Cozic
67d2c454ee Desktop: Resolves #2031: Prevent window from being shown on startup when it should be hidden in tray 2019-11-05 17:03:24 +00:00
Helmut K. C. Tessarek
83c3c027d0 Desktop, Mobile: Fix TOC with special characters (#2052) 2019-11-05 13:18:05 +00:00
genneko
3cac187023 Translation: Update ja_JP.po (#2061) 2019-11-05 00:30:14 -05:00
Helmut K. C. Tessarek
3800b0bf47 Update de_DE.po 2019-11-04 19:07:56 -05:00
Helmut K. C. Tessarek
41b2eb8871 Update translations 2019-11-04 19:02:39 -05:00
Helmut K. C. Tessarek
bc84cdda7d Translation: pt_BR.po (#2060)
Translation: pt_BR.po
2019-11-04 18:47:51 -05:00
Marton Paulo
6d77394196 Translation: add Esperanto language (eo.po) (#2054)
* Add Esperanto language

* Update Esperanto language to 40% completed

* Update Esperanto language to 51% completed
2019-11-04 18:47:05 -05:00
Marton Paulo
968bba4d8e Updated Brazilian Portuguese language to 100% complete 2019-11-04 18:41:02 -05:00
Helmut K. C. Tessarek
cdd8090f33 Update de_DE.po 2019-11-04 15:40:43 -05:00
Helmut K. C. Tessarek
1be26e4497 Update web site 2019-11-02 09:47:19 -04:00
Laurent Cozic
cc51ba4f90 Tools: Upgraded jasmine and made it easier to filter tests 2019-11-02 10:19:24 +00:00
Laurent Cozic
85984109b5 Merge branch 'master' of github.com:laurent22/joplin 2019-11-01 22:44:50 +00:00
Laurent Cozic
689a12cdfb Cli: Fixes #2039: Handle paths with spaces for text editor 2019-11-01 22:42:05 +00:00
Laurent Cozic
abd74db112 Doc: Removed Hacktoberfest 🎃 banner 2019-11-01 13:20:35 +00:00
m-svo
cb06dab16f fix typo in install_and_update.sh (#2051) 2019-11-01 11:28:25 +00:00
Laurent Cozic
d2a7e46c1a Fix tests 2019-10-31 09:55:39 +00:00
Laurent Cozic
2997b0f2c4 Renamed 'layout' setting to 'layoutButtonSequence' 2019-10-31 08:47:45 +00:00
Subodh Dahal
f450ef09cc Desktop: Resolves #1900: Allow selecting what views should be available from the Layout button (#2028)
* Added options for selecting layout

* Toggle through the layouts based on config

* Used redux state for getting layout settings

* Removed duplicated strings for layout options

* Moved option for selecting layouts to "View" menu
2019-10-31 08:42:17 +00:00
aerotog
316746605e Desktop: Fixes #1790: Stop print command from resetting theme (#1999) 2019-10-31 08:33:40 +00:00
Laurent Cozic
5522d11eed Merge branch 'master' of github.com:laurent22/joplin 2019-10-31 07:25:39 +00:00
Helmut K. C. Tessarek
67266af1ae fix layout issue introduced by #1991 2019-10-30 16:59:32 -04:00
Laurent Cozic
273c0f432c Desktop: Fixed attachment markup when importing ENEX files as HTML so that it works in mobile too 2019-10-30 18:23:37 +00:00
Laurent Cozic
d346cdb897 Added Bosnian language and cleaned up translations 2019-10-30 18:12:06 +00:00
Fernando K
57a4b48c9b Desktop, Mobile: Resolves #2043: Add <kbd> tag support (#2044) 2019-10-30 15:43:58 +00:00
Daniel Landau
c3b1018929 Desktop: Resolves #215: Fill X primary selection from the editor on text selection (#2029)
This fixes the Joplin->"other apps" half of
https://github.com/laurent22/joplin/issues/215.
2019-10-30 15:40:59 +00:00
Laurent Cozic
a2ba64ccf5 Merge branch 'master' of github.com:laurent22/joplin 2019-10-30 13:56:59 +00:00
Helmut K. C. Tessarek
26d91e355a Mobile: Show alarm in correct date and time format (#2026) 2019-10-30 10:24:06 +00:00
Stephanie Foskitt
7bf394d8d5 Desktop: Resolves #1918: Allow custom CSS when printing (#2014)
* Sets `useCustomCss` default to "true".   Updates README.md for reference to Custom CSS.

* Reverse changes to  and .  Correct the spacing in .
2019-10-30 10:21:58 +00:00
Helmut K. C. Tessarek
cdf6f9c436 Desktop, Mobile: Resolves #1953: Update Markdown plugins: toc-done-right, anchor (#2005)
This change fixes a few issues with the toc plugin.
It now allows to set inline options. e.g. to set the max toc depth.

1. set toc depth to 2 levels

```
$<toc{"level":[1,2]}>
```

2. set toc depth to 3 levels and use an ordered list

```
$<toc{"level":[1,2,3],"listType":"ol"}>
```

/ref https://github.com/nagaozen/markdown-it-toc-done-right/issues/16

---

fixes #1953
fixes #1843
fixes https://discourse.joplinapp.org/t/set-depth-of-toc/2899
2019-10-30 10:18:31 +00:00
Helmut K. C. Tessarek
dece5d8de7 Desktop: Resolves #1903: Add Nord theme (#2004)
code by vzsky (PR was abandoned)
closes #1903
2019-10-30 09:55:45 +00:00
Laurent Cozic
33b8da98af Clean up 2019-10-30 09:54:32 +00:00
Hanna Bennett
0386534b3a CLI: Resolves #1974: Add command to list all tags for a note (#2003)
* Add command to list tags associated with a given note

* Update description

* Fix autocompletion to do notes instead of tags when tag-command is notetags
2019-10-30 09:43:47 +00:00
Tommy Bergeron
885858dcb4 Desktop: Resolves #1988: Add menu item to toggle note list (#1991)
* Add menu item to toggle note list #1988

* Hiding the noteList now fully works + standardized casing for noteList #1988

* hiding verticalResizer to fully hide note list and its extra border #1988

* curly braces on the same line #1988

* fa-tasks is "less" worse as an icon for toggle note list #1988

* liking this icon a whole lot more

* removed useless width tweak
2019-10-30 09:40:33 +00:00
Laurent Cozic
8c5d82fab2 Update CONTRIBUTING.md 2019-10-30 09:11:07 +00:00
Laurent Cozic
c683c1b8ec Doc: Added link to good-first-issue tag 2019-10-30 09:06:57 +00:00
Laurent Cozic
cde5aa9b06 Merge branch 'master' of github.com:laurent22/joplin 2019-10-29 11:08:48 +00:00
luzpaz
d3ba6798d7 Doc: Fix documentation and source comment typos (#2037)
* Misc. typo and whitespace fixes

Found via `codespell -q 3 -S *.po,*.pot,./ElectronClient/app/locales,./ReactNativeClient/locales,./CliClient/locales -L adresse,ba,fonction,te,whet`

* Revert a previous change
2019-10-29 09:02:42 +00:00
Helmut K. C. Tessarek
1f42c10c2a Update translations 2019-10-28 21:18:18 -04:00
exponentactivity
14f6108e57 Translation: update Danish (da_DK.po ) (#2033) 2019-10-28 21:00:43 -04:00
Helmut K. C. Tessarek
9512a08810 Update web site 2019-10-28 20:26:19 -04:00
Helmut K. C. Tessarek
78b8648945 add FAQ entry on how to restart Joplin on Windows 2019-10-28 20:22:45 -04:00
Laurent Cozic
71e01e5566 Cli: Handle special shortcuts such as Ctrl+H 2019-10-28 20:10:03 +00:00
Laurent Cozic
01614b5a13 All: Resolves #2002: Handle WebDAV server with empty XML namespaces 2019-10-28 19:15:18 +00:00
Laurent Cozic
7153c06e88 Api: Fixes #2018: Fixed error handling when getting resources of a note that does not exist 2019-10-28 19:02:29 +00:00
Laurent Cozic
30969f8ab6 Desktop: Fixes #1867: Fix scrolling issue when clicking on internal link 2019-10-28 18:56:38 +00:00
Laurent Cozic
19f9c4f540 Desktop: Fixes #2008: Open links in external browser from revision view 2019-10-28 18:47:23 +00:00
Laurent Cozic
5b5e07d4dc Merge branch 'master' of github.com:laurent22/joplin 2019-10-28 18:19:49 +00:00
Laurent Cozic
4ab1fb3ec5 Not needed 2019-10-23 16:17:40 +01:00
abonte
9dedb832fc Translation: update Italian (it_IT.po) (#2009) 2019-10-20 03:07:40 -04:00
Alex Devero
b8b487991d Translation: update Czech cs_CZ.po (#2007) 2019-10-18 06:00:42 -04:00
Laurent Cozic
f10ba28e0c Update lock.yml 2019-10-18 11:32:23 +02:00
Helmut K. C. Tessarek
22398e69c5 Desktop: Add context menu and menu item to create sub-notebook (#1984)
* add context menu and menu item to create sub-notebook

closes #1978 (create sub-notebook by right-clicking on notebook)

* simplify code, remove async
2019-10-17 22:41:13 +02:00
Caleb John
0eb51e6bb0 Desktop: Stop watching external edits when closing editor (#1981)
* Stop watching external edits

* move onClose to options

* Wrap openExternal in promise

* More specific error with locale

* Removed localization of external edit error
2019-10-17 22:40:27 +02:00
genneko
9436075fdf Translation: Update ja_JP.po Japanese (#2000)
* Translate new strings.
* Improve existing strings.
2019-10-17 00:22:13 -04:00
Woosuk Park
409494afbb Translation: update Korean Langauge (ko.po) (#1989)
* Translation - Korean Langauge

Some change of Korean Language

* Translation - Korean Langauge

Some change of Korean Language
2019-10-16 19:47:47 -04:00
Helmut K. C. Tessarek
a544ebd451 update translations 2019-10-16 19:25:55 -04:00
Xaris Ar
8350a6cc12 Translation: new language Greek (el_GR) (#1997)
* Create el_GR.po (part1)

* Update el_GR.po

* Update el_GR.po (part 2)

* Update el_GR.po

* Finished Greek(el_GR) translation

Finished translating all texts.
Update el_GR.po (beta)
2019-10-16 19:15:55 -04:00
Helmut K. C. Tessarek
b5e7dc5304 Update de_DE.po 2019-10-16 19:07:38 -04:00
Helmut K. C. Tessarek
a11171d73a update translations 2019-10-16 18:14:43 -04:00
Laurent Cozic
4706abbc06 Android release v1.0.309 2019-10-16 23:59:46 +02:00
Laurent Cozic
58b307ba02 Mobile: Resolves #1998: Allow selecting camera ratio and fixed camera view aspect ratio. Also made camera type persistent. 2019-10-16 23:52:22 +02:00
Laurent Cozic
3281ab05b1 Merge branch 'master' of github.com:laurent22/joplin 2019-10-15 00:04:37 +02:00
Laurent Cozic
3a32e79001 Doc: Moved API doc to generation script 2019-10-15 00:04:23 +02:00
Helmut K. C. Tessarek
d91b3624e9 Desktop, Mobile: Add typographer support (#1987)
* add typographer support

* add info to readme/markdown.md
2019-10-15 00:01:58 +02:00
Helmut K. C. Tessarek
d02ced59f8 GitHub: Lock issues that have been closed as stale after 1 day 2019-10-14 17:35:54 -04:00
Laurent Cozic
ba3abf7c4c Update website 2019-10-14 23:28:24 +02:00
Laurent Cozic
cc24398e71 Doc: Add mhchem doc 2019-10-14 23:28:00 +02:00
Laurent Cozic
27d0a8f6e7 GitHub: Lock issues that have been closed as stale after 1 day 2019-10-14 15:44:17 +02:00
Laurent Cozic
4788c46e2c Merge branch 'master' of github.com:laurent22/joplin 2019-10-14 10:35:21 +02:00
Laurent Cozic
0370c7b627 All: Allow apps to work with read-only profile 2019-10-14 10:35:04 +02:00
FoxMaSk
5cbae74086 update API doc related to issue #1956 (#1982)
* update doc related to issue #1956

* Space line
2019-10-14 04:21:51 -04:00
Laurent Cozic
008e30bdb7 Apply linter 2019-10-14 01:47:21 +02:00
Laurent Cozic
a5f17fad58 Android release v1.0.308 2019-10-13 23:19:15 +02:00
Laurent Cozic
22c3646fc6 Electron release v1.0.170 2019-10-13 23:13:19 +02:00
Laurent Cozic
a3e7f0b5ef Tools: Fixed building Android app on Windows 2019-10-13 01:21:56 +02:00
Laurent Cozic
9f5da92ab4 Desktop, Mobile: Added support for chemical equations using mhchem for Katex 2019-10-13 00:22:24 +02:00
Laurent Cozic
fdafe3b947 Desktop: Fixes #1854: Prevent note content from being deleted when using certain external editors (in particular Typora) 2019-10-12 22:51:38 +02:00
Laurent Cozic
6dec711a0a Desktop: Fixes #1854: Prevent external editor from clearing the note in some hard to replicate cases 2019-10-12 21:30:38 +02:00
Laurent Cozic
ec67bc7f1a Mobile: Fixes #1910: Make sure side bar text is white when dark theme is used 2019-10-12 20:55:59 +02:00
Laurent Cozic
47aaf639b3 Merge branch 'master' of github.com:laurent22/joplin 2019-10-12 20:49:42 +02:00
Laurent Cozic
51233c2745 Mobile: Fixes #1975: Images were not being displayed just after having been taken or attached 2019-10-12 20:49:10 +02:00
Laurent Cozic
90bc84c010 Clipper: Fixed: Some tables were imported with a duplicate header 2019-10-12 19:36:06 +02:00
Laurent Cozic
7f1e684dab Updated package to fix tests 2019-10-12 10:47:16 +02:00
Helmut K. C. Tessarek
5f28d0ec24 Desktop: Add option to set page dimensions when printing (#1976)
* add setting: export.pdfPageSize

* create 2 settings: size and orientation

* export.pdfPageOrientation: use string instead of boolean

* add other page formats supported by Electron
2019-10-12 01:21:19 +02:00
Matthew Crumley
348c4ad3a3 Desktop: Resolves #1222: Truncate update changelog when it's too long (#1967)
The changelong text is truncated if it's longer than 1000 characters,
but avoids cutting off a partial line, unless that would lead to cutting
off too much of the text. An ellipsis is added to mark the truncation.

Additionally, when the changelong is truncated, it adds a "Full Release Notes"
button that opens the GitHub release page in a browser window.
2019-10-12 00:44:58 +02:00
J0J0 T
f90cc8d67d Desktop, Cli: enex_to_md: Support italic in span tags (#1966)
* Desktop, Cli: enex_to_md: support italic in span tags

* Desktop, Cli: enex_to_md: readd debug message to resolve CI conflict

* Desktop, Cli: enex_to_md: fix CI errors

add spaces to commented out debug messages

* Desktop, Cli: enex_to_md: remove redundant commented out debug message

* Desktop, Cli: enex_to_md: readd redundant commented out debug message

CI wants it in there - maybe remove in another PR
2019-10-12 00:39:13 +02:00
Alan Martins Silva
d3e9ffcaea Mobile: Added duplicate option when selecting notes. (#1969)
* Adding duplicate button on screen-header.js when selecting notes; Adding 'duplicateMultipleNotes' function on Note.js;

* Using for-loop like the rest of the code does

* changing from 'uniqueTitle' to 'ensureUniqueTitle'
2019-10-12 00:37:16 +02:00
Laurent Cozic
b0a4a10dcc Clipper: Fixes #1876: Handle more styles of named anchors, including spans 2019-10-12 00:18:40 +02:00
Laurent Cozic
8ef5c96cb6 Desktop: Fixes #1970: Display error message when notes cannot be exported 2019-10-11 20:20:12 +02:00
Laurent Cozic
6be36ffe17 Desktop: Fixes #1819: Note view was not reloaded after viewing revisions 2019-10-11 20:10:25 +02:00
Laurent Cozic
7d7975daf4 Cli: Allow setting user timestamps with "set" command 2019-10-11 19:49:47 +02:00
Laurent Cozic
c98644b72f All: Allow a sync client to lock a sync target, so that migration operations can be performed on it 2019-10-11 01:03:23 +02:00
Laurent Cozic
8a097fb79c All: Added concept of sync version and client ID to allow upgrading sync targets 2019-10-10 23:23:11 +02:00
Laurent Cozic
f71e7f4fd3 Update ISSUE_TEMPLATE.md 2019-10-09 22:13:14 +02:00
Laurent Cozic
9c8add97e7 Tests: Add EnexToHtml to the list 2019-10-09 22:10:18 +02:00
Laurent Cozic
b099c811cc Merge branch 'master' of github.com:laurent22/joplin 2019-10-09 21:35:33 +02:00
Laurent Cozic
a8ae0f8078 Apply linter config 2019-10-09 21:35:13 +02:00
Laurent Cozic
d355169b60 Tools: Added rules to linter 2019-10-09 21:33:21 +02:00
Helmut K. C. Tessarek
08295525de Desktop: Add checkmark to menu item, if Dev Tools are on (#1949)
* add checkmark to menu item, if Dev Tools are on

If one closed the dev tools window, one could think that the Dev Tools are closed.
This is not the case. After the next action, the window opens again. This can be
confusing, therefore I added a checkmark to the menu item so that it is very clear.

* fix no-case-declarations

* fix reducer issue
2019-10-09 19:55:35 +02:00
Nathan Leiby
fdcf27fc65 Mobile: confirm encryption password (#1939)
* mobile: confirm encryption password

* pr feedback: translatable strings + style refactor

also added placeholder text

* s/did/do
2019-10-08 18:04:25 -04:00
Caleb John
f2c82b05d9 Desktop: Improved resource hover title (#1965)
* Improved resource hover title

* Add mimetype to resource links

* Escape mime type for resource links
2019-10-08 21:39:38 +02:00
Laurent Cozic
add9dda759 Desktop, Cli: Give correct mime type to more file types 2019-10-08 21:36:33 +02:00
Rafael Cavalcanti
fbba4a1ec4 Fix category on Linux installation script (#1964) 2019-10-08 19:45:08 +02:00
Laurent Cozic
154d303463 Merge branch 'master' of github.com:laurent22/joplin 2019-10-07 23:15:14 +02:00
Laurent Cozic
fdef2db232 Desktop, Cli: Fixes #1960: Apply default style to notes in HTML format 2019-10-07 23:14:49 +02:00
Rafael Cavalcanti
d49fa8e42b Minor fix on install script (#1954) 2019-10-07 22:32:17 +02:00
Irvin Dominin
871d3cb87d Fixed italian locale (#1955)
* Fixed italian locale

* Fixed italian locale

* Revert "Fixed italian locale"

This reverts commit b48695593f.
2019-10-07 16:20:31 -04:00
Laurent Cozic
f1d751b356 Tools: Handle Api commit messages 2019-10-07 10:12:10 +02:00
Laurent Cozic
60c1939d26 Api: Resolves #1956: Allow getting the resources of a note 2019-10-07 09:57:24 +02:00
Devon Zuegel
d2aaac22e5 Desktop: Add loading animation to import/export (#1888)
* Add loading animation to import/export

* Removed unecessary CSS prefixes
2019-10-05 22:46:39 +01:00
Andros Fenollosa
c6842a8591 Update Joplin_install_and_update.sh (#1952)
- Add argument: Mutes messages by console.
- Remove unset.
- Variables in capital letters.
2019-10-05 18:14:45 +01:00
Laurent Cozic
60e9abdd61 GitHub: Remove option to create feature requests 2019-10-04 13:54:07 +01:00
Laurent Cozic
9796630aa2 Update markdown.md 2019-10-04 09:14:18 +01:00
Laurent Cozic
7230cdea33 Doc: Added table example to Markdown cheatsheet 2019-10-04 09:13:24 +01:00
Andros Fenollosa
6460907976 Updating translation es_ES.po (#1947)
* Update language es_ES

* Add Last-Translator

* Translation fix
2019-10-03 17:42:07 -04:00
Helmut K. C. Tessarek
d7a50a1b48 Desktop: Resolves #1662: Set cancel as the default in dangerous operations (#1934)
* set cancel as the  default in dangerous operations, rename buttons (delete, remove) and context menu (for tags)

fixes #1662 (partially, because I can't fix the upstream issue, unless we update Electron)

* add default value for buttonLabel
2019-10-03 22:33:49 +01:00
oskar
4a88343372 Mobile: Added Front Camera toggle when taking a picture (#1913)
* added front camera support

* added front camera button and logic
2019-10-03 22:23:43 +01:00
Helmut K. C. Tessarek
74c2bbc2f0 change tense when passwords do not match 2019-10-02 19:32:32 -04:00
Nathan Leiby
5ed5d16716 Desktop: Resolves #1896: Hide some toolbar buttons when editor hidden (#1940)
addresses issue: https://github.com/laurent22/joplin/issues/1896
2019-10-03 00:07:58 +01:00
Subodh Dahal
43083b0b7a Desktop: Resolves #917: Larger search bar (#1933)
* Increased the width of search bar

* Added some margin to the left ofsearch bar

* Reduced left margin for the search bar
2019-10-02 22:55:29 +01:00
fabianskibr
a4e5054008 Doc: Add AUR repository (#1941) 2019-10-02 22:52:22 +01:00
Laurent Cozic
02eb2f2e45 Desktop, Cli: Resolves #1932: Use profile temp dir when exporting files 2019-10-02 19:22:32 +01:00
Laurent Cozic
5d015bf746 All: Fixes #1906: Fixed translation of "Synchronisation Status" 2019-10-02 19:07:51 +01:00
Laurent Cozic
ce5db5a5c1 Add more logging info to ExternalEditWatcher so that I do not need to ask to enable debug mode 2019-10-02 19:04:50 +01:00
Laurent Cozic
cdcc3902c5 Merge branch 'master' of github.com:laurent22/joplin 2019-10-02 19:03:59 +01:00
Laurent Cozic
309835f2fe Clipper: Fixes #1881: Some pages could not be clipped in Firefox due to an issue with dynamic images 2019-10-02 19:03:36 +01:00
Laurent Cozic
eca0ab0ef6 Desktop: Fixes #1829: Fixed alarms that would trigger immediately when they were set too far in future 2019-10-02 18:21:42 +00:00
Laurent Cozic
4ce35ee1ed Desktop: Fixes #1703: Text input context menu was not working in Windows 2019-10-02 18:05:30 +00:00
Laurent Cozic
8856456afd Doc: Update Markdown page 2019-10-02 08:12:03 +01:00
Helmut K. C. Tessarek
4259d900f4 Mobile: Don't display Dracula theme on mobile (#1935) 2019-10-02 07:49:38 +01:00
Nathan Leiby
438c448ef7 CLI: confirm encryption password (#1937)
Successful flow:
https://gyazo.com/354ca9ea412ffe3756ee77938d544341

Flow with error (non-matching passwords):
https://gyazo.com/9adda69278e3631da33d9fb366815d04
2019-10-02 07:48:58 +01:00
Laurent Cozic
0fb5b35212 All: Fixes #1938: App would crash if trying to index a note that has not been decrypted yet 2019-10-02 07:38:16 +01:00
Laurent Cozic
b69efb4970 Added Markdown Guide to website menu 2019-10-01 22:50:30 +01:00
Laurent Cozic
44ea237538 Merge branch 'master' of github.com:laurent22/joplin 2019-10-01 22:36:11 +01:00
Laurent Cozic
a58316b24c Doc: Fixed Markdown cheat sheet so that it looks better on GitHub 2019-10-01 22:33:19 +01:00
Mats Estensen
df95d01f6e update nb_NO translation to be 100 percent complete (#1930) 2019-10-01 17:32:38 -04:00
Laurent Cozic
d6924893e5 Merge branch 'master' of github.com:laurent22/joplin 2019-10-01 22:28:40 +01:00
Laurent Cozic
0f04ea4f70 Doc: Various changes and added Markdown cheat sheet 2019-10-01 22:27:57 +01:00
Laurent Cozic
4b8026cf83 Update PULL_REQUEST_TEMPLATE 2019-10-01 21:37:55 +01:00
JRaiden
a98a586295 Update es_ES.po (#1929)
I added some translations and change a couple more in order to improve there meaning in Spanish.
I am a native spanish speaker so I could help with some more translate if you want.
2019-10-01 16:32:11 -04:00
Laurent Cozic
29ec7ba03a Apply linter 2019-10-01 19:33:46 +01:00
Helmut K. C. Tessarek
a35cc23d28 Update localization de_DE.po (#1928) 2019-10-01 14:08:33 -04:00
Alexey Pyltsyn
20a8ddd841 Improve Russian translation (#1926) 2019-10-01 14:07:58 -04:00
Davide Cazzin
774fc9ce53 Update Italian translation (#1925) 2019-10-01 14:07:36 -04:00
Dom Goodwin
84ab395fae Desktop: Resolves (#1863): Added Dracula theme (#1924)
* Added dracula theme

* Removed package-lock
2019-10-01 12:23:32 +01:00
Reinhart Previano K
edc4dc5801 Doc: Update React Native build documentation (#1922) 2019-10-01 09:03:31 +01:00
Helmut K. C. Tessarek
6e128a7285 update question template
Somebody deleted the label `question`, so I changed the template to use `invalid`, since a question is technically invalid on the issue tracker.
2019-09-30 19:50:46 -04:00
Helmut K. C. Tessarek
ff977cebaf update issue templates 2019-09-30 19:45:44 -04:00
Caleb John
5bcd5f050a Desktop: Code button now detects multiline (#1915)
* Code button now detects multiline

* Fix text selection for code insertion
2019-09-30 23:24:07 +01:00
Laurent Cozic
fe57f163f3 Merge branch 'master' of github.com:laurent22/joplin 2019-09-30 23:19:31 +01:00
Laurent Cozic
cb24db4e39 Renamed "feature request" to "enhancement" (which is already for feature requests) 2019-09-30 14:57:45 +01:00
Laurent Cozic
e93d96193c eslint 2019-09-29 22:11:36 +00:00
Laurent Cozic
637a4dc1f9 Improve eslint rules and run them from CI 2019-09-29 22:01:10 +00:00
Laurent Cozic
2c522637ef Update website 2019-09-29 15:32:11 +01:00
Laurent Cozic
8fbb1fd246 A bit shorter 2019-09-29 15:32:00 +01:00
Laurent Cozic
75b7e7d999 Update website 2019-09-29 15:30:19 +01:00
Laurent Cozic
7e2e901035 Added note about Hacktoberfest 2019-09-29 15:30:01 +01:00
Laurent Cozic
a73a1f896c Merge branch 'master' of github.com:laurent22/joplin 2019-09-29 14:46:18 +01:00
Laurent Cozic
ae7f0e8ffb Tools: Disable build for macOS on pull requests due to electron-builder bug 2019-09-29 14:46:05 +01:00
abonte
08343e6be9 update translation (#1911) 2019-09-29 14:31:17 +01:00
Laurent Cozic
9cb3496159 Updated Russian translation (Thanks Kirill Keller) 2019-09-29 14:26:51 +01:00
Helmut K. C. Tessarek
37b035d0d0 update issue templates
Some people still ignore the templates. This update makes the important statements more prominent.
2019-09-28 20:48:01 -04:00
genneko
f37ac8b5de Update ja_JP.po Japanese translation. (#1902)
* Translate new strings.
* Check and update 'fuzzy' strings.
2019-09-27 21:31:55 -04:00
Robert
343d04b05d Update nl_NL.po (#1901)
Updated for missing translations in  1.0.168
2019-09-27 21:30:48 -04:00
Laurent Cozic
e92741edd6 CLI v1.0.149 2019-09-27 22:19:13 +01:00
Laurent Cozic
8565cd7d40 Cli: Resolves #1905: Add support to Termux by returning a default when platform name cannot be determined 2019-09-27 22:18:22 +01:00
Laurent Cozic
58e299383d CLI v1.0.148 2019-09-27 19:43:22 +01:00
Laurent Cozic
bcb44aa532 Android release v1.0.307 2019-09-27 19:09:14 +01:00
Laurent Cozic
0c552feb57 Electron release v1.0.169 2019-09-27 19:02:09 +01:00
Laurent Cozic
cd1aa57243 Merge branch 'master' of github.com:laurent22/joplin 2019-09-27 19:01:51 +01:00
Laurent Cozic
c9098b0489 All: Improves deletion fail-safe so it is based on percentage of notes deleted. And display warning on sidebar. 2019-09-27 18:12:28 +00:00
Valentin Deville
117ce52597 Desktop: Add support for Deepin desktop environment in install script (#1884)
* Add support for Deepin desktop environment

* Update Joplin_install_and_update.sh
2019-09-26 21:53:11 +01:00
Laurent Cozic
1836b9a0b0 Merge branch 'master' of github.com:laurent22/joplin 2019-09-26 21:00:28 +01:00
FoxMaSk
563a4b7bd8 Repo: Drop emoji in tag name (#1899) 2019-09-26 20:46:42 +01:00
Laurent Cozic
2a5648d1a7 Tools: Fix build for Android 9 debugging 2019-09-26 19:26:18 +00:00
Laurent Cozic
5b425f9178 Android: Fixes "Row too big to fit into CursorWindow" error by allowing notes up to 50MB in size 2019-09-26 19:11:55 +00:00
Laurent Cozic
820e32ddca Doc: Removed default title in new issue templates
Because otherwise people leave them in, but they are redundant with
the automatically attached tag.
2019-09-26 15:21:00 +01:00
Laurent Cozic
b873e706ca Removed invalid files 2019-09-26 00:54:36 +01:00
Laurent Cozic
f0f6e7c856 Update website 2019-09-26 00:53:57 +01:00
Laurent Cozic
1ff3c7d074 Merge branch 'master' of github.com:laurent22/joplin 2019-09-26 00:53:34 +01:00
Laurent Cozic
393bb8993e Update readme 2019-09-25 22:42:59 +01:00
Helmut K. C. Tessarek
00ddb1eb64 update stale.yml 2019-09-25 17:41:39 -04:00
Laurent Cozic
cd518776a9 Update website 2019-09-25 22:28:48 +01:00
Laurent Cozic
391f7d22a3 CLI v1.0.147 2019-09-25 22:27:58 +01:00
Laurent Cozic
effbf10571 All: Log last requests in case of a sync error 2019-09-25 18:58:15 +00:00
Laurent Cozic
4405e94e0c Android release v1.0.306 2019-09-25 19:52:01 +01:00
Laurent Cozic
69f1b72127 Electron release v1.0.168 2019-09-25 18:54:50 +01:00
Laurent Cozic
383fa2e278 Update translations 2019-09-25 18:54:25 +01:00
Laurent Cozic
573100c203 Merge branch 'master' of github.com:laurent22/joplin 2019-09-25 18:46:52 +01:00
Laurent Cozic
348efdd7b6 All: Added fail-safe to prevent data from being wiped out when the sync target is empty 2019-09-25 18:40:04 +00:00
Laurent Cozic
cb9cc95e6a Doc: Fix email address 2019-09-25 16:29:21 +01:00
Laurent Cozic
1994b334fa Create SECURITY.md 2019-09-25 16:28:34 +01:00
Laurent Cozic
3e5a9cdb97 Tests: Make all tests use asyncTest for better error handling 2019-09-23 23:23:10 +01:00
Laurent Cozic
ae863c95c7 Tests: Make tests and CLI app less dependent on building the translations 2019-09-23 23:01:05 +01:00
Laurent Cozic
e89e5efb62 CI: Fix npm install 2019-09-23 22:45:07 +01:00
Laurent Cozic
9f2ce06829 CI: Build pull requests too 2019-09-23 22:41:22 +01:00
Laurent Cozic
ec89ebc6b0 Make build fail if tests don't pass 2019-09-23 22:37:14 +01:00
Laurent Cozic
f3e9668eb7 Tests: Fail test units when an uncaught exception is thrown inside asyncTest 2019-09-23 22:30:25 +01:00
Laurent Cozic
cc7e2fc456 Merge branch 'master' of github.com:laurent22/joplin 2019-09-23 22:27:16 +01:00
Devon Zuegel
172d925f0f Desktop: Fix import interop service (#1887)
* Revert "Revert "Desktop: Add ENEX to HTML export (#1795)""

This reverts commit 50b66cceca.

* Revert "Revert "Desktop, Cli: Fixed interop service so that it still allow auto-detecting importer based on format (required for Cli and for test units)""

This reverts commit c7c57ab2a5.

* Fix the .md importer

* Add comment re future refactor

* Rm importerClass for .md importer

* Fix EnexToMd module name
2019-09-23 22:18:30 +01:00
Laurent Cozic
8a8ecaade3 Update BUILD.md 2019-09-22 10:54:14 +01:00
Helmut K. C. Tessarek
d21a3f0bca update stale.yml 2019-09-21 14:55:26 -04:00
Helmut K. C. Tessarek
9322212601 update issue templates 2019-09-21 14:50:20 -04:00
Laurent Cozic
691eefec2f Desktop, CLI: Also allow importing TXT files with markdown 2019-09-20 23:00:59 +01:00
Laurent Cozic
50b66cceca Revert "Desktop: Add ENEX to HTML export (#1795)"
This reverts commit 2f14832c34.

Reverting PR #1795 due to broken MD import and other issues
2019-09-20 22:18:09 +01:00
Laurent Cozic
c7c57ab2a5 Revert "Desktop, Cli: Fixed interop service so that it still allow auto-detecting importer based on format (required for Cli and for test units)"
Reverting PR #1795 due to broken MD import and other issues

This reverts commit 558b6443bc.
2019-09-20 22:13:34 +01:00
Laurent Cozic
558b6443bc Desktop, Cli: Fixed interop service so that it still allow auto-detecting importer based on format (required for Cli and for test units) 2019-09-19 23:26:33 +01:00
Laurent Cozic
335b43ead4 Chore: Fixed a few formatting issues 2019-09-19 23:02:29 +01:00
Laurent Cozic
e648392330 Chore: Apply eslint rules 2019-09-19 22:51:18 +01:00
Laurent Cozic
ab29d7e872 Chore: Add line break style, and use of template to eslint rules 2019-09-19 22:49:17 +01:00
Woosuk Park
d7fae6b5b8 Update ko.po - korean language support (#1875) 2019-09-17 20:43:38 -04:00
Devon Zuegel
4ba4910a9c Mobile: Custom mobile editor font (#1797)
* Make editor font "Menlo"

* Add .vscode/* to .gitignore

* Add "editor font" config UI

* Render "editor font" chosen in config

* Add shim.mobilePlatform()

* Use style.editor.fontFamily rather than editorFont

* Add default font option

* Fixed for Android
2019-09-17 21:32:00 +01:00
Laurent Cozic
fe9a037cf9 Chore: Fixed package.json files and updated BUILD instructions 2019-09-17 21:29:37 +01:00
Devon Zuegel
2f14832c34 Desktop: Add ENEX to HTML export (#1795)
* Add `escape` to go back from Dropbox Login screen

* Add .vscode/ to .gitignore

* Remove call to enexXmlToMd

* The 2 enex importers have distinct functionality!

* Add tmp #deleteAllNotebooks

* checkbox state still not persisting

* images now fixed, but checkboxes still broken

* Figured out that #ipcProxySendToHost is important for handling checkbox

* cleanup closing br and en-todo tags + add notes

* Handle en-media, add NOTEs & TODOs, & format html

* Clean up some of the logging

* cleanHtml is a nice beautifier, but callback hell ensues...

* Rm #htmlFormat

* Recreating the xml actually seems to work

* Add test (not functional rn)

* Add test for checkboxes

* Add test for image en-media

* Separate tests into 2 function calls

* Clean up test

* Add `en-media-audio` test

* Add bad resource test

* Misc cleanup

* Rm SlateEditor files

* Misc cleanup

* Remove #deleteAllNotebooks button

* Add names to tests

* Extract resourceUtils

* Rm DropboxLoginScreen esc behavior, part of another PR

* Misc cleanup

* Improve audioElement, add attachment import support

* Misc cleanup

* Add svg test for enex_to_html

* Clean up test

* Set markup_language to MARKUP_LANGUAGE_HTML to tell renderer that the content is only HTML

* Rename to newModuleByFormat_ for clarity

* Add comment to clarify newModuleFromPath_
2019-09-17 21:19:32 +01:00
Laurent Cozic
52ace55db0 Mobile: Remove empty sections from config screen 2019-09-16 22:59:45 +01:00
Laurent Cozic
224a4d786b Desktop: Fixed broken menu bar 2019-09-16 22:54:40 +01:00
腹肌抽筋了
3ea97ad9ff Update zh_CN.po Chinese translation (#1871) 2019-09-15 00:02:53 -04:00
Laurent Cozic
e7a56bb2b1 ios-v10.0.37 2019-09-13 22:08:13 +01:00
Laurent Cozic
e4aed469d7 Chore: Add reslect to package 2019-09-13 22:05:02 +01:00
Laurent Cozic
15a42a3729 Chore: Apply eslint no-unused-vars eslint config and add TypeScript config 2019-09-12 22:16:42 +00:00
Laurent Cozic
0b9e007b46 Merge branch 'master' of github.com:laurent22/joplin 2019-09-12 22:48:49 +01:00
Laurent Cozic
88561a6c3c Desktop, CLI: Fixed import of notes that contain links with hashes 2019-09-12 22:48:10 +01:00
genneko
e6b77c3381 Update ja_JP.po Japanese translation (#1868)
* Update Japanese translation (Fix typos).

* Update Japanese translation (Improve the wording).

* Update Japanese translation (Add new items).
2019-09-12 17:38:48 -04:00
abonte
f7e1589476 Update it_IT.po (#1866) 2019-09-12 17:37:34 -04:00
Laurent Cozic
0379523eaf Desktop, Mobile: Fixes #1870: Support non-alphabetical characters in note link anchors 2019-09-12 21:57:23 +01:00
Laurent Cozic
5db7502fe4 Merge branch 'tidy_config' 2019-09-11 23:00:03 +01:00
Laurent Cozic
1578188fde Update website 2019-09-11 11:18:44 +01:00
Laurent Cozic
e8e1a0fe4d Desktop: Cleaned up and improved config screen design, move all screens under same one, and added section buttons 2019-09-10 23:53:01 +00:00
Laurent Cozic
8059009ff3 Android release v1.0.305 2019-09-10 09:31:48 +01:00
Laurent Cozic
32865f065c Electron release v1.0.167 2019-09-10 09:26:26 +01:00
Laurent Cozic
e03ef78049 All: Fixed link issue following last update 2019-09-10 09:25:58 +01:00
Laurent Cozic
45a820bb35 Update website 2019-09-09 19:03:22 +01:00
Laurent Cozic
3c26159b79 Doc: Add link to 32-bit Android APK to readme and website 2019-09-09 18:58:35 +01:00
Laurent Cozic
cf67e0d4af Tools: Allow specifying "to" commit option in git-changelog 2019-09-09 18:50:04 +01:00
Laurent Cozic
1b2767167d Cli: Upgrade joplin-turndown-plugin-gfm to fix import of certain Enex tables 2019-09-09 18:35:22 +01:00
Laurent Cozic
f07bb5c275 Android release v1.0.304 2019-09-09 18:26:55 +01:00
Laurent Cozic
0e2cc418e2 Electron release v1.0.166 2019-09-09 18:22:42 +01:00
Laurent Cozic
0340456d55 Update translations 2019-09-09 18:22:20 +01:00
Laurent Cozic
7aea2cec69 Desktop: Resolves #1490: Add support for anchor hashes in note links 2019-09-09 18:16:00 +01:00
Laurent Cozic
fa83107840 Doc: Update CLI installation info 2019-09-08 20:21:14 +01:00
Laurent Cozic
bb0bf46f81 CLI v1.0.146 2019-09-08 20:12:49 +01:00
Laurent Cozic
694c3fed2d Cli: Fixed regression that was making installation fail 2019-09-08 20:12:25 +01:00
Laurent Cozic
772e39b710 Tools: Improved git-changelog so that it is less error prone 2019-09-08 17:54:41 +01:00
Laurent Cozic
05e0a2c29d CLI v1.0.145 2019-09-08 17:24:00 +01:00
Laurent Cozic
78e0efb95f Trying CLI release 2019-09-08 17:19:22 +01:00
Laurent Cozic
a5f749cfd2 Tools: Added moment package 2019-09-08 17:18:44 +01:00
Laurent Cozic
3d6c932e1b Cli: Added headless server command (Beta) (#1860)
* Trying to implement headless server

* Cli: Cleaned up and completed server command so that it is usable. Added warnings as it is advanced usage only at this point.

* Restored welcome assets
2019-09-08 17:16:45 +01:00
archont00
4488a1b95f Doc: Update explanation of enabling E2EE (#1859)
As per https://discourse.joplinapp.org/t/totally-confused-re-e2ee/3295, I tried to improve the explanation of the process to avoid multiple encryption keys.
2019-09-08 16:35:10 +01:00
archont00
e2808a90c6 Doc: Update re. impossibility to delete unused Master Keys (#1858)
As per discussion at https://discourse.joplinapp.org/t/totally-confused-re-e2ee/3295/2, I propose to add info about Master Keys persistence.
2019-09-08 16:34:37 +01:00
Laurent Cozic
755a972e02 Update website 2019-09-08 11:09:02 +01:00
Laurent Cozic
8b1de22049 Merge branch 'master' of github.com:laurent22/joplin 2019-09-08 11:07:54 +01:00
Laurent Cozic
a9735123b7 Doc: Added warning to generated HTML files 2019-09-08 11:06:53 +01:00
Laurent Cozic
5ccafa2838 Doc: Added warning to generated HTML files 2019-09-08 10:46:35 +01:00
archont00
e2926a4f82 Doc: Update explanation of enabling E2EE (#1856)
As per https://discourse.joplinapp.org/t/totally-confused-re-e2ee/3295, I tried to improve the explanation of the process to avoid multiple encryption keys.
2019-09-08 10:35:15 +01:00
Laurent Cozic
09df315639 Desktop: Fixes #1833: Do not scroll text when search is open and user type in note 2019-09-07 11:57:31 +01:00
Laurent Cozic
5a9b3b6c7c Desktop, Mobile: Resolves #1832: Only support checkboxes that start with a dash 2019-09-07 11:18:07 +01:00
Laurent Cozic
6da6f35ddd Merge branch 'master' of github.com:laurent22/joplin 2019-09-07 10:47:51 +01:00
Laurent Cozic
dcb5590842 Clipper: Fixes #1851: Fixed error when trying to import certain pages using "Clip simplified page" feature 2019-09-07 10:47:31 +01:00
Laurent Cozic
5135c8a782 Clipper: Fixes #1783: Fixed importing tables that contain pipes 2019-09-07 10:32:52 +01:00
Laurent Cozic
1b2f4fb036 Update bug_report.md 2019-09-07 10:09:05 +01:00
Laurent Cozic
76a4a445f0 Doc: Added info about SKIP_PREFLIGHT_CHECK 2019-09-07 09:56:06 +01:00
Helmut K. C. Tessarek
20abb125a5 infrastructure: skip preflight check for building clipper 2019-09-06 13:53:35 -04:00
Laurent Cozic
be9e50b4a1 Update FUNDING.yml 2019-09-06 18:48:05 +01:00
Helmut K. C. Tessarek
02bfcf577d Clipper release v1.0.18 2019-09-06 13:37:55 -04:00
Laurent Cozic
038efa10f2 Update website 2019-09-06 18:34:47 +01:00
Laurent Cozic
dfa692569b Update translations 2019-09-06 18:33:30 +01:00
Laurent Cozic
9abc6a2e44 CLI: Fixes #1779: Make sure setting side-effects are applied even when running in command line mode 2019-09-06 18:29:40 +01:00
Laurent Cozic
11f23f4e00 Android release v1.0.303 2019-09-06 17:51:38 +01:00
Laurent Cozic
6a7d40d171 Merge branch 'master' of github.com:laurent22/joplin 2019-09-06 17:50:39 +01:00
Laurent Cozic
bf5601429e Mobile: Fixes #1767: Fixed broken search when certain notes are too large 2019-09-06 17:39:36 +01:00
abonte
73ae8aaf2f Update it_IT.po (#1853) 2019-09-05 22:45:36 -04:00
axq
7eb7bd98f3 Doc: Minor English improvements in README.md (#1852) 2019-09-05 17:11:45 +01:00
Laurent Cozic
10e22654ea Desktop: Fixes #1815: Fixed cropped content issue when printing or exporting to PDF 2019-09-04 20:11:35 +01:00
Joan Montané
ccfc80ad04 Update ca.po (#1836) 2019-08-29 17:39:35 +01:00
stellarpower
5e95278084 Fix Cinnamon Detection (#1828)
$desktop was converted to lowercase, but matched against 'X-Cinnamon'
2019-08-29 17:39:10 +01:00
Helmut K. C. Tessarek
d69ba6bc75 All: fix typo on encryption options screen (#1823)
fixes #1798
2019-08-29 17:38:54 +01:00
Caleb John
d28fbe2d3b Desktop: Apply current locale to date and time (#1822) 2019-08-29 17:38:24 +01:00
Caleb John
415e7b84da Desktop: Change localeCompare functiion for tags (#1811)
* change localeCompare functin for tags

* Fix spacing
2019-08-29 17:36:53 +01:00
Caleb John
ac4986b620 Desktop: Fixes #1803: Use correct date format for templates (#1810) 2019-08-29 17:35:43 +01:00
Caleb John
9a4f4cbb65 Desktop: Change template prompt to sans and sort templates (#1806)
* Change template prompt to sans and sort templates

* Sort templates by filename to ensure order
2019-08-29 17:34:54 +01:00
Helmut K. C. Tessarek
8e32957111 Infrastructure: build-translation.js - add support for macOS (#1804)
* remove unnecessary comment

It's totally fine to add the double quotes after -i.
Using gsed would mean that people had to install GNU sed. For what, if the same is possible with the system's sed with a slight modification.
Checking for gsed and using it is more trouble than it's worth.

* build-translation.js: add support for macOS

* implement requested changes
2019-08-29 17:34:05 +01:00
Helmut K. C. Tessarek
91aa3703d4 CLI: Fixes fatal error with cli 1.0.141 on start (#1791)
- updated terminal-kit to 1.30.0
- do not call method, if object does not exist

fixes #1778
2019-08-29 17:05:20 +01:00
FoxMaSk
a889762056 Update README.md
Double line fixed
2019-08-21 10:14:15 +02:00
Robert
6478d6c9c9 Update nl_NL.po (#1821) 2019-08-19 17:59:43 -04:00
FoxMaSk
7a681d0a4a README: add Discord Community Server (#1800)
* Discord Community Server

* Discord Server Link fixed

* improvment
2019-08-19 13:34:43 -04:00
Rafael Teixeira
83b6eba8bd Updated Last Translator pt_BR (#1813) 2019-08-17 02:36:25 -04:00
Helmut K. C. Tessarek
2766ded5f6 Update website 2019-08-16 19:55:27 -04:00
Rafael Teixeira
ca0d966ed9 Translation: Translation Update pt_BR (#1809)
* Updated translation pt-BR

* New updates translation pt_BR
2019-08-16 03:58:07 -04:00
Woosuk Park
386c583b0e Translation : Korean Translation #2 (#1802)
* Korean Language Support

Korean Language 100% Translated, but something is roughted. soon fix it ;)

* some improved

Some Improved

* Improve v2

some polished

* Ok, now Completed

For Now, Completed Polish(Change Respect of Users, and several fixing & polishing) + 100% Translated. Ready to Shipping

* Korean Language Update #2

1. 조플린 -> Joplin (Sorry i forgot)
2. Fuzzy correction.

Korean Language Update #2

1. 조플린 -> Joplin (Sorry i forgot)
2. Fuzzy correction.
2019-08-15 13:15:32 -04:00
Laurent Cozic
b3d34ad7e9 Android release v1.0.299 2019-08-14 23:47:38 +02:00
Laurent Cozic
ba5c636dda Android: Fixed AndroidX transition issue 2019-08-14 23:44:57 +02:00
Laurent Cozic
ea16f6e0b1 Revert "Trying to fix Android buikld"
This reverts commit 0dd0dc5489.
2019-08-14 23:23:27 +02:00
Laurent Cozic
0dd0dc5489 Trying to fix Android buikld 2019-08-14 23:22:52 +02:00
Laurent Cozic
f3ab21ff43 Electron release v1.0.165 2019-08-14 23:17:25 +02:00
Laurent Cozic
5ac6b46efd Desktop: Fixed theme options for Solarized theme 2019-08-14 23:17:02 +02:00
Laurent Cozic
6548f30a4b Electron release v1.0.164 2019-08-14 22:49:45 +02:00
Laurent Cozic
849d7983f6 Desktop: Added support for Fountain screenwriting language 2019-08-14 12:40:06 +02:00
Helmut K. C. Tessarek
e32e4423db change feature request template 2019-08-14 02:08:35 -04:00
Laurent Cozic
7f5bf131a8 Add back files that might have been modified by linter 2019-07-30 11:40:33 +02:00
Laurent Cozic
87a639df2b Mobile: Disabled solarized themes on mobile 2019-07-30 11:37:52 +02:00
Laurent Cozic
bdd8eab87e Mobile: Make it clearer when there are no notebooks and added a button create one 2019-07-30 11:36:56 +02:00
Laurent Cozic
b9e5c8a387 Electron release v1.0.163 2019-07-30 09:52:26 +02:00
Laurent Cozic
d646a2dd01 Fix Linux and macOS build to go around this bug: https://github.com/electron-userland/electron-builder/issues/3179 2019-07-30 09:52:16 +02:00
Laurent Cozic
71a3a0176e Android release v1.0.294 2019-07-30 09:42:09 +02:00
Laurent Cozic
a363d119cf Electron release v1.0.162 2019-07-30 09:37:23 +02:00
Laurent Cozic
ff08bdbc0b Merge branch 'master' of github.com:laurent22/joplin 2019-07-30 09:35:49 +02:00
Laurent Cozic
71efff6827 Linter update (#1777)
* Update eslint config

* Applied linter to lib

* Applied eslint config to CliClient/app

* Removed prettier due to https://github.com/prettier/prettier/pull/4765

* First pass on test units

* Applied linter config to test units

* Applied eslint config to clipper

* Applied to plugin dir

* Applied to root of ElectronClient

* Applied on RN root

* Applied on CLI root

* Applied on Clipper root

* Applied config to tools

* test hook

* test hook

* test hook

* Added pre-commit hook

* Applied rule no-trailing-spaces

* Make sure root packages are installed when installing sub-dir

* Added doc
2019-07-30 09:35:42 +02:00
Laurent Cozic
7595fe4a8c Merge branch 'master' of github.com:laurent22/joplin 2019-07-30 09:32:34 +02:00
Laurent Cozic
7697e75466 Update eslint config 2019-07-29 21:23:14 +02:00
Helmut K. C. Tessarek
b8fbaa2029 Update en_US.po 2019-07-29 11:34:52 -04:00
Helmut K. C. Tessarek
38bc750ecf Update de_DE.po 2019-07-29 11:34:02 -04:00
Laurent Cozic
6cfacb1a48 Second pass at linting lib dir 2019-07-29 15:58:33 +02:00
Laurent Cozic
0b9078d034 config 2019-07-29 15:58:17 +02:00
Laurent Cozic
86dc72b204 First pass at linting lib dir 2019-07-29 15:43:53 +02:00
Laurent Cozic
64b7bc3d62 More config 2019-07-29 15:43:39 +02:00
Laurent Cozic
086f9e1123 Started applying config to Electron app 2019-07-29 14:13:23 +02:00
Laurent Cozic
4fe70fe8ee Ignore some files 2019-07-29 14:13:09 +02:00
Laurent Cozic
95a1f40404 Tweaked linter config 2019-07-29 14:10:07 +02:00
Laurent Cozic
88f04509ee Also added prettier config 2019-07-29 13:48:43 +02:00
Laurent Cozic
7eebd544d6 Fixed eslint 2019-07-29 12:55:50 +02:00
Laurent Cozic
e369a8decf Added eslint config 2019-07-29 12:55:39 +02:00
Helmut K. C. Tessarek
ad8054ba4b Desktop: Better handling of adding the title to print and export to PDF (#1744)
fixes #1743
2019-07-29 12:33:40 +02:00
J0J0 T
b47cb4e29a Desktop, Cli: Improved bold formatting support in Enex import (#1708)
* Dekstop,CLI: enex_to_md: add html/md test file pairs

* one pair for basic text formatting tags: strong, b, i, em
* and one using span tags with inline styles for bold formatting

Note: The html files include the Evernote-typical "linebreak tags inside of separate <div> tags"
to represent empty lines!

* Desktop,Cli: enex_to_md: support bold in span tags using inline styles

* function isSpanWithStyle() checks if further processing of a span tag
  makes sense
* function isSpanStyleBold() checks if bold formatting via styles is
  used - a similar function could be written for each span-inline-style-format
  that should be supported

* Desktop,Cli: enex_to_md: fix saving span attrs in state object

pushing attributes of span tag to state object now
happens outside of isSpanWithStyle()
2019-07-29 12:25:25 +02:00
Laurent Cozic
8c42ddf6c3 Merge branch 'master' of github.com:laurent22/joplin 2019-07-29 12:17:33 +02:00
tfinnberg
f7fcabbf41 Desktop: Create fileURLs via drag and drop (#1653)
* enable drag and drop fileURLs

* fix windows fileURL syntax

* introduce encodeURI function

* fixed encoding issue

* use path-utils.js to deal with fileURL path conversion

* add changes as requested

* Minor rewording 'On the' -> 'In the', additional info about attaching files

* change call of toFileProtocolPath

* enable test script to check syntax for all OS-platforms
2019-07-29 12:16:47 +02:00
Shane Kilkelly
38a51070fc Desktop: add depthColor for solarized light and dark themes (#1765) 2019-07-29 12:08:49 +02:00
Laurent Cozic
44fa099a77 Desktop: No longer crash if certain theme properties are not set 2019-07-29 12:05:58 +02:00
sumomo-99
af6f3999df Update ja_JP.po (#1776) 2019-07-29 11:55:02 +02:00
Laurent Cozic
6fbeb35951 Update translations 2019-07-29 11:52:19 +02:00
Laurent Cozic
b2eadffde0 Using British English by default for consistency 2019-07-29 11:51:09 +02:00
Laurent Cozic
200ba2775f All: Resolves #1459: Make translation files smaller by not including untranslated strings. Also add percentage translated to config screen. 2019-07-29 11:47:50 +02:00
Laurent Cozic
39ba021a79 Merge branch 'master' of github.com:laurent22/joplin 2019-07-29 10:12:45 +02:00
Laurent Cozic
2c6b291b9b Desktop: Only repeat failed requests up to 3 times during sync 2019-07-29 10:12:23 +02:00
Devon Zuegel
770846be2e Doc: Add docs to clarify how to test (#1775) 2019-07-29 09:42:10 +02:00
Laurent Cozic
af4aa01b75 Mobile: Upgraded packages to fix security issues 2019-07-28 23:03:54 +02:00
Laurent Cozic
1bf2bec805 CLI v1.0.141 2019-07-28 22:54:45 +02:00
Laurent Cozic
3a41ac9be0 CLI: Upgraded packages to fix security issues 2019-07-28 22:54:29 +02:00
Laurent Cozic
f2c9cdd7f1 Desktop: Upgraded packages to fix security issue 2019-07-28 22:48:30 +02:00
Laurent Cozic
058f418cc7 Tools: Do not display full release info when releasing Android app 2019-07-28 22:43:33 +02:00
Laurent Cozic
5fa84b0dfb Android release v1.0.293 2019-07-28 18:36:36 +02:00
Laurent Cozic
ec8ec3e38d Android release v1.0.292 2019-07-28 18:34:44 +02:00
Laurent Cozic
0e6190b42b Tools: Allow creating multiple Android releases 2019-07-28 18:33:48 +02:00
Laurent Cozic
fcfee36c8c Android release v1.0.291 2019-07-28 18:32:33 +02:00
Laurent Cozic
1d3d3b99bb Tools: Allow creating multiple Android releases 2019-07-28 18:31:31 +02:00
Laurent Cozic
2f80bf9647 Android release v1.0.290 2019-07-28 18:29:07 +02:00
Laurent Cozic
675a4c795f Android release v1.0.289 2019-07-28 18:22:33 +02:00
Laurent Cozic
ed3361df57 Merge branch 'master' of github.com:laurent22/joplin 2019-07-28 18:22:33 +02:00
Laurent Cozic
87396572e4 Tools: Allow creating multiple Android releases 2019-07-28 18:19:41 +02:00
Woosuk Park
143b610291 Korean Language Support (#1769)
* Korean Language Support

Korean Language 100% Translated, but something is roughted. soon fix it ;)

* some improved

Some Improved

* Improve v2

some polished

* Ok, now Completed

For Now, Completed Polish(Change Respect of Users, and several fixing & polishing) + 100% Translated. Ready to Shipping
2019-07-26 23:18:47 -04:00
Laurent Cozic
c952c4591f Android release v1.0.284 2019-07-26 23:11:08 +02:00
Laurent Cozic
e418701e68 Mobile: Fixes #1764 (maybe): Upgrading React-Native to 0.59.10 to try to fix crash in certain Samsung phone due to 64-bit version
See also:

https://github.com/facebook/react-native/issues/24261#issuecomment-514332549
2019-07-26 23:08:11 +02:00
Laurent Cozic
6fc0ee3062 Android release v1.0.283 2019-07-26 21:26:24 +02:00
Laurent Cozic
7b42d7d2c8 Mobile: Fixed freeze when last notebook was the conflict one and there are no longer any conflicted notes 2019-07-26 21:23:18 +02:00
Mr. Traduttore
eb083ae925 [Mobile/Desktop] Changed cancel, directory and delete translations (ITALIAN) (#1759)
* Changed cancel and delete translation (ITALIAN)

Changed cancel from "cancellare" to "annullare" (whic is used more to express the cancelling operations) and delete from "cancellare" to "eliminare". I think that doing this will help people understanding what is the main task of these option since they use the same verbs in the current translation.

* Update it_IT.po
2019-07-22 14:15:11 +01:00
Helmut K. C. Tessarek
905e65365f Update en_US.po 2019-07-22 06:28:04 -04:00
Helmut K. C. Tessarek
a0c04c0e6a Update de_DE.po 2019-07-22 06:27:55 -04:00
Laurent Cozic
635baa5b6f Updated translations 2019-07-22 00:02:25 +00:00
Laurent Cozic
7591b614c5 typos 2019-07-21 22:27:13 +00:00
Helmut K. C. Tessarek
5b5ec682c0 Update en_US.po 2019-07-21 22:18:35 -04:00
Helmut K. C. Tessarek
b0a80ddf65 Update de_DE.po 2019-07-21 22:17:25 -04:00
Laurent Cozic
893531f8c7 Desktop: Make depthColor theme property optional 2019-07-21 17:30:36 +01:00
Shane Kilkelly
3d498e7a75 Desktop: Add solarized themes to desktop client (#1733) 2019-07-21 17:27:42 +01:00
Laurent Cozic
45ad201132 Mobile: Fixed colour of placeholder text in dark theme 2019-07-21 17:16:15 +01:00
Laurent Cozic
6e64b950ca Merge branch 'master' of github.com:laurent22/joplin 2019-07-21 17:05:09 +01:00
Laurent Cozic
6d4e67769c Desktop: Fixed Back button icon on Config screen 2019-07-21 16:49:53 +01:00
Laurent Cozic
3aa0394062 Mobile: Fixes #1684: Trying to fix problem when attaching file that contains spaces in name 2019-07-21 14:39:52 +01:00
Laurent Cozic
b65767a43c Mobile: Fixes #1746: Populate note side menu when swiping right 2019-07-21 14:11:30 +01:00
Laurent Cozic
3a9817d11e Android release v1.0.282 2019-07-21 14:04:18 +01:00
Laurent Cozic
6a42ef50ec All: Fixes #1732: Fixed note order when dragging a note outside a notebook 2019-07-21 13:55:25 +01:00
Laurent Cozic
35b6b3fc46 Merge branch 'clipper_html_mode' 2019-07-21 13:46:54 +01:00
Laurent Cozic
f5515e3496 Doc: Fixed template doc 2019-07-21 09:07:33 +01:00
Laurent Cozic
fd509bb4af Doc: Fixed template table 2019-07-21 08:57:50 +01:00
Laurent Cozic
b21c0f5d69 Doc: Fixed website templating 2019-07-21 08:55:44 +01:00
Laurent Cozic
1033b3626f Update translations 2019-07-21 08:49:49 +01:00
Laurent Cozic
f407c8d756 Added Serbian translation - thanks Željko! 2019-07-21 08:19:32 +01:00
Laurent Cozic
6436dff94b Api: Fixed handling of markup language 2019-07-21 00:31:29 +01:00
Laurent Cozic
3f7b4e10b6 Merge branch 'master' into clipper_html_mode 2019-07-21 00:24:25 +01:00
Laurent Cozic
36168a9a5d Use regex instead of jsdom for compability with mobile app 2019-07-21 00:18:51 +01:00
Helmut K. C. Tessarek
118540c733 add config for stale bot 2019-07-20 17:41:49 -04:00
Caleb John
cd5d412c69 Desktop: Added support for templates (#1647)
* First pass of adding support for templates

* remove default value from template prompt

* Add template placeholder text

* Add mustache templates with datetime support for new notes

* Moved template code to utils, added separate prompt for templates

* Add templates to menu and allow for keyboad only use

* update template prompt for dark theme

* update with laurents suggestions, add refresh button

* revert template command, remove new note prompt
2019-07-20 22:13:10 +01:00
Helmut K. C. Tessarek
e29fb3eb66 new issue templates 2019-07-19 15:01:32 -04:00
Laurent Cozic
8ff1668c8f Minor changes 2019-07-19 18:18:05 +01:00
Laurent Cozic
14fc73b388 Use markupToHtml everywhere 2019-07-19 17:48:38 +01:00
Laurent Cozic
f34330f101 Doc: Contributor list on rows of 5 2019-07-18 20:46:01 +01:00
Laurent Cozic
2ba50321d4 Doc: Added contributors 2019-07-18 18:36:29 +01:00
Laurent Cozic
38177c7e54 All: Optimised loading of multiple items 2019-07-17 22:50:12 +01:00
Laurent Cozic
687e308a73 Desktop: Added markup language to property dialog 2019-07-17 22:49:40 +01:00
Laurent Cozic
490db0db62 Desktop: Disable Markdown actions for HTML notes 2019-07-17 22:49:12 +01:00
Laurent Cozic
feb5f17479 Clipper: Generate better HTML so that it loads faster in text editor 2019-07-17 22:48:13 +01:00
Laurent Cozic
fbb3543818 Desktop: Fixed race condition when loading a note while another one is still loading. Improved performance when loading large note. 2019-07-17 22:42:53 +01:00
Laurent Cozic
30d0dfb424 Clipper: Fixed sizing issue when importing HTML pages 2019-07-16 22:58:44 +01:00
Laurent Cozic
7239a2013c Clipper: Improved clipping of images in HTML mode 2019-07-16 22:23:04 +01:00
Laurent Cozic
2361c5a5e7 Clipper: Better handling of images when multiple images have the same source but with different dimensions 2019-07-16 21:47:44 +01:00
Laurent Cozic
38e8a881d5 More refactoring to easily handle multiple renderers 2019-07-16 19:05:47 +01:00
Helmut K. C. Tessarek
d45d1b4225 Mobile: Show correct time/date (as specified in settings) for note properties (#1749) 2019-07-16 15:11:58 +01:00
Helmut K. C. Tessarek
e9c88dfdc4 Update de_DE.po 2019-07-15 23:21:46 -04:00
Laurent Cozic
fbb0ac5892 Clipper: Refactored image rules to re-use more code 2019-07-15 20:43:28 +00:00
Helmut K. C. Tessarek
7a902bbd25 Desktop, Mobile: Update Markdown plugins: footnote, toc-done-right, anchor (#1741) 2019-07-15 01:29:44 +01:00
Laurent Cozic
c75618eb8f Clipper: Minor fixes 2019-07-15 01:17:17 +01:00
Laurent Cozic
74ee629266 Clipper: Fixed issue with relative links when importing HTML 2019-07-15 00:44:45 +01:00
Caleb John
8ecc58e1bf Desktop: Add support for cinnamon to install script (#1738) 2019-07-15 00:29:09 +01:00
Laurent Cozic
71078637db Android release v1.0.281 2019-07-14 19:56:46 +01:00
Laurent Cozic
5460a977b1 Clipper: Fixed issues related to viewing images and to HTML comments that were incorrectly being displayed 2019-07-14 19:52:57 +01:00
Laurent Cozic
a0dd0702fb Clipper: Adding support for clipping page as HTML 2019-07-14 16:00:02 +01:00
Laurent Cozic
3e48992eb4 Clipper: Disabled preview for now as too many problems with it and not so useful 2019-07-14 09:46:06 +01:00
Laurent Cozic
bdb31f2890 Mobile: Fixed issue that could slow down app when displaying large list of notes 2019-07-13 23:55:28 +01:00
Laurent Cozic
0255546ae1 Mobile: Auto-save after toggling to-do state 2019-07-13 23:49:35 +01:00
Laurent Cozic
d066350eea Electron release v1.0.161 2019-07-13 19:18:34 +01:00
Laurent Cozic
a1e3260309 Clipper: Resolves #1160: Allow importing MathJax formulas, in particular from StackExchange 2019-07-13 19:17:28 +01:00
Laurent Cozic
be1f57a8a6 Desktop: Fixes #1727: Keep back button when opening a note link from the search results 2019-07-13 17:58:59 +01:00
Laurent Cozic
ca4dfe0f0f Desktop: Fixes #1724: Improved note selection and scrolling when moving a note to a different notebook 2019-07-13 17:40:09 +01:00
Laurent Cozic
fa69957d3f Desktop, CLI: Fixes #1723: Import Evernote audio files correctly 2019-07-13 17:26:47 +01:00
Laurent Cozic
f7203ed7e2 Desktop: Fixes #1720: Fixed issue with certain commands being repeated in some cases 2019-07-13 16:57:33 +01:00
Laurent Cozic
331858bd4f Desktop: Fixes #1704: Set note title to correct size when zoom is enabled 2019-07-13 16:46:52 +01:00
Laurent Cozic
4d2c9523a3 Desktop: Fixes #1699: Hide toolbar button text when it is below a certain size 2019-07-13 16:42:57 +01:00
Laurent Cozic
4d9d84a8f3 Merge branch 'master' of github.com:laurent22/joplin 2019-07-13 15:58:06 +01:00
Laurent Cozic
ec1089870f All: Fixes #1694: When deleting resource from sync target also delete associated data blob 2019-07-13 15:57:53 +01:00
Helmut K. C. Tessarek
dbedefc021 Desktop: Fixes #1342: Add override for ACE editor shortcut Ctrl+K (#1705) 2019-07-13 14:52:32 +01:00
Kirill Goncharov
f6b0da3f5e Android: Check filesystem permission if filesystem sync target is selected (#1665)
* Android: Check filesystem permission if filesystem sync target is selected

* Android: Change permission error text, don't prevent user from saving settings
2019-07-13 14:51:54 +01:00
Laurent Cozic
85bf89fd97 Android release v1.0.279 2019-07-12 19:44:23 +01:00
Laurent Cozic
c2a80b12f0 Mobile: More rendering optimisations to make animations smoother and to allow typing fast on large notes 2019-07-12 19:36:12 +01:00
Laurent Cozic
981c97cca5 Mobile: Optimising screen rendering to make text input faster 2019-07-12 18:32:08 +01:00
Laurent Cozic
091cbc5355 Mobile: Added sync button animation; Added notebook header; Improved layout of Edit Notebook screen 2019-07-12 18:07:47 +01:00
Laurent Cozic
e5a8114887 Mobile: Added icons to left sidebar 2019-07-11 18:44:26 +01:00
Laurent Cozic
4779fc6f43 Mobile: Remove search and side menu button from config screen 2019-07-11 18:26:04 +01:00
Laurent Cozic
86e7daaec4 Mobile: Cleaned context menu and moved options and metadata to side menu bar 2019-07-11 18:23:29 +01:00
Laurent Cozic
cab73a26e7 Mobile: Adding note side menu 2019-07-11 17:43:55 +01:00
Laurent Cozic
554ddb3b51 Mobile: Grouped file attachment action under one menu 2019-07-11 17:41:13 +01:00
Laurent Cozic
3b22bdb8ae Doc: Fixed Linux install command line for website 2019-07-10 18:18:31 +01:00
Laurent Cozic
5fdd07679e All: Fix: Only log master key ID 2019-07-10 17:35:08 +01:00
Laurent Cozic
69f75a1520 Doc: Updated old links 2019-07-10 17:00:10 +01:00
Laurent Cozic
f9b7acb8b1 Merge branch 'master' of github.com:laurent22/joplin 2019-07-10 16:41:20 +01:00
Laurent Cozic
91f700ad54 Doc: Updated email addresses 2019-07-10 16:41:13 +01:00
Robert
966aca7753 Update nl_NL.po (#1709)
* Update nl_NL.po

* Added ampersands to main menu items 

for the nl-nl translation
2019-07-05 13:00:53 -04:00
Helmut K. C. Tessarek
4de8816ed5 Merge pull request #1710 from Marmo/Marmo-translation-20190705
Translation: minor fixes (de_DE)
2019-07-05 11:26:32 -04:00
Marmo
bea68a1056 Minor translation fixes (de_DE) 2019-07-05 13:54:11 +02:00
Laurent Cozic
6fea7116b6 Mobile: Removed now unneeded Welcome screen 2019-06-29 00:24:00 +01:00
Laurent Cozic
2955914ca5 Mobile: Fixes #1690 (maybe): Process less data simultaneously when building search index to prevent out of memory errors 2019-06-28 23:49:43 +01:00
Laurent Cozic
fd150b5b9d Update website 2019-06-28 16:08:50 +01:00
Laurent Cozic
334ffad196 Doc: Added link to Mastodon feed 2019-06-28 16:04:05 +01:00
Charles
a796a9d179 API: Support is_todo property to allow making a note a todo (#1688) 2019-06-28 13:46:55 +01:00
Helmut K. C. Tessarek
917dcea28a use a command to get the current branch that works with older git versions
closes #1695
2019-06-28 05:02:21 -04:00
Laurent Cozic
c901228dc5 Merge branch 'master' of github.com:laurent22/joplin 2019-06-28 00:51:14 +01:00
Laurent Cozic
da21580785 Mobile: Added 'All notes' screen; Cleaned up header bar buttons; Removed 'body' from note preview object to improve memory usage 2019-06-28 00:51:02 +01:00
Laurent Cozic
4d92187327 Mobile: Added button to fix search engine index 2019-06-28 00:48:52 +01:00
Helmut K. C. Tessarek
207d433fb3 Desktop: Improved: Show git branch and hash in About dialog (#1692)
* show git branch and hash in About dialog

This additional info will only be shown, if the code is not an official release.

An official release is calculated as follows:
- current commit has a tag
- the tag contains the version number of the package

However, the information will always be printed to the console.

* info will now always be shown in About dialog (if available)

ElectronClient/app/compile-package-info.js: added warning
ElectronClient/app/app.js: push info conditionally to the message array

* use sprintf syntax
2019-06-27 15:04:02 +01:00
Laurent Cozic
ffc311d7bd Mobile: Moved slider value to the left so that it is visible while dragging 2019-06-27 00:05:17 +01:00
Laurent Cozic
a1e8e71359 Mobile: Added auto-save 2019-06-26 23:26:26 +01:00
Laurent Cozic
7942e74dc6 Mobile: Fixed field focus logic 2019-06-26 23:21:12 +01:00
Laurent Cozic
c4e21c2b6a Mobile: Added placeholders for note title and body, and focus body by default for notes 2019-06-26 23:00:25 +01:00
Laurent Cozic
0a06aa6f9f Mobile: When inside a note, do not show side menu and search buttons 2019-06-26 22:54:09 +01:00
Laurent Cozic
f985cfa25c Mobile: Removed arrow icon as it is rendered weirdly on device 2019-06-26 18:51:12 +01:00
Laurent Cozic
6e143aef5c Android release v1.0.277 2019-06-26 18:40:43 +01:00
Laurent Cozic
bf16aa6192 All: Better logging in case of error while indexing search 2019-06-26 18:36:42 +01:00
Laurent Cozic
d96c58d192 Mobile: Edit and delete notebooks by long-pressing them, and removed context menu on note lists 2019-06-26 18:28:09 +01:00
Laurent Cozic
e7e0264411 Mobile: Improved side menu: Made button panel fixed at the bottom, and added dark overlay over right side content 2019-06-26 18:05:37 +00:00
Laurent Cozic
430a11282b Mobile: Moved 'New notebook' button to sidebar 2019-06-26 01:10:15 +01:00
Laurent Cozic
9957b2798c Mobile: Moved config menu item to button on side bar 2019-06-26 00:35:26 +01:00
Laurent Cozic
2c5b0010bf Mobile: Removed concept of Advanced Options and move tools to Config screen to clean up context menu 2019-06-26 00:13:13 +01:00
Laurent Cozic
1e3c6ed98c Desktop: When doing local search do not split query into words 2019-06-25 23:09:53 +01:00
Laurent Cozic
484f290eb0 Clipper: Improved clipping selection by removing unecessary elements 2019-06-25 22:11:12 +01:00
Helmut K. C. Tessarek
06ad539941 Clipper release v1.0.17 2019-06-23 23:23:07 -04:00
Laurent Cozic
5b84e80ac4 Clipper: Fixes #1214: Include data from form fields when clipping forms 2019-06-24 00:57:39 +01:00
Laurent Cozic
ca0f349348 Merge branch 'master' of github.com:laurent22/joplin 2019-06-24 00:00:24 +01:00
Laurent Cozic
d79089aea3 Clipper: Fixes #1682: Do not clip elements that should be hidden 2019-06-24 00:00:11 +01:00
Eugene Odeluga
03611ad5ca Desktop: For Ubuntu users, added unity to if condition for desktop icon creation (#1683) 2019-06-23 22:24:58 +01:00
Helmut K. C. Tessarek
c78c1cd3cf Clipper release v1.0.16 2019-06-23 03:06:34 -04:00
水货
55afa7b5b7 Update zh_CN.po (#1681) 2019-06-23 03:00:41 -04:00
Laurent Cozic
a6c407b62b Doc: Mentioned Goto Anything feature 2019-06-22 19:06:54 +01:00
Laurent Cozic
21897a3cd4 Clipper: Resolves #1669: Handle special case of code block used on Microsoft website 2019-06-22 18:57:41 +01:00
Laurent Cozic
5796dd2098 Update translations 2019-06-22 13:10:13 +01:00
abonte
d050071437 update it_IT.po (#1680) 2019-06-22 12:45:35 +01:00
Laurent Cozic
eaf8510f49 Doc: Added requirement for unit tests 2019-06-22 12:44:31 +01:00
Laurent Cozic
6ee2595dce Desktop: Fixes #1676: Preserve user timestamps when adding note via API 2019-06-22 12:31:04 +01:00
Laurent Cozic
0ecf2d6d9a Merge branch 'master' of github.com:laurent22/joplin 2019-06-22 11:23:35 +01:00
Laurent Cozic
50fd075168 Desktop, CLI: Fixes #1672: Fix line break issue when importing certain notes from Evernotes 2019-06-22 11:23:22 +01:00
Helmut K. C. Tessarek
6fa76bb83a fix minor typo in README.md 2019-06-21 23:58:44 -04:00
Laurent Cozic
b175c1fc94 Desktop: Resolves #1649: Cache code blocks in notes to speed up rendering 2019-06-21 08:28:59 +01:00
Caleb John
b461625518 Desktop: Fixed issue with issue with watching file on Linux (#1659)
Watch for rename events in the external editor and re-watch file
2019-06-20 00:44:51 +01:00
Laurent Cozic
3819897ba1 Merge branch 'master' of github.com:laurent22/joplin 2019-06-20 00:02:29 +01:00
Laurent Cozic
6a031857ba Desktop: Fixes #1664: Disable certain menu items when no note or multiple notes are selected, and fixed menu item to set tag 2019-06-20 00:02:13 +01:00
Laurent Cozic
0e57b7eb46 iOS v10.0.36 2019-06-19 23:22:35 +01:00
Laurent Cozic
e21a0ba5b7 Update translations 2019-06-19 23:18:24 +01:00
Laurent Cozic
78f731e616 Merge branch 'master' of github.com:laurent22/joplin 2019-06-19 23:16:45 +01:00
Laurent Cozic
f6688a65ae iOS: Fixed bug that was preventing images from displaying 2019-06-19 23:16:37 +01:00
Laurent Cozic
035b9c6d1a Android: This is now needed to build the app 2019-06-19 21:51:22 +01:00
Laurent Cozic
266ff244d9 Revert "Mobile: Added button to clear local sync state"
Can cause too many issues.

This reverts commit 6ce091f4d8.
2019-06-19 21:50:26 +01:00
Laurent Cozic
de1bfa5c34 Android release v1.0.276 2019-06-19 15:08:44 +01:00
Laurent Cozic
478b8f00d8 Fix release script 2019-06-19 15:04:46 +01:00
Laurent Cozic
860d2fd7f5 Merge branch 'master' of github.com:laurent22/joplin 2019-06-19 15:04:16 +01:00
Laurent Cozic
6ce091f4d8 Mobile: Added button to clear local sync state 2019-06-19 14:57:59 +01:00
Laurent Cozic
ce595ac5e4 Mentioned that it works on FreeBSD 2019-06-19 12:29:15 +01:00
Laurent Cozic
267436a00d Merge pull request #1660 from delta-emil/bulgarian-translation
Localization: add bulgarian
2019-06-18 22:54:52 +01:00
Helmut K. C. Tessarek
97e0f4258a Update localization en_US.po 2019-06-18 12:32:56 -04:00
delta-emil
faa6ccc150 add bulgarian translation 2019-06-16 23:39:20 +03:00
Laurent Cozic
349cade946 All: Optimised resource download queue by exiting early if resources are already downloaded 2019-06-15 21:48:37 +01:00
Laurent Cozic
0200aa92de Doc: Added doc for resource download mode 2019-06-15 21:28:31 +01:00
Laurent Cozic
60ed2cbee5 Mobile: Fixed bug where photo was not displayed just after having taken it 2019-06-15 21:23:30 +01:00
Laurent Cozic
0e7b2f36c8 Fixing release process for Android 2019-06-15 18:58:09 +01:00
Laurent Cozic
4083221b21 Android: Added support for 64-bit hardware 2019-06-15 18:48:07 +01:00
Laurent Cozic
d55c511b4a iOS v10.0.35 2019-06-15 18:18:17 +01:00
Laurent Cozic
7863e1dffe Update website 2019-06-15 10:27:44 +01:00
Laurent Cozic
7cfdf778de Android release v1.0.271 2019-06-15 09:44:34 +01:00
Laurent Cozic
075e55c077 Android release v1.0.269 2019-06-15 01:23:12 +01:00
Laurent Cozic
dc818e8a0c Electron release v1.0.160 2019-06-15 00:57:36 +01:00
Laurent Cozic
caa58dd913 name 2019-06-15 00:57:13 +01:00
Laurent Cozic
c84c3cd026 Merge pull request #1655 from laurent22/react-native-5-9
React Native 5 9
2019-06-14 23:32:12 +01:00
Laurent Cozic
bda5ac9fb5 Upgraded RNdocument-picker 2019-06-14 23:23:01 +01:00
Laurent Cozic
f928f645e5 Upgraded RNSqlite to remove warnings 2019-06-14 23:16:37 +01:00
Laurent Cozic
53d7e906d4 Removed unneeded class that was causing a require cycle 2019-06-14 23:04:05 +01:00
Laurent Cozic
e670b5d03f Upgraded RNDialogbox to remove warnings 2019-06-14 23:02:35 +01:00
Laurent Cozic
2a7d555859 Replaced deprecated Slider component 2019-06-14 22:59:27 +01:00
Laurent Cozic
e6675f500c Removed no longer used WebView module 2019-06-14 22:46:08 +01:00
Laurent Cozic
c3f20d3ebc Getting latest RNCamera to work with Android 2019-06-14 22:45:35 +01:00
Laurent Cozic
ff257060d1 Trying get RNCamera to work in iOS 2019-06-14 22:31:01 +01:00
Laurent Cozic
68cde202a4 Added JSC to improve performances of Android app 2019-06-14 18:37:46 +01:00
Laurent Cozic
1a7a87e170 Remove this for now as are not on AndroidX yet 2019-06-14 18:30:16 +01:00
Laurent Cozic
2990642923 Trying to fix rn-camera but cannot be full fixed yet due to https://github.com/react-native-community/react-native-camera/pull/2306 2019-06-14 09:15:38 +01:00
Laurent Cozic
0818de036e Fixing issue with webview so that WebKit rendering can be used 2019-06-14 09:14:01 +01:00
Laurent Cozic
122bc29035 Mobile: Upgraded WebView 2019-06-14 08:11:15 +01:00
Laurent Cozic
861cf8a1b2 Merge branch 'master' into react-native-5-9 2019-06-14 07:22:57 +01:00
Laurent Cozic
7d6959e9e4 Merge branch 'master' of github.com:laurent22/joplin 2019-06-14 07:22:38 +01:00
Laurent Cozic
85091052e7 iOS: Fixed missing Confirm and Cancel buttons on Alarm dialog 2019-06-14 07:22:25 +01:00
Laurent Cozic
f46ad5bfda Upgrading to React Native 5.9 2019-06-14 07:12:24 +01:00
Laurent Cozic
29f7937fc2 Merge branch 'master' of github.com:laurent22/joplin 2019-06-13 08:48:30 +01:00
Laurent Cozic
7fae9fda10 Desktop: Fixes #1443: Allow opening external editor on new notes 2019-06-13 08:48:19 +01:00
Laurent Cozic
a37961dccc Desktop: Removed placeholder in tag list because it repeats the label 2019-06-13 08:47:47 +01:00
Helmut K. C. Tessarek
55155646aa Clipper release v1.0.15 2019-06-12 19:38:32 -04:00
Laurent Cozic
7bffe86439 Merge branch 'master' of github.com:laurent22/joplin 2019-06-13 00:26:55 +01:00
Laurent Cozic
86136e0c6c Clipper: Fixes #1622: Import named anchors from clipped pages 2019-06-13 00:26:19 +01:00
Helmut K. C. Tessarek
21ae447d9c Clipper: Create a zip file of the source (for validation by Firefox reviewers) (#1648)
The file `joplin-webclipper-source.zip` will be in the `dist` directory of the webclipper.
2019-06-12 23:11:24 +01:00
Laurent Cozic
ad211b4b4e Clipper: Fixes #1600: Handle SVG images and fix issue with invalid file extensions 2019-06-12 09:45:31 +01:00
Laurent Cozic
d6218f35fe Clipper: Fixes #1526: Local files can be clipped again 2019-06-11 01:09:48 +01:00
Laurent Cozic
7af0dcd19a Merge branch 'master' of github.com:laurent22/joplin 2019-06-11 00:11:57 +01:00
Laurent Cozic
e1a52c5606 CLI: Remove Welcome notes because they are mostly relevent to desktop and mobile, and there is already intro text on CLI 2019-06-11 00:11:49 +01:00
Helmut K. C. Tessarek
468c345527 Desktop: Improved: Added shortuct for tags (Cmd+Opt+T / Ctrl+Alt+T) (#1638)
fixes #1626
2019-06-10 23:45:49 +01:00
Caleb John
041bdc08a2 Desktop: New: Highlight notebooks based on depth (#1634)
* Highlight notebooks based on depth

* Adjusted notebook depth targets, and dark theme select color
2019-06-10 23:44:51 +01:00
Laurent Cozic
7535f1a8c6 Update website 2019-06-10 23:41:32 +01:00
Laurent Cozic
0b24433db3 CLI v1.0.140 2019-06-10 08:56:11 +01:00
Laurent Cozic
f7de0c5ffd Merge branch 'master' of github.com:laurent22/joplin 2019-06-10 08:55:46 +01:00
Laurent Cozic
62c48b9a46 CLI: Fixed regression which was preventing decryption on newly created profiles 2019-06-10 08:55:36 +01:00
Helmut K. C. Tessarek
3fafda9684 Desktop: Added menu item to format inline code (#1641)
* Revert "Fix for #1426, aded backticks to auto-wrapping quotes."

This reverts commit 7dee93076a.

* changes to backtick behavior

- add shortcut ``` cmd+` ``` / ``` ctrl+` ```
- add menu item for `Inline code`

* rename menu item Inline Code -> Code
2019-06-10 08:05:20 +01:00
Helmut K. C. Tessarek
2cf1cda128 Update de_DE.po (#1640) 2019-06-10 01:18:07 -04:00
Laurent Cozic
fedee9499b Funding: Remove name for now because it causes an error 2019-06-08 10:38:42 +01:00
Laurent Cozic
7c6c7f34ba Android release v1.0.261 2019-06-08 00:49:41 +01:00
Laurent Cozic
0d65edd0e8 Electron release v1.0.159 2019-06-08 00:47:09 +01:00
Laurent Cozic
d57520c66a Merge branch 'master' of github.com:laurent22/joplin 2019-06-08 00:23:35 +01:00
Laurent Cozic
fa28ae1433 Mobile: Improved and cleaned up config screen 2019-06-08 00:23:17 +01:00
Laurent Cozic
0acf9823e5 Added missing test 2019-06-07 23:39:34 +01:00
Caleb John
799ad5f1da Desktop: Improved tag dialog to make it easier to add and remove tags (#1589) 2019-06-07 23:33:06 +01:00
Laurent Cozic
9f6b3ccf40 All: Improved: Allow using multiple connections to download items while synchronising (#1633)
* Task queue

* All: Improved sync speed by downloading items in parallel

* Improved download queue
2019-06-07 23:20:08 +01:00
Laurent Cozic
df714c357d All: Improved: Better handling of items that cannot be decrypted, including those that cause crashes 2019-06-07 23:11:08 +01:00
Laurent Cozic
de5fdc84f8 Added simple Key-Value store to support temporary data 2019-06-07 08:05:15 +00:00
Laurent Cozic
b5b228af15 Merge branch 'master' of github.com:laurent22/joplin 2019-06-06 16:05:26 +01:00
Laurent Cozic
7a85628f46 Doc: added Twitter feed and Product Hunt page 2019-06-06 16:05:14 +01:00
MichipX
075e76fc4b [Update] Language file: pl_PL.po (#1625)
Addition of strings and correction of mistakes.
2019-06-06 13:40:51 +01:00
Gustavo Reis
172a98fed4 Desktop: Fix icon path and directory in Linux install script (#1612) 2019-06-05 23:14:19 +01:00
Caleb John
409bdd7b78 Desktop, mobile: Upgrade TOC plugin version to 4.0.0 to fix various issues (#1603) 2019-06-05 23:13:00 +01:00
Caleb John
d012c689e1 Desktop: Improve how font size is applied (#1601) 2019-06-05 23:11:18 +01:00
Caleb John
89ec0629e6 Bump version of multimd-tables for mobile (#1597) 2019-06-05 23:02:10 +01:00
Laurent Cozic
b3475ae195 Android release v1.0.260 2019-06-05 18:31:59 +01:00
Laurent Cozic
a72ab67473 CLI v1.0.139 2019-06-05 18:09:10 +01:00
Laurent Cozic
90fbfec914 Update translations 2019-06-05 18:07:11 +01:00
Germán Martín
49ef023a90 Complete Spanish translation (#1613)
* Complete Spanish translation

Add missing translations

* Fix translation

* Review translation with Poedit
2019-06-05 18:02:36 +01:00
abonte
64bfd74f18 Translation: update it_IT.po (#1616)
* update Italian translation

* small fix
2019-06-05 18:02:20 +01:00
Laurent Cozic
655e35056e Merge branch 'master' of github.com:laurent22/joplin 2019-06-05 17:41:40 +01:00
Laurent Cozic
a13ba63ab8 Desktop: New: Added option to open development tools, to make it easier to create custom CSS 2019-06-05 17:41:30 +01:00
Laurent Cozic
e2e00d4c87 Doc: Added info to submit a web clipper bug 2019-06-05 15:09:22 +01:00
Helmut K. C. Tessarek
159dc44f6c Update website 2019-05-28 22:43:54 -04:00
Laurent Cozic
8fe2091926 Desktop, CLI: Fixes #1583: Handle multiple lines in attributes when importing Enex files 2019-05-28 22:52:09 +01:00
Laurent Cozic
c362c38dc0 Merge branch 'master' of github.com:laurent22/joplin 2019-05-28 22:05:25 +01:00
Laurent Cozic
316a52bbc2 All: Improved workflow of downloading and decrypting data during sync 2019-05-28 22:05:11 +01:00
Helmut K. C. Tessarek
0de9f6f944 Merge pull request #1596 from mmahmoudian/Update-Persian-localization
Improved and fixed Persian (fa) translation
2019-05-28 13:48:03 -04:00
Laurent Cozic
3ba021fdd9 Fixed test for Welcome notebook 2019-05-28 18:17:59 +01:00
Laurent Cozic
04c6579f2c All: Fix: Fix issue with revisions being needlessly created when decrypting notes 2019-05-28 18:10:21 +01:00
Mehrad Mahmoudian
bc7bd456a7 [update] Persian (fa) Language 2019-05-28 19:02:02 +03:00
Laurent Cozic
6d7511efbb Electron release v1.0.158 2019-05-27 19:54:04 +01:00
Caleb John
a0fb99d78f Desktop, Mobile: Improved: Enable more options on multimd-table plugin (#1586)
* Update multimd-table and enable options

* Add `options` option to markdown plugins
2019-05-27 19:53:02 +01:00
Laurent Cozic
685a52c2c5 Desktop, Mobile: Fixes #1587: Fix internal note links 2019-05-27 19:49:18 +01:00
Laurent Cozic
fc77419ca1 Desktop: Fixed empty separators in menu 2019-05-27 19:48:09 +01:00
Laurent Cozic
bab3a12e92 Doc: Updated build instructions for Windows 2019-05-27 18:04:24 +01:00
Laurent Cozic
21f0b90f48 Android release v1.0.255 2019-05-26 19:41:20 +01:00
Laurent Cozic
83682ab513 Desktop, Mobile: Improved config screen with dark theme 2019-05-26 19:39:07 +01:00
Laurent Cozic
7b987b5a8f Desktop: Resolves #1575: Make bold text more visible 2019-05-24 23:51:56 +01:00
Laurent Cozic
cb5aa425c8 Updated translations 2019-05-24 23:09:31 +01:00
Laurent Cozic
dd222381dd Translatiobs 2019-05-24 23:08:31 +01:00
Laurent Cozic
d7210811f6 Android release v1.0.254 2019-05-24 17:38:10 +01:00
Laurent Cozic
3a43cfeebf Electron release v1.0.157 2019-05-24 17:35:53 +01:00
Laurent Cozic
31e33c6628 Updated translations 2019-05-24 17:35:44 +01:00
Laurent Cozic
875f8d6997 Electron release v1.0.156 2019-05-24 17:35:04 +01:00
Laurent Cozic
aaaf27af6e Android: Fixed resource loading issue, and improved logging on desktop 2019-05-24 17:34:18 +01:00
Laurent Cozic
43624ffa75 Desktop: Improved: Add number of characters removed and added in revision list 2019-05-24 17:31:18 +01:00
Laurent Cozic
996b6623f1 Android release v1.0.253 2019-05-24 14:50:18 +01:00
1030 changed files with 158077 additions and 55796 deletions

64
.eslintignore Normal file
View File

@@ -0,0 +1,64 @@
*.min.js
.git/
.github/
_mydocs/
_releases/
Assets/
CliClient/build
CliClient/locales
CliClient/locales-build
CliClient/node_modules
CliClient/tests-build
CliClient/tests/enex_to_md
CliClient/tests/html_to_md
CliClient/tests/logs
CliClient/tests/support
CliClient/tests/sync
CliClient/tests/tmp
Clipper/content_scripts/JSDOMParser.js
Clipper/content_scripts/Readability-readerable.js
Clipper/content_scripts/Readability.js
Clipper/dist
Clipper/icons
Clipper/popup/build
Clipper/popup/node_modules
docs/
ElectronClient/dist
ElectronClient/lib
ElectronClient/lib/vendor/sjcl-rn.js
ElectronClient/lib/vendor/sjcl.js
ElectronClient/locales
ElectronClient/node_modules
highlight.pack.js
node_modules/
ReactNativeClient/android
ReactNativeClient/ios
ReactNativeClient/lib/vendor/
ReactNativeClient/lib/welcomeAssets.js
ReactNativeClient/locales
ReactNativeClient/node_modules
readme/
Tools/node_modules
Tools/PortableAppsLauncher
Server/.git/
Server/.github/
Server/docs/
Server/dist/
Server/bin/
Server/node_modules/
ElectronClient/packageInfo.js
ReactNativeClient/pluginAssets/
ReactNativeClient/lib/joplin-renderer/vendor/fountain.min.js
ReactNativeClient/lib/joplin-renderer/assets/
ReactNativeClient/lib/rnInjectedJs/
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
ElectronClient/gui/NoteContentPropertiesDialog.js
ElectronClient/gui/ResourceScreen.js
ElectronClient/gui/ShareNoteDialog.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
ReactNativeClient/lib/JoplinServerApi.js
ReactNativeClient/PluginAssetsLoader.js
ReactNativeClient/setUpQuickActions.js
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD

100
.eslintrc.js Normal file
View File

@@ -0,0 +1,100 @@
module.exports = {
'env': {
'browser': true,
'es6': true,
'node': true,
},
"parser": "@typescript-eslint/parser",
'extends': ['eslint:recommended'],
"settings": {
'react': {
'version': '16.12',
},
},
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly',
// Jasmine variables
'expect': 'readonly',
'describe': 'readonly',
'it': 'readonly',
'beforeAll': 'readonly',
'afterAll': 'readonly',
'beforeEach': 'readonly',
'afterEach': 'readonly',
'jasmine': 'readonly',
// React Native variables
'__DEV__': 'readonly',
// Clipper variables
'browserSupportsPromises_': true,
'chrome': 'readonly',
'browser': 'readonly',
},
'parserOptions': {
'ecmaVersion': 2018,
"ecmaFeatures": {
"jsx": true,
},
"sourceType": "module",
},
'rules': {
// -------------------------------
// Code correctness
// -------------------------------
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"no-unused-vars": "error",
"no-constant-condition": 0,
"no-prototype-builtins": 0,
// This error is always a false positive so far since it detects
// possible race conditions in contexts where we know it cannot happen.
"require-atomic-updates": 0,
// Checks rules of Hooks
"react-hooks/rules-of-hooks": "error",
// Checks effect dependencies
"react-hooks/exhaustive-deps": "error",
// -------------------------------
// Formatting
// -------------------------------
"space-in-parens": ["error", "never"],
"semi": ["error", "always"],
"eol-last": ["error", "always"],
"quotes": ["error", "single"],
"indent": ["error", "tab"],
"comma-dangle": ["error", "always-multiline"],
"no-trailing-spaces": "error",
"linebreak-style": ["error", "unix"],
"prefer-template": ["error"],
"template-curly-spacing": ["error", "never"],
"object-curly-spacing": ["error", "always"],
"array-bracket-spacing": ["error", "never"],
"key-spacing": ["error", {
"beforeColon": false,
"afterColon": true,
"mode": "strict"
}],
"block-spacing": ["error"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"no-spaced-func": ["error"],
"func-call-spacing": ["error"],
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"multiline-comment-style": ["error", "separate-lines"],
"space-before-blocks": "error",
"spaced-comment": ["error", "always"],
"keyword-spacing": ["error", { "before": true, "after": true }]
},
"plugins": [
"react",
"@typescript-eslint",
"react-hooks"
],
};

2
.github/FUNDING.yml vendored
View File

@@ -1,5 +1,5 @@
# These are supported funding model platforms
github: laurent22
patreon: joplin
github: laurent22
custom: https://joplinapp.org/donate/

9
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,9 @@
👉 Please follow one of these issue templates:
- https://github.com/laurent22/joplin/issues/new/choose
⚠️
The GitHub issue tracker is for **bugs** and **security issues** ONLY. For feature requests and support, please use the forum:
https://discourse.joplinapp.org/
⚠️
Note: to keep the backlog clean and actionable, issues may be immediately closed if they do not follow one of the above issue templates.

50
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,50 @@
---
name: "🐛 Bug Report"
about: Report a reproducible bug or regression in Joplin.
title: ''
labels: 'bug'
---
<!--
Please provide a clear and concise description of what the bug is. (In the section Steps To Reproduce.)
Include screenshots if needed.
Please test using the latest Joplin release to make sure your issue has not already been fixed.
-->
<!--
IMPORTANT: If you are reporting a clipper bug, please include an example URL that shows the issue.
Without the URL the issue is likely to be closed.
-->
## Environment
Joplin version:
Platform:
OS specifics:
<!--
Platform can be one of: macOS, Linux, Windows, Android, iOS, terminal (or a combination)
OS specifics: e.g. OS version, Linux distribution, Android/iOS version...
-->
## Steps to reproduce
1.
2.
3.
<!--
Issues without reproduction steps are likely to stall.
-->
## Describe what you expected to happen
## Logfile
<!--
Please attach a debug log. Issues without a debug log are likely to stall.
For information on how to collect a log file: https://joplinapp.org/debugging/
-->

29
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View File

@@ -0,0 +1,29 @@
---
name: "🤔 Questions and Help"
about: The issue tracker is not for questions. Please ask questions on https://discourse.joplinapp.org/.
title: ''
labels: 'invalid'
---
⚠🚨⛔ The issue tracker is not for questions. ⛔🚨⚠
As it happens, support requests that are created as issues are likely to be closed. We want to make sure you are able to find the help you seek.
## Questions and Help
Please read the [documentation](https://joplinapp.org/) and [FAQ](https://joplinapp.org/faq/) first.
### https://discourse.joplinapp.org/
If you have still questions related to Joplin, please open a topic in the [forum](https://discourse.joplinapp.org/).
You can use your GitHub credentials to login to the forum.
## Links
- Documentation: https://joplinapp.org
- FAQ: https://joplinapp.org/faq/
- Forum: https://discourse.joplinapp.org
- How to enable end-to-end encryption: https://joplinapp.org/e2ee/
- API documentation: https://joplinapp.org/api/
- How to enable debug mode: https://joplinapp.org/debugging/

View File

@@ -6,6 +6,8 @@ Please prefix the title with the platform you are targetting:
- "Mobile" for the mobile app (or "Android" / "iOS" if the pull request only applies to one of the mobile platforms)
- "CLI" for the CLI app
If it's not related to any platform (such as a translation, change to the documentation, etc.), simply don't add a platform.
For example: "Desktop: Added new setting to change font", or "Mobile: Fixed config screen error"
PLEASE READ THE GUIDE FIRST: https://github.com/laurent22/joplin/blob/master/CONTRIBUTING.md

25
.github/lock.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
# Configuration for Lock Threads - https://github.com/dessant/lock-threads
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 7
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: []
# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: false
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: false
# Limit to only `issues` or `pulls`
only: issues
# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
# exemptLabels:
# - help-wanted
# lockLabel: outdated
# pulls:
# daysUntilLock: 30
# Repository to extend settings from
# _extends: repo

26
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 90
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- "good first issue"
- "essential"
- "essential-reviewed"
- "help wanted"
- "nice to have"
- "upstream"
- "backlog"
- "high"
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs.
You may comment on the issue and I will leave it open.
Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
only: issues

22
.gitignore vendored
View File

@@ -40,6 +40,22 @@ Tools/github_oauth_token.txt
_releases
ReactNativeClient/lib/csstojs/
ReactNativeClient/lib/rnInjectedJs/
ElectronClient/app/gui/note-viewer/fonts/
ElectronClient/app/gui/note-viewer/lib.js
Tools/commit_hook.txt
ElectronClient/gui/note-viewer/fonts/
ElectronClient/gui/note-viewer/lib.js
Clipper-source/
Clipper/joplin-webclipper-source.zip
joplin-webclipper-source.zip
Tools/commit_hook.txt
.vscode/*
*.map
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
ElectronClient/gui/NoteContentPropertiesDialog.js
ElectronClient/gui/ResourceScreen.js
ElectronClient/gui/ShareNoteDialog.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
ReactNativeClient/lib/JoplinServerApi.js
ReactNativeClient/PluginAssetsLoader.js
ReactNativeClient/setUpQuickActions.js
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD

View File

@@ -1,5 +1,5 @@
# Only build tags (Doesn't work - doesn't build anything)
if: tag IS present
if: tag IS present OR type = pull_request
rvm: 2.3.3
@@ -50,12 +50,63 @@ before_install:
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update || true
sudo apt-get install -y yarn
sudo apt-get install -y gettext
fi
script:
- |
# Install tools
npm install
cd Tools
npm install
cd ../ElectronClient/app
rsync -aP --delete ../../ReactNativeClient/lib/ lib/
npm install && yarn dist
cd ..
# Run test units.
# Only do it for pull requests because Travis randomly fails to run them
# and that would break the desktop release.
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
cd CliClient
npm run test
testResult=$?
if [ $testResult -ne 0 ]; then
exit $testResult
fi
cd ..
fi
# Run linter for pull requests only - this is so that
# bypassing eslint is allowed for urgent fixes.
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
npm run linter-ci ./
testResult=$?
if [ $testResult -ne 0 ]; then
exit $testResult
fi
fi
# Validate translations - this is needed as some users manually
# edit .po files (and often make mistakes) instead of using a proper
# tool like poedit. Doing it for Linux only is sufficient.
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
if [ "$TRAVIS_OS_NAME" != "osx" ]; then
node Tools/validate-translation.js
testResult=$?
if [ $testResult -ne 0 ]; then
exit $testResult
fi
fi
fi
# Find out if we should run the build or not. Electron-builder gets stuck when
# builing PRs so we disable it in this case. The Linux build should provide
# enough info if the app builds or not.
# https://github.com/electron-userland/electron-builder/issues/4263
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
exit 0
fi
fi
# Prepare the Electron app and build it
cd ElectronClient
USE_HARD_LINKS=false yarn dist

Binary file not shown.

Before

Width:  |  Height:  |  Size: 986 B

BIN
Assets/AdresseSupport.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 36 KiB

19
Assets/JoplinIcon.svg Normal file
View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 682.66669 682.66669" height="682.66669" width="682.66669" xml:space="preserve" id="svg2" version="1.1">
<defs id="defs6">
<linearGradient id="linearGradient26" spreadMethod="pad" gradientTransform="matrix(-4387.91,4387.91,4387.91,4387.91,4753.95,366.05)" gradientUnits="userSpaceOnUse" y2="0" x2="1" y1="0" x1="0">
<stop id="stop22" offset="0" style="stop-opacity:1;stop-color:#004caf"/>
<stop id="stop24" offset="1" style="stop-opacity:1;stop-color:#1f95f8"/>
</linearGradient>
</defs>
<g transform="matrix(1.3333333,0,0,-1.3333333,0,682.66667)" id="g10">
<g transform="scale(0.1)" id="g12">
<g id="g14">
<g clip-path="url(#clipPath20)" id="g16">
<path id="path28" style="fill:url(#linearGradient26);fill-opacity:1;fill-rule:nonzero;stroke:none" d="M 3873.89,0 H 1246.11 C 560.754,0 0,560.75 0,1246.11 V 3873.88 C 0,4559.25 560.754,5120 1246.11,5120 H 3873.89 C 4559.25,5120 5120,4559.25 5120,3873.88 V 1246.11 C 5120,560.75 4559.25,0 3873.89,0"/>
</g>
</g>
<path id="path30" style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" d="M 3961.59,4435.23 H 2570.18 c -13.15,0 -23.78,-10.64 -23.78,-23.77 v -441.84 c 0,-14.87 12.04,-26.92 26.92,-26.92 h 190.77 c 77.16,0 139.73,-59.35 146.43,-134.77 V 3505 3336.23 1728.75 1717.36 h -0.05 c 0.48,-16.84 -0.19,-33.4 -1.83,-49.71 -0.18,-2.38 -0.5,-4.73 -0.79,-7.09 -1.1,-9.53 -2.32,-19.01 -4.17,-28.29 -1.01,-5.29 -2.44,-10.44 -3.71,-15.65 -1.71,-6.93 -3.09,-13.97 -5.22,-20.75 -12.58,-40.27 -32.47,-77.62 -59.98,-110.5 -1.01,-1.17 -2.26,-2.25 -3.26,-3.41 -8.39,-9.72 -17.2,-19.19 -26.95,-28.06 -9.84,-8.95 -20.26,-17.27 -31.21,-25 -77.84,-55.14 -182.61,-79.4 -299.67,-68.2 -149.26,14.03 -297.34,81.72 -417.03,190.62 -119.67,108.89 -194.08,243.62 -209.48,379.41 -13.85,121.48 22.55,228.38 102.42,301.05 0.21,0.16 0.4,0.31 0.56,0.48 3.09,2.77 6.49,5.2 9.67,7.87 57.16,47.89 131.67,76.91 216.7,84.91 0.96,0.09 1.88,0.24 2.79,0.32 8.95,0.79 18.07,1.15 27.27,1.49 4.81,0.16 9.56,0.5 14.44,0.54 1.62,0.02 3.16,0.19 4.78,0.19 2.9,0 5.91,-0.38 8.81,-0.42 13.4,-0.21 26.9,-0.76 40.67,-1.94 1.74,-0.14 3.4,-0.08 5.19,-0.24 1.27,-0.13 2.53,-0.41 3.8,-0.54 78,-7.82 155.23,-31.11 228.52,-66.4 1.53,-0.07 3.3,-0.54 5.51,-1.76 22.34,-12.34 26.62,0.9 27.28,9.65 v 382.24 282.82 c 0,19.05 -13.25,35.9 -31.83,39.99 -394.76,86.88 -782.08,-3.55 -1055.38,-252.34 -238.75,-217.18 -354.24,-530.58 -316.82,-859.79 33.39,-293.23 183.91,-574.94 423.88,-793.33 233.89,-212.79 531.69,-345.86 838.88,-374.801 42.33,-3.918 84.86,-5.938 126.36,-5.938 293.38,0 565.61,100.598 766.54,283.379 190.34,173.3 304.35,411.27 321.08,670.16 l 1.55,1697.91 h 0.17 v 453.97 h 0.06 v 7.92 c 1.72,80.12 67.05,144.58 147.61,144.58 h 190.77 c 14.86,0 26.92,12.05 26.92,26.92 v 441.84 c 0,13.13 -10.63,23.77 -23.78,23.77"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
id="svg40"
version="1.1"
width="1536"
height="1536"
viewBox="0 0 1536 1536">
<metadata
id="metadata46">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs44" />
<path
id="path38"
fill="#ffffff"
d="M 373.834,0 C 168.227,0 0,168.223 0,373.834 V 1162.17 C 0,1367.778 168.227,1536 373.834,1536 H 1162.17 C 1367.778,1536 1536,1367.778 1536,1162.17 V 373.834 C 1536,168.224 1367.778,0 1162.17,0 Z m 397.222,205.431 h 417.424 a 7.132,7.132 0 0 1 7.132,7.133 v 132.552 c 0,4.461 -3.619,8.073 -8.077,8.073 h -57.23 c -24.168,0 -43.768,19.338 -44.284,43.374 v 2.377 h -0.017 v 136.191 h -0.053 l -0.466,509.375 c -5.02,77.667 -39.222,149.056 -96.324,201.046 -60.28,54.834 -141.948,85.017 -229.962,85.017 -12.45,0 -25.208,-0.61 -37.907,-1.785 -92.157,-8.682 -181.494,-48.601 -251.662,-112.438 -71.99,-65.517 -117.147,-150.03 -127.164,-238 -11.226,-98.763 23.42,-192.783 95.045,-257.937 81.99,-74.637 198.185,-101.768 316.613,-75.704 5.574,1.227 9.55,6.282 9.55,11.997 v 199.52 c -0.199,2.625 -1.481,6.599 -8.183,2.896 -0.663,-0.365 -1.194,-0.511 -1.653,-0.531 -21.987,-10.587 -45.159,-17.57 -68.559,-19.916 -0.38,-0.04 -0.757,-0.124 -1.138,-0.163 -0.537,-0.048 -1.034,-0.033 -1.556,-0.075 -4.13,-0.354 -8.183,-0.517 -12.203,-0.58 -0.87,-0.011 -1.771,-0.127 -2.641,-0.127 -0.486,0 -0.951,0.05 -1.437,0.057 -1.464,0.011 -2.886,0.115 -4.33,0.163 -2.76,0.102 -5.497,0.211 -8.182,0.448 -0.273,0.024 -0.547,0.07 -0.835,0.097 -25.509,2.4 -47.864,11.104 -65.012,25.47 -0.954,0.802 -1.974,1.53 -2.9,2.36 a 1.34,1.34 0 0 1 -0.168,0.146 c -23.96,21.8 -34.881,53.872 -30.726,90.316 4.62,40.737 26.94,81.156 62.841,113.823 35.908,32.67 80.335,52.977 125.113,57.186 35.118,3.36 66.547,-3.919 89.899,-20.461 a 97.255,97.255 0 0 0 9.365,-7.501 c 2.925,-2.661 5.569,-5.5 8.086,-8.416 0.3,-0.348 0.672,-0.673 0.975,-1.024 8.253,-9.864 14.222,-21.067 17.996,-33.148 0.639,-2.034 1.051,-4.148 1.564,-6.227 0.381,-1.563 0.81,-3.106 1.112,-4.693 0.555,-2.784 0.923,-5.632 1.253,-8.49 0.086,-0.709 0.183,-1.414 0.237,-2.128 0.492,-4.893 0.693,-9.858 0.55,-14.91 h 0.013 V 393.623 c -2.01,-22.626 -20.78,-40.434 -43.928,-40.434 h -57.23 a 8.071,8.071 0 0 1 -8.077,-8.073 V 212.564 a 7.132,7.132 0 0 1 7.136,-7.133 z" />
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

96
Assets/JoplinLetter.eps Normal file
View File

@@ -0,0 +1,96 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: cairo 1.15.6 (http://cairographics.org)
%%CreationDate: Wed Dec 04 10:22:47 2019
%%Pages: 1
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%BoundingBox: 0 0 331 372
%%EndComments
%%BeginProlog
save
50 dict begin
/q { gsave } bind def
/Q { grestore } bind def
/cm { 6 array astore concat } bind def
/w { setlinewidth } bind def
/J { setlinecap } bind def
/j { setlinejoin } bind def
/M { setmiterlimit } bind def
/d { setdash } bind def
/m { moveto } bind def
/l { lineto } bind def
/c { curveto } bind def
/h { closepath } bind def
/re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto
0 exch rlineto 0 rlineto closepath } bind def
/S { stroke } bind def
/f { fill } bind def
/f* { eofill } bind def
/n { newpath } bind def
/W { clip } bind def
/W* { eoclip } bind def
/BT { } bind def
/ET { } bind def
/pdfmark where { pop globaldict /?pdfmark /exec load put }
{ globaldict begin /?pdfmark /pop load def /pdfmark
/cleartomark load def end } ifelse
/BDC { mark 3 1 roll /BDC pdfmark } bind def
/EMC { mark /EMC pdfmark } bind def
/cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def
/Tj { show currentpoint cairo_store_point } bind def
/TJ {
{
dup
type /stringtype eq
{ show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse
} forall
currentpoint cairo_store_point
} bind def
/cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore
cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def
/Tf { pop /cairo_font exch def /cairo_font_matrix where
{ pop cairo_selectfont } if } bind def
/Td { matrix translate cairo_font_matrix matrix concatmatrix dup
/cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point
/cairo_font where { pop cairo_selectfont } if } bind def
/Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def
cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def
/g { setgray } bind def
/rg { setrgbcolor } bind def
/d1 { setcachedevice } bind def
/cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def
/cairo_image { image cairo_flush_ascii85_file } def
/cairo_imagemask { imagemask cairo_flush_ascii85_file } def
%%EndProlog
%%BeginSetup
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
%%PageBoundingBox: 0 0 331 372
%%EndPageSetup
q 0 0 331 372 rectclip
1 0 0 -1 0 372 cm q
0 g
116.223 371.219 m 92.629 368.047 79.551 364.387 63.867 356.57 c 34.902
342.121 12.555 317.016 3.848 289.133 c 0.383 278.039 -0.012 275.32 0 262.508
c 0.008 251.938 0.258 249.27 1.699 244.234 c 4.723 233.676 8.77 226.742
16.426 219.008 c 25.66 209.676 35.293 205.477 48.723 204.93 c 61.566 204.41
70.113 206.629 78.211 212.594 c 83.371 216.391 88.637 223.828 91.578 231.484
c 93.445 236.34 93.59 237.676 94.133 255.008 c 94.699 273.145 95.164 276.641
98.078 284.684 c 102.059 295.672 108.82 303.285 118.855 308.086 c 127.93
312.426 134.84 313.762 146.094 313.348 c 153.41 313.078 156.309 312.625
160.699 311.07 c 173.777 306.434 184.691 296.008 189.934 283.133 c 195.355
269.828 195.344 270.066 195.328 160.883 c 195.313 65.117 195.297 64.098
193.781 60.758 c 190.078 52.586 186.18 51.125 166.371 50.488 c 151.848
50.02 l 151.848 0 l 329.973 0.383 l 330.168 25.199 l 330.367 50.02 l 315.918
50.527 l 307.902 50.809 300.027 51.465 298.23 52.004 c 293.328 53.461 290.211
56.363 288.234 61.305 c 286.504 65.633 l 286.027 164.258 l 285.547 264.215
285.48 266.555 282.668 280.234 c 277.531 305.25 259.137 330.953 234.594
347.406 c 214.891 360.621 193.523 367.852 164.223 371.227 c 156.445 372.121
122.898 372.117 116.223 371.219 c h
116.223 371.219 m f
Q Q
showpage
%%Trailer
end restore
%%EOF

BIN
Assets/JoplinLetter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -9,54 +7,63 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="116.54575mm"
height="131.19589mm"
viewBox="0 0 116.54575 131.19589"
viewBox="0 0 682.66669 682.66669"
height="682.66669"
width="682.66669"
xml:space="preserve"
id="svg2"
version="1.1"
id="svg8"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
sodipodi:docname="JoplinLetter.svg">
sodipodi:docname="JoplinLetter.svg"
inkscape:version="1.0beta1 (32d4812, 2019-09-19)"><metadata
id="metadata23">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
inkscape:document-rotation="0"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="907"
id="namedview21"
showgrid="false"
inkscape:zoom="0.35"
inkscape:cx="400"
inkscape:cy="560"
inkscape:window-x="0"
inkscape:window-y="23"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.49497475"
inkscape:cx="152.11122"
inkscape:cy="-26.090631"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-2.7903623,-2.175533)">
<path
style="fill:#000000;stroke-width:0.26458332"
d="m 43.790458,133.13317 c -8.32317,-1.11843 -12.937,-2.40956 -18.46857,-5.16822 -10.21924,-5.09644 -18.1023498,-13.95338 -21.1745998,-23.79038 -1.22214,-3.91319 -1.3607,-4.872332 -1.35685,-9.392712 0.003,-3.72804 0.0907,-4.66941 0.59927,-6.44569 1.0664,-3.7246 2.49409,-6.1704 5.19529,-8.90014 3.2574198,-3.29184 6.6565798,-4.77332 11.3929598,-4.96548 4.53189,-0.18388 7.54661,0.59927 10.40386,2.70266 1.82035,1.34007 3.67693,3.96421 4.71565,6.66525 0.65839,1.71204 0.70959,2.1839 0.90042,8.29756 0.19973,6.39855 0.36372,7.6318 1.39223,10.469902 1.40468,3.87611 3.78939,6.56189 7.33039,8.25588 3.20047,1.53108 5.63801,2.00183 9.60817,1.8556 2.58182,-0.0951 3.60332,-0.25442 5.15337,-0.80371 4.61358,-1.63493 8.46322,-5.31381 10.31326,-9.85579 1.91154,-4.693002 1.90785,-4.609372 1.90213,-43.127082 -0.005,-33.78395 -0.0106,-34.14337 -0.54484,-35.32188 -1.30698,-2.882895 -2.68223,-3.398165 -9.66971,-3.622945 l -5.12472,-0.16486 V 10.998334 2.175533 l 31.41927,0.06723 31.419272,0.06723 0.0697,8.755726 0.0697,8.755724 -5.09675,0.1793 c -2.82759,0.0995 -5.60596,0.33101 -6.24051,0.52006 -1.72896,0.5151 -2.82899,1.538795 -3.52569,3.281045 l -0.61059,1.5269 -0.16762,34.7927 c -0.16988,35.26321 -0.19381,36.08914 -1.18496,40.914372 -1.81292,8.82581 -8.301582,17.89221 -16.959672,23.69719 -6.95182,4.66099 -14.48972,7.21214 -24.82645,8.40235 -2.7431,0.31585 -14.57797,0.31433 -16.93333,-0.002 z"
id="path21"
inkscape:connector-curvature="0" />
</g>
id="defs6" />
<path
id="path30"
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.133333;stop-opacity:1"
d="M 528.21199,91.302685 H 342.69066 c -1.75334,0 -3.17067,1.418666 -3.17067,3.169333 v 58.912002 c 0,1.98266 1.60533,3.58933 3.58933,3.58933 h 25.436 c 10.288,0 18.63067,7.91333 19.524,17.96933 v 40.39067 22.50266 214.33067 1.51866 h -0.007 c 0.064,2.24534 -0.0253,4.45334 -0.244,6.628 -0.024,0.31734 -0.0667,0.63067 -0.10534,0.94534 -0.14666,1.27066 -0.30933,2.53466 -0.556,3.772 -0.13466,0.70533 -0.32533,1.392 -0.49466,2.08666 -0.228,0.924 -0.412,1.86267 -0.696,2.76667 -1.67734,5.36933 -4.32934,10.34933 -7.99734,14.73333 -0.13466,0.156 -0.30133,0.3 -0.43466,0.45467 -1.11867,1.296 -2.29334,2.55866 -3.59334,3.74133 -1.312,1.19333 -2.70133,2.30267 -4.16133,3.33333 -10.37867,7.352 -24.348,10.58667 -39.956,9.09334 -19.90133,-1.87067 -39.64533,-10.896 -55.604,-25.416 -15.956,-14.51867 -25.87733,-32.48267 -27.93066,-50.588 -1.84667,-16.19733 3.00666,-30.45067 13.656,-40.14 0.028,-0.0213 0.0533,-0.0413 0.0747,-0.064 0.412,-0.36933 0.86534,-0.69333 1.28934,-1.04933 7.62133,-6.38534 17.556,-10.25467 28.89333,-11.32134 0.128,-0.012 0.25067,-0.032 0.372,-0.0427 1.19333,-0.10534 2.40933,-0.15334 3.636,-0.19867 0.64133,-0.0213 1.27467,-0.0667 1.92533,-0.072 0.216,-0.003 0.42134,-0.0253 0.63734,-0.0253 0.38666,0 0.788,0.0507 1.17466,0.056 1.78667,0.028 3.58667,0.10133 5.42267,0.25866 0.232,0.0187 0.45333,0.0107 0.692,0.032 0.16933,0.0173 0.33733,0.0547 0.50667,0.072 10.4,1.04267 20.69733,4.148 30.46933,8.85334 0.204,0.009 0.44,0.072 0.73466,0.23466 2.97867,1.64534 3.54934,-0.12 3.63734,-1.28666 V 329.57734 291.868 c 0,-2.54 -1.76667,-4.78666 -4.244,-5.332 -52.63467,-11.584 -104.27733,0.47334 -140.71733,33.64534 -31.83333,28.95733 -47.232,70.74399 -42.24267,114.63866 4.452,39.09733 24.52134,76.65866 56.51733,105.77733 31.18534,28.372 70.892,46.11467 111.85067,49.97347 5.644,0.5224 11.31467,0.79173 16.848,0.79173 39.11733,0 75.41466,-13.41307 102.20533,-37.78387 25.37867,-23.10666 40.58,-54.836 42.81066,-89.35466 l 0.20667,-226.388 h 0.0227 v -60.52933 h 0.008 v -1.056 c 0.22933,-10.68266 8.94,-19.27733 19.68133,-19.27733 h 25.436 c 1.98133,0 3.58933,-1.60667 3.58933,-3.58933 V 94.472018 c 0,-1.750667 -1.41733,-3.169333 -3.17066,-3.169333"
inkscape:connector-curvature="0" />
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 679 B

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 968 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
Assets/SquareIcon1024.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
Assets/SquareIcon512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 679 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Binary file not shown.

139
BUILD.md
View File

@@ -1,79 +1,116 @@
[![Travis Build Status](https://travis-ci.org/laurent22/joplin.svg?branch=master)](https://travis-ci.org/laurent22/joplin) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/laurent22/joplin?branch=master&passingText=master%20-%20OK&svg=true)](https://ci.appveyor.com/project/laurent22/joplin)
# General information
# Building the applications
- All the applications share the same library, which, for historical reasons, is in ReactNativeClient/lib. This library is copied to the relevant directories when building each app.
Note that all the applications share the same library, which, for historical reasons, is in `ReactNativeClient/lib`. This library is copied to the relevant directories when building each app.
## macOS dependencies
brew install yarn node
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
## Linux and Windows (WSL) dependencies
## Required dependencies
- Install yarn - https://yarnpkg.com/lang/en/docs/install/
- 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`
- Install node - https://nodejs.org/en/
# Building the tools
## Building
Before building any of the applications, you need to build the tools:
Before doing anything else, from the root of the project, run:
```
cd Tools
npm install
npm install
Then you can test the various applications:
## Testing the desktop application
cd ElectronClient
npm start
If you'd like to auto-reload the app on changes rather than having to quit and restart it manually each time, you can use [watchman-make](https://facebook.github.io/watchman/docs/watchman-make.html):
```sh
cd ElectronClient
watchman-make -p '**/*.js' '**/*.jsx' --run "npm start"
```
# Building the Electron application
It still requires you to quit the application each time you want it to rebuild, but at least you don't have to re-run `"npm start"` each time. Here's what the workflow loop looks like in practice:
```
cd ElectronClient/app
rsync --delete -a ../../ReactNativeClient/lib/ lib/
npm install
yarn dist
```
1. Edit and save files in your text editor.
2. Switch to the Electron app and <kbd>cmd</kbd>+<kbd>Q</kbd> to quit it.
3. `watchman` immediately restarts the app for you (whereas usually you'd have to switch back to the terminal, type `"npm start"`, and hit enter).
## Testing the Terminal application
cd CliClient
npm start
## Testing 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 "React Native CLI Quickstart" tab.
Then:
cd ReactNativeClient
npm start-android
# Or: npm start-ios
To run the iOS application, it might be easier to open the file `ios/Joplin.xcworkspace` on XCode and run the app from there.
Normally the bundler should start automatically with the application. If it doesn't run `npm start`.
## Building the clipper
cd Clipper/popup
npm install
npm run watch # To watch for changes
To test the extension please refer to the relevant pages for each browser: [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#Trying_it_out) / [Chrome](https://developer.chrome.com/extensions/faq#faq-dev-01). Please note that the extension in dev mode will only connect to a dev instance of the desktop app (and vice-versa).
## Watching files
To make changes to the application, you'll need to rebuild any TypeScript file you've changed, and rebuild the lib. The simplest way to do all this is to watch for changes from the root of the project. Simply run this command, and it should take care of the rest:
npm run watch
Running `npm run build` would have the same effect, but without watching.
## Running an application with additional parameters
You can specify additional parameters when running the desktop or CLI application. To do so, add `--` to the `npm start` command, followed by your flags. For example:
npm start -- --profile ~/MyTestProfile
## TypeScript
Most of the application is written in JavaScript, however new classes and files should generally be written in [TypeScript](https://www.typescriptlang.org/). All TypeScript files are generated next to the .ts or .tsx file. So for example, if there's a file "lib/MyClass.ts", there will be a generated "lib/MyClass.js" next to it. It is implemented that way as it requires minimal changes to integrate TypeScript in the existing JavaScript code base.
# Troubleshooting desktop application
## On Linux and macOS
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`
If you get a node-gyp related error you might need to manually install it: `npm install -g node-gyp`.
If you get a node-gyp related error, you might need to manually install it: `npm install -g node-gyp`.
If you get the error `libtool: unrecognized option '-static'`, follow the instructions [in this post](https://stackoverflow.com/a/38552393/561309) to use the correct libtool version.
That will create the executable file in the `dist` directory.
## On Windows
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
```
If node-gyp does not works (MSBUILD: error MSB3428: Could not load the Visual C++ component "VCBuild.exe"), you might need to install the `windows-build-tools` using `npm install --global windows-build-tools`.
If node-gyp does not work (MSBUILD: error MSB3428: Could not load the Visual C++ component "VCBuild.exe"), you might need to install `windows-build-tools` using `npm install --global windows-build-tools`.
If `yarn dist` fails, it may need administrative rights.
The [building\_win32\_tips on this page](./readme/building_win32_tips.md) might be helpful.
If you get an `error MSB8020: The build tools for v140 cannot be found.` try to run with a different toolset version, eg `npm install --toolset=v141` (See [here](https://github.com/mapbox/node-sqlite3/issues/1124) for more info).
# Building the Mobile application
## Other issues
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.
> The application window doesn't open or is white
Then, from `/ReactNativeClient`, run `npm install`, then `react-native run-ios` or `react-native run-android`.
This is an indication that there's an early initialisation error. Try this:
# Building the Terminal application
- In ElectronAppWrapper, set `debugEarlyBugs` to `true`. This will force the window to show up and should open the console next to it, which should display any error.
- In more rare cases, an already open instance of Joplin can create strange low-level bugs that will display no error but will result in this white window. A non-dev instance of Joplin, or a dev instance that wasn't properly closed might cause this. So make sure you close everything and try again. Perhaps even other Electron apps running (Skype, Slack, etc.) could cause this?
- Also try to delete node_modules and rebuild.
- If all else fails, switch your computer off and on again, to make sure you start clean.
```
cd CliClient
npm install
./build.sh
rsync --delete -aP ../ReactNativeClient/locales/ build/locales/
```
> How to work on the app from Windows?
Run `run.sh` to start the application for testing.
**You should not use WSL at all** because this is a GUI app that lives outside of WSL, and the WSL layer can cause all kind of very hard to debug issues. It can also lock files in node_modules that cannot be unlocked when the app crashes. (You need to restart your computer.) Likewise, don't run the TypeScript watch command from WSL.
So everything should be done from a Windows Command prompt or Windows PowerShell running as Administrator. All build and start commands are designed to work cross-platform, including on Windows.

View File

@@ -1,44 +1,92 @@
# User support
The [Joplin Forum](https://discourse.joplinapp.org/) is the community driven place for user support, general discussion about Joplin, problems with installation, new features and software development questions. It is possible to login with your GitHub account.
The [Joplin Forum](https://discourse.joplinapp.org/) is the community driven place for user support, general discussion about Joplin, problems with installation, new features and software development questions. It is possible to login with your GitHub account. Don't use the issue tracker for support questions.
# Reporting a bug
File bugs in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). Please follow these guidelines:
- Search existing issues first, make sure yours hasn't already been reported.
- Don't use the issue tracker for support questions.
- Consider [enabling debug mode](https://github.com/laurent22/joplin/blob/master/readme/debugging.md) so that you can provide as much details as possible when reporting the issue.
- Stay on topic, but describe the issue in detail so that others can reproduce it.
- Please follow the template.
- Consider [enabling debug mode](https://joplinapp.org/debugging/) so that you can provide as much details as possible when reporting the issue.
- Stay on topic, but describe the issue in detail so that others can **reproduce** it.
- **Provide a screenshot** if possible. A screenshot showing the problem is often more useful than a paragraph describing it.
- For web clipper bugs, **please provide the URL causing the issue**. Sometimes the clipper works in one page but not in another so it is important to know what URL has a problem.
# Feature requests
Please check that your request has not already been posted in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). If it has, **up-voting the issue** increases the chances it'll be noticed and implemented in the future. "+1" comments are not tracked.
Feature requests **must be opened and discussed on the [forum](https://discourse.joplinapp.org/c/features)**. After they have been accepted, they can be added to the GitHub tracker.
As a general rule, suggestions to _improve Joplin_ should be posted first in the [Joplin Forum](https://discourse.joplinapp.org/) for discussion.
Please check that your request has not already been posted on the forum or the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). If it has, **up-voting the issue or topic** increases the chances it'll be noticed and implemented in the future. "+1" comments are not tracked.
Avoid listing multiple requests in one report in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). One issue per request makes it easier to track and discuss it.
Avoid listing multiple requests in one topic. One topic per request makes it easier to track and discuss it.
Finally, when submitting a pull request, don't forget to [test your code](#unit-tests).
# Contribute to the project
## Contributing to Joplin's translation
Joplin is available in multiple languages thanks to the help of its users. You can help translate Joplin to your language or keep it up to date. Please read the documentation about [Localisation](https://github.com/laurent22/joplin#localisation).
Joplin is available in multiple languages thanks to the help of its users. You can help translate Joplin to your language or keep it up to date. Please read the documentation about [Localisation](https://joplinapp.org/#localisation).
## Contributing to Joplin's code
If you want to start contributing to the project's code, please follow these guidelines before creating a pull request:
- Bug fixes are always welcome. Start by reviewing the list of [essential issues](https://github.com/laurent22/joplin/issues?q=is%3Aissue+is%3Aopen+label%3Aessential)
- Bug fixes are always welcome. Start by reviewing the [list of bugs](https://github.com/laurent22/joplin/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
- A good way to easily start contributing is to pick and work on a [good first issue](https://github.com/laurent22/joplin/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). We try to make these issues as clear as possible and provide basic info on how the code should be changed, and if something is unclear feel free to ask for more information on the issue.
- Before adding a new feature, ask about it in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue) or the [Joplin Forum](https://discourse.joplinapp.org/), or check if existing discussions exist to make sure the new functionality is desired.
- **Changes that will consist in more than 50 lines of code should be discussed the [Joplin Forum](https://discourse.joplinapp.org/)**, so that you don't spend too much time implementing something that might not be accepted.
- All the applications share the same backend (database, synchronisation, settings, models, business logic, etc.) so if you change something in the backend in one app, makes sure it still work in the other apps. Usually it does, but keep this in mind.
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
### Coding style
There are only two rules, but not following them means the pull request will not be accepted (it can be accepted once the issues are fixed):
Coding style is enforced by a pre-commit hook that runs eslint. This hook is installed whenever running `npm install` on any of the application directory. If for some reason the pre-commit hook didn't get installed, you can manually install it by running `npm install` at the root of the repository.
- **Please use tabs, NOT spaces.**
- **Please do not add or remove optional characters, such as spaces or colons.** Please setup your editor so that it only changes what you are working on and is not making automated changes elsewhere. The reason for this is that small white space changes make diff hard to read and can cause needless conflicts.
For new React components, please use [React Hooks](https://reactjs.org/docs/hooks-intro.html). For new code in general, please use TypeScript (unless you are modifying a file that was originally in JavaScript).
For changes made to the Desktop client that affect the user interface, refer to `ElectronClient/app/theme.js` for all styling information. The goal is to create a consistent user interface to allow for easy navigation of Joplin's various features and improve the overall user experience.
### Unit tests
When submitting a pull request for a new feature or bug fix, please add unit tests for your code. Unit testing GUI changes is not always possible so it is not required, but any change in a file under /lib for example should be unit tested.
The tests are under CliClient/tests. To get them running, you first need to build the CLI app:
```sh
npm run tsc # Build the .ts and .tsx files
cd CliClient
npm install
```
To run all the test units:
```sh
npm run test
```
To run just one particular file:
```sh
npm run test -- --filter=markdownUtils # Don't add the .js extension
```
To filter tests. For example, to run all the test units that contain "should handle conflict" in their description:
```sh
npm run test -- --filter="should handle conflict"
```
If you get the error `Cannot find module '/joplin/CliClient/node_modules/sqlite3/lib/binding/node-v79-darwin-x64/node_sqlite3.node'`, you may need to run `npm rebuild`.
## About abandoned pull requests
It happens that a pull request is started but not finished and despite our attempts to contact the contributor, we don’t hear from them again.
In that case we will not merge the pull request, even if only small changes are missing. Our policy is simply to close the pull request. Why? Because an unfinished pull request essentially means giving us work and moving on. We would rather not encourage this behaviour.
Also, please note that since we have spent time reviewing the pull request and proposing solutions, we reserve the right to re-use that knowledge to create a new pull request, potentially based on your changes.
We’d much prefer that you complete the pull request though, so we’ll be sure to ping you a few times before that!

13
CliClient/.eslintrc.js Normal file
View File

@@ -0,0 +1,13 @@
module.exports = {
"overrides": [
{
"files": ["tests/**/*.js"],
'rules': {
// Ignore all unused function arguments, because in some
// case they are kept to indicate the function signature.
"no-unused-vars": ["error", { "argsIgnorePattern": ".*" }],
"@typescript-eslint/no-unused-vars": 0,
}
},
],
};

View File

@@ -1,4 +1,3 @@
build/
node_modules/
app/src
tests-build/
@@ -20,4 +19,5 @@ tests/sync
out.txt
linkToLocal.sh
yarn-error.log
tests/support/dropbox-auth.txt
tests/support/dropbox-auth.txt
build/

View File

@@ -1,14 +1,11 @@
const { _ } = require('lib/locale.js');
const { Logger } = require('lib/logger.js');
const Resource = require('lib/models/Resource.js');
const { netUtils } = require('lib/net-utils.js');
const http = require("http");
const urlParser = require("url");
const http = require('http');
const urlParser = require('url');
const enableServerDestroy = require('server-destroy');
class ResourceServer {
constructor() {
this.server_ = null;
this.logger_ = new Logger();
@@ -31,7 +28,7 @@ class ResourceServer {
baseUrl() {
if (!this.port_) return '';
return 'http://127.0.0.1:' + this.port_;
return `http://127.0.0.1:${this.port_}`;
}
setLinkHandler(handler) {
@@ -40,7 +37,7 @@ class ResourceServer {
async start() {
this.port_ = await netUtils.findAvailablePort([9167, 9267, 8167, 8267]);
if (!this.port_) {
if (!this.port_) {
this.logger().error('Could not find available port to start resource server. Please report the error at https://github.com/laurent22/joplin');
return;
}
@@ -48,16 +45,15 @@ class ResourceServer {
this.server_ = http.createServer();
this.server_.on('request', async (request, response) => {
const writeResponse = (message) => {
const writeResponse = message => {
response.write(message);
response.end();
}
};
const url = urlParser.parse(request.url, true);
let resourceId = url.pathname.split('/');
if (resourceId.length < 2) {
writeResponse('Error: could not get resource ID from path name: ' + url.pathname);
writeResponse(`Error: could not get resource ID from path name: ${url.pathname}`);
return;
}
resourceId = resourceId[1];
@@ -66,9 +62,10 @@ class ResourceServer {
try {
const done = await this.linkHandler_(resourceId, response);
if (!done) throw new Error('Unhandled resource: ' + resourceId);
if (!done) throw new Error(`Unhandled resource: ${resourceId}`);
} catch (error) {
response.setHeader('Content-Type', 'text/plain');
// eslint-disable-next-line require-atomic-updates
response.statusCode = 400;
response.write(error.message);
}
@@ -76,7 +73,7 @@ class ResourceServer {
response.end();
});
this.server_.on('error', (error) => {
this.server_.on('error', error => {
this.logger().error('Resource server:', error);
});
@@ -91,7 +88,6 @@ class ResourceServer {
if (this.server_) this.server_.destroy();
this.server_ = null;
}
}
module.exports = ResourceServer;
module.exports = ResourceServer;

View File

@@ -5,13 +5,12 @@ const Tag = require('lib/models/Tag.js');
const BaseModel = require('lib/BaseModel.js');
const Note = require('lib/models/Note.js');
const Resource = require('lib/models/Resource.js');
const { cliUtils } = require('./cli-utils.js');
const { reducer, defaultState } = require('lib/reducer.js');
const { splitCommandString } = require('lib/string-utils.js');
const { reg } = require('lib/registry.js');
const { _ } = require('lib/locale.js');
const Entities = require('html-entities').AllHtmlEntities;
const htmlentities = (new Entities()).encode;
const htmlentities = new Entities().encode;
const chalk = require('chalk');
const tk = require('terminal-kit');
@@ -20,12 +19,10 @@ const Renderer = require('tkwidgets/framework/Renderer.js');
const DecryptionWorker = require('lib/services/DecryptionWorker');
const BaseWidget = require('tkwidgets/BaseWidget.js');
const ListWidget = require('tkwidgets/ListWidget.js');
const TextWidget = require('tkwidgets/TextWidget.js');
const HLayoutWidget = require('tkwidgets/HLayoutWidget.js');
const VLayoutWidget = require('tkwidgets/VLayoutWidget.js');
const ReduxRootWidget = require('tkwidgets/ReduxRootWidget.js');
const RootWidget = require('tkwidgets/RootWidget.js');
const WindowWidget = require('tkwidgets/WindowWidget.js');
const NoteWidget = require('./gui/NoteWidget.js');
@@ -37,7 +34,6 @@ const StatusBarWidget = require('./gui/StatusBarWidget.js');
const ConsoleWidget = require('./gui/ConsoleWidget.js');
class AppGui {
constructor(app, store, keymap) {
try {
this.app_ = app;
@@ -50,12 +46,12 @@ class AppGui {
// 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',
focus_next: 'TAB',
focus_previous: 'SHIFT_TAB',
move_up: 'UP',
move_down: 'DOWN',
page_down: 'PAGE_DOWN',
page_up: 'PAGE_UP',
};
this.renderer_ = null;
@@ -64,7 +60,7 @@ class AppGui {
this.renderer_ = new Renderer(this.term(), this.rootWidget_);
this.app_.on('modelAction', async (event) => {
this.app_.on('modelAction', async event => {
await this.handleModelAction(event.action);
});
@@ -83,7 +79,7 @@ class AppGui {
reg.setupRecurrentSync();
DecryptionWorker.instance().scheduleStart();
} catch (error) {
this.fullScreen(false);
if (this.term_) { this.fullScreen(false); }
console.error(error);
process.exit(1);
}
@@ -134,7 +130,7 @@ class AppGui {
};
folderList.name = 'folderList';
folderList.vStretch = true;
folderList.on('currentItemChange', async (event) => {
folderList.on('currentItemChange', async event => {
const item = folderList.currentItem;
if (item === '-') {
@@ -169,7 +165,7 @@ class AppGui {
});
}
});
this.rootWidget_.connect(folderList, (state) => {
this.rootWidget_.connect(folderList, state => {
return {
selectedFolderId: state.selectedFolderId,
selectedTagId: state.selectedTagId,
@@ -196,7 +192,7 @@ class AppGui {
id: note ? note.id : null,
});
});
this.rootWidget_.connect(noteList, (state) => {
this.rootWidget_.connect(noteList, state => {
return {
selectedNoteId: state.selectedNoteIds.length ? state.selectedNoteIds[0] : null,
items: state.notes,
@@ -210,7 +206,7 @@ class AppGui {
borderBottomWidth: 1,
borderLeftWidth: 1,
};
this.rootWidget_.connect(noteText, (state) => {
this.rootWidget_.connect(noteText, state => {
return {
noteId: state.selectedNoteIds.length ? state.selectedNoteIds[0] : null,
notes: state.notes,
@@ -225,7 +221,7 @@ class AppGui {
borderLeftWidth: 1,
borderRightWidth: 1,
};
this.rootWidget_.connect(noteMetadata, (state) => {
this.rootWidget_.connect(noteMetadata, state => {
return { noteId: state.selectedNoteIds.length ? state.selectedNoteIds[0] : null };
});
noteMetadata.hide();
@@ -292,7 +288,7 @@ class AppGui {
if (!cmd) return;
const isConfigPassword = cmd.indexOf('config ') >= 0 && cmd.indexOf('password') >= 0;
if (isConfigPassword) return;
this.stdout(chalk.cyan.bold('> ' + cmd));
this.stdout(chalk.cyan.bold(`> ${cmd}`));
}
setupKeymap(keymap) {
@@ -301,7 +297,7 @@ class AppGui {
for (let i = 0; i < keymap.length; i++) {
const item = Object.assign({}, keymap[i]);
if (!item.command) throw new Error('Missing command for keymap item: ' + JSON.stringify(item));
if (!item.command) throw new Error(`Missing command for keymap item: ${JSON.stringify(item)}`);
if (!('type' in item)) item.type = 'exec';
@@ -408,7 +404,7 @@ class AppGui {
activeListItem() {
const widget = this.widget('mainWindow').focusedWidget;
if (!widget) return null;
if (widget.name == 'noteList' || widget.name == 'folderList') {
return widget.currentItem;
}
@@ -430,25 +426,21 @@ class AppGui {
}
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);
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) {
@@ -462,9 +454,7 @@ class AppGui {
} 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();
@@ -475,22 +465,15 @@ class AppGui {
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);
await this.processPromptCommand(cmd);
} else {
throw new Error('Unknown command: ' + cmd);
throw new Error(`Unknown command: ${cmd}`);
}
}
@@ -501,7 +484,7 @@ class AppGui {
// this.logger().debug('Got command: ' + cmd);
try {
try {
let note = this.widget('noteList').currentItem;
let folder = this.widget('folderList').currentItem;
let args = splitCommandString(cmd);
@@ -511,7 +494,7 @@ class AppGui {
args[i] = note ? note.id : '';
} else if (args[i] == '$b') {
args[i] = folder ? folder.id : '';
} else if (args[i] == '$c') {
} else if (args[i] == '$c') {
const item = this.activeListItem();
args[i] = item ? item.id : '';
}
@@ -523,7 +506,7 @@ class AppGui {
}
this.widget('console').scrollBottom();
// Invalidate so that the screen is redrawn in case inputting a command has moved
// the GUI up (in particular due to autocompletion), it's moved back to the right position.
this.widget('root').invalidate();
@@ -603,17 +586,17 @@ class AppGui {
async setupResourceServer() {
const linkStyle = chalk.blue.underline;
const noteTextWidget = this.widget('noteText');
const resourceIdRegex = /^:\/[a-f0-9]+$/i
const resourceIdRegex = /^:\/[a-f0-9]+$/i;
const noteLinks = {};
const hasProtocol = function(s, protocols) {
if (!s) return false;
s = s.trim().toLowerCase();
for (let i = 0; i < protocols.length; i++) {
if (s.indexOf(protocols[i] + '://') === 0) return true;
if (s.indexOf(`${protocols[i]}://`) === 0) return true;
}
return false;
}
};
// By default, before the server is started, only the regular
// URLs appear in blue.
@@ -637,29 +620,31 @@ class AppGui {
const link = noteLinks[path];
if (link.type === 'url') {
response.writeHead(302, { 'Location': link.url });
response.writeHead(302, { Location: link.url });
return true;
}
if (link.type === 'item') {
const itemId = link.id;
let item = await BaseItem.loadItemById(itemId);
if (!item) throw new Error('No item with ID ' + itemId); // Should be nearly impossible
if (!item) throw new Error(`No item with ID ${itemId}`); // Should be nearly impossible
if (item.type_ === BaseModel.TYPE_RESOURCE) {
if (item.mime) response.setHeader('Content-Type', item.mime);
response.write(await Resource.content(item));
} else if (item.type_ === BaseModel.TYPE_NOTE) {
const html = [`
const html = [
`
<!DOCTYPE html>
<html class="client-nojs" lang="en" dir="ltr">
<head><meta charset="UTF-8"/></head><body>
`];
html.push('<pre>' + htmlentities(item.title) + '\n\n' + htmlentities(item.body) + '</pre>');
`,
];
html.push(`<pre>${htmlentities(item.title)}\n\n${htmlentities(item.body)}</pre>`);
html.push('</body></html>');
response.write(html.join(''));
} else {
throw new Error('Unsupported item type: ' + item.type_);
throw new Error(`Unsupported item type: ${item.type_}`);
}
return true;
@@ -679,7 +664,7 @@ class AppGui {
noteLinks[index] = {
type: 'item',
id: url.substr(2),
};
};
} else if (hasProtocol(url, ['http', 'https', 'file', 'ftp'])) {
noteLinks[index] = {
type: 'url',
@@ -691,7 +676,7 @@ class AppGui {
return url;
}
return linkStyle(this.resourceServer_.baseUrl() + '/' + index);
return linkStyle(`${this.resourceServer_.baseUrl()}/${index}`);
},
};
}
@@ -710,8 +695,7 @@ class AppGui {
term.grabInput();
term.on('key', async (name, matches, data) => {
term.on('key', async (name) => {
// -------------------------------------------------------------------------
// Handle special shortcuts
// -------------------------------------------------------------------------
@@ -729,13 +713,13 @@ class AppGui {
return;
}
if (name === 'CTRL_C' ) {
if (name === 'CTRL_C') {
const cmd = this.app().currentCommand();
if (!cmd || !cmd.cancellable() || this.commandCancelCalled_) {
this.stdout(_('Press Ctrl+D or type "exit" to exit the application'));
} else {
this.commandCancelCalled_ = true;
await cmd.cancel()
await cmd.cancel();
this.commandCancelCalled_ = false;
}
return;
@@ -744,8 +728,8 @@ class AppGui {
// -------------------------------------------------------------------------
// Build up current shortcut
// -------------------------------------------------------------------------
const now = (new Date()).getTime();
const now = new Date().getTime();
if (now - this.lastShortcutKeyTime_ > 800 || this.isSpecialKey(name)) {
this.currentShortcutKeys_ = [name];
@@ -793,7 +777,7 @@ class AppGui {
} else if (keymapItem.type === 'tkwidgets') {
this.widget('root').handleKey(this.tkWidgetKeys_[keymapItem.command]);
} else {
throw new Error('Unknown command type: ' + JSON.stringify(keymapItem));
throw new Error(`Unknown command type: ${JSON.stringify(keymapItem)}`);
}
}
@@ -813,7 +797,6 @@ class AppGui {
process.exit(1);
});
}
}
AppGui.INPUT_MODE_NORMAL = 1;

View File

@@ -1,10 +1,5 @@
const { BaseApplication } = require('lib/BaseApplication');
const { createStore, applyMiddleware } = require('redux');
const { reducer, defaultState } = 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');
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');
@@ -12,21 +7,15 @@ const BaseItem = require('lib/models/BaseItem.js');
const Note = require('lib/models/Note.js');
const Tag = require('lib/models/Tag.js');
const Setting = require('lib/models/Setting.js');
const { Logger } = require('lib/logger.js');
const { sprintf } = require('sprintf-js');
const { reg } = require('lib/registry.js');
const { fileExtension } = require('lib/path-utils.js');
const { shim } = require('lib/shim.js');
const { _, setLocale, defaultLocale, closestSupportedLocale } = require('lib/locale.js');
const os = require('os');
const { _ } = require('lib/locale.js');
const fs = require('fs-extra');
const { cliUtils } = require('./cli-utils.js');
const Cache = require('lib/Cache');
const WelcomeUtils = require('lib/WelcomeUtils');
const RevisionService = require('lib/services/RevisionService');
class Application extends BaseApplication {
constructor() {
super();
@@ -75,7 +64,7 @@ class Application extends BaseApplication {
// const response = await cliUtils.promptMcq(msg, answers);
// if (!response) return null;
return output[response - 1];
// return output[response - 1];
} else {
return output.length ? output[0] : null;
}
@@ -97,10 +86,12 @@ class Application extends BaseApplication {
const parent = options.parent ? options.parent : app().currentFolder();
const ItemClass = BaseItem.itemClass(type);
if (type == BaseModel.TYPE_NOTE && pattern.indexOf('*') >= 0) { // Handle it as pattern
if (type == BaseModel.TYPE_NOTE && pattern.indexOf('*') >= 0) {
// Handle it as pattern
if (!parent) throw new Error(_('No notebook selected.'));
return await Note.previews(parent.id, { titlePattern: pattern });
} else { // Single item
} else {
// Single item
let item = null;
if (type == BaseModel.TYPE_NOTE) {
if (!parent) throw new Error(_('No notebook has been specified.'));
@@ -126,15 +117,15 @@ class Application extends BaseApplication {
}
setupCommand(cmd) {
cmd.setStdout((text) => {
cmd.setStdout(text => {
return this.stdout(text);
});
cmd.setDispatcher((action) => {
cmd.setDispatcher(action => {
if (this.store()) {
return this.store().dispatch(action);
} else {
return (action) => {};
return () => {};
}
});
@@ -145,10 +136,10 @@ class Application extends BaseApplication {
if (!options.answers) options.answers = options.booleanAnswerDefault === 'y' ? [_('Y'), _('n')] : [_('N'), _('y')];
if (options.type == 'boolean') {
message += ' (' + options.answers.join('/') + ')';
message += ` (${options.answers.join('/')})`;
}
let answer = await this.gui().prompt('', message + ' ', options);
let answer = await this.gui().prompt('', `${message} `, options);
if (options.type === 'boolean') {
if (answer === null) return false; // Pressed ESCAPE
@@ -185,12 +176,12 @@ class Application extends BaseApplication {
commands(uiType = null) {
if (!this.allCommandsLoaded_) {
fs.readdirSync(__dirname).forEach((path) => {
fs.readdirSync(__dirname).forEach(path => {
if (path.indexOf('command-') !== 0) return;
const ext = fileExtension(path)
const ext = fileExtension(path);
if (ext != 'js') return;
let CommandClass = require('./' + path);
let CommandClass = require(`./${path}`);
let cmd = new CommandClass();
if (!cmd.enabled()) return;
cmd = this.setupCommand(cmd);
@@ -257,7 +248,7 @@ class Application extends BaseApplication {
let CommandClass = null;
try {
CommandClass = require(__dirname + '/command-' + name + '.js');
CommandClass = require(`${__dirname}/command-${name}.js`);
} catch (error) {
if (error.message && error.message.indexOf('Cannot find module') >= 0) {
let e = new Error(_('No such command: %s', name));
@@ -276,19 +267,27 @@ class Application extends BaseApplication {
dummyGui() {
return {
isDummy: () => { return true; },
prompt: (initialText = '', promptString = '', options = null) => { return cliUtils.prompt(initialText, promptString, options); },
isDummy: () => {
return true;
},
prompt: (initialText = '', promptString = '', options = null) => {
return cliUtils.prompt(initialText, promptString, options);
},
showConsole: () => {},
maximizeConsole: () => {},
stdout: (text) => { console.info(text); },
fullScreen: (b=true) => {},
stdout: text => {
console.info(text);
},
fullScreen: () => {},
exit: () => {},
showModalOverlay: (text) => {},
showModalOverlay: () => {},
hideModalOverlay: () => {},
stdoutMaxWidth: () => { return 100; },
stdoutMaxWidth: () => {
return 100;
},
forceRender: () => {},
termSaveState: () => {},
termRestoreState: (state) => {},
termRestoreState: () => {},
};
}
@@ -300,7 +299,7 @@ class Application extends BaseApplication {
let outException = null;
try {
if (this.gui().isDummy() && !this.activeCommand_.supportsUi('cli')) throw new Error(_('The command "%s" is only available in GUI mode', this.activeCommand_.name()));
if (this.gui().isDummy() && !this.activeCommand_.supportsUi('cli')) throw new Error(_('The command "%s" is only available in GUI mode', this.activeCommand_.name()));
const cmdArgs = cliUtils.makeCommandArgs(this.activeCommand_, argv);
await this.activeCommand_.action(cmdArgs);
} catch (error) {
@@ -316,24 +315,24 @@ class Application extends BaseApplication {
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 }
{ 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
@@ -341,10 +340,10 @@ class Application extends BaseApplication {
const itemsByCommand = {};
for (let i = 0; i < defaultKeyMap.length; i++) {
itemsByCommand[defaultKeyMap[i].command] = defaultKeyMap[i]
itemsByCommand[defaultKeyMap[i].command] = defaultKeyMap[i];
}
const filePath = Setting.value('profileDir') + '/keymap.json';
const filePath = `${Setting.value('profileDir')}/keymap.json`;
if (await fs.pathExists(filePath)) {
try {
let configString = await fs.readFile(filePath, 'utf-8');
@@ -356,7 +355,7 @@ class Application extends BaseApplication {
}
} catch (error) {
let msg = error.message ? error.message : '';
msg = 'Could not load keymap ' + filePath + '\n' + msg;
msg = `Could not load keymap ${filePath}\n${msg}`;
error.message = msg;
throw error;
}
@@ -368,18 +367,28 @@ class Application extends BaseApplication {
output.push(itemsByCommand[n]);
}
// Map reserved shortcuts to their equivalent key
// https://github.com/cronvel/terminal-kit/issues/101
for (let i = 0; i < output.length; i++) {
const newKeys = output[i].keys.map(k => {
k = k.replace(/CTRL_H/g, 'BACKSPACE');
k = k.replace(/CTRL_I/g, 'TAB');
k = k.replace(/CTRL_M/g, 'ENTER');
return k;
});
output[i].keys = newKeys;
}
return output;
}
async start(argv) {
argv = await super.start(argv);
cliUtils.setStdout((object) => {
cliUtils.setStdout(object => {
return this.stdout(object);
});
await WelcomeUtils.install(this.dispatch.bind(this));
// If we have some arguments left at this point, it's a command
// so execute it.
if (argv.length) {
@@ -387,6 +396,8 @@ class Application extends BaseApplication {
this.currentFolder_ = await Folder.load(Setting.value('activeFolderId'));
await this.applySettingsSideEffects();
try {
await this.execCommand(argv);
} catch (error) {
@@ -400,10 +411,11 @@ class Application extends BaseApplication {
await Setting.saveAll();
// Need to call exit() explicitely, otherwise Node wait for any timeout to complete
// Need to call exit() explicitly, otherwise Node wait for any timeout to complete
// https://stackoverflow.com/questions/18050095
process.exit(0);
} else { // Otherwise open the GUI
} else {
// Otherwise open the GUI
this.initRedux();
const keymap = await this.loadKeymaps();
@@ -423,7 +435,7 @@ class Application extends BaseApplication {
const tags = await Tag.allWithNotes();
ResourceService.runInBackground();
RevisionService.instance().runInBackground();
this.dispatch({
@@ -437,7 +449,6 @@ class Application extends BaseApplication {
});
}
}
}
let application_ = null;
@@ -448,4 +459,4 @@ function app() {
return application_;
}
module.exports = { app };
module.exports = { app };

View File

@@ -10,42 +10,47 @@ async function handleAutocompletionPromise(line) {
// Auto-complete the command name
const names = await app().commandNames();
let words = getArguments(line);
//If there is only one word and it is not already a command name then you
//should look for commmands it could be
// If there is only one word and it is not already a command name then you
// should look for commands it could be
if (words.length == 1) {
if (names.indexOf(words[0]) === -1) {
let x = names.filter((n) => n.indexOf(words[0]) === 0);
let x = names.filter(n => n.indexOf(words[0]) === 0);
if (x.length === 1) {
return x[0] + ' ';
return `${x[0]} `;
}
return x.length > 0 ? x.map((a) => a + ' ') : line;
return x.length > 0 ? x.map(a => `${a} `) : line;
} else {
return line;
}
}
//There is more than one word and it is a command
// There is more than one word and it is a command
const metadata = (await app().commandMetadata())[words[0]];
//If for some reason this command does not have any associated metadata
//just don't autocomplete. However, this should not happen.
// If for some reason this command does not have any associated metadata
// just don't autocomplete. However, this should not happen.
if (metadata === undefined) {
return line;
}
//complete an option
if (words[0] === 'tag' && words[1] === 'notetags') {
metadata.usage = 'tag <tag-command> <note>';
}
// complete an option
let next = words.length > 1 ? words[words.length - 1] : '';
let l = [];
if (next[0] === '-') {
for (let i = 0; i<metadata.options.length; i++) {
for (let i = 0; i < metadata.options.length; i++) {
const options = metadata.options[i][0].split(' ');
//if there are multiple options then they will be separated by comma and
//space. The comma should be removed
// if there are multiple options then they will be separated by comma and
// space. The comma should be removed
if (options[0][options[0].length - 1] === ',') {
options[0] = options[0].slice(0, -1);
}
if (words.includes(options[0]) || words.includes(options[1])) {
continue;
}
//First two elements are the flag and the third is the description
//Only autocomplete long
// First two elements are the flag and the third is the description
// Only autocomplete long
if (options.length > 1 && options[1].indexOf(next) === 0) {
l.push(options[1]);
} else if (options[0].indexOf(next) === 0) {
@@ -55,44 +60,43 @@ async function handleAutocompletionPromise(line) {
if (l.length === 0) {
return line;
}
let ret = l.map(a=>toCommandLine(a));
ret.prefix = toCommandLine(words.slice(0, -1)) + ' ';
let ret = l.map(a => toCommandLine(a));
ret.prefix = `${toCommandLine(words.slice(0, -1))} `;
return ret;
}
//Complete an argument
//Determine the number of positional arguments by counting the number of
//words that don't start with a - less one for the command name
const positionalArgs = words.filter((a)=>a.indexOf('-') !== 0).length - 1;
// Complete an argument
// Determine the number of positional arguments by counting the number of
// words that don't start with a - less one for the command name
const positionalArgs = words.filter(a => a.indexOf('-') !== 0).length - 1;
let cmdUsage = yargParser(metadata.usage)['_'];
cmdUsage.splice(0, 1);
if (cmdUsage.length >= positionalArgs) {
let argName = cmdUsage[positionalArgs - 1];
argName = cliUtils.parseCommandArg(argName).name;
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));
const notes = currentFolder ? await Note.previews(currentFolder.id, { titlePattern: `${next}*` }) : [];
l.push(...notes.map(n => n.title));
}
if (argName == 'notebook') {
const folders = await Folder.search({ titlePattern: next + '*' });
l.push(...folders.map((n) => n.title));
const folders = await Folder.search({ titlePattern: `${next}*` });
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));
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));
let tags = await Tag.search({ titlePattern: `${next}*` });
l.push(...tags.map(n => n.title));
}
if (argName == 'file') {
@@ -101,7 +105,7 @@ async function handleAutocompletionPromise(line) {
}
if (argName == 'tag-command') {
let c = filterList(['add', 'remove', 'list'], next);
let c = filterList(['add', 'remove', 'list', 'notetags'], next);
l.push(...c);
}
@@ -113,12 +117,11 @@ async function handleAutocompletionPromise(line) {
if (l.length === 1) {
return toCommandLine([...words.slice(0, -1), l[0]]);
} else if (l.length > 1) {
let ret = l.map(a=>toCommandLine(a));
ret.prefix = toCommandLine(words.slice(0, -1)) + ' ';
let ret = l.map(a => toCommandLine(a));
ret.prefix = `${toCommandLine(words.slice(0, -1))} `;
return ret;
}
return line;
}
function handleAutocompletion(str, callback) {
handleAutocompletionPromise(str).then(function(res) {
@@ -127,22 +130,24 @@ function handleAutocompletion(str, callback) {
}
function toCommandLine(args) {
if (Array.isArray(args)) {
return args.map(function(a) {
if(a.indexOf('"') !== -1 || a.indexOf(' ') !== -1) {
return "'" + a + "'";
} else if (a.indexOf("'") !== -1) {
return '"' + a + '"';
} else {
return a;
}
}).join(' ');
return args
.map(function(a) {
if (a.indexOf('"') !== -1 || a.indexOf(' ') !== -1) {
return `'${a}'`;
} else if (a.indexOf('\'') !== -1) {
return `"${a}"`;
} else {
return a;
}
})
.join(' ');
} else {
if(args.indexOf('"') !== -1 || args.indexOf(' ') !== -1) {
return "'" + args + "' ";
} else if (args.indexOf("'") !== -1) {
return '"' + args + '" ';
if (args.indexOf('"') !== -1 || args.indexOf(' ') !== -1) {
return `'${args}' `;
} else if (args.indexOf('\'') !== -1) {
return `"${args}" `;
} else {
return args + ' ';
return `${args} `;
}
}
}
@@ -151,27 +156,26 @@ function getArguments(line) {
let inDoubleQuotes = false;
let currentWord = '';
let parsed = [];
for(let i = 0; i<line.length; i++) {
if(line[i] === '"') {
if(inDoubleQuotes) {
for (let i = 0; i < line.length; i++) {
if (line[i] === '"') {
if (inDoubleQuotes) {
inDoubleQuotes = false;
//maybe push word to parsed?
//currentWord += '"';
// maybe push word to parsed?
// currentWord += '"';
} else {
inDoubleQuotes = true;
//currentWord += '"';
// currentWord += '"';
}
} else if(line[i] === "'") {
if(inSingleQuotes) {
} else if (line[i] === '\'') {
if (inSingleQuotes) {
inSingleQuotes = false;
//maybe push word to parsed?
//currentWord += "'";
// maybe push word to parsed?
// currentWord += "'";
} else {
inSingleQuotes = true;
//currentWord += "'";
// currentWord += "'";
}
} else if (/\s/.test(line[i]) &&
!(inDoubleQuotes || inSingleQuotes)) {
} else if (/\s/.test(line[i]) && !(inDoubleQuotes || inSingleQuotes)) {
if (currentWord !== '') {
parsed.push(currentWord);
currentWord = '';

View File

@@ -2,7 +2,6 @@ const { _ } = require('lib/locale.js');
const { reg } = require('lib/registry.js');
class BaseCommand {
constructor() {
this.stdout_ = null;
this.prompt_ = null;
@@ -20,7 +19,7 @@ class BaseCommand {
throw new Error('Description not defined');
}
async action(args) {
async action() {
throw new Error('Action not defined');
}
@@ -93,7 +92,6 @@ class BaseCommand {
logger() {
return reg.logger();
}
}
module.exports = { BaseCommand };
module.exports = { BaseCommand };

View File

@@ -1,7 +1,7 @@
const fs = require('fs-extra');
const { fileExtension, basename, dirname } = require('lib/path-utils.js');
const { fileExtension, dirname } = require('lib/path-utils.js');
const wrap_ = require('word-wrap');
const { _, setLocale, languageCode } = require('lib/locale.js');
const { languageCode } = require('lib/locale.js');
const rootDir = dirname(dirname(__dirname));
const MAX_WIDTH = 78;
@@ -22,14 +22,14 @@ function renderOptions(options) {
let option = options[i];
const flag = option[0];
const indent = INDENT + INDENT + ' '.repeat(optionColWidth + 2);
let r = wrap(option[1], indent);
r = r.substr(flag.length + (INDENT + INDENT).length);
r = INDENT + INDENT + flag + r;
output.push(r);
}
return output.join("\n");
return output.join('\n');
}
function renderCommand(cmd) {
@@ -44,17 +44,17 @@ function renderCommand(cmd) {
output.push('');
output.push(optionString);
}
return output.join("\n");
return output.join('\n');
}
function getCommands() {
let output = [];
fs.readdirSync(__dirname).forEach((path) => {
fs.readdirSync(__dirname).forEach(path => {
if (path.indexOf('command-') !== 0) return;
const ext = fileExtension(path)
const ext = fileExtension(path);
if (ext != 'js') return;
let CommandClass = require('./' + path);
let CommandClass = require(`./${path}`);
let cmd = new CommandClass();
if (!cmd.enabled()) return;
if (cmd.hidden()) return;
@@ -87,14 +87,14 @@ function getHeader() {
let description = [];
description.push('Joplin is a note taking and to-do application, which can handle a large number of notes organised into notebooks.');
description.push('The notes are searchable, can be copied, tagged and modified with your own text editor.');
description.push("\n\n");
description.push('\n\n');
description.push('The notes can be synchronised with various target including the file system (for example with a network directory) or with Microsoft OneDrive.');
description.push("\n\n");
description.push('\n\n');
description.push('Notes exported from Evenotes via .enex files can be imported into Joplin, including the formatted content, resources (images, attachments, etc.) and complete metadata (geolocation, updated time, created time, etc.).');
output.push(wrap(description.join(''), INDENT));
return output.join("\n");
return output.join('\n');
}
function getFooter() {
@@ -102,18 +102,18 @@ function getFooter() {
output.push('WEBSITE');
output.push('');
output.push(INDENT + 'https://joplinapp.org');
output.push(`${INDENT}https://joplinapp.org`);
output.push('');
output.push('LICENSE');
output.push('');
let filePath = rootDir + '/LICENSE_' + languageCode();
if (!fs.existsSync(filePath)) filePath = rootDir + '/LICENSE';
let filePath = `${rootDir}/LICENSE_${languageCode()}`;
if (!fs.existsSync(filePath)) filePath = `${rootDir}/LICENSE`;
const licenseText = fs.readFileSync(filePath, 'utf8');
output.push(wrap(licenseText, INDENT));
return output.join("\n");
return output.join('\n');
}
async function main() {
@@ -128,12 +128,12 @@ async function main() {
}
const headerText = getHeader();
const commandsText = commandBlocks.join("\n\n");
const commandsText = commandBlocks.join('\n\n');
const footerText = getFooter();
console.info(headerText + "\n\n" + 'USAGE' + "\n\n" + commandsText + "\n\n" + footerText);
console.info(`${headerText}\n\n` + 'USAGE' + `\n\n${commandsText}\n\n${footerText}`);
}
main().catch((error) => {
main().catch(error => {
console.error(error);
});
});

View File

@@ -1,4 +1,4 @@
"use strict"
'use strict';
const fs = require('fs-extra');
const { Logger } = require('lib/logger.js');
@@ -10,14 +10,14 @@ const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const Setting = require('lib/models/Setting.js');
const { sprintf } = require('sprintf-js');
const exec = require('child_process').exec
const exec = require('child_process').exec;
process.on('unhandledRejection', (reason, p) => {
console.error('Unhandled promise rejection', p, 'reason:', reason);
});
const baseDir = dirname(__dirname) + '/tests/cli-integration';
const joplinAppPath = __dirname + '/main.js';
const baseDir = `${dirname(__dirname)}/tests/cli-integration`;
const joplinAppPath = `${__dirname}/main.js`;
const logger = new Logger();
logger.addTarget('console');
@@ -32,17 +32,17 @@ db.setLogger(dbLogger);
function createClient(id) {
return {
'id': id,
'profileDir': baseDir + '/client' + id,
id: id,
profileDir: `${baseDir}/client${id}`,
};
}
const client = createClient(1);
function execCommand(client, command, options = {}) {
let exePath = 'node ' + joplinAppPath;
let cmd = exePath + ' --update-geolocation-disabled --env dev --profile ' + client.profileDir + ' ' + command;
logger.info(client.id + ': ' + command);
function execCommand(client, command) {
let exePath = `node ${joplinAppPath}`;
let cmd = `${exePath} --update-geolocation-disabled --env dev --profile ${client.profileDir} ${command}`;
logger.info(`${client.id}: ${command}`);
return new Promise((resolve, reject) => {
exec(cmd, (error, stdout, stderr) => {
@@ -72,14 +72,7 @@ function assertEquals(expected, real) {
}
async function clearDatabase() {
await db.transactionExecBatch([
'DELETE FROM folders',
'DELETE FROM notes',
'DELETE FROM tags',
'DELETE FROM note_tags',
'DELETE FROM resources',
'DELETE FROM deleted_items',
]);
await db.transactionExecBatch(['DELETE FROM folders', 'DELETE FROM notes', 'DELETE FROM tags', 'DELETE FROM note_tags', 'DELETE FROM resources', 'DELETE FROM deleted_items']);
}
const testUnits = {};
@@ -101,7 +94,7 @@ testUnits.testFolders = async () => {
folders = await Folder.all();
assertEquals(0, folders.length);
}
};
testUnits.testNotes = async () => {
await execCommand(client, 'mkbook nb1');
@@ -121,16 +114,16 @@ testUnits.testNotes = async () => {
notes = await Note.all();
assertEquals(2, notes.length);
await execCommand(client, "rm -f 'blabla*'");
await execCommand(client, 'rm -f \'blabla*\'');
notes = await Note.all();
assertEquals(2, notes.length);
await execCommand(client, "rm -f 'n*'");
await execCommand(client, 'rm -f \'n*\'');
notes = await Note.all();
assertEquals(0, notes.length);
}
};
testUnits.testCat = async () => {
await execCommand(client, 'mkbook nb1');
@@ -145,7 +138,7 @@ testUnits.testCat = async () => {
r = await execCommand(client, 'cat -v mynote');
assertTrue(r.indexOf(note.id) >= 0);
}
};
testUnits.testConfig = async () => {
await execCommand(client, 'config editor vim');
@@ -159,7 +152,7 @@ testUnits.testConfig = async () => {
let r = await execCommand(client, 'config');
assertTrue(r.indexOf('editor') >= 0);
assertTrue(r.indexOf('subl') >= 0);
}
};
testUnits.testCp = async () => {
await execCommand(client, 'mkbook nb2');
@@ -180,7 +173,7 @@ testUnits.testCp = async () => {
notes = await Note.previews(f2.id);
assertEquals(1, notes.length);
assertEquals(notesF1[0].title, notes[0].title);
}
};
testUnits.testLs = async () => {
await execCommand(client, 'mkbook nb1');
@@ -190,7 +183,7 @@ testUnits.testLs = async () => {
assertTrue(r.indexOf('note1') >= 0);
assertTrue(r.indexOf('note2') >= 0);
}
};
testUnits.testMv = async () => {
await execCommand(client, 'mkbook nb2');
@@ -210,21 +203,21 @@ testUnits.testMv = async () => {
await execCommand(client, 'mknote note2');
await execCommand(client, 'mknote note3');
await execCommand(client, 'mknote blabla');
await execCommand(client, "mv 'note*' nb2");
await execCommand(client, 'mv \'note*\' nb2');
notes1 = await Note.previews(f1.id);
notes2 = await Note.previews(f2.id);
assertEquals(1, notes1.length);
assertEquals(4, notes2.length);
}
};
async function main(argv) {
async function main() {
await fs.remove(baseDir);
logger.info(await execCommand(client, 'version'));
await db.open({ name: client.profileDir + '/database.sqlite' });
await db.open({ name: `${client.profileDir}/database.sqlite` });
BaseModel.db_ = db;
await Setting.load();
@@ -237,13 +230,13 @@ async function main(argv) {
await clearDatabase();
let testName = n.substr(4).toLowerCase();
process.stdout.write(testName + ': ');
process.stdout.write(`${testName}: `);
await testUnits[n]();
console.info('');
}
}
main(process.argv).catch((error) => {
main(process.argv).catch(error => {
console.info('');
logger.error(error);
});
});

View File

@@ -5,7 +5,7 @@ const stringPadding = require('string-padding');
const cliUtils = {};
cliUtils.printArray = function(logFunction, rows, headers = null) {
cliUtils.printArray = function(logFunction, rows) {
if (!rows.length) return '';
const ALIGN_LEFT = 0;
@@ -16,7 +16,7 @@ cliUtils.printArray = function(logFunction, rows, headers = null) {
for (let i = 0; i < rows.length; i++) {
let row = rows[i];
for (let j = 0; j < row.length; j++) {
let item = row[j];
let width = item ? item.toString().length : 0;
@@ -26,7 +26,6 @@ cliUtils.printArray = function(logFunction, rows, headers = null) {
}
}
let lines = [];
for (let row = 0; row < rows.length; row++) {
let line = [];
for (let col = 0; col < colWidths.length; col++) {
@@ -37,7 +36,7 @@ cliUtils.printArray = function(logFunction, rows, headers = null) {
}
logFunction(line.join(' '));
}
}
};
cliUtils.parseFlags = function(flags) {
let output = {};
@@ -56,10 +55,10 @@ cliUtils.parseFlags = function(flags) {
}
}
return output;
}
};
cliUtils.parseCommandArg = function(arg) {
if (arg.length <= 2) throw new Error('Invalid command arg: ' + arg);
if (arg.length <= 2) throw new Error(`Invalid command arg: ${arg}`);
const c1 = arg[0];
const c2 = arg[arg.length - 1];
@@ -70,9 +69,9 @@ cliUtils.parseCommandArg = function(arg) {
} else if (c1 == '[' && c2 == ']') {
return { required: false, name: name };
} else {
throw new Error('Invalid command arg: ' + arg);
throw new Error(`Invalid command arg: ${arg}`);
}
}
};
cliUtils.makeCommandArgs = function(cmd, argv) {
let cmdUsage = cmd.usage();
@@ -83,9 +82,8 @@ cliUtils.makeCommandArgs = function(cmd, argv) {
let booleanFlags = [];
let aliases = {};
for (let i = 0; i < options.length; i++) {
if (options[i].length != 2) throw new Error('Invalid options: ' + options[i]);
if (options[i].length != 2) throw new Error(`Invalid options: ${options[i]}`);
let flags = options[i][0];
let text = options[i][1];
flags = cliUtils.parseFlags(flags);
@@ -125,27 +123,27 @@ cliUtils.makeCommandArgs = function(cmd, argv) {
output.options = argOptions;
return output;
}
};
cliUtils.promptMcq = function(message, answers) {
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
output: process.stdout,
});
message += "\n\n";
message += '\n\n';
for (let n in answers) {
if (!answers.hasOwnProperty(n)) continue;
message += _('%s: %s', n, answers[n]) + "\n";
message += `${_('%s: %s', n, answers[n])}\n`;
}
message += "\n";
message += '\n';
message += _('Your choice: ');
return new Promise((resolve, reject) => {
rl.question(message, (answer) => {
rl.question(message, answer => {
rl.close();
if (!(answer in answers)) {
@@ -156,7 +154,7 @@ cliUtils.promptMcq = function(message, answers) {
resolve(answer);
});
});
}
};
cliUtils.promptConfirm = function(message, answers = null) {
if (!answers) answers = [_('Y'), _('n')];
@@ -164,23 +162,24 @@ cliUtils.promptConfirm = function(message, answers = null) {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
output: process.stdout,
});
message += ' (' + answers.join('/') + ')';
message += ` (${answers.join('/')})`;
return new Promise((resolve, reject) => {
rl.question(message + ' ', (answer) => {
return new Promise((resolve) => {
rl.question(`${message} `, answer => {
const ok = !answer || answer.toLowerCase() == answers[0].toLowerCase();
rl.close();
resolve(ok);
});
});
}
};
// Note: initialText is there to have the same signature as statusBar.prompt() so that
// it can be a drop-in replacement, however initialText is not used (and cannot be
// with readline.question?).
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
cliUtils.prompt = function(initialText = '', promptString = ':', options = null) {
if (!options) options = {};
@@ -189,10 +188,9 @@ cliUtils.prompt = function(initialText = '', promptString = ':', options = null)
const mutableStdout = new Writable({
write: function(chunk, encoding, callback) {
if (!this.muted)
process.stdout.write(chunk, encoding);
if (!this.muted) process.stdout.write(chunk, encoding);
callback();
}
},
});
const rl = readline.createInterface({
@@ -201,18 +199,18 @@ cliUtils.prompt = function(initialText = '', promptString = ':', options = null)
terminal: true,
});
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
mutableStdout.muted = false;
rl.question(promptString, (answer) => {
rl.question(promptString, answer => {
rl.close();
if (!!options.secure) this.stdout_('');
if (options.secure) this.stdout_('');
resolve(answer);
});
mutableStdout.muted = !!options.secure;
});
}
};
let redrawStarted_ = false;
let redrawLastLog_ = null;
@@ -220,7 +218,7 @@ let redrawLastUpdateTime_ = 0;
cliUtils.setStdout = function(v) {
this.stdout_ = v;
}
};
cliUtils.redraw = function(s) {
const now = time.unixMs();
@@ -233,8 +231,8 @@ cliUtils.redraw = function(s) {
redrawLastLog_ = s;
}
redrawStarted_ = true;
}
redrawStarted_ = true;
};
cliUtils.redrawDone = function() {
if (!redrawStarted_) return;
@@ -245,6 +243,6 @@ cliUtils.redrawDone = function() {
redrawLastLog_ = null;
redrawStarted_ = false;
}
};
module.exports = { cliUtils };
module.exports = { cliUtils };

View File

@@ -1,19 +1,12 @@
const { BaseCommand } = require('./base-command.js');
const { _ } = require('lib/locale.js');
const { cliUtils } = require('./cli-utils.js');
const EncryptionService = require('lib/services/EncryptionService');
const DecryptionWorker = require('lib/services/DecryptionWorker');
const MasterKey = require('lib/models/MasterKey');
const BaseItem = require('lib/models/BaseItem');
const BaseModel = require('lib/BaseModel');
const Setting = require('lib/models/Setting.js');
const { toTitleCase } = require('lib/string-utils.js');
const { reg } = require('lib/registry.js');
const markdownUtils = require('lib/markdownUtils');
const { Database } = require('lib/database.js');
class Command extends BaseCommand {
usage() {
return 'apidoc';
}
@@ -23,18 +16,22 @@ class Command extends BaseCommand {
}
createPropertiesTable(tableFields) {
const headers = [
{ name: 'name', label: 'Name' },
{ name: 'type', label: 'Type', filter: (value) => {
return Database.enumName('fieldType', value);
}},
{ name: 'description', label: 'Description' },
];
return markdownUtils.createMarkdownTable(headers, tableFields);
const headers = [
{ name: 'name', label: 'Name' },
{
name: 'type',
label: 'Type',
filter: value => {
return Database.enumName('fieldType', value);
},
},
{ name: 'description', label: 'Description' },
];
return markdownUtils.createMarkdownTable(headers, tableFields);
}
async action(args) {
async action() {
const models = [
{
type: BaseModel.TYPE_NOTE,
@@ -70,8 +67,8 @@ class Command extends BaseCommand {
lines.push('}');
lines.push('```');
lines.push('');
lines.push('# Authorisation')
lines.push('# Authorisation');
lines.push('');
lines.push('To prevent unauthorised applications from accessing the API, the calls must be authentified. To do so, you must provide a token as a query parameter for each API call. You can get this token from the Joplin desktop application, on the Web Clipper Options screen.');
lines.push('');
@@ -134,6 +131,24 @@ class Command extends BaseCommand {
lines.push('');
lines.push('Call **GET /search?query=YOUR_QUERY** to search for notes. This end-point supports the `field` parameter which is recommended to use so that you only get the data that you need. The query syntax is as described in the main documentation: https://joplinapp.org/#searching');
lines.push('');
lines.push('To retrieve non-notes items, such as notebooks or tags, add a `type` parameter and set it to the required [item type name](#item-type-id). In that case, full text search will not be used - instead it will be a simple case-insensitive search. You can also use `*` as a wildcard. This is convenient for example to retrieve notebooks or tags by title.');
lines.push('');
lines.push('For example, to retrieve the notebook named `recipes`: **GET /search?query=recipes&type=folder**');
lines.push('');
lines.push('To retrieve all the tags that start with `project-`: **GET /search?query=project-*&type=tag**');
lines.push('');
lines.push('# Item type IDs');
lines.push('');
lines.push('Item type IDs might be refered to in certain object you will retrieve from the API. This is the correspondance between name and ID:');
lines.push('');
lines.push('Name | Value');
lines.push('---- | -----');
for (const t of BaseModel.typeEnum_) {
const value = t[1];
lines.push(`${BaseModel.modelTypeToName(value)} | ${value} `);
}
lines.push('');
for (let i = 0; i < models.length; i++) {
const model = models[i];
@@ -171,7 +186,7 @@ class Command extends BaseCommand {
// });
}
lines.push('# ' + toTitleCase(tableName));
lines.push(`# ${toTitleCase(tableName)}`);
lines.push('');
if (model.type === BaseModel.TYPE_FOLDER) {
@@ -184,9 +199,9 @@ class Command extends BaseCommand {
lines.push(this.createPropertiesTable(tableFields));
lines.push('');
lines.push('## GET /' + tableName);
lines.push(`## GET /${tableName}`);
lines.push('');
lines.push('Gets all ' + tableName);
lines.push(`Gets all ${tableName}`);
lines.push('');
if (model.type === BaseModel.TYPE_FOLDER) {
@@ -194,9 +209,9 @@ class Command extends BaseCommand {
lines.push('');
}
lines.push('## GET /' + tableName + '/:id');
lines.push(`## GET /${tableName}/:id`);
lines.push('');
lines.push('Gets ' + singular + ' with ID :id');
lines.push(`Gets ${singular} with ID :id`);
lines.push('');
if (model.type === BaseModel.TYPE_TAG) {
@@ -211,6 +226,11 @@ class Command extends BaseCommand {
lines.push('');
lines.push('Gets all the tags attached to this note.');
lines.push('');
lines.push('## GET /notes/:id/resources');
lines.push('');
lines.push('Gets all the resources attached to this note.');
lines.push('');
}
if (model.type === BaseModel.TYPE_FOLDER) {
@@ -227,9 +247,9 @@ class Command extends BaseCommand {
lines.push('');
}
lines.push('## POST /' + tableName);
lines.push(`## POST /${tableName}`);
lines.push('');
lines.push('Creates a new ' + singular);
lines.push(`Creates a new ${singular}`);
lines.push('');
if (model.type === BaseModel.TYPE_RESOURCE) {
@@ -273,14 +293,14 @@ class Command extends BaseCommand {
lines.push('');
}
lines.push('## PUT /' + tableName + '/:id');
lines.push(`## PUT /${tableName}/:id`);
lines.push('');
lines.push('Sets the properties of the ' + singular + ' with ID :id');
lines.push(`Sets the properties of the ${singular} with ID :id`);
lines.push('');
lines.push('## DELETE /' + tableName + '/:id');
lines.push(`## DELETE /${tableName}/:id`);
lines.push('');
lines.push('Deletes the ' + singular + ' with ID :id');
lines.push(`Deletes the ${singular} with ID :id`);
lines.push('');
if (model.type === BaseModel.TYPE_TAG) {
@@ -293,7 +313,6 @@ class Command extends BaseCommand {
this.stdout(lines.join('\n'));
}
}
module.exports = Command;

View File

@@ -3,10 +3,8 @@ const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const BaseModel = require('lib/BaseModel.js');
const { shim } = require('lib/shim.js');
const fs = require('fs-extra');
class Command extends BaseCommand {
usage() {
return 'attach <note> <file>';
}
@@ -26,7 +24,6 @@ class Command extends BaseCommand {
await shim.attachFileToNote(note, localFilePath);
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -2,11 +2,9 @@ const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const BaseModel = require('lib/BaseModel.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
class Command extends BaseCommand {
usage() {
return 'cat <note>';
}
@@ -16,9 +14,7 @@ class Command extends BaseCommand {
}
options() {
return [
['-v, --verbose', _('Displays the complete information about note.')],
];
return [['-v, --verbose', _('Displays the complete information about note.')]];
}
async action(args) {
@@ -30,10 +26,13 @@ class Command extends BaseCommand {
const content = args.options.verbose ? await Note.serialize(item) : await Note.serializeForEdit(item);
this.stdout(content);
app().gui().showConsole();
app().gui().maximizeConsole();
app()
.gui()
.showConsole();
app()
.gui()
.maximizeConsole();
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,28 +1,75 @@
const { BaseCommand } = require('./base-command.js');
const { _, setLocale } = require('lib/locale.js');
const { app } = require('./app.js');
const fs = require('fs-extra');
const Setting = require('lib/models/Setting.js');
class Command extends BaseCommand {
usage() {
return 'config [name] [value]';
}
description() {
return _("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.");
return _('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.');
}
options() {
return [
['-v, --verbose', _('Also displays unset and hidden config variables.')],
['--export', 'Writes all settings to STDOUT as JSON including secure variables.'],
['--import', 'Reads in JSON formatted settings from STDIN.'],
['--import-file <file>', 'Reads in settings from <file>. <file> must contain valid JSON.'],
];
}
async __importSettings(inputStream) {
return new Promise((resolve, reject) => {
// being defensive and not attempting to settle twice
let isSettled = false;
const chunks = [];
inputStream.on('readable', () => {
let chunk;
while ((chunk = inputStream.read()) !== null) {
chunks.push(chunk);
}
});
inputStream.on('end', () => {
let json = chunks.join('');
let settingsObj;
try {
settingsObj = JSON.parse(json);
} catch (err) {
isSettled = true;
return reject(new Error(`Invalid JSON passed to config --import: \n${err.message}.`));
}
if (settingsObj) {
Object.entries(settingsObj)
.forEach(([key, value]) => {
Setting.setValue(key, value);
});
}
if (!isSettled) {
isSettled = true;
resolve();
}
});
inputStream.on('error', (error) => {
if (!isSettled) {
isSettled = true;
reject(error);
}
});
});
}
async action(args) {
const verbose = args.options.verbose;
const isExport = args.options.export;
const isImport = args.options.import || args.options.importFile;
const importFile = args.options.importFile;
const renderKeyValue = (name) => {
const renderKeyValue = name => {
const md = Setting.settingMetadata(name);
let value = Setting.value(name);
if (typeof value === 'object' || Array.isArray(value)) value = JSON.stringify(value);
@@ -33,29 +80,47 @@ class Command extends BaseCommand {
} else {
return _('%s = %s', name, value);
}
}
};
if (!args.name && !args.value) {
if (isExport || (!isImport && !args.value)) {
let keys = Setting.keys(!verbose, 'cli');
keys.sort();
for (let i = 0; i < keys.length; i++) {
const value = Setting.value(keys[i]);
if (!verbose && !value) continue;
this.stdout(renderKeyValue(keys[i]));
if (isExport) {
const resultObj = keys.reduce((acc, key) => {
const value = Setting.value(key);
if (!verbose && !value) return acc;
acc[key] = value;
return acc;
}, {});
// Printing the object in "pretty" format so it's easy to read/edit
this.stdout(JSON.stringify(resultObj, null, 2));
} else if (!args.name) {
for (let i = 0; i < keys.length; i++) {
const value = Setting.value(keys[i]);
if (!verbose && !value) continue;
this.stdout(renderKeyValue(keys[i]));
}
} else {
this.stdout(renderKeyValue(args.name));
}
app().gui().showConsole();
app().gui().maximizeConsole();
return;
}
if (args.name && !args.value) {
this.stdout(renderKeyValue(args.name));
app().gui().showConsole();
app().gui().maximizeConsole();
return;
if (isImport) {
let fileStream = process.stdin;
if (importFile) {
fileStream = fs.createReadStream(importFile, { autoClose: true });
}
await this.__importSettings(fileStream);
} else {
Setting.setValue(args.name, args.value);
}
Setting.setValue(args.name, args.value);
if (args.name == 'locale') {
setLocale(Setting.value('locale'));
@@ -64,7 +129,6 @@ class Command extends BaseCommand {
await Setting.saveAll();
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -2,11 +2,9 @@ const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const BaseModel = require('lib/BaseModel.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
class Command extends BaseCommand {
usage() {
return 'cp <note> [notebook]';
}
@@ -33,7 +31,6 @@ class Command extends BaseCommand {
Note.updateGeolocation(newNote.id);
}
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -2,12 +2,10 @@ const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const BaseModel = require('lib/BaseModel.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const { time } = require('lib/time-utils.js');
class Command extends BaseCommand {
usage() {
return 'done <note>';
}
@@ -35,7 +33,6 @@ class Command extends BaseCommand {
async action(args) {
await Command.handleAction(this, args, true);
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,12 +1,9 @@
const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const Tag = require('lib/models/Tag.js');
class Command extends BaseCommand {
usage() {
return 'dump';
}
@@ -19,7 +16,7 @@ class Command extends BaseCommand {
return true;
}
async action(args) {
async action() {
let items = [];
let folders = await Folder.all();
for (let i = 0; i < folders.length; i++) {
@@ -35,10 +32,9 @@ class Command extends BaseCommand {
}
items = items.concat(tags);
this.stdout(JSON.stringify(items));
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,9 +1,7 @@
const { BaseCommand } = require('./base-command.js');
const { _ } = require('lib/locale.js');
const { cliUtils } = require('./cli-utils.js');
const EncryptionService = require('lib/services/EncryptionService');
const DecryptionWorker = require('lib/services/DecryptionWorker');
const MasterKey = require('lib/models/MasterKey');
const BaseItem = require('lib/models/BaseItem');
const Setting = require('lib/models/Setting.js');
const { shim } = require('lib/shim');
@@ -12,7 +10,6 @@ const imageType = require('image-type');
const readChunk = require('read-chunk');
class Command extends BaseCommand {
usage() {
return 'e2ee <command> [path]';
}
@@ -35,7 +32,7 @@ class Command extends BaseCommand {
const options = args.options;
const askForMasterKey = async (error) => {
const askForMasterKey = async error => {
const masterKeyId = error.masterKeyId;
const password = await this.prompt(_('Enter master password:'), { type: 'string', secure: true });
if (!password) {
@@ -45,7 +42,7 @@ class Command extends BaseCommand {
Setting.setObjectKey('encryption.passwordCache', masterKeyId, password);
await EncryptionService.instance().loadMasterKeysFromSettings();
return true;
}
};
if (args.command === 'enable') {
const password = options.password ? options.password.toString() : await this.prompt(_('Enter master password:'), { type: 'string', secure: true });
@@ -53,7 +50,15 @@ class Command extends BaseCommand {
this.stdout(_('Operation cancelled'));
return;
}
const password2 = await this.prompt(_('Confirm password:'), { type: 'string', secure: true });
if (!password2) {
this.stdout(_('Operation cancelled'));
return;
}
if (password !== password2) {
this.stdout(_('Passwords do not match!'));
return;
}
await EncryptionService.instance().generateMasterKeyAndEnableEncryption(password);
return;
}
@@ -100,13 +105,13 @@ class Command extends BaseCommand {
while (true) {
try {
const outputDir = options.output ? options.output : require('os').tmpdir();
let outFile = outputDir + '/' + pathUtils.filename(args.path) + '.' + Date.now() + '.bin';
let outFile = `${outputDir}/${pathUtils.filename(args.path)}.${Date.now()}.bin`;
await EncryptionService.instance().decryptFile(args.path, outFile);
const buffer = await readChunk(outFile, 0, 64);
const detectedType = imageType(buffer);
if (detectedType) {
const newOutFile = outFile + '.' + detectedType.ext;
const newOutFile = `${outFile}.${detectedType.ext}`;
await shim.fsDriver().move(outFile, newOutFile);
outFile = newOutFile;
}
@@ -128,19 +133,17 @@ class Command extends BaseCommand {
if (args.command === 'target-status') {
const fs = require('fs-extra');
const pathUtils = require('lib/path-utils.js');
const fsDriver = new (require('lib/fs-driver-node.js').FsDriverNode)();
const targetPath = args.path;
if (!targetPath) throw new Error('Please specify the sync target path.');
const dirPaths = function(targetPath) {
let paths = [];
fs.readdirSync(targetPath).forEach((path) => {
fs.readdirSync(targetPath).forEach(path => {
paths.push(path);
});
return paths;
}
};
let itemCount = 0;
let resourceCount = 0;
@@ -155,7 +158,7 @@ class Command extends BaseCommand {
for (let i = 0; i < paths.length; i++) {
const path = paths[i];
const fullPath = targetPath + '/' + path;
const fullPath = `${targetPath}/${path}`;
const stat = await fs.stat(fullPath);
// this.stdout(fullPath);
@@ -165,7 +168,7 @@ class Command extends BaseCommand {
for (let j = 0; j < resourcePaths.length; j++) {
const resourcePath = resourcePaths[j];
resourceCount++;
const fullResourcePath = fullPath + '/' + resourcePath;
const fullResourcePath = `${fullPath}/${resourcePath}`;
const isEncrypted = await EncryptionService.instance().fileIsEncrypted(fullResourcePath);
if (isEncrypted) {
encryptedResourceCount++;
@@ -199,9 +202,9 @@ class Command extends BaseCommand {
}
}
this.stdout('Encrypted items: ' + encryptedItemCount + '/' + itemCount);
this.stdout('Encrypted resources: ' + encryptedResourceCount + '/' + resourceCount);
this.stdout('Other items (never encrypted): ' + otherItemCount);
this.stdout(`Encrypted items: ${encryptedItemCount}/${itemCount}`);
this.stdout(`Encrypted resources: ${encryptedResourceCount}/${resourceCount}`);
this.stdout(`Other items (never encrypted): ${otherItemCount}`);
if (options.verbose) {
this.stdout('');
@@ -224,7 +227,6 @@ class Command extends BaseCommand {
return;
}
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,17 +1,14 @@
const fs = require('fs-extra');
const { BaseCommand } = require('./base-command.js');
const { splitCommandString } = require('lib/string-utils.js');
const { uuid } = require('lib/uuid.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const Setting = require('lib/models/Setting.js');
const BaseModel = require('lib/BaseModel.js');
const { cliUtils } = require('./cli-utils.js');
const { time } = require('lib/time-utils.js');
class Command extends BaseCommand {
usage() {
return 'edit <note>';
}
@@ -21,20 +18,19 @@ class Command extends BaseCommand {
}
async action(args) {
let watcher = null;
let tempFilePath = null;
const onFinishedEditing = async () => {
if (tempFilePath) fs.removeSync(tempFilePath);
}
};
const textEditorPath = () => {
if (Setting.value('editor')) return Setting.value('editor');
if (process.env.EDITOR) return process.env.EDITOR;
throw new Error(_('No text editor is defined. Please set it using `config editor <editor-path>`'));
}
};
try {
try {
// -------------------------------------------------------------------------
// Load note or create it if it doesn't exist
// -------------------------------------------------------------------------
@@ -58,14 +54,14 @@ class Command extends BaseCommand {
// -------------------------------------------------------------------------
let editorPath = textEditorPath();
let editorArgs = editorPath.split(' ');
let editorArgs = splitCommandString(editorPath);
editorPath = editorArgs[0];
editorArgs = editorArgs.splice(1);
const originalContent = await Note.serializeForEdit(note);
tempFilePath = Setting.value('tempDir') + '/' + uuid.create() + '.md';
tempFilePath = `${Setting.value('tempDir')}/${uuid.create()}.md`;
editorArgs.push(tempFilePath);
await fs.writeFile(tempFilePath, originalContent);
@@ -80,7 +76,7 @@ class Command extends BaseCommand {
await app().gui().forceRender();
const termState = app().gui().termSaveState();
const spawnSync = require('child_process').spawnSync;
const spawnSync = require('child_process').spawnSync;
const result = spawnSync(editorPath, editorArgs, { stdio: 'inherit' });
if (result.error) this.stdout(_('Error opening note in editor: %s', result.error.message));
@@ -107,13 +103,11 @@ class Command extends BaseCommand {
});
await onFinishedEditing();
} catch(error) {
} catch (error) {
await onFinishedEditing();
throw error;
}
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -3,7 +3,6 @@ const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
class Command extends BaseCommand {
usage() {
return 'exit';
}
@@ -16,10 +15,9 @@ class Command extends BaseCommand {
return ['gui'];
}
async action(args) {
async action() {
await app().exit();
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,13 +1,10 @@
const { BaseCommand } = require('./base-command.js');
const { Database } = require('lib/database.js');
const { app } = require('./app.js');
const Setting = require('lib/models/Setting.js');
const { _ } = require('lib/locale.js');
const { ReportService } = require('lib/services/report.js');
const fs = require('fs-extra');
class Command extends BaseCommand {
usage() {
return 'export-sync-status';
}
@@ -20,17 +17,20 @@ class Command extends BaseCommand {
return true;
}
async action(args) {
async action() {
const service = new ReportService();
const csv = await service.basicItemList({ format: 'csv' });
const filePath = Setting.value('profileDir') + '/syncReport-' + (new Date()).getTime() + '.csv';
const filePath = `${Setting.value('profileDir')}/syncReport-${new Date().getTime()}.csv`;
await fs.writeFileSync(filePath, csv);
this.stdout('Sync status exported to ' + filePath);
this.stdout(`Sync status exported to ${filePath}`);
app().gui().showConsole();
app().gui().maximizeConsole();
app()
.gui()
.showConsole();
app()
.gui()
.maximizeConsole();
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,14 +1,10 @@
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 { 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 'export <path>';
}
@@ -19,17 +15,14 @@ class Command extends BaseCommand {
options() {
const service = new InteropService();
const formats = service.modules()
const formats = service
.modules()
.filter(m => m.type === 'exporter')
.map(m => m.format + (m.description ? ' (' + m.description + ')' : ''));
.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.')],
];
return [['--format <format>', _('Destination format: %s', formats.join(', '))], ['--note <note>', _('Exports only the given note.')], ['--notebook <notebook>', _('Exports only the given notebook.')]];
}
async action(args) {
let exportOptions = {};
exportOptions.path = args.path;
@@ -37,25 +30,20 @@ class Command extends BaseCommand {
exportOptions.format = args.options.format ? args.options.format : 'jex';
if (args.options.note) {
const notes = await app().loadItems(BaseModel.TYPE_NOTE, args.options.note, { parent: app().currentFolder() });
if (!notes.length) throw new Error(_('Cannot find "%s".', args.options.note));
exportOptions.sourceNoteIds = notes.map((n) => n.id);
exportOptions.sourceNoteIds = notes.map(n => n.id);
} else if (args.options.notebook) {
const folders = await app().loadItems(BaseModel.TYPE_FOLDER, args.options.notebook);
if (!folders.length) throw new Error(_('Cannot find "%s".', args.options.notebook));
exportOptions.sourceFolderIds = folders.map((n) => n.id);
exportOptions.sourceFolderIds = folders.map(n => n.id);
}
const service = new InteropService();
const result = await service.export(exportOptions);
result.warnings.map((w) => this.stdout(w));
result.warnings.map(w => this.stdout(w));
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -2,11 +2,9 @@ const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const BaseModel = require('lib/BaseModel.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
class Command extends BaseCommand {
usage() {
return 'geoloc <note>';
}
@@ -23,9 +21,10 @@ class Command extends BaseCommand {
const url = Note.geolocationUrl(item);
this.stdout(url);
app().gui().showConsole();
app()
.gui()
.showConsole();
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,14 +1,10 @@
const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { renderCommandHelp } = require('./help-utils.js');
const { Database } = require('lib/database.js');
const Setting = require('lib/models/Setting.js');
const { wrap } = require('lib/string-utils.js');
const { _ } = require('lib/locale.js');
const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand {
usage() {
return 'help [command]';
}
@@ -28,7 +24,7 @@ class Command extends BaseCommand {
output.push(command);
}
output.sort((a, b) => a.name() < b.name() ? -1 : +1);
output.sort((a, b) => (a.name() < b.name() ? -1 : +1));
return output;
}
@@ -40,31 +36,37 @@ class Command extends BaseCommand {
this.stdout(_('For information on how to customise the shortcuts please visit %s', 'https://joplinapp.org/terminal/#shortcuts'));
this.stdout('');
if (app().gui().isDummy()) {
if (
app()
.gui()
.isDummy()
) {
throw new Error(_('Shortcuts are not available in CLI mode.'));
}
const keymap = app().gui().keymap();
const keymap = app()
.gui()
.keymap();
let rows = [];
for (let i = 0; i < keymap.length; i++) {
const item = keymap[i];
const keys = item.keys.map((k) => k === ' ' ? '(SPACE)' : k);
const keys = item.keys.map(k => (k === ' ' ? '(SPACE)' : k));
rows.push([keys.join(', '), item.command]);
}
cliUtils.printArray(this.stdout.bind(this), rows);
} else if (args.command === 'all') {
const commands = this.allCommands();
const output = commands.map((c) => renderCommandHelp(c));
const output = commands.map(c => renderCommandHelp(c));
this.stdout(output.join('\n\n'));
} else if (args.command) {
const command = app().findCommandByName(args['command']);
if (!command) throw new Error(_('Cannot find "%s".', args.command));
this.stdout(renderCommandHelp(command, stdoutWidth));
} else {
const commandNames = this.allCommands().map((a) => a.name());
const commandNames = this.allCommands().map(a => a.name());
this.stdout(_('Type `help [command]` for more information about a command; or type `help all` for the complete usage information.'));
this.stdout('');
@@ -82,10 +84,13 @@ class Command extends BaseCommand {
this.stdout(_('For the list of keyboard shortcuts and config options, type `help keymap`'));
}
app().gui().showConsole();
app().gui().maximizeConsole();
app()
.gui()
.showConsole();
app()
.gui()
.maximizeConsole();
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,17 +1,11 @@
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]';
}
@@ -22,14 +16,14 @@ class Command extends BaseCommand {
options() {
const service = new InteropService();
const formats = service.modules().filter(m => m.type === 'importer').map(m => m.format);
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.')],
];
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);
@@ -44,7 +38,7 @@ class Command extends BaseCommand {
// onProgress/onError supported by Enex import only
importOptions.onProgress = (progressState) => {
importOptions.onProgress = progressState => {
let line = [];
line.push(_('Found: %d.', progressState.loaded));
line.push(_('Created: %d.', progressState.created));
@@ -56,20 +50,21 @@ class Command extends BaseCommand {
cliUtils.redraw(lastProgress);
};
importOptions.onError = (error) => {
importOptions.onError = error => {
let s = error.trace ? error.trace : error.toString();
this.stdout(s);
};
app().gui().showConsole();
app()
.gui()
.showConsole();
this.stdout(_('Importing notes...'));
const service = new InteropService();
const result = await service.import(importOptions);
result.warnings.map((w) => this.stdout(w));
result.warnings.map(w => this.stdout(w));
cliUtils.redrawDone();
if (lastProgress) this.stdout(_('The notes have been imported: %s', lastProgress));
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -10,7 +10,6 @@ const { time } = require('lib/time-utils.js');
const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand {
usage() {
return 'ls [note-pattern]';
}
@@ -24,14 +23,7 @@ class Command extends BaseCommand {
}
options() {
return [
['-n, --limit <num>', _('Displays only the first top <num> notes.')],
['-s, --sort <field>', _('Sorts the item by <field> (eg. title, updated_time, created_time).')],
['-r, --reverse', _('Reverses the sorting order.')],
['-t, --type <type>', _('Displays only the items of the specific type(s). Can be `n` for notes, `t` for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the to-dos, while `-ttd` would display notes and to-dos.')],
['-f, --format <format>', _('Either "text" or "json"')],
['-l, --long', _('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for to-dos), TITLE')],
];
return [['-n, --limit <num>', _('Displays only the first top <num> notes.')], ['-s, --sort <field>', _('Sorts the item by <field> (eg. title, updated_time, created_time).')], ['-r, --reverse', _('Reverses the sorting order.')], ['-t, --type <type>', _('Displays only the items of the specific type(s). Can be `n` for notes, `t` for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the to-dos, while `-ttd` would display notes and to-dos.')], ['-f, --format <format>', _('Either "text" or "json"')], ['-l, --long', _('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for to-dos), TITLE')]];
}
async action(args) {
@@ -98,14 +90,14 @@ class Command extends BaseCommand {
let title = item.title;
if (!shortIdShown && (seenTitles.indexOf(item.title) >= 0 || !item.title)) {
title += ' (' + BaseModel.shortId(item.id) + ')';
title += ` (${BaseModel.shortId(item.id)})`;
} else {
seenTitles.push(item.title);
}
if (hasTodos) {
if (item.is_todo) {
row.push(sprintf('[%s]', !!item.todo_completed ? 'X' : ' '));
row.push(sprintf('[%s]', item.todo_completed ? 'X' : ' '));
} else {
row.push(' ');
}
@@ -118,9 +110,7 @@ class Command extends BaseCommand {
cliUtils.printArray(this.stdout.bind(this), rows);
}
}
}
module.exports = Command;

View File

@@ -2,10 +2,8 @@ const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const Folder = require('lib/models/Folder.js');
const { reg } = require('lib/registry.js');
class Command extends BaseCommand {
usage() {
return 'mkbook <new-notebook>';
}
@@ -15,10 +13,9 @@ class Command extends BaseCommand {
}
async action(args) {
let folder = await Folder.save({ title: args['new-notebook'] }, { userSideValidation: true });
let folder = await Folder.save({ title: args['new-notebook'] }, { userSideValidation: true });
app().switchCurrentFolder(folder);
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -4,7 +4,6 @@ const { _ } = require('lib/locale.js');
const Note = require('lib/models/Note.js');
class Command extends BaseCommand {
usage() {
return 'mknote <new-note>';
}
@@ -26,7 +25,6 @@ class Command extends BaseCommand {
app().switchCurrentFolder(app().currentFolder());
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -4,7 +4,6 @@ const { _ } = require('lib/locale.js');
const Note = require('lib/models/Note.js');
class Command extends BaseCommand {
usage() {
return 'mktodo <new-todo>';
}
@@ -27,7 +26,6 @@ class Command extends BaseCommand {
app().switchCurrentFolder(app().currentFolder());
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -6,7 +6,6 @@ const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
class Command extends BaseCommand {
usage() {
return 'mv <note> [notebook]';
}
@@ -18,7 +17,7 @@ class Command extends BaseCommand {
async action(args) {
const pattern = args['note'];
const destination = args['notebook'];
const folder = await Folder.loadByField('title', destination);
if (!folder) throw new Error(_('Cannot find "%s".', destination));
@@ -29,7 +28,6 @@ class Command extends BaseCommand {
await Note.moveToFolder(notes[i].id, folder.id);
}
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -6,7 +6,6 @@ const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
class Command extends BaseCommand {
usage() {
return 'ren <item> <name>';
}
@@ -35,7 +34,6 @@ class Command extends BaseCommand {
await Note.save(newItem);
}
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,14 +1,10 @@
const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const BaseItem = require('lib/models/BaseItem.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const BaseModel = require('lib/BaseModel.js');
const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand {
usage() {
return 'rmbook <notebook>';
}
@@ -18,9 +14,7 @@ class Command extends BaseCommand {
}
options() {
return [
['-f, --force', _('Deletes the notebook without asking for confirmation.')],
];
return [['-f, --force', _('Deletes the notebook without asking for confirmation.')]];
}
async action(args) {
@@ -34,7 +28,6 @@ class Command extends BaseCommand {
await Folder.delete(folder.id);
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,14 +1,10 @@
const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const BaseItem = require('lib/models/BaseItem.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const BaseModel = require('lib/BaseModel.js');
const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand {
usage() {
return 'rmnote <note-pattern>';
}
@@ -18,9 +14,7 @@ class Command extends BaseCommand {
}
options() {
return [
['-f, --force', _('Deletes the notes without asking for confirmation.')],
];
return [['-f, --force', _('Deletes the notes without asking for confirmation.')]];
}
async action(args) {
@@ -32,10 +26,9 @@ class Command extends BaseCommand {
const ok = force ? true : await this.prompt(notes.length > 1 ? _('%d notes match this pattern. Delete them?', notes.length) : _('Delete note?'), { booleanAnswerDefault: 'n' });
if (!ok) return;
let ids = notes.map((n) => n.id);
let ids = notes.map(n => n.id);
await Note.batchDelete(ids);
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,15 +1,10 @@
const { BaseCommand } = require('./base-command.js');
const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const BaseModel = require('lib/BaseModel.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const { sprintf } = require('sprintf-js');
const { time } = require('lib/time-utils.js');
const { uuid } = require('lib/uuid.js');
class Command extends BaseCommand {
usage() {
return 'search <pattern> [notebook]';
}
@@ -50,7 +45,6 @@ class Command extends BaseCommand {
id: searchId,
});
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -0,0 +1,57 @@
const { BaseCommand } = require('./base-command.js');
const { _ } = require('lib/locale.js');
const Setting = require('lib/models/Setting.js');
const { Logger } = require('lib/logger.js');
const { shim } = require('lib/shim');
class Command extends BaseCommand {
usage() {
return 'server <command>';
}
description() {
return `${_('Start, stop or check the API server. To specify on which port it should run, set the api.port config variable. Commands are (%s).', ['start', 'stop', 'status'].join('|'))} This is an experimental feature - use at your own risks! It is recommended that the server runs off its own separate profile so that no two CLI instances access that profile at the same time. Use --profile to specify the profile path.`;
}
async action(args) {
const command = args.command;
const ClipperServer = require('lib/ClipperServer');
const stdoutFn = (s) => this.stdout(s);
const clipperLogger = new Logger();
clipperLogger.addTarget('file', { path: `${Setting.value('profileDir')}/log-clipper.txt` });
clipperLogger.addTarget('console', { console: {
info: stdoutFn,
warn: stdoutFn,
error: stdoutFn,
} });
ClipperServer.instance().setDispatch(() => {});
ClipperServer.instance().setLogger(clipperLogger);
const pidPath = `${Setting.value('profileDir')}/clipper-pid.txt`;
const runningOnPort = await ClipperServer.instance().isRunning();
if (command === 'start') {
if (runningOnPort) {
this.stdout(_('Server is already running on port %d', runningOnPort));
} else {
await shim.fsDriver().writeFile(pidPath, process.pid.toString(), 'utf-8');
await ClipperServer.instance().start(); // Never exit
}
} else if (command === 'status') {
this.stdout(runningOnPort ? _('Server is running on port %d', runningOnPort) : _('Server is not running.'));
} else if (command === 'stop') {
if (!runningOnPort) {
this.stdout(_('Server is not running.'));
return;
}
const pid = await shim.fsDriver().readFile(pidPath);
if (!pid) return;
process.kill(pid, 'SIGTERM');
}
}
}
module.exports = Command;

View File

@@ -3,12 +3,9 @@ const { app } = require('./app.js');
const { _ } = require('lib/locale.js');
const BaseModel = require('lib/BaseModel.js');
const { Database } = require('lib/database.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const BaseItem = require('lib/models/BaseItem.js');
class Command extends BaseCommand {
usage() {
return 'set <note> <name> [value]';
}
@@ -19,7 +16,7 @@ class Command extends BaseCommand {
for (let i = 0; i < fields.length; i++) {
const f = fields[i];
if (f.name === 'id') continue;
s.push(f.name + ' (' + Database.enumName('fieldType', f.type) + ')');
s.push(`${f.name} (${Database.enumName('fieldType', f.type)})`);
}
return _('Sets the property <name> of the given <note> to the given [value]. Possible properties are:\n\n%s', s.join(', '));
@@ -42,10 +39,16 @@ class Command extends BaseCommand {
type_: notes[i].type_,
};
newNote[propName] = propValue;
await Note.save(newNote);
const timestamp = Date.now();
await Note.save(newNote, {
autoTimestamp: false, // No auto-timestamp because user may have provided them
updated_time: timestamp,
created_time: timestamp,
});
}
}
}
module.exports = Command;
module.exports = Command;

View File

@@ -1,12 +1,10 @@
const { BaseCommand } = require('./base-command.js');
const { Database } = require('lib/database.js');
const { app } = require('./app.js');
const Setting = require('lib/models/Setting.js');
const { _ } = require('lib/locale.js');
const { ReportService } = require('lib/services/report.js');
class Command extends BaseCommand {
usage() {
return 'status';
}
@@ -15,7 +13,7 @@ class Command extends BaseCommand {
return _('Displays summary about the notes and notebooks.');
}
async action(args) {
async action() {
let service = new ReportService();
let report = await service.status(Setting.value('sync.target'));
@@ -24,7 +22,7 @@ class Command extends BaseCommand {
if (i > 0) this.stdout('');
this.stdout('# ' + section.title);
this.stdout(`# ${section.title}`);
this.stdout('');
for (let n in section.body) {
@@ -34,10 +32,13 @@ class Command extends BaseCommand {
}
}
app().gui().showConsole();
app().gui().maximizeConsole();
app()
.gui()
.showConsole();
app()
.gui()
.maximizeConsole();
}
}
module.exports = Command;
module.exports = Command;

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