mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 09:45:10 +00:00
Alignment and formatting tweaks
This commit is contained in:
parent
40c336db9b
commit
5ff7bd30eb
3 changed files with 26 additions and 7 deletions
|
@ -8,6 +8,8 @@ var claimCodePageStyle = {
|
||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
cursor: 'default',
|
cursor: 'default',
|
||||||
width: '130px',
|
width: '130px',
|
||||||
|
textAlign: 'right',
|
||||||
|
marginRight: '6px',
|
||||||
};
|
};
|
||||||
|
|
||||||
var ClaimCodePage = React.createClass({
|
var ClaimCodePage = React.createClass({
|
||||||
|
@ -78,7 +80,7 @@ var ClaimCodePage = React.createClass({
|
||||||
<p>You will be added to our mailing list (if you're not already on it) and will be eligible for future rewards for beta testers.</p>
|
<p>You will be added to our mailing list (if you're not already on it) and will be eligible for future rewards for beta testers.</p>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<form>
|
<form onSubmit={this.handleSubmit}>
|
||||||
<section><label style={claimCodeLabelStyle} htmlFor="code">Invitation code</label><input name="code" ref="code" /></section>
|
<section><label style={claimCodeLabelStyle} htmlFor="code">Invitation code</label><input name="code" ref="code" /></section>
|
||||||
<section><label style={claimCodeLabelStyle} htmlFor="email">Email</label><input name="email" ref="email" /></section>
|
<section><label style={claimCodeLabelStyle} htmlFor="email">Email</label><input name="email" ref="email" /></section>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -117,7 +117,7 @@ var SearchResultRow = React.createClass({
|
||||||
|
|
||||||
var featuredContentItemStyle = {
|
var featuredContentItemStyle = {
|
||||||
fontSize: '0.95em',
|
fontSize: '0.95em',
|
||||||
marginBottom: '10px',
|
marginTop: '10px',
|
||||||
minHeight: '130px',
|
minHeight: '130px',
|
||||||
}, featuredContentItemImgStyle = {
|
}, featuredContentItemImgStyle = {
|
||||||
maxHeight: '90px',
|
maxHeight: '90px',
|
||||||
|
@ -130,6 +130,7 @@ var featuredContentItemStyle = {
|
||||||
color: '#444',
|
color: '#444',
|
||||||
marginBottom: '5px',
|
marginBottom: '5px',
|
||||||
fontSize: '0.9em',
|
fontSize: '0.9em',
|
||||||
|
minHeight: '74px',
|
||||||
}, featuredContentItemCostStyle = {
|
}, featuredContentItemCostStyle = {
|
||||||
display: 'block',
|
display: 'block',
|
||||||
float: 'right',
|
float: 'right',
|
||||||
|
@ -156,7 +157,7 @@ var FeaturedContentItem = React.createClass({
|
||||||
});
|
});
|
||||||
lbry.search(this.props.name, (results) => {
|
lbry.search(this.props.name, (results) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
amount: results[0].cost_est
|
amount: (results ? results[0].cost_est : 0.0)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -168,10 +169,23 @@ var FeaturedContentItem = React.createClass({
|
||||||
|
|
||||||
var metadata = this.state.metadata;
|
var metadata = this.state.metadata;
|
||||||
|
|
||||||
|
if ('narrow' in this.props) {
|
||||||
|
// Workaround -- narrow thumbnails look a bit funky without some extra left margin.
|
||||||
|
// Find a way to do this in CSS.
|
||||||
|
|
||||||
|
var thumbStyle = Object.assign({}, featuredContentItemImgStyle, {
|
||||||
|
position: 'relative',
|
||||||
|
maxHeight: '102px',
|
||||||
|
left: '13px',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var thumbStyle = featuredContentItemImgStyle;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="row-fluid" style={featuredContentItemStyle}>
|
<div className="row-fluid" style={featuredContentItemStyle}>
|
||||||
<div className="span4">
|
<div className="span4">
|
||||||
<img src={metadata.thumbnail} alt={'Photo for ' + this.state.title} style={featuredContentItemImgStyle} />
|
<img src={metadata.thumbnail} alt={'Photo for ' + this.state.title} style={thumbStyle} />
|
||||||
</div>
|
</div>
|
||||||
<div className="span8">
|
<div className="span8">
|
||||||
<h4>{this.state.title}</h4>
|
<h4>{this.state.title}</h4>
|
||||||
|
@ -189,6 +203,7 @@ var FeaturedContentItem = React.createClass({
|
||||||
|
|
||||||
var featuredContentStyle = {
|
var featuredContentStyle = {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
|
marginTop: '-8px',
|
||||||
};
|
};
|
||||||
|
|
||||||
var FeaturedContent = React.createClass({
|
var FeaturedContent = React.createClass({
|
||||||
|
@ -201,7 +216,7 @@ var FeaturedContent = React.createClass({
|
||||||
<FeaturedContentItem name="keynesvhayek" />
|
<FeaturedContentItem name="keynesvhayek" />
|
||||||
</div>
|
</div>
|
||||||
<div className="span6">
|
<div className="span6">
|
||||||
<FeaturedContentItem name="itsadisaster" />
|
<FeaturedContentItem name="itsadisaster" narrow />
|
||||||
<FeaturedContentItem name="meetlbry1" />
|
<FeaturedContentItem name="meetlbry1" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -307,7 +322,9 @@ var topBarStyle = {
|
||||||
'height': '26px',
|
'height': '26px',
|
||||||
},
|
},
|
||||||
balanceStyle = {
|
balanceStyle = {
|
||||||
'marginRight': '5px'
|
'marginRight': '5px',
|
||||||
|
'position': 'relative',
|
||||||
|
'top': '1px',
|
||||||
};
|
};
|
||||||
|
|
||||||
var mainMenuStyle = {
|
var mainMenuStyle = {
|
||||||
|
|
|
@ -149,7 +149,7 @@ var MyFilesPage = React.createClass({
|
||||||
let {title, thumbnail} = metadata;
|
let {title, thumbnail} = metadata;
|
||||||
|
|
||||||
var ratioLoaded = written_bytes / total_bytes;
|
var ratioLoaded = written_bytes / total_bytes;
|
||||||
var showWatchButton = (lbry.getMediaType(file_name) == 'video');
|
var showWatchButton = (lbry.getMediaType(file_name) == 'video' || lbry.getMediaType(file_name) == 'audio');
|
||||||
|
|
||||||
content.push(<MyFilesRow lbryUri={lbry_uri} title={title || ('lbry://' + lbry_uri)} completed={completed} stopped={stopped}
|
content.push(<MyFilesRow lbryUri={lbry_uri} title={title || ('lbry://' + lbry_uri)} completed={completed} stopped={stopped}
|
||||||
ratioLoaded={ratioLoaded} imgUrl={thumbnail} path={download_path}
|
ratioLoaded={ratioLoaded} imgUrl={thumbnail} path={download_path}
|
||||||
|
|
Loading…
Add table
Reference in a new issue