summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-03-01 16:59:20 +0000
committerAndrej Mihajlov <and@codeispoetry.ru>2017-03-01 16:59:20 +0000
commitafe91adaa7bf80663e539117f80fec9c2fb5b3fc (patch)
treeafdb428670b17de4218ad0914e305ee2b93753d6
parentf4df32b86edb8f8867f9d67ae1fbeeabe10723ae (diff)
downloadmullvadvpn-afe91adaa7bf80663e539117f80fec9c2fb5b3fc.tar.xz
mullvadvpn-afe91adaa7bf80663e539117f80fec9c2fb5b3fc.zip
Add settings button in header bar
-rw-r--r--app/components/Login.js3
-rw-r--r--app/containers/LoginPage.js1
2 files changed, 3 insertions, 1 deletions
diff --git a/app/components/Login.js b/app/components/Login.js
index 7c1c32ba05..43cccf3f69 100644
--- a/app/components/Login.js
+++ b/app/components/Login.js
@@ -8,6 +8,7 @@ export default class Login extends Component {
static propTypes = {
user: PropTypes.object.isRequired,
onLogin: PropTypes.func.isRequired,
+ onSettings: PropTypes.func.isRequired,
onChange: PropTypes.func.isRequired,
onFirstChangeAfterFailure: PropTypes.func.isRequired,
onExternalLink: PropTypes.func.isRequired,
@@ -133,7 +134,7 @@ export default class Login extends Component {
return (
<Layout>
- <Header />
+ <Header showSettings={ true } onSettings={ this.props.onSettings } />
<Container>
<div className="login">
<div className="login-form">
diff --git a/app/containers/LoginPage.js b/app/containers/LoginPage.js
index 57706c0f79..571156ecb2 100644
--- a/app/containers/LoginPage.js
+++ b/app/containers/LoginPage.js
@@ -11,6 +11,7 @@ const mapDispatchToProps = (dispatch, props) => {
const { loginChange, login } = bindActionCreators(userActions, dispatch);
const { backend } = props;
return {
+ onSettings: () => props.router.push('/settings'),
onLogin: (account) => login(backend, account),
onChange: (account) => loginChange({ account }),
onFirstChangeAfterFailure: () => loginChange({ status: LoginState.none, error: null }),