-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Themed auth0 lock. Added account page with password reset control. Cl…
…oses #23
- Loading branch information
Showing
7 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.impact-auth0-lock { | ||
.auth0-lock-header-avatar { | ||
display: none !important; | ||
} | ||
.auth0-lock-header { | ||
display: none !important; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import * as React from 'react'; | ||
import { Grid } from 'semantic-ui-react'; | ||
import {Auth0Lock} from 'components/Auth0Lock'; | ||
|
||
interface IState { | ||
changePasswordStarted: boolean; | ||
} | ||
|
||
class Account extends React.Component<any, IState> { | ||
|
||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
changePasswordStarted: false, | ||
}; | ||
this.startChangePassword = this.startChangePassword.bind(this); | ||
this.renderChangePassword = this.renderChangePassword.bind(this); | ||
} | ||
|
||
private startChangePassword() { | ||
this.setState({ | ||
changePasswordStarted: true, | ||
}); | ||
} | ||
|
||
private renderChangePassword() { | ||
if (this.state.changePasswordStarted) { | ||
return ( | ||
<Auth0Lock auth0Options={{initialScreen: 'forgotPassword'}} /> | ||
); | ||
} else { | ||
return ( | ||
<a onClick={this.startChangePassword}>Click here to change your password</a> | ||
); | ||
} | ||
} | ||
|
||
public render() { | ||
return ( | ||
<Grid container columns={1} id="Account"> | ||
<Grid.Column> | ||
<h1>Account</h1> | ||
<h3>Change Password</h3> | ||
{this.renderChangePassword()} | ||
<h3>Delete Account</h3> | ||
<p>To delete your account, please send an email to <a href="mailto:support@impactasaurus.org?Subject=DeleteAccount">support@impactasaurus.org</a></p> | ||
</Grid.Column> | ||
</Grid> | ||
); | ||
} | ||
} | ||
|
||
export { Account } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,7 @@ | |
font-size: 1.5em; | ||
font-weight: 300; | ||
} | ||
a { | ||
cursor: pointer; | ||
} | ||
} |