mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(post): show loading state info
This commit is contained in:
@@ -434,7 +434,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies, showReplies
|
||||
)}
|
||||
</span>
|
||||
)}
|
||||
{post?.replyCount === undefined && (
|
||||
{post?.replyCount === undefined && !isInPendingPostView && (
|
||||
<span className={styles.loadingString}>
|
||||
<LoadingEllipsis string={t('loading_comments')} />
|
||||
</span>
|
||||
@@ -452,14 +452,15 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies, showReplies
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
{stateString && stateString !== 'Failed' ? (
|
||||
<div className={styles.stateString}>
|
||||
<br />
|
||||
<LoadingEllipsis string={stateString} />
|
||||
</div>
|
||||
) : (
|
||||
state === 'failed' && <span className={styles.error}>{t('failed')}</span>
|
||||
)}
|
||||
{!isInPendingPostView &&
|
||||
(stateString && stateString !== 'Failed' ? (
|
||||
<div className={styles.stateString}>
|
||||
<br />
|
||||
<LoadingEllipsis string={stateString} />
|
||||
</div>
|
||||
) : (
|
||||
state === 'failed' && <span className={styles.error}>{t('failed')}</span>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -348,7 +348,7 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies, showReplies =
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{post?.replyCount === undefined && (
|
||||
{post?.replyCount === undefined && !isInPendingPostView && (
|
||||
<span className={styles.loadingString}>
|
||||
<LoadingEllipsis string={t('loading_comments')} />
|
||||
</span>
|
||||
@@ -365,13 +365,14 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies, showReplies =
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
{stateString && stateString !== 'Failed' ? (
|
||||
<div className={styles.stateString}>
|
||||
<LoadingEllipsis string={stateString} />
|
||||
</div>
|
||||
) : (
|
||||
state === 'failed' && <span className={styles.error}>{t('failed')}</span>
|
||||
)}
|
||||
{!isInPendingPostView &&
|
||||
(stateString && stateString !== 'Failed' ? (
|
||||
<div className={styles.stateString}>
|
||||
<LoadingEllipsis string={stateString} />
|
||||
</div>
|
||||
) : (
|
||||
state === 'failed' && <span className={styles.error}>{t('failed')}</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -519,8 +519,6 @@
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: calc(100vw - 28px);
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
@@ -544,10 +542,6 @@
|
||||
.authorAvatar {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.stateString {
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
@@ -568,8 +562,4 @@
|
||||
.replyMobile {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.stateString {
|
||||
padding-top: 10px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user