1
0
mirror of https://github.com/ascribe/onion.git synced 2025-02-14 21:10:27 +01:00

Merged in AD-572-make-thumbnails-way-smaller (pull request #15)

Ad 572 make thumbnails way smaller
This commit is contained in:
diminator 2015-07-21 21:14:52 +02:00
commit 6c3868616b
5 changed files with 11 additions and 4 deletions

View File

@ -155,7 +155,7 @@ let AccordionListItem = React.createClass({
<div className="col-xs-4 col-sm-3 col-md-2 col-lg-2 clear-paddings">
<div className="thumbnail-wrapper">
<Link {...linkData}>
<img src={this.props.content.thumbnail}/>
<img src={this.props.content.thumbnail.url_safe}/>
</Link>
</div>
</div>

View File

@ -18,7 +18,8 @@ let MediaContainer = React.createClass({
},
render() {
let thumbnail = this.props.content.thumbnail;
let thumbnail = this.props.content.thumbnail.thumbnail_sizes && this.props.content.thumbnail.thumbnail_sizes['600x600'] ?
this.props.content.thumbnail.thumbnail_sizes['600x600'] : this.props.content.thumbnail.url_safe;
let mimetype = this.props.content.digital_work.mime;
let embed = null;
let extraData = null;

View File

@ -153,7 +153,10 @@ let MediaPlayer = React.createClass({
if (this.props.mimetype === 'video' && this.props.encodingStatus !== undefined && this.props.encodingStatus !== 100) {
return (
<div className="ascribe-detail-header ascribe-media-player">
<p><em>Please be patient, the video is been encoded</em></p>
<p>
<em>We successfully received your video and it is now being encoded.
<br />You can leave this page and check back on the status later.</em>
</p>
<ProgressBar now={this.props.encodingStatus}
label='%(percent)s%' />
</div>

View File

@ -209,6 +209,7 @@ var ReactS3FineUploader = React.createClass({
requestKey(fileId) {
let defer = new fineUploader.Promise();
let filename = this.state.uploader.getName(fileId);
let uuid = this.state.uploader.getUuid(fileId);
window.fetch(this.props.keyRoutine.url, {
method: 'post',
@ -220,7 +221,8 @@ var ReactS3FineUploader = React.createClass({
credentials: 'include',
body: JSON.stringify({
'filename': filename,
'file_class': this.props.keyRoutine.fileClass,
'category': this.props.keyRoutine.fileClass,
'uuid': uuid,
'piece_id': this.props.keyRoutine.pieceId
})
})

View File

@ -32,6 +32,7 @@ $ascribe-accordion-list-font: 'Source Sans Pro';
height: 110px;
padding:0;
cursor: pointer;
text-align: center;
img {
max-width: 100%;
max-height: 100%;