mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-24 17:44:50 +03:00
fix: carousel sidebar
This commit is contained in:
parent
b860987762
commit
597bd2e603
@ -469,7 +469,7 @@ class CarouselSidebarData extends React.Component {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
console.log(Validations.isPreviewableImage(type));
|
||||
elements.push(
|
||||
<div key="s-2" style={{ marginBottom: 80 }}>
|
||||
<div css={STYLES_META}>
|
||||
@ -563,25 +563,35 @@ class CarouselSidebarData extends React.Component {
|
||||
)}
|
||||
{type && Validations.isPreviewableImage(type) ? null : (
|
||||
<div>
|
||||
{coverImage && (
|
||||
<React.Fragment>
|
||||
<System.P css={STYLES_SECTION_HEADER} style={{ margin: "48px 0px 8px 0px" }}>
|
||||
Preview image
|
||||
</System.P>
|
||||
{coverImage ? (
|
||||
|
||||
<React.Fragment>
|
||||
<System.P css={STYLES_TEXT}>This is the preview image of your file.</System.P>
|
||||
<div css={STYLES_IMAGE_BOX} style={{ marginTop: 24 }}>
|
||||
<img
|
||||
src={coverImage.url}
|
||||
src={coverImage?.url}
|
||||
alt=""
|
||||
style={{ maxWidth: "368px", maxHeight: "368px" }}
|
||||
/>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
) : (
|
||||
<System.P css={STYLES_TEXT}>Add a cover image for your file.</System.P>
|
||||
</React.Fragment>
|
||||
)}
|
||||
{this.props.isOwner && (
|
||||
<React.Fragment>
|
||||
<System.P css={STYLES_TEXT}>Add a cover image for your file.</System.P>
|
||||
|
||||
<div style={{ marginTop: 16 }}>
|
||||
<input css={STYLES_FILE_HIDDEN} type="file" id="file" onChange={this._handleUpload} />
|
||||
<input
|
||||
css={STYLES_FILE_HIDDEN}
|
||||
type="file"
|
||||
id="file"
|
||||
onChange={this._handleUpload}
|
||||
/>
|
||||
<System.ButtonPrimary
|
||||
full
|
||||
type="label"
|
||||
@ -591,6 +601,8 @@ class CarouselSidebarData extends React.Component {
|
||||
Upload image
|
||||
</System.ButtonPrimary>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{this.props.isOwner ? (
|
||||
|
Loading…
Reference in New Issue
Block a user