Show static image if wall video missing (#849)

This commit is contained in:
WithoutPants
2020-10-15 10:53:00 +11:00
committed by GitHub
parent 482f8cbd92
commit d0f1ad3c24
2 changed files with 14 additions and 8 deletions

View File

@@ -6,6 +6,7 @@
* Add selective scene export.
### 🎨 Improvements
* Show static image on scene wall if preview video is missing.
* Add path filter to scene and gallery query.
* Add button to hide left panel on scene page.
* Add link to parent studio in studio page.

View File

@@ -46,14 +46,6 @@ const Preview: React.FC<{
if (!previews) return <div />;
if (isMissing) {
return (
<div className="wall-item-media wall-item-missing">
Pending preview generation
</div>
);
}
const image = (
<img
alt=""
@@ -81,6 +73,19 @@ const Preview: React.FC<{
/>
);
if (isMissing) {
// show the image if the video preview is unavailable
if (previews.image) {
return image;
}
return (
<div className="wall-item-media wall-item-missing">
Pending preview generation
</div>
);
}
if (previewType === "video") {
return video;
}