Fix media not loading if status is not cached

This commit is contained in:
Lim Chee Aun 2023-04-15 12:26:11 +08:00
parent 5d2a14442a
commit a505f7c5e4
2 changed files with 13 additions and 11 deletions

View file

@ -804,14 +804,6 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
flex-grow: 1;
/* backdrop-filter: saturate(0.75); */
}
.deck-backdrop > .deck-loader {
flex-grow: 1;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(24px);
background-image: radial-gradient(closest-side, var(--bg-color), transparent);
}
@keyframes slide-in {
0% {
transform: translate3d(100%, 0, 0);
@ -902,6 +894,16 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
backdrop-filter: blur(24px);
animation: appear 0.3s var(--timing-function) both;
}
.media-modal-container.loading {
display: flex;
justify-content: center;
align-items: center;
background-image: radial-gradient(
closest-side,
var(--bg-blur-color),
transparent
);
}
.carousel {
display: flex;

View file

@ -86,7 +86,7 @@ function StatusPage() {
}
})();
}
}, []);
}, [showMedia]);
const mediaAttachments = mediaStatusID
? mediaStatus?.mediaAttachments
@ -112,8 +112,8 @@ function StatusPage() {
}}
/>
) : (
<div class="deck-loader">
<Loader />
<div class="media-modal-container loading">
<Loader abrupt />
</div>
)
) : (