summaryrefslogtreecommitdiffstats
path: root/web/react/components/login.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-12-17 12:44:46 -0500
committerJoramWilander <jwawilander@gmail.com>2015-12-17 12:44:46 -0500
commita6ae90ac2a74871331707751e823b4746136ff09 (patch)
tree2651cc8adfeca84a0ee89974ba6c40f167a81123 /web/react/components/login.jsx
parent58358ddd7cd0152bf16a7326e1d595524fb51246 (diff)
downloadchat-a6ae90ac2a74871331707751e823b4746136ff09.tar.gz
chat-a6ae90ac2a74871331707751e823b4746136ff09.tar.bz2
chat-a6ae90ac2a74871331707751e823b4746136ff09.zip
Add ability to switch between SSO and email account
Diffstat (limited to 'web/react/components/login.jsx')
-rw-r--r--web/react/components/login.jsx33
1 files changed, 22 insertions, 11 deletions
diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx
index 9afaa8b0d..1d9b3e906 100644
--- a/web/react/components/login.jsx
+++ b/web/react/components/login.jsx
@@ -1,10 +1,12 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-import * as Utils from '../utils/utils.jsx';
import LoginEmail from './login_email.jsx';
import LoginLdap from './login_ldap.jsx';
+import * as Utils from '../utils/utils.jsx';
+import Constants from '../utils/constants.jsx';
+
export default class Login extends React.Component {
constructor(props) {
super(props);
@@ -40,15 +42,24 @@ export default class Login extends React.Component {
);
}
- const verifiedParam = Utils.getUrlParameter('verified');
- let verifiedBox = '';
- if (verifiedParam) {
- verifiedBox = (
- <div className='alert alert-success'>
- <i className='fa fa-check' />
- {' Email Verified'}
- </div>
- );
+ const extraParam = Utils.getUrlParameter('extra');
+ let extraBox = '';
+ if (extraParam) {
+ let msg;
+ if (extraParam === Constants.SIGNIN_CHANGE) {
+ msg = ' Sign-in method changed successfully';
+ } else if (extraParam === Constants.SIGNIN_VERIFIED) {
+ msg = ' Email Verified';
+ }
+
+ if (msg != null) {
+ extraBox = (
+ <div className='alert alert-success'>
+ <i className='fa fa-check' />
+ {msg}
+ </div>
+ );
+ }
}
let emailSignup;
@@ -124,7 +135,7 @@ export default class Login extends React.Component {
<h5 className='margin--less'>{'Sign in to:'}</h5>
<h2 className='signup-team__name'>{teamDisplayName}</h2>
<h2 className='signup-team__subdomain'>{'on '}{global.window.mm_config.SiteName}</h2>
- {verifiedBox}
+ {extraBox}
{loginMessage}
{emailSignup}
{ldapLogin}