aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-03-07 14:57:26 +0100
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-03-07 14:57:26 +0100
commit2b67d6e7d888331380ea93fd3c93a87e17c41306 (patch)
tree1c4421acee04ce20ee9f8aabef4767ef3675ab7a /src/stores
parentmanage translations before git pushes (diff)
parentfeat(Linux): Add auto updater for Linux AppImage builds (diff)
downloadferdium-app-2b67d6e7d888331380ea93fd3c93a87e17c41306.tar.gz
ferdium-app-2b67d6e7d888331380ea93fd3c93a87e17c41306.tar.zst
ferdium-app-2b67d6e7d888331380ea93fd3c93a87e17c41306.zip
Merge branch 'develop' into chore/react-intl-manager
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/AppStore.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 168aa7e48..f9009af5a 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -8,6 +8,7 @@ import { getDoNotDisturb } from '@meetfranz/electron-notification-state';
8import AutoLaunch from 'auto-launch'; 8import AutoLaunch from 'auto-launch';
9import prettyBytes from 'pretty-bytes'; 9import prettyBytes from 'pretty-bytes';
10import ms from 'ms'; 10import ms from 'ms';
11import { URL } from 'url';
11 12
12import Store from './lib/Store'; 13import Store from './lib/Store';
13import Request from './lib/Request'; 14import Request from './lib/Request';
@@ -19,6 +20,7 @@ import { onVisibilityChange } from '../helpers/visibility-helper';
19import { getLocale } from '../helpers/i18n-helpers'; 20import { getLocale } from '../helpers/i18n-helpers';
20 21
21import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '../helpers/service-helpers.js'; 22import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '../helpers/service-helpers.js';
23import { isValidExternalURL } from '../helpers/url-helpers';
22 24
23const debug = require('debug')('Franz:AppStore'); 25const debug = require('debug')('Franz:AppStore');
24 26
@@ -256,7 +258,14 @@ export default class AppStore extends Store {
256 } 258 }
257 259
258 @action _openExternalUrl({ url }) { 260 @action _openExternalUrl({ url }) {
259 shell.openExternal(url); 261 const parsedUrl = new URL(url);
262 debug('open external url', parsedUrl);
263
264 if (isValidExternalURL(url)) {
265 shell.openExternal(url);
266 }
267
268 gaEvent('External URL', 'open', parsedUrl.host);
260 } 269 }
261 270
262 @action _checkForUpdates() { 271 @action _checkForUpdates() {