diff options
| author | anderklander <anderklander@gmail.com> | 2017-11-09 13:30:52 +0100 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-12-14 09:16:49 +0100 |
| commit | a35898e0fafa2dae93b00ca074b810cc88a2fa71 (patch) | |
| tree | 8b85b8bbff5085e4a121e5d06af31271132ac2f0 /app/lib | |
| parent | b74910f21f720741a6b7e3e537ee637200e6a449 (diff) | |
| download | mullvadvpn-a35898e0fafa2dae93b00ca074b810cc88a2fa71.tar.xz mullvadvpn-a35898e0fafa2dae93b00ca074b810cc88a2fa71.zip | |
Reactxp starter pack
Some changes in app init and rendering the header bar in reactxp. Moved linking and exit to separate files for web/mobile
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/backend.js | 1 | ||||
| -rw-r--r-- | app/lib/exit.android.js | 5 | ||||
| -rw-r--r-- | app/lib/exit.js | 5 | ||||
| -rw-r--r-- | app/lib/linking.android.js | 6 | ||||
| -rw-r--r-- | app/lib/linking.js | 6 |
5 files changed, 23 insertions, 0 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js index b76b3b3749..a68c2309e7 100644 --- a/app/lib/backend.js +++ b/app/lib/backend.js @@ -8,6 +8,7 @@ import accountActions from '../redux/account/actions'; import connectionActions from '../redux/connection/actions'; import settingsActions from '../redux/settings/actions'; import { push } from 'react-router-redux'; +import { defaultServer } from '../config'; import type { ReduxStore } from '../redux/store'; import type { AccountToken, BackendState, RelayLocation, RelaySettingsUpdate } from './ipc-facade'; diff --git a/app/lib/exit.android.js b/app/lib/exit.android.js new file mode 100644 index 0000000000..2dbcf80413 --- /dev/null +++ b/app/lib/exit.android.js @@ -0,0 +1,5 @@ +import { BackHandler } from 'react-native'; + +module.exports = function () { + BackHandler.exitApp(); +} diff --git a/app/lib/exit.js b/app/lib/exit.js new file mode 100644 index 0000000000..cf87680b32 --- /dev/null +++ b/app/lib/exit.js @@ -0,0 +1,5 @@ +import { remote } from 'electron'; + +module.exports = function () { + remote.app.quit(); +} diff --git a/app/lib/linking.android.js b/app/lib/linking.android.js new file mode 100644 index 0000000000..ec99b85997 --- /dev/null +++ b/app/lib/linking.android.js @@ -0,0 +1,6 @@ +import { Linking } from 'react-native'; + +var open = (link) => { + Linking.openURL(link); +}; +export default open; diff --git a/app/lib/linking.js b/app/lib/linking.js new file mode 100644 index 0000000000..1d7a0a8d0a --- /dev/null +++ b/app/lib/linking.js @@ -0,0 +1,6 @@ +import { shell } from 'electron'; + +var open = (link) => { + shell.openExternal(link); +}; +export default open;
\ No newline at end of file |
