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

Compare commits

...

48 Commits

Author SHA1 Message Date
Laurent Cozic
acc10ccac4 Electron release v1.0.221 2020-06-20 02:31:12 +01:00
Laurent Cozic
45160a2e73 Desktop: API: Add support for external editing from API 2020-06-20 02:30:09 +01:00
Laurent Cozic
e38794171a Tools: Fix desktop build issue on Windows 2020-06-20 01:18:46 +01:00
Laurent Cozic
c2d6da83c0 All: Fixes #3381: Prevent desktop.ini file from breaking sync lock 2020-06-20 01:15:56 +01:00
Caleb John
77005fc495 Tools: Try to add codemirror types again (#3380)
* Try add codemirror type again

* Add global typedef for codemirror

* Add comment
2020-06-18 18:58:11 +01:00
Deep Majumder
0273e58783 Doc: Corrected info on supported Linux dsitros. (#3378)
Added list of supported desktop environments
2020-06-18 18:55:41 +01:00
Laurent Cozic
3e88a24753 Desktop: Reduce database logging statements 2020-06-17 23:46:47 +01:00
Laurent Cozic
1205908233 Revert "Desktop: Change codemirror to user import syntax (#3375)"
This reverts commit 3a7a068196.
2020-06-17 23:45:36 +01:00
Caleb John
3a7a068196 Desktop: Change codemirror to user import syntax (#3375) 2020-06-17 18:47:11 +01:00
Caleb John
845ecfe742 Desktop: Add default filename for jex export (#3034)
* Add default filename for jex export

* Restructure date as default filename
2020-06-17 18:35:13 +01:00
Laurent Cozic
53355aaad3 Clipper: Do not export invisible elements 2020-06-17 00:03:40 +01:00
Laurent Cozic
7cd0e25538 Merge branch 'master' of github.com:laurent22/joplin 2020-06-16 18:10:04 +01:00
Caleb John
2f15178ff6 Desktop: Remove auto-indent for in note html/xml for Code Mirror (#3374)
html/xml inside of a codeblock will still benefit from auto-indent
2020-06-16 13:00:58 +01:00
Caleb John
a4b13be0d1 Desktop: Fix getLineSpan logic and list token regex logic (#3365)
- previously getLineSpan was included line text as a token (dumb
oversight)
- the regex was updated to include a space after a OL element (was
missing for some reason)
2020-06-16 13:00:17 +01:00
Caleb John
23ae4fb790 Desktop: Add swapLineUp and swapLineDown keys to Code Mirror editor (#3363) 2020-06-16 12:59:33 +01:00
Laurent Cozic
cff036d08b Desktop: Do not expand the leaft notebook when following a link to a note 2020-06-15 22:59:42 +00:00
Laurent Cozic
7826cc0b03 Doc: Added sponsor 2020-06-15 23:03:09 +01:00
Alexander van der Berg
2bfa28a311 Doc: Fix sponsors table layout in the GitHub README.md (#3362)
The table was displayed correctly only on https://joplinapp.org/
2020-06-15 23:00:50 +01:00
Laurent Cozic
780c5c80ae Revert "Desktop: Fixes #3302: Prevent drag and dropping of text in editor as it can lead to data loss"
This reverts commit a75db94da5.

It turns out people often drag and drop text, so restoring the functionality.

See https://discourse.joplinapp.org/t/9406
2020-06-15 19:16:22 +01:00
Laurent Cozic
fcd00b3212 Desktop, Cli: Fixed various bugs related to the import of ENEX files as HTML 2020-06-15 17:10:51 +01:00
Laurent Cozic
6a41d6e85a Cli: Allow importing ENEX files as HTML 2020-06-14 16:45:17 +00:00
Laurent Cozic
3733858145 Desktop, Cli: Fixed issue with importing resources from ENEX files 2020-06-14 16:26:35 +00:00
Laurent Cozic
95d8ee65a5 ios-v10.0.49 2020-06-14 17:04:10 +01:00
Laurent Cozic
8e57697b71 Android release v1.0.332 2020-06-14 16:28:11 +01:00
Helmut K. C. Tessarek
c9c371b297 Update translations 2020-06-13 18:18:30 -04:00
Helmut K. C. Tessarek
d4f794920e update de_DE.po 2020-06-13 18:17:07 -04:00
Helmut K. C. Tessarek
13b5ef36d7 Update translations 2020-06-13 17:47:15 -04:00
Laurent Cozic
83e0bac52a Electron release v1.0.220 2020-06-13 17:43:07 +01:00
Laurent Cozic
9943ae0fa5 Electron release v1.0.219 2020-06-13 17:41:20 +01:00
Laurent Cozic
4c95872826 Tools: Fixed build-translation tool on macOS 2020-06-13 17:41:02 +01:00
Laurent Cozic
4aef72572d Desktop: Added debug info to detect empty note issue 2020-06-13 17:17:32 +01:00
Laurent Cozic
126918be54 Mobile: Do not restore selection on undo/redo (unreliable) 2020-06-13 16:46:43 +01:00
Laurent Cozic
1dc4516efc Revert "Mobile: Refactored and made dialog boxes more reliable"
This reverts commit f432734338.

This new package has its own glitches and doesn't look good
when button labels are too large. So reverting to the less
glitchy package.
2020-06-13 16:20:59 +01:00
Laurent Cozic
9a9cfbd130 Mobile: Resolves #2595: Add undo/redo support 2020-06-13 16:20:18 +01:00
Rodgco
341c9ba64b All: Translation: Update pt_BR.po (#3358) 2020-06-10 22:08:07 -04:00
Laurent Cozic
f432734338 Mobile: Refactored and made dialog boxes more reliable 2020-06-10 22:12:18 +01:00
Laurent Cozic
b7f5f848f2 All: Refactored themes to allow using the same ones in both desktop and mobile version
Will also allow using them when exporting HTML or PDF from CLI.
2020-06-10 22:08:59 +01:00
Laurent Cozic
d80cf6bf37 Mobile: Made saving notes more reliable 2020-06-09 23:30:32 +00:00
Laurent Cozic
31bce2e644 Mobile: Fixed issue with resources not being downloaded after metadata has been decrypted 2020-06-09 19:56:48 +00:00
Laurent Cozic
faabd17fc6 Desktop: Fixed issue with setting filename for edited attachments 2020-06-09 19:15:43 +00:00
Laurent Cozic
4c4ed60cfb Merge branch 'master' of github.com:laurent22/joplin 2020-06-08 18:49:16 +01:00
Laurent Cozic
be1895a080 Clipper: Fixes #3241: Handle certain special cases of ordered lists 2020-06-08 18:44:13 +01:00
Laurent Cozic
b81b6135f6 Clean up unused optional parameter 2020-06-08 09:05:03 +01:00
Laurent Cozic
583ac7960b Mobile: Dev fix: Add missing key 2020-06-08 09:02:14 +01:00
Laurent Cozic
b749bb60fc Merge branch 'master' of github.com:laurent22/joplin 2020-06-08 09:02:04 +01:00
Roman Musin
2c6a298758 Android: Fixes #3010: Request permissions if needed when exporting profile (#3202) 2020-06-08 09:01:11 +01:00
Laurent Cozic
42544cc63b Mobile: Reduce side menu edge hit width
Due to this bug:

https://github.com/react-native-community/react-native-side-menu/issues/153

After rotating the device, the edge hit area is too large, more than 50%
of the note in some cases, which makes it difficult to scroll the note
or zoom.
2020-06-08 08:49:24 +01:00
Roman Musin
d2b81d221b Mobile: Fixes #3343: Fixed issue when creating note then switching notebook (#3347) 2020-06-08 08:40:52 +01:00
273 changed files with 107014 additions and 103170 deletions

View File

@@ -61,6 +61,7 @@ Modules/TinyMCE/IconPack/postinstall.js
Modules/TinyMCE/langs/
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
ElectronClient/global.d.js
ElectronClient/gui/MultiNoteActions.js
ElectronClient/gui/NoteContentPropertiesDialog.js
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/AceEditor.js
@@ -114,6 +115,7 @@ ReactNativeClient/lib/services/keychain/KeychainServiceDriver.node.js
ReactNativeClient/lib/services/keychain/KeychainServiceDriverBase.js
ReactNativeClient/lib/services/ResourceEditWatcher.js
ReactNativeClient/lib/services/SettingUtils.js
ReactNativeClient/lib/services/UndoRedoService.js
ReactNativeClient/lib/ShareExtension.js
ReactNativeClient/lib/shareHandler.js
ReactNativeClient/PluginAssetsLoader.js

2
.gitignore vendored
View File

@@ -51,6 +51,7 @@ Tools/commit_hook.txt
*.map
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
ElectronClient/global.d.js
ElectronClient/gui/MultiNoteActions.js
ElectronClient/gui/NoteContentPropertiesDialog.js
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/AceEditor.js
@@ -104,6 +105,7 @@ ReactNativeClient/lib/services/keychain/KeychainServiceDriver.node.js
ReactNativeClient/lib/services/keychain/KeychainServiceDriverBase.js
ReactNativeClient/lib/services/ResourceEditWatcher.js
ReactNativeClient/lib/services/SettingUtils.js
ReactNativeClient/lib/services/UndoRedoService.js
ReactNativeClient/lib/ShareExtension.js
ReactNativeClient/lib/shareHandler.js
ReactNativeClient/PluginAssetsLoader.js

View File

@@ -21,7 +21,11 @@ class Command extends BaseCommand {
.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.')],
['--output-format <output-format>', _('Output format: %s', 'md, html')],
];
}
async action(args) {
@@ -55,9 +59,9 @@ class Command extends BaseCommand {
this.stdout(s);
};
app()
.gui()
.showConsole();
if (args.options.outputFormat) importOptions.outputFormat = args.options.outputFormat;
app().gui().showConsole();
this.stdout(_('Importing notes...'));
const service = new InteropService();
const result = await service.import(importOptions);

View File

@@ -52,8 +52,6 @@ BaseItem.loadClass('Revision', Revision);
Setting.setConstant('appId', `net.cozic.joplin${env === 'dev' ? 'dev' : ''}-cli`);
Setting.setConstant('appType', 'cli');
console.info(Setting.value('appId'));
shimInit();
const application = app();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -38,42 +38,42 @@ locales['tr_TR'] = require('./tr_TR.json');
locales['vi'] = require('./vi.json');
locales['zh_CN'] = require('./zh_CN.json');
locales['zh_TW'] = require('./zh_TW.json');
stats['ar'] = {"percentDone":85};
stats['eu'] = {"percentDone":36};
stats['bs_BA'] = {"percentDone":79};
stats['bg_BG'] = {"percentDone":71};
stats['ca'] = {"percentDone":56};
stats['hr_HR'] = {"percentDone":30};
stats['cs_CZ'] = {"percentDone":88};
stats['da_DK'] = {"percentDone":79};
stats['de_DE'] = {"percentDone":96};
stats['et_EE'] = {"percentDone":70};
stats['ar'] = {"percentDone":84};
stats['eu'] = {"percentDone":35};
stats['bs_BA'] = {"percentDone":78};
stats['bg_BG'] = {"percentDone":70};
stats['ca'] = {"percentDone":55};
stats['hr_HR'] = {"percentDone":29};
stats['cs_CZ'] = {"percentDone":86};
stats['da_DK'] = {"percentDone":78};
stats['de_DE'] = {"percentDone":97};
stats['et_EE'] = {"percentDone":69};
stats['en_GB'] = {"percentDone":100};
stats['en_US'] = {"percentDone":100};
stats['es_ES'] = {"percentDone":95};
stats['es_ES'] = {"percentDone":94};
stats['eo'] = {"percentDone":40};
stats['fr_FR'] = {"percentDone":100};
stats['gl_ES'] = {"percentDone":46};
stats['id_ID'] = {"percentDone":98};
stats['fr_FR'] = {"percentDone":99};
stats['gl_ES'] = {"percentDone":45};
stats['id_ID'] = {"percentDone":97};
stats['it_IT'] = {"percentDone":95};
stats['nl_NL'] = {"percentDone":89};
stats['nl_BE'] = {"percentDone":36};
stats['nl_NL'] = {"percentDone":90};
stats['nb_NO'] = {"percentDone":93};
stats['nb_NO'] = {"percentDone":92};
stats['fa'] = {"percentDone":35};
stats['pl_PL'] = {"percentDone":89};
stats['pt_PT'] = {"percentDone":94};
stats['pt_BR'] = {"percentDone":95};
stats['pl_PL'] = {"percentDone":88};
stats['pt_PT'] = {"percentDone":93};
stats['pt_BR'] = {"percentDone":99};
stats['ro'] = {"percentDone":36};
stats['sl_SI'] = {"percentDone":45};
stats['sv'] = {"percentDone":75};
stats['th_TH'] = {"percentDone":56};
stats['vi'] = {"percentDone":91};
stats['tr_TR'] = {"percentDone":95};
stats['th_TH'] = {"percentDone":55};
stats['vi'] = {"percentDone":90};
stats['tr_TR'] = {"percentDone":99};
stats['el_GR'] = {"percentDone":95};
stats['ru_RU'] = {"percentDone":93};
stats['ru_RU'] = {"percentDone":92};
stats['sr_RS'] = {"percentDone":76};
stats['zh_CN'] = {"percentDone":93};
stats['zh_TW'] = {"percentDone":94};
stats['ja_JP'] = {"percentDone":98};
stats['ko'] = {"percentDone":92};
stats['zh_CN'] = {"percentDone":98};
stats['zh_TW'] = {"percentDone":93};
stats['ja_JP'] = {"percentDone":97};
stats['ko'] = {"percentDone":91};
module.exports = { locales: locales, stats: stats };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -33,9 +33,9 @@
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"acorn": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg=="
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz",
"integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ=="
},
"acorn-globals": {
"version": "4.3.4",
@@ -1161,9 +1161,9 @@
"integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw=="
},
"cssstyle": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.2.0.tgz",
"integrity": "sha512-sEb3XFPx3jNnCAMtqrXPDeSgQr+jojtCeNf8cvMNMh1cG970+lljssvQDzPq6lmmJu2Vhqood/gtEomBiHOGnA==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz",
"integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==",
"requires": {
"cssom": "~0.3.6"
},
@@ -1594,9 +1594,9 @@
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"escodegen": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.1.tgz",
"integrity": "sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ==",
"version": "1.14.2",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.2.tgz",
"integrity": "sha512-InuOIiKk8wwuOFg6x9BQXbzjrQhtyXh46K9bqVTPzSo2FnyMBaYGBMC6PhQy7yxxil9vIedFBweQBMK74/7o8A==",
"requires": {
"esprima": "^4.0.1",
"estraverse": "^4.2.0",
@@ -2111,7 +2111,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -2132,12 +2133,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -2152,17 +2155,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -2279,7 +2285,8 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -2291,6 +2298,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -2305,6 +2313,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -2312,12 +2321,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -2336,6 +2347,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -2425,7 +2437,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -2437,6 +2450,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -2522,7 +2536,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -2558,6 +2573,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -2577,6 +2593,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -2620,12 +2637,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@@ -3730,9 +3749,9 @@
"dev": true
},
"joplin-turndown": {
"version": "4.0.27",
"resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.27.tgz",
"integrity": "sha512-qwJEzpbsyXnfjYgCVXWbuf3BdbDAaP7edm5ubeVAaQ3RnaiSEB2xZLg3lubmuFOIxXnkMDMkGJC4G+qAbCW95w==",
"version": "4.0.28",
"resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.28.tgz",
"integrity": "sha512-wQP9OUBAkWq/VPPCJcY1EI6tSXWlGs/BJ7Ce8BZYRF/1vEk/TRHOdKmCObQrXz/0nRoLiP5xeqNvHE1nK4XbRQ==",
"requires": {
"css": "^2.2.4",
"html-entities": "^1.2.1",
@@ -6611,7 +6630,7 @@
"requires": {
"chalk": "^2.1.0",
"emphasize": "^1.5.0",
"node-emoji": "git+https://github.com/laurent22/node-emoji.git#9fa01eac463e94dde1316ef8c53089eeef4973b5",
"node-emoji": "git+https://github.com/laurent22/node-emoji.git",
"slice-ansi": "^1.0.0",
"string-width": "^2.1.1",
"terminal-kit": "^1.13.11",
@@ -7283,9 +7302,9 @@
}
},
"ws": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz",
"integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ=="
"version": "7.3.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz",
"integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w=="
},
"xdg-basedir": {
"version": "3.0.0",

View File

@@ -55,7 +55,7 @@
"htmlparser2": "^4.1.0",
"image-data-uri": "^2.0.0",
"image-type": "^3.0.0",
"joplin-turndown": "^4.0.27",
"joplin-turndown": "^4.0.28",
"joplin-turndown-plugin-gfm": "^1.0.12",
"json-stringify-safe": "^5.0.1",
"jssha": "^2.3.0",

View File

@@ -89,20 +89,20 @@ describe('EnexToHtml', function() {
}],
});
it('fails when not given a matching resource', asyncTest(async () => {
// To test the promise-unexpectedly-resolved case, add `audioResource` to the array.
const resources = [];
const inputFile = fileWithPath('en-media--image.enex');
const enexInput = await shim.fsDriver().readFile(inputFile);
const promisedOutput = enexXmlToHtml(enexInput, resources);
// it('fails when not given a matching resource', asyncTest(async () => {
// // To test the promise-unexpectedly-resolved case, add `audioResource` to the array.
// const resources = [];
// const inputFile = fileWithPath('en-media--image.enex');
// const enexInput = await shim.fsDriver().readFile(inputFile);
// const promisedOutput = enexXmlToHtml(enexInput, resources);
promisedOutput.then(() => {
// Promise should not be resolved
expect(false).toEqual(true);
}, (reason) => {
expect(reason)
.toBe('Hash with no associated resource: 89ce7da62c6b2832929a6964237e98e9');
});
}));
// promisedOutput.then(() => {
// // Promise should not be resolved
// expect(false).toEqual(true);
// }, (reason) => {
// expect(reason)
// .toBe('Hash with no associated resource: 89ce7da62c6b2832929a6964237e98e9');
// });
// }));
});

View File

@@ -12,7 +12,7 @@ const BaseModel = require('lib/BaseModel.js');
const { shim } = require('lib/shim');
const MdToHtml = require('lib/joplin-renderer/MdToHtml');
const { enexXmlToMd } = require('lib/import-enex-md-gen.js');
const { themeStyle } = require('../../ElectronClient/theme.js');
const { themeStyle } = require('lib/theme');
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60 * 60 * 1000; // Can run for a while since everything is in the same test unit

View File

@@ -2,6 +2,5 @@
<div><a href="joplin://21ca2b948f222a38802940ec7e2e5de3" hash="21ca2b948f222a38802940ec7e2e5de3" type="application/pdf" style="cursor:pointer;" alt="attachment-1">attachment-1</a></div>
<div>
<br>
<br>
</div>
</en-note>

View File

@@ -8,6 +8,5 @@
</div>
<div>
<br>
<br>
</div>
</en-note>

View File

@@ -4,11 +4,9 @@
<div>
<input type="checkbox" onclick="return false;">A test for <i>italic</i>
<br>
<br>
</div>
<div>
<br>
<br>
</div>
<div><i><img src=":/89ce7da62c6b2832929a6964237e98e9" hash="89ce7da62c6b2832929a6964237e98e9" type="image/jpeg" alt=""></i></div>
</en-note>

View File

@@ -0,0 +1,5 @@
<ul style="list-style-type:decimal;">
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ul>

View File

@@ -0,0 +1,3 @@
1. Item A
2. Item B
3. Item C

View File

@@ -0,0 +1,33 @@
/* eslint-disable no-unused-vars */
require('app-module-path').addPath(__dirname);
const { time } = require('lib/time-utils.js');
const { asyncTest, fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js');
const mimeUtils = require('lib/mime-utils.js').mime;
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
describe('mimeUils', function() {
beforeEach(async (done) => {
done();
});
it('should get the file extension from the mime type', asyncTest(async () => {
expect(mimeUtils.toFileExtension('image/jpeg')).toBe('jpg');
expect(mimeUtils.toFileExtension('image/jpg')).toBe('jpg');
expect(mimeUtils.toFileExtension('IMAGE/JPG')).toBe('jpg');
expect(mimeUtils.toFileExtension('')).toBe(null);
}));
it('should get the mime type from the filename', asyncTest(async () => {
expect(mimeUtils.fromFilename('test.jpg')).toBe('image/jpeg');
expect(mimeUtils.fromFilename('test.JPG')).toBe('image/jpeg');
expect(mimeUtils.fromFilename('test.doesntexist')).toBe(null);
expect(mimeUtils.fromFilename('test')).toBe(null);
}));
});

View File

@@ -0,0 +1,86 @@
// /* eslint-disable no-unused-vars */
// require('app-module-path').addPath(__dirname);
// const { asyncTest, fileContentEqual, setupDatabase, checkThrow, revisionService, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js');
// const KvStore = require('lib/services/KvStore.js');
// const UndoRedoService = require('lib/services/UndoRedoService.js').default;
// process.on('unhandledRejection', (reason, p) => {
// console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
// });
// jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
// describe('services_UndoRedoService', function() {
// beforeEach(async (done) => {
// await setupDatabaseAndSynchronizer(1);
// await switchClient(1);
// done();
// });
// it('should undo and redo', asyncTest(async () => {
// const service = new UndoRedoService();
// expect(service.canUndo).toBe(false);
// expect(service.canRedo).toBe(false);
// service.push('test');
// expect(service.canUndo).toBe(true);
// expect(service.canRedo).toBe(false);
// service.push('test 2');
// service.push('test 3');
// expect(service.undo()).toBe('test 3');
// expect(service.canRedo).toBe(true);
// expect(service.undo()).toBe('test 2');
// expect(service.undo()).toBe('test');
// expect(checkThrow(() => service.undo())).toBe(true);
// expect(service.canUndo).toBe(false);
// expect(service.canRedo).toBe(true);
// expect(service.redo()).toBe('test');
// expect(service.canUndo).toBe(true);
// expect(service.redo()).toBe('test 2');
// expect(service.redo()).toBe('test 3');
// expect(service.canRedo).toBe(false);
// expect(checkThrow(() => service.redo())).toBe(true);
// }));
// it('should clear the redo stack when undoing', asyncTest(async () => {
// const service = new UndoRedoService();
// service.push('test');
// service.push('test 2');
// service.push('test 3');
// service.undo();
// expect(service.canRedo).toBe(true);
// service.push('test 4');
// expect(service.canRedo).toBe(false);
// expect(service.undo()).toBe('test 4');
// expect(service.undo()).toBe('test 2');
// }));
// it('should limit the size of the undo stack', asyncTest(async () => {
// const service = new UndoRedoService();
// for (let i = 0; i < 30; i++) {
// service.push(`test${i}`);
// }
// for (let i = 0; i < 20; i++) {
// service.undo();
// }
// expect(service.canUndo).toBe(false);
// }));
// });

View File

@@ -378,6 +378,16 @@ async function checkThrowAsync(asyncFn) {
return hasThrown;
}
function checkThrow(fn) {
let hasThrown = false;
try {
fn();
} catch (error) {
hasThrown = true;
}
return hasThrown;
}
function fileContentEqual(path1, path2) {
const fs = require('fs-extra');
const content1 = fs.readFileSync(path1, 'base64');
@@ -563,4 +573,4 @@ class TestApp extends BaseApplication {
}
}
module.exports = { kvStore, resourceService, resourceFetcher, tempFilePath, allSyncTargetItemsEncrypted, setupDatabase, revisionService, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync, encryptionService, loadEncryptionMasterKey, fileContentEqual, decryptionWorker, asyncTest, currentClientId, id, ids, sortedIds, at, createNTestNotes, createNTestFolders, createNTestTags, TestApp };
module.exports = { kvStore, resourceService, resourceFetcher, tempFilePath, allSyncTargetItemsEncrypted, setupDatabase, revisionService, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync, checkThrow, encryptionService, loadEncryptionMasterKey, fileContentEqual, decryptionWorker, asyncTest, currentClientId, id, ids, sortedIds, at, createNTestNotes, createNTestFolders, createNTestTags, TestApp };

View File

@@ -226,8 +226,9 @@
const nodeName = node.nodeName.toLowerCase();
const nodeParent = node.parentNode;
const nodeParentName = nodeParent ? nodeParent.nodeName.toLowerCase() : '';
const computedStyle = node.nodeType === 1 ? window.getComputedStyle(node) : {};
let isVisible = node.nodeType === 1 ? window.getComputedStyle(node).display !== 'none' : true;
let isVisible = node.nodeType === 1 ? computedStyle.display !== 'none' && computedStyle.visibility !== 'hidden' : true;
if (isVisible && ['script', 'noscript', 'style', 'select', 'option', 'button'].indexOf(nodeName) >= 0) isVisible = false;
// If it's a text input or a textarea and it has a value, save

View File

@@ -9,3 +9,8 @@ const sourcePath = `${__dirname}../../../ReactNativeClient/lib/randomClipperPort
if (fs.pathExistsSync(sourcePath)) {
fs.copySync(sourcePath, `${__dirname}/../src/randomClipperPort.js`);
}
// These files give warnings when loading the extension in Chrome, in dev mode
fs.removeSync(`${__dirname}/node_modules/public-encrypt/test/test_key.pem`);
fs.removeSync(`${__dirname}/node_modules/public-encrypt/test/test_rsa_pubkey.pem`);
fs.removeSync(`${__dirname}/node_modules/public-encrypt/test/test_rsa_privkey.pem`);

View File

@@ -4,6 +4,7 @@ const InteropService = require('lib/services/InteropService');
const Setting = require('lib/models/Setting');
const Note = require('lib/models/Note.js');
const { friendlySafeFilename } = require('lib/path-utils');
const { time } = require('lib/time-utils.js');
const md5 = require('md5');
const url = require('url');
const { shim } = require('lib/shim');
@@ -108,10 +109,16 @@ class InteropServiceHelper {
}
static async defaultFilename(noteId, fileExtension) {
if (!noteId) return '';
const note = await Note.load(noteId);
// In a rare case the passed not will be null, use the id for filename
const filename = friendlySafeFilename(note ? note.title : noteId, 100);
// Default filename is just the date
const date = time.formatMsToLocal(new Date().getTime(), time.dateFormat());
let filename = friendlySafeFilename(`${date}`, 100);
if (noteId) {
const note = await Note.load(noteId);
// In a rare case the passed note will be null, use the id for filename
filename = friendlySafeFilename(note ? note.title : noteId, 100);
}
return `${filename}.${fileExtension}`;
}

4
ElectronClient/global.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
// Declare codemirror module so that we can import it using the import syntax.
// This also means it will implicitly have the any type, which is necessary because
// of the flexible manner that codemirror is made https://discuss.codemirror.net/t/basic-codemirror-configuration-in-typescript-project/2047/2
declare module 'codemirror';

View File

@@ -1,7 +1,7 @@
const React = require('react');
const { connect } = require('react-redux');
const { bridge } = require('electron').remote.require('./bridge');
const { themeStyle } = require('../theme.js');
const { themeStyle } = require('lib/theme');
const { _ } = require('lib/locale.js');
const ClipperServer = require('lib/ClipperServer');
const Setting = require('lib/models/Setting');

View File

@@ -2,7 +2,7 @@ const React = require('react');
const { connect } = require('react-redux');
const Setting = require('lib/models/Setting.js');
const { bridge } = require('electron').remote.require('./bridge');
const { themeStyle } = require('../theme.js');
const { themeStyle } = require('lib/theme');
const pathUtils = require('lib/path-utils.js');
const { _ } = require('lib/locale.js');
const SyncTargetRegistry = require('lib/SyncTargetRegistry');

View File

@@ -1,6 +1,6 @@
const React = require('react');
const { _ } = require('lib/locale.js');
const { themeStyle } = require('../theme.js');
const { themeStyle } = require('lib/theme');
function DialogButtonRow(props) {
const theme = themeStyle(props.theme);

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