aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.all-contributorsrc9
-rw-r--r--README.md9
-rw-r--r--misty.yml4
-rw-r--r--package-lock.json19
-rw-r--r--package.json2
-rw-r--r--src/components/settings/services/EditServiceForm.js2
-rw-r--r--src/models/Service.js6
-rw-r--r--src/stores/SettingsStore.js8
8 files changed, 33 insertions, 26 deletions
diff --git a/.all-contributorsrc b/.all-contributorsrc
index 2644b1edb..2da78ea6b 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -287,6 +287,15 @@
287 "contributions": [ 287 "contributions": [
288 "code" 288 "code"
289 ] 289 ]
290 },
291 {
292 "login": "dpeukert",
293 "name": "Daniel Peukert",
294 "avatar_url": "https://avatars2.githubusercontent.com/u/3451904?v=4",
295 "profile": "https://gitlab.com/dpeukert",
296 "contributions": [
297 "code"
298 ]
290 } 299 }
291 ], 300 ],
292 "contributorsPerLine": 6, 301 "contributorsPerLine": 6,
diff --git a/README.md b/README.md
index 67bac2277..7b4abef5b 100644
--- a/README.md
+++ b/README.md
@@ -180,13 +180,19 @@ $ npm run rebuild
180 180
181### Start development app 181### Start development app
182 182
183Run these two commands **simultaneously** in different console tabs: 183Run these two commands **simultaneously** in different terminals:
184 184
185```bash 185```bash
186$ npm run dev 186$ npm run dev
187$ npm run start 187$ npm run start
188``` 188```
189 189
190Optionally, you can run both commands in one terminal with [misty](https://github.com/adlk/misty) (see [misty.yml](https://github.com/getferdi/ferdi/blob/develop/misty.yml)):
191
192```bash
193$ npx misty
194```
195
190Be aware that the development database will be reset regularly. 196Be aware that the development database will be reset regularly.
191 197
192### Packaging 198### Packaging
@@ -255,6 +261,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
255 <tr> 261 <tr>
256 <td align="center"><a href="http://lhw.ring0.de"><img src="https://avatars2.githubusercontent.com/u/351875?v=4" width="40px;" alt=""/><br /><sub><b>Lennart Weller</b></sub></a><br /><a href="#platform-lhw" title="Packaging/porting to new platform">📦</a></td> 262 <td align="center"><a href="http://lhw.ring0.de"><img src="https://avatars2.githubusercontent.com/u/351875?v=4" width="40px;" alt=""/><br /><sub><b>Lennart Weller</b></sub></a><br /><a href="#platform-lhw" title="Packaging/porting to new platform">📦</a></td>
257 <td align="center"><a href="https://github.com/jereksel"><img src="https://avatars0.githubusercontent.com/u/1307829?v=4" width="40px;" alt=""/><br /><sub><b>Andrzej Ressel</b></sub></a><br /><a href="https://github.com/getferdi/ferdi/commits?author=jereksel" title="Code">💻</a></td> 263 <td align="center"><a href="https://github.com/jereksel"><img src="https://avatars0.githubusercontent.com/u/1307829?v=4" width="40px;" alt=""/><br /><sub><b>Andrzej Ressel</b></sub></a><br /><a href="https://github.com/getferdi/ferdi/commits?author=jereksel" title="Code">💻</a></td>
264 <td align="center"><a href="https://gitlab.com/dpeukert"><img src="https://avatars2.githubusercontent.com/u/3451904?v=4" width="40px;" alt=""/><br /><sub><b>Daniel Peukert</b></sub></a><br /><a href="https://github.com/getferdi/ferdi/commits?author=dpeukert" title="Code">💻</a></td>
258 </tr> 265 </tr>
259</table> 266</table>
260 267
diff --git a/misty.yml b/misty.yml
index a1e024c4e..2b93d025e 100644
--- a/misty.yml
+++ b/misty.yml
@@ -2,5 +2,5 @@ code:
2 cmd: npm run dev 2 cmd: npm run dev
3 3
4app: 4app:
5 cmd: npx electron ./build 5 cmd: npm start
6 waitOn: http://localhost:8000 \ No newline at end of file 6 waitOn: http://localhost:8000
diff --git a/package-lock.json b/package-lock.json
index fd54e00b0..94e2b995b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
1{ 1{
2 "name": "ferdi", 2 "name": "ferdi",
3 "version": "5.4.3", 3 "version": "5.4.4-beta.1",
4 "lockfileVersion": 1, 4 "lockfileVersion": 1,
5 "requires": true, 5 "requires": true,
6 "dependencies": { 6 "dependencies": {
@@ -19890,15 +19890,9 @@
19890 } 19890 }
19891 }, 19891 },
19892 "normalize-url": { 19892 "normalize-url": {
19893 "version": "1.9.1", 19893 "version": "5.0.0",
19894 "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", 19894 "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-5.0.0.tgz",
19895 "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", 19895 "integrity": "sha512-bAEm2fx8Dq/a35Z6PIRkkBBJvR56BbEJvhpNtvCZ4W9FyORSna77fn+xtYFjqk5JpBS+fMnAOG/wFgkQBmB7hw=="
19896 "requires": {
19897 "object-assign": "^4.0.1",
19898 "prepend-http": "^1.0.0",
19899 "query-string": "^4.1.0",
19900 "sort-keys": "^1.0.0"
19901 }
19902 }, 19896 },
19903 "now-and-later": { 19897 "now-and-later": {
19904 "version": "2.0.1", 19898 "version": "2.0.1",
@@ -21006,11 +21000,6 @@
21006 "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", 21000 "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
21007 "dev": true 21001 "dev": true
21008 }, 21002 },
21009 "prepend-http": {
21010 "version": "1.0.4",
21011 "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
21012 "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
21013 },
21014 "preserve": { 21003 "preserve": {
21015 "version": "0.2.0", 21004 "version": "0.2.0",
21016 "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", 21005 "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
diff --git a/package.json b/package.json
index c33bf4f7a..89a8283fe 100644
--- a/package.json
+++ b/package.json
@@ -96,7 +96,7 @@
96 "moment": "^2.17.1", 96 "moment": "^2.17.1",
97 "ms": "2.1.2", 97 "ms": "2.1.2",
98 "node-fetch": "2.6.0", 98 "node-fetch": "2.6.0",
99 "normalize-url": "^1.9.1", 99 "normalize-url": "5.0.0",
100 "pretty-bytes": "^4.0.2", 100 "pretty-bytes": "^4.0.2",
101 "prop-types": "^15.5.10", 101 "prop-types": "^15.5.10",
102 "react": "16.12.0", 102 "react": "16.12.0",
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js
index fa34ac60b..89c82c7f8 100644
--- a/src/components/settings/services/EditServiceForm.js
+++ b/src/components/settings/services/EditServiceForm.js
@@ -169,7 +169,7 @@ export default @observer class EditServiceForm extends Component {
169 if (recipe.validateUrl && values.customUrl) { 169 if (recipe.validateUrl && values.customUrl) {
170 this.setState({ isValidatingCustomUrl: true }); 170 this.setState({ isValidatingCustomUrl: true });
171 try { 171 try {
172 values.customUrl = normalizeUrl(values.customUrl, { stripWWW: false }); 172 values.customUrl = normalizeUrl(values.customUrl, { stripWWW: false, removeTrailingSlash: false });
173 isValid = await recipe.validateUrl(values.customUrl); 173 isValid = await recipe.validateUrl(values.customUrl);
174 } catch (err) { 174 } catch (err) {
175 console.warn('ValidateURL', err); 175 console.warn('ValidateURL', err);
diff --git a/src/models/Service.js b/src/models/Service.js
index 10b54602f..12a2d4af9 100644
--- a/src/models/Service.js
+++ b/src/models/Service.js
@@ -1,6 +1,6 @@
1import { computed, observable, autorun } from 'mobx'; 1import { autorun, computed, observable } from 'mobx';
2import path from 'path';
3import normalizeUrl from 'normalize-url'; 2import normalizeUrl from 'normalize-url';
3import path from 'path';
4 4
5const debug = require('debug')('Ferdi:Service'); 5const debug = require('debug')('Ferdi:Service');
6 6
@@ -146,7 +146,7 @@ export default class Service {
146 if (this.recipe.hasCustomUrl && this.customUrl) { 146 if (this.recipe.hasCustomUrl && this.customUrl) {
147 let url; 147 let url;
148 try { 148 try {
149 url = normalizeUrl(this.customUrl, { stripWWW: false }); 149 url = normalizeUrl(this.customUrl, { stripWWW: false, removeTrailingSlash: false });
150 } catch (err) { 150 } catch (err) {
151 console.error(`Service (${this.recipe.name}): '${this.customUrl}' is not a valid Url.`); 151 console.error(`Service (${this.recipe.name}): '${this.customUrl}' is not a valid Url.`);
152 } 152 }
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js
index 8a5ee7204..428b6342c 100644
--- a/src/stores/SettingsStore.js
+++ b/src/stores/SettingsStore.js
@@ -47,9 +47,11 @@ export default class SettingsStore extends Store {
47 47
48 reaction( 48 reaction(
49 () => this.all.app.autohideMenuBar, 49 () => this.all.app.autohideMenuBar,
50 () => remote.getCurrentWindow().setAutoHideMenuBar( 50 () => {
51 this.all.app.autohideMenuBar, 51 const currentWindow = remote.getCurrentWindow();
52 ), 52 currentWindow.setMenuBarVisibility(!this.all.app.autohideMenuBar);
53 currentWindow.setAutoHideMenuBar(this.all.app.autohideMenuBar);
54 },
53 ); 55 );
54 56
55 reaction( 57 reaction(