diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 8 | ||||
-rw-r--r-- | src/components/ui/Link.js | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 1df8c3527..41580ca78 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -12,11 +12,9 @@ import ToggleRaw from '../../ui/ToggleRaw'; | |||
12 | import Select from '../../ui/Select'; | 12 | import Select from '../../ui/Select'; |
13 | import Input from '../../ui/Input'; | 13 | import Input from '../../ui/Input'; |
14 | 14 | ||
15 | import { | 15 | import { FRANZ_TRANSLATION, GITHUB_FRANZ_URL } from '../../../config'; |
16 | FRANZ_TRANSLATION, | 16 | import { DEFAULT_APP_SETTINGS, ferdiVersion, isMac, isWindows, lockFerdiShortcutKey, userDataPath, userDataRecipesPath } from '../../../environment'; |
17 | GITHUB_FRANZ_URL, | 17 | import { openPath } from '../../../helpers/url-helpers'; |
18 | } from '../../../config'; | ||
19 | import { DEFAULT_APP_SETTINGS, ferdiVersion, isMac, isWindows, lockFerdiShortcutKey, openPath, userDataPath, userDataRecipesPath } from '../../../environment'; | ||
20 | import globalMessages from '../../../i18n/globalMessages'; | 18 | import globalMessages from '../../../i18n/globalMessages'; |
21 | 19 | ||
22 | const messages = defineMessages({ | 20 | const messages = defineMessages({ |
diff --git a/src/components/ui/Link.js b/src/components/ui/Link.js index fd14b7018..003211e5c 100644 --- a/src/components/ui/Link.js +++ b/src/components/ui/Link.js | |||
@@ -1,4 +1,3 @@ | |||
1 | import { shell } from 'electron'; | ||
2 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
3 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
4 | import { inject, observer } from 'mobx-react'; | 3 | import { inject, observer } from 'mobx-react'; |
@@ -7,15 +6,18 @@ import classnames from 'classnames'; | |||
7 | 6 | ||
8 | import { oneOrManyChildElements } from '../../prop-types'; | 7 | import { oneOrManyChildElements } from '../../prop-types'; |
9 | import { matchRoute } from '../../helpers/routing-helpers'; | 8 | import { matchRoute } from '../../helpers/routing-helpers'; |
9 | import { openExternalUrl } from '../../helpers/url-helpers'; | ||
10 | 10 | ||
11 | // TODO: create container component for this component | 11 | // TODO: create container component for this component |
12 | export default @inject('stores') @observer class Link extends Component { | 12 | export default @inject('stores') @observer class Link extends Component { |
13 | onClick(e) { | 13 | onClick(e) { |
14 | if (this.props.disabled) e.preventDefault(); | 14 | if (this.props.disabled) { |
15 | else if (this.props.target === '_blank') { | ||
16 | e.preventDefault(); | 15 | e.preventDefault(); |
17 | shell.openExternal(this.props.to); | 16 | } else if (this.props.target === '_blank') { |
17 | e.preventDefault(); | ||
18 | openExternalUrl(this.props.to, true); | ||
18 | } | 19 | } |
20 | // Note: if neither of the above, then let the other onClick handlers process it | ||
19 | } | 21 | } |
20 | 22 | ||
21 | render() { | 23 | render() { |