Skip to content

added copyrights to the signin page #276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/components/SignIn/SignIn.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,16 @@
width: 500px;
margin: 0 auto;
}
}

.footer-copyrights {
/* position */
position: absolute;
bottom: 2em;
left: 0;
right: 0;

/* font */
text-align: center;
font-size: 0.8em;
}
51 changes: 21 additions & 30 deletions src/components/SignIn/SignIn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ export class SignIn extends Component {
store.set('authToken')(token);
this.setState({ loading: false });

if (location.state && location.state.from)
history.replace(location.state.from);
else
history.push('/dashboard');
if (location.state && location.state.from) history.replace(location.state.from);
else history.push('/dashboard');
} catch (error) {
this.showError('Invalid username or password');
this.setState({ loading: false });
Expand All @@ -78,37 +76,26 @@ export class SignIn extends Component {
hideError() {
this.setState({ error: null });
}

render() {
const {
error, username, password, loading,
} = this.state;
const { error, username, password, loading } = this.state;

return (
<div className="signin login-pf-page">
<div className="signin-container">
{
error && (
<div className="signin-error-container">
<Alert
className="signin-error"
variant="danger"
title={error}
actionClose={<AlertActionCloseButton onClose={this.hideError} />}
/>
</div>
)
}
<div className="signin-logo-container">
<Link
className="signin-logo-link"
href="/"
to="/"
>
<img
className="signin-logo"
src={chrisLogo}
alt=""
{error && (
<div className="signin-error-container">
<Alert
className="signin-error"
variant="danger"
title={error}
actionClose={<AlertActionCloseButton onClose={this.hideError} />}
/>
</div>
)}
<div className="signin-logo-container">
<Link className="signin-logo-link" href="/" to="/">
<img className="signin-logo" src={chrisLogo} alt="" />
</Link>
</div>
<Card className="signin-card">
Expand Down Expand Up @@ -146,14 +133,18 @@ export class SignIn extends Component {
Log In
</Button>
<p className="login-pf-signup">
Need an account? {' '}
Need an account?{' '}
<Link to="/quickstart" href="/quickstart">
Signup
</Link>
</p>
</Form>
</CardBody>
</Card>
<div className="footer-copyrights" style={{ color: 'white' }}>
© 2018 - {new Date().getFullYear()} Boston Children&apos;s Hospital, Red Hat,
Massachusetts Open Cloud, Boston University. All rights reserved.
</div>
</div>
</div>
);
Expand Down