1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00

Merge remote-tracking branch 'origin/AD-419-decouple-piece-registration-from-' into AD-499-whitelabel-prize-with-sluice-as-k

This commit is contained in:
Tim Daubenschütz 2015-07-15 14:06:03 +02:00
commit 81aeb478b7
10 changed files with 54 additions and 25 deletions

View File

@ -38,8 +38,8 @@ let DetailProperty = React.createClass({
return ( return (
<div className="row ascribe-detail-property"> <div className="row ascribe-detail-property">
<div className="row-same-height"> <div className="row-same-height">
<div className={this.props.labelClassName + ' col-xs-height col-bottom'}> <div className={this.props.labelClassName + ' col-xs-height col-bottom ascribe-detail-property-label'}>
<div>{ this.props.label + this.props.separator}</div> { this.props.label + this.props.separator}
</div> </div>
<div className={this.props.valueClassName + ' col-xs-height col-bottom'}> <div className={this.props.valueClassName + ' col-xs-height col-bottom'}>
{value} {value}

View File

@ -135,7 +135,7 @@ let Piece = React.createClass({
<EditionDetailProperty label="TITLE" value={<div className="ascribe-detail-title">{this.props.piece.title}</div>} /> <EditionDetailProperty label="TITLE" value={<div className="ascribe-detail-title">{this.props.piece.title}</div>} />
<EditionDetailProperty label="BY" value={this.props.piece.artist_name} /> <EditionDetailProperty label="BY" value={this.props.piece.artist_name} />
<EditionDetailProperty label="DATE" value={ this.props.piece.date_created.slice(0, 4) } /> <EditionDetailProperty label="DATE" value={ this.props.piece.date_created.slice(0, 4) } />
{this.props.piece.num_editions > 0 ? <EditionDetailProperty label="NUMBER OF EDITIONS" value={ this.props.piece.num_editions } /> : null} {this.props.piece.num_editions > 0 ? <EditionDetailProperty label="EDITIONS" value={ this.props.piece.num_editions } /> : null}
<hr/> <hr/>
</div> </div>
<div className="ascribe-detail-header"> <div className="ascribe-detail-header">

View File

@ -52,7 +52,7 @@ let CreateEditionsForm = React.createClass({
<input <input
type="number" type="number"
placeholder="(e.g. 32)" placeholder="(e.g. 32)"
min={0}/> min={1}/>
</Property> </Property>
</Form> </Form>
); );

View File

@ -5,7 +5,7 @@ import Router from 'react-router';
import Form from './ascribe_forms/form'; import Form from './ascribe_forms/form';
import Property from './ascribe_forms/property'; import Property from './ascribe_forms/property';
import FormPropertyHeader from './ascribe_forms/form_property_header';
import apiUrls from '../constants/api_urls'; import apiUrls from '../constants/api_urls';
import GlobalNotificationModel from '../models/global_notification_model'; import GlobalNotificationModel from '../models/global_notification_model';
@ -25,9 +25,6 @@ let PasswordResetContainer = React.createClass({
if (this.props.query.email && this.props.query.token) { if (this.props.query.email && this.props.query.token) {
return ( return (
<div> <div>
<div className="ascribe-login-text ascribe-login-header">
{getLangText('Reset the password for')} {this.props.query.email}
</div>
<PasswordResetForm <PasswordResetForm
email={this.props.query.email} email={this.props.query.email}
token={this.props.query.token}/> token={this.props.query.token}/>
@ -38,9 +35,6 @@ let PasswordResetContainer = React.createClass({
if (this.state.isRequested === false) { if (this.state.isRequested === false) {
return ( return (
<div> <div>
<div className="ascribe-login-text ascribe-login-header">
{getLangText('Reset your password')}
</div>
<PasswordRequestResetForm <PasswordRequestResetForm
handleRequestSuccess={this.handleRequestSuccess}/> handleRequestSuccess={this.handleRequestSuccess}/>
</div> </div>
@ -86,6 +80,9 @@ let PasswordRequestResetForm = React.createClass({
<img src="https://s3-us-west-2.amazonaws.com/ascribe0/media/thumbnails/ascribe_animated_medium.gif" /> <img src="https://s3-us-west-2.amazonaws.com/ascribe0/media/thumbnails/ascribe_animated_medium.gif" />
</span> </span>
}> }>
<FormPropertyHeader>
<h3>{getLangText('Reset your password')}</h3>
</FormPropertyHeader>
<Property <Property
name='email' name='email'
label={getLangText('Email')}> label={getLangText('Email')}>
@ -133,6 +130,9 @@ let PasswordResetForm = React.createClass({
<img src="https://s3-us-west-2.amazonaws.com/ascribe0/media/thumbnails/ascribe_animated_medium.gif" /> <img src="https://s3-us-west-2.amazonaws.com/ascribe0/media/thumbnails/ascribe_animated_medium.gif" />
</span> </span>
}> }>
<FormPropertyHeader>
<h3>{getLangText('Reset the password for')} {this.props.email}</h3>
</FormPropertyHeader>
<Property <Property
name='password' name='password'
label={getLangText('Password')}> label={getLangText('Password')}>

View File

@ -32,7 +32,7 @@ let SettingsContainer = React.createClass({
render() { render() {
return ( return (
<div> <div className="settings-container">
<AccountSettings /> <AccountSettings />
<APISettings /> <APISettings />
<BitcoinWalletSettings /> <BitcoinWalletSettings />
@ -297,10 +297,10 @@ let APISettings = React.createClass({
name={app.name} name={app.name}
label={app.name}> label={app.name}>
<div className="row-same-height"> <div className="row-same-height">
<div className="no-padding col-xs-6 col-xs-height col-middle"> <div className="no-padding col-xs-6 col-sm-10 col-xs-height col-middle">
{'Bearer ' + app.bearer_token.token} {'Bearer ' + app.bearer_token.token}
</div> </div>
<div className="col-xs-6 col-xs-height"> <div className="col-xs-6 col-sm-2 col-xs-height">
<button <button
className="pull-right btn btn-default btn-sm" className="pull-right btn btn-default btn-sm"
onClick={this.handleTokenRefresh} onClick={this.handleTokenRefresh}

View File

@ -52,6 +52,27 @@ let PieceContainer = React.createClass({
<Piece <Piece
piece={this.state.piece} piece={this.state.piece}
loadPiece={this.loadPiece}> loadPiece={this.loadPiece}>
<PrizePieceDetails piece={this.state.piece}/>
</Piece>
);
} else {
return (
<div className="fullpage-spinner">
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_medium.gif'} />
</div>
);
}
}
});
let PrizePieceDetails = React.createClass({
propTypes: {
piece: React.PropTypes.object
},
render() {
if (this.props.piece.prize && this.props.piece.prize.name){
return (
<CollapsibleParagraph <CollapsibleParagraph
title="Prize Details" title="Prize Details"
show={true} show={true}
@ -70,15 +91,9 @@ let PieceContainer = React.createClass({
<hr /> <hr />
</Form> </Form>
</CollapsibleParagraph> </CollapsibleParagraph>
</Piece>
);
} else {
return (
<div className="fullpage-spinner">
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_medium.gif'} />
</div>
); );
} }
return null;
} }
}); });

View File

@ -27,7 +27,7 @@ let apiUrls = {
'ownership_loans': AppConstants.apiEndpoint + 'ownership/loans/', 'ownership_loans': AppConstants.apiEndpoint + 'ownership/loans/',
'ownership_loans_confirm': AppConstants.apiEndpoint + 'ownership/loans/confirm/', 'ownership_loans_confirm': AppConstants.apiEndpoint + 'ownership/loans/confirm/',
'ownership_loans_deny': AppConstants.apiEndpoint + 'ownership/loans/deny/', 'ownership_loans_deny': AppConstants.apiEndpoint + 'ownership/loans/deny/',
'ownership_loans_contract': AppConstants.apiEndpoint + 'ownership/loans/contract/', 'ownership_loans_contract': AppConstants.apiEndpoint + 'ownership/loans/editions/contract/',
'ownership_shares_editions': AppConstants.apiEndpoint + 'ownership/shares/editions/', 'ownership_shares_editions': AppConstants.apiEndpoint + 'ownership/shares/editions/',
'ownership_shares_pieces': AppConstants.apiEndpoint + 'ownership/shares/pieces/', 'ownership_shares_pieces': AppConstants.apiEndpoint + 'ownership/shares/pieces/',
'ownership_transfers': AppConstants.apiEndpoint + 'ownership/transfers/', 'ownership_transfers': AppConstants.apiEndpoint + 'ownership/transfers/',

View File

@ -1,3 +1,7 @@
.settings-container{
max-width: 600px;
margin: auto;
}
.ascribe-settings-wrapper { .ascribe-settings-wrapper {
width: 100%; width: 100%;

View File

@ -44,6 +44,11 @@ hr {
margin-bottom: 15px; margin-bottom: 15px;
} }
form{
max-width: 600px;
margin: auto;
}
#main { #main {
height: 100%; height: 100%;
} }
@ -217,6 +222,10 @@ hr {
padding-bottom: 0.4em; padding-bottom: 0.4em;
} }
.ascribe-detail-property-label{
font-size: 0.8em;
}
::-webkit-input-placeholder { /* WebKit browsers */ ::-webkit-input-placeholder { /* WebKit browsers */
font-size: 0.9em; font-size: 0.9em;
font-style: italic; font-style: italic;

View File

@ -1,6 +1,7 @@
.wp { .wp {
height: 100%; height: 100%;
max-width: 90%;
margin: auto;
/* We need this, otherwise piece list will have a scrollbar */ /* We need this, otherwise piece list will have a scrollbar */
overflow-x: hidden; overflow-x: hidden;
} }