From f82aa0added911ab004549ac38a6176fea3900b8 Mon Sep 17 00:00:00 2001 From: Amit singh Date: Fri, 27 Mar 2020 17:39:26 +0530 Subject: [PATCH 1/4] Mobile: Fixes #2867: Fixed styling issue in config screen (#2868) * fixes hidden path text * fixes hidden path text lable --- ReactNativeClient/lib/components/screens/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactNativeClient/lib/components/screens/config.js b/ReactNativeClient/lib/components/screens/config.js index 12f3cd1034..c5117c572c 100644 --- a/ReactNativeClient/lib/components/screens/config.js +++ b/ReactNativeClient/lib/components/screens/config.js @@ -450,7 +450,7 @@ class ConfigScreenComponent extends BaseScreenComponent { const profileExportPrompt = ( Path: - this.setState({ profileExportPath: event.nativeEvent.text })} value={this.state.profileExportPath} placeholder="/path/to/sdcard"> + this.setState({ profileExportPath: event.nativeEvent.text })} value={this.state.profileExportPath} placeholder="/path/to/sdcard"> ); From 62db3d09eac8c4c2a8cd34e2c961d8e53b9d3eb1 Mon Sep 17 00:00:00 2001 From: Ishant Gupta Date: Fri, 27 Mar 2020 17:43:22 +0530 Subject: [PATCH 2/4] Mobile: Fixes #2900: Fixed bold text not visible in dark theme (#2909) * fixed bold text not visible in oled dark theme * fixed variable names --- ReactNativeClient/lib/components/global-style.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ReactNativeClient/lib/components/global-style.js b/ReactNativeClient/lib/components/global-style.js index 5986f9840d..4790db1ae5 100644 --- a/ReactNativeClient/lib/components/global-style.js +++ b/ReactNativeClient/lib/components/global-style.js @@ -153,6 +153,8 @@ function themeStyle(theme) { output.colorUrl = '#7B81FF'; + output.colorBright = 'rgb(220,220,220)'; + themeCache_[theme] = output; return addExtraStyles(themeCache_[theme]); } @@ -184,6 +186,8 @@ function themeStyle(theme) { output.colorUrl = '#7B81FF'; + output.colorBright = 'rgb(220,220,220)'; + themeCache_[theme] = output; return addExtraStyles(themeCache_[theme]); } From ae73051797d0cdb7d157ff21a45ee1fbec0041fb Mon Sep 17 00:00:00 2001 From: anirudh murali <49116134+anihm136@users.noreply.github.com> Date: Fri, 27 Mar 2020 12:16:40 +0000 Subject: [PATCH 3/4] Desktop: Fixes #2917: Prevent title overflow on small windows (#2918) --- ElectronClient/gui/NoteText.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/ElectronClient/gui/NoteText.jsx b/ElectronClient/gui/NoteText.jsx index 5f1a2d41d6..a1461ff8ba 100644 --- a/ElectronClient/gui/NoteText.jsx +++ b/ElectronClient/gui/NoteText.jsx @@ -2023,6 +2023,7 @@ class NoteTextComponent extends React.Component { backgroundColor: theme.backgroundColor, border: '1px solid', borderColor: theme.dividerColor, + overflow: 'hidden', }; const toolbarStyle = { From 37158fdb8970da84b0001e48d433e5cf9358589f Mon Sep 17 00:00:00 2001 From: Bart Date: Fri, 27 Mar 2020 12:20:38 +0000 Subject: [PATCH 4/4] Desktop: Fixes #2334: MD importer handle special chars in linked image name (#2346) * md importer: decode uri encoded links to cover case of special chars in linked image names * md importer: temp debug logs for linux test pipeline * md importer: more temp debug logs * md importer: tests, add special char image name on linux * md importer: tests, use const not let * md importer: remove debug logs --- CliClient/tests/MdToMd.js | 5 +++++ CliClient/tests/md_to_md/sample-special-chars.md | 1 + CliClient/tests/support/photo-åäö.jpg | Bin 0 -> 2720 bytes CliClient/tests/support/photo-åäö.jpg | Bin 0 -> 2720 bytes .../lib/services/InteropService_Importer_Md.js | 3 ++- 5 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 CliClient/tests/md_to_md/sample-special-chars.md create mode 100644 CliClient/tests/support/photo-åäö.jpg create mode 100644 CliClient/tests/support/photo-åäö.jpg diff --git a/CliClient/tests/MdToMd.js b/CliClient/tests/MdToMd.js index 186b7f40c4..d10278d661 100644 --- a/CliClient/tests/MdToMd.js +++ b/CliClient/tests/MdToMd.js @@ -38,4 +38,9 @@ describe('InteropService_Importer_Md: importLocalImages', function() { expect(items.length).toBe(0); expect(note.body).toContain('Unidentified vessel travelling at sub warp speed, bearing 235.7. Fluctuations in energy readings from it, Captain. All transporters off.'); }); + it('should import linked image with special characters in name', async function() { + const note = await importer.importFile(`${__dirname}/md_to_md/sample-special-chars.md`, 'notebook'); + const items = await Note.linkedItems(note.body); + expect(items.length).toBe(1); + }); }); diff --git a/CliClient/tests/md_to_md/sample-special-chars.md b/CliClient/tests/md_to_md/sample-special-chars.md new file mode 100644 index 0000000000..3bc1a5ed07 --- /dev/null +++ b/CliClient/tests/md_to_md/sample-special-chars.md @@ -0,0 +1 @@ +![link special chars](../support/photo-åäö.jpg) diff --git a/CliClient/tests/support/photo-åäö.jpg b/CliClient/tests/support/photo-åäö.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b258679de6bf0f62a6ae9c65f3b8e85d1dba3c50 GIT binary patch literal 2720 zcmb7=c{tRI8pnTQhOvxgvehui*eVml%viE3YYRg()Im|%ml-=J!ko}3OZI&?*;C<^ zC2N*4wuZrIbPR=}O{M1QKF@ugd;h%O_s`G!e&6r&DKD?2hE-Qm!Klj1qYcp*oQ}S} zKI)k9Nn>4ete(EkZxfK9pr9~J7$GW(&{39G*7?81?E&EYKnM^G1}OqOa1a;{;`Rfw z002Pu!~T~*JYWd#e&T(4LJR8dCB^d1Cspc@u@`iq04G*Lt3c?m{~4lk2^TU9B#8!yF?^g932$qFI+E z2xWr0Z1K)(LrmB8I6*%xIWx&&XJ>WHbduxglXvArDt{WjjTx(@2~1m3qj zRrJPma`cpnfXuQYUWmG9i%E6(0c)gowxzaxg-K9@D5K|PBqy3OAjo7LUh z_ETHNKM^bW{>-_BKo!OsPX*Gg_&0;@o{E)Jx#aE51u9wPeiL-o&m!YbGM^l5EgXq~ zjdgrSdm&+TH6YXEN&uFi7<65Ea8{tY8l#tp)wqr)7xR6u6f=Cd^I|=~?_=rCS|zl- z?Vg*^nRq4dX-R#psjKffb2#CdFer&`ao{THp>ckc6?3cToM*|kD*zgg3W^I8C}e}~ zVndNL(qfjViuAc;ydFueWR5r-0*+3YoOfHT-9Gy2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}fz5$T-@0BoAlM@V8uF z8Nsqw=@!b|Qyg~RMV#uRLe1!wF>_Xj6{7`;hOGsZ_6R zCTr3HDLM65e+y!y=?N`w(pDvDYawYa0+-&+_l)TgHq~5mjMs?>sW(`VPi}SAil|!& zU|WuCTJHJ(oE|ZPSBr=?-JOvtfq8Wt+8)vQtV|vwsOW3%fY8iS_v#PV=*51XAUj0S zI7i|Rf%WVjqxh&-c=PFNx6fx&Ll%k`vts6oZHwOE9+y|JH*6W}Fie518X6))d`igl zX-Y3(?|CyGMtENP8UgZE4>z0N?O9>p<^sX1PnIsK`*(+;1P6|3rp!8dd={mIA!U~; zT9B3*&PA$qb{9F6uIUf+!%Puels*-T#pW*VOh@g#GQD}7rsy{@@@jB9tfR60uxZCj z@$E}^UJ?6jpCM6*Gjr^ly6l2KbtZF+CN_Ak0}Li_#&Q8%UTtlDW29=arI9rvI#j{EO1V|%ZO?T0p`{J2nQx?t zy(n^U21h&yXZUhgDwY*Yh^)D<5{;1=RW5y=v&d|EOY2n74%>kDWl8}6l*Nl8~RxTuLBfhBy9ZuYpVW6+cI_F1S zo$OymYHmmBwDv6hbm~s~lfL*PuY8WgAtKaG znf{?}^&jK+o~+$Fo?^t%pE}3+3wf8!#Q*>R literal 0 HcmV?d00001 diff --git a/CliClient/tests/support/photo-åäö.jpg b/CliClient/tests/support/photo-åäö.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b258679de6bf0f62a6ae9c65f3b8e85d1dba3c50 GIT binary patch literal 2720 zcmb7=c{tRI8pnTQhOvxgvehui*eVml%viE3YYRg()Im|%ml-=J!ko}3OZI&?*;C<^ zC2N*4wuZrIbPR=}O{M1QKF@ugd;h%O_s`G!e&6r&DKD?2hE-Qm!Klj1qYcp*oQ}S} zKI)k9Nn>4ete(EkZxfK9pr9~J7$GW(&{39G*7?81?E&EYKnM^G1}OqOa1a;{;`Rfw z002Pu!~T~*JYWd#e&T(4LJR8dCB^d1Cspc@u@`iq04G*Lt3c?m{~4lk2^TU9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ReactNativeClient/lib/services/InteropService_Importer_Md.js b/ReactNativeClient/lib/services/InteropService_Importer_Md.js index 2cb99ca066..d4e029c463 100644 --- a/ReactNativeClient/lib/services/InteropService_Importer_Md.js +++ b/ReactNativeClient/lib/services/InteropService_Importer_Md.js @@ -63,7 +63,8 @@ class InteropService_Importer_Md extends InteropService_Importer_Base { async importLocalImages(filePath, md) { let updated = md; const imageLinks = unique(extractImageUrls(md)); - await Promise.all(imageLinks.map(async (link) => { + await Promise.all(imageLinks.map(async (encodedLink) => { + const link = decodeURI(encodedLink); const attachmentPath = filename(`${dirname(filePath)}/${link}`, true); const pathWithExtension = `${attachmentPath}.${fileExtension(link)}`; const stat = await shim.fsDriver().stat(pathWithExtension);