Merge branch 'master' into user-history

This commit is contained in:
Sean Yesmunt 2018-09-04 13:28:51 -04:00 committed by GitHub
commit 151d78f1c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 35 additions and 19 deletions

View file

@ -55,22 +55,34 @@ class SelectThumbnail extends React.PureComponent<Props, State> {
const thumbnailSrc = const thumbnailSrc =
!thumbnail || thumbnailError ? Native.imagePath(thumbnailErrorImage) : thumbnail; !thumbnail || thumbnailError ? Native.imagePath(thumbnailErrorImage) : thumbnail;
/*
Note:
We are using backgroundImage instead of an <img /> to zoom if the selected thumbnail isn't
the proper aspect ratio. This is to avoid blackbars on the side of images and inconsistent thumbnails
We still need to render the image to see if there is an error loading the url
*/
return ( return (
<div className="card__content"> <div className="card__content">
{status === THUMBNAIL_STATUSES.API_DOWN || status === THUMBNAIL_STATUSES.MANUAL ? ( {status === THUMBNAIL_STATUSES.API_DOWN || status === THUMBNAIL_STATUSES.MANUAL ? (
<div className="column"> <div className="column">
<img <div
src={thumbnailSrc} className="column__item thumbnail-preview card__media"
className="column__item thumbnail-preview" style={{ backgroundImage: `url(${thumbnailSrc})` }}
alt={__('Thumbnail Preview')} >
onError={() => { <img
this.setState({ style={{ display: 'none' }}
thumbnailError: true, src={thumbnailSrc}
thumbnailErrorImage: alt={__('Thumbnail Preview')}
thumbnail && thumbnail.length > 0 ? 'broken.png' : 'no-thumbnail.png', onError={() => {
}); this.setState({
}} thumbnailError: true,
/> thumbnailErrorImage:
thumbnail && thumbnail.length > 0 ? 'broken.png' : 'no-thumbnail.png',
});
}}
/>
</div>
<div className="column__item"> <div className="column__item">
<FormField <FormField
className="input--thumbnail" className="input--thumbnail"

View file

@ -217,7 +217,14 @@ class HelpPage extends React.PureComponent<Props, State> {
<td>{__('Connected Email')}</td> <td>{__('Connected Email')}</td>
<td> <td>
{user && user.primary_email ? ( {user && user.primary_email ? (
user.primary_email <React.Fragment>
{user.primary_email}{' '}
<Button
button="link"
href={`http://lbry.io/list/edit/${accessToken}`}
label={__('Update mailing preferences')}
/>
</React.Fragment>
) : ( ) : (
<React.Fragment> <React.Fragment>
<span className="empty">{__('none')} </span> <span className="empty">{__('none')} </span>

View file

@ -389,5 +389,4 @@ p {
.thumbnail-preview { .thumbnail-preview {
height: var(--thumbnail-preview-height); height: var(--thumbnail-preview-height);
width: var(--thumbnail-preview-width); width: var(--thumbnail-preview-width);
border: var(--thumbnail-preview-border);
} }

View file

@ -195,6 +195,4 @@ $large-breakpoint: 1921px;
/* Image */ /* Image */
--thumbnail-preview-height: 100px; --thumbnail-preview-height: 100px;
--thumbnail-preview-width: 177px; --thumbnail-preview-width: 177px;
// This will awlways white, it looks fine on light mode
--thumbnail-preview-border: 1px solid var(--color-white);
} }

View file

@ -163,7 +163,7 @@ button:disabled {
transition: color var(--animation-duration) var(--animation-style); transition: color var(--animation-duration) var(--animation-style);
&:hover { &:hover {
color: var(--color-light-blue); color: var(--btn-color-inverse);
} }
} }

View file

@ -32,7 +32,7 @@
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
background-size: cover; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 50% 50%; background-position: 50% 50%;
display: flex; display: flex;

View file

@ -3,7 +3,7 @@ table.table,
word-wrap: break-word; word-wrap: break-word;
max-width: 100%; max-width: 100%;
text-align: left; text-align: left;
margin-top: $spacing-width; margin-top: $spacing-vertical * 2/3;
tr td:first-of-type, tr td:first-of-type,
tr th:first-of-type { tr th:first-of-type {