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>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
console.log(Validations.isPreviewableImage(type));
|
||||||
elements.push(
|
elements.push(
|
||||||
<div key="s-2" style={{ marginBottom: 80 }}>
|
<div key="s-2" style={{ marginBottom: 80 }}>
|
||||||
<div css={STYLES_META}>
|
<div css={STYLES_META}>
|
||||||
@ -563,34 +563,46 @@ class CarouselSidebarData extends React.Component {
|
|||||||
)}
|
)}
|
||||||
{type && Validations.isPreviewableImage(type) ? null : (
|
{type && Validations.isPreviewableImage(type) ? null : (
|
||||||
<div>
|
<div>
|
||||||
<System.P css={STYLES_SECTION_HEADER} style={{ margin: "48px 0px 8px 0px" }}>
|
{coverImage && (
|
||||||
Preview image
|
|
||||||
</System.P>
|
|
||||||
{coverImage ? (
|
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<System.P css={STYLES_TEXT}>This is the preview image of your file.</System.P>
|
<System.P css={STYLES_SECTION_HEADER} style={{ margin: "48px 0px 8px 0px" }}>
|
||||||
<div css={STYLES_IMAGE_BOX} style={{ marginTop: 24 }}>
|
Preview image
|
||||||
<img
|
</System.P>
|
||||||
src={coverImage.url}
|
|
||||||
alt=""
|
<React.Fragment>
|
||||||
style={{ maxWidth: "368px", maxHeight: "368px" }}
|
<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}
|
||||||
|
alt=""
|
||||||
|
style={{ maxWidth: "368px", maxHeight: "368px" }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</React.Fragment>
|
||||||
|
</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}
|
||||||
/>
|
/>
|
||||||
|
<System.ButtonPrimary
|
||||||
|
full
|
||||||
|
type="label"
|
||||||
|
htmlFor="file"
|
||||||
|
loading={this.state.changingPreview}
|
||||||
|
>
|
||||||
|
Upload image
|
||||||
|
</System.ButtonPrimary>
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
</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} />
|
|
||||||
<System.ButtonPrimary
|
|
||||||
full
|
|
||||||
type="label"
|
|
||||||
htmlFor="file"
|
|
||||||
loading={this.state.changingPreview}
|
|
||||||
>
|
|
||||||
Upload image
|
|
||||||
</System.ButtonPrimary>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{this.props.isOwner ? (
|
{this.props.isOwner ? (
|
||||||
|
Loading…
Reference in New Issue
Block a user