1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

Last minute editions for usability

This commit is contained in:
Tim Daubenschütz 2015-11-16 09:39:45 +01:00
parent 633ebc8fb9
commit 1c172fd887
3 changed files with 27 additions and 4 deletions

View File

@ -107,8 +107,9 @@ const PRRegisterPieceForm = React.createClass({
}
})
.then(() => this.history.pushState(null, `/pieces/${this.state.piece.id}`))
.catch((err) => {
console.log(err);
.catch(() => {
const notificationMessage = new GlobalNotificationModel(getLangText("Ups! We weren't able to send your submission. Contact: support@ascribe.io"), 'danger', 5000);
GlobalNotificationActions.appendGlobalNotification(notificationMessage);
});
},

View File

@ -2,14 +2,36 @@
import React from 'react';
import UserStore from '../../../../../stores/user_store';
import UserActions from '../../../../../actions/user_actions';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
const PRHero = React.createClass({
getInitialState() {
return UserStore.getState();
},
componentDidMount() {
UserStore.listen(this.onChange);
UserActions.fetchCurrentUser();
},
componentWillUnmount() {
UserStore.unlisten(this.onChange);
},
onChange(state) {
this.setState(state);
},
render() {
const { currentUser } = this.state;
return (
<div className="piece--hero">
<h2><Glyphicon glyph="ok" /> Congratulations!</h2>
<h2><Glyphicon glyph="ok" /> Congratulations {currentUser.email}!</h2>
<h1>You have successfully submitted to Portfolio Review 2016</h1>
<p>See below, your uploaded portfolio:</p>
</div>

View File

@ -62,7 +62,7 @@ const PRRegisterPiece = React.createClass({
<Col xs={6}>
<div className="register-piece--info">
<h1>Portfolio Review</h1>
<h2>{getLangText('Submission closing on %s', ' 21 Dec 2015')}</h2>
<h2>{getLangText('Submission closing on %s', ' 22 Dec 2015')}</h2>
<p style={{marginTop: '1em'}}>
{getLangText("You're submitting as %s. ", currentUser.email)}
<Link to="/logout">{getLangText('Change account?')}</Link>