mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(post): prioritize 'failed' state over 'pending'
This commit is contained in:
@@ -77,7 +77,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.postDesktop .postNumLink a:hover, .postDesktop .postNumLink span:hover, .replyDesktop .postNumLink a:hover, .replyDesktop .postNumLink span:hover {
|
.postDesktop .postNumLink a:hover, .postDesktop .postNumLink span:hover, .replyDesktop .postNumLink a:hover, .replyDesktop .postNumLink span:hover {
|
||||||
cursor: pointer;
|
|
||||||
color: var(--button-desktop-text-color-hover);
|
color: var(--button-desktop-text-color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
|
|||||||
c/
|
c/
|
||||||
</Link>
|
</Link>
|
||||||
{!cid ? (
|
{!cid ? (
|
||||||
<span className={styles.pendingCid}>{state === 'failed' ? 'Failed' : 'Pending'}</span>
|
<span className={styles.pendingCid}>{state === 'failed' || stateString === 'Failed' ? 'Failed' : 'Pending'}</span>
|
||||||
) : (
|
) : (
|
||||||
<span className={styles.replyToPost} title={t('reply_to_post')} onClick={() => openReplyModal && openReplyModal(cid)}>
|
<span className={styles.replyToPost} title={t('reply_to_post')} onClick={() => openReplyModal && openReplyModal(cid)}>
|
||||||
{shortCid}
|
{shortCid}
|
||||||
@@ -187,7 +187,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
|
|||||||
<Trans i18nKey={'comment_too_long'} shouldUnescape={true} components={{ 1: <Link to={`/p/${subplebbitAddress}/c/${cid}`} /> }} />
|
<Trans i18nKey={'comment_too_long'} shouldUnescape={true} components={{ 1: <Link to={`/p/${subplebbitAddress}/c/${cid}`} /> }} />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{!cid && state === 'pending' && (
|
{!cid && state === 'pending' && stateString !== 'Failed' && (
|
||||||
<>
|
<>
|
||||||
<br />
|
<br />
|
||||||
{loadingString}
|
{loadingString}
|
||||||
@@ -195,7 +195,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
|
|||||||
)}
|
)}
|
||||||
</blockquote>
|
</blockquote>
|
||||||
)}
|
)}
|
||||||
{!isDescription && !isRules && (replies.length > 5 || (pinned && replies.length > 0)) && !isInPostPage && (
|
{!isDescription && !isRules && !isPendingPostPage && (replies.length > 5 || (pinned && replies.length > 0)) && !isInPostPage && (
|
||||||
<span className={styles.summary}>
|
<span className={styles.summary}>
|
||||||
<span className={styles.expandButtonWrapper}>
|
<span className={styles.expandButtonWrapper}>
|
||||||
<span className={styles.expandButton} />
|
<span className={styles.expandButton} />
|
||||||
@@ -274,7 +274,7 @@ const ReplyDesktop = ({ reply, roles, openReplyModal }: PostProps) => {
|
|||||||
c/
|
c/
|
||||||
</Link>
|
</Link>
|
||||||
{!cid ? (
|
{!cid ? (
|
||||||
<span className={styles.pendingCid}>{state === 'failed' ? 'Failed' : 'Pending'}</span>
|
<span className={styles.pendingCid}>{state === 'failed' || stateString === 'Failed' ? 'Failed' : 'Pending'}</span>
|
||||||
) : (
|
) : (
|
||||||
<span className={styles.replyToPost} title={t('reply_to_post')} onClick={() => openReplyModal && openReplyModal(cid)}>
|
<span className={styles.replyToPost} title={t('reply_to_post')} onClick={() => openReplyModal && openReplyModal(cid)}>
|
||||||
{shortCid}
|
{shortCid}
|
||||||
@@ -350,7 +350,7 @@ const ReplyDesktop = ({ reply, roles, openReplyModal }: PostProps) => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Markdown content={content} />
|
<Markdown content={content} />
|
||||||
{!cid && state === 'pending' && (
|
{!cid && state === 'pending' && stateString !== 'Failed' && (
|
||||||
<>
|
<>
|
||||||
<br />
|
<br />
|
||||||
{loadingString}
|
{loadingString}
|
||||||
@@ -439,7 +439,7 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
|
|||||||
c/
|
c/
|
||||||
</Link>
|
</Link>
|
||||||
{!cid ? (
|
{!cid ? (
|
||||||
<span className={styles.pendingCid}>{state === 'failed' ? 'Failed' : 'Pending'}</span>
|
<span className={styles.pendingCid}>{state === 'failed' || stateString === 'Failed' ? 'Failed' : 'Pending'}</span>
|
||||||
) : (
|
) : (
|
||||||
<span className={styles.replyToPost} title={t('reply_to_post')} onClick={() => openReplyModal && openReplyModal(cid)}>
|
<span className={styles.replyToPost} title={t('reply_to_post')} onClick={() => openReplyModal && openReplyModal(cid)}>
|
||||||
{shortCid}
|
{shortCid}
|
||||||
@@ -469,7 +469,7 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
|
|||||||
<Trans i18nKey={'comment_too_long'} shouldUnescape={true} components={{ 1: <Link to={`/p/${subplebbitAddress}/c/${cid}`} /> }} />
|
<Trans i18nKey={'comment_too_long'} shouldUnescape={true} components={{ 1: <Link to={`/p/${subplebbitAddress}/c/${cid}`} /> }} />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{!cid && state === 'pending' && (
|
{!cid && state === 'pending' && stateString !== 'Failed' && (
|
||||||
<>
|
<>
|
||||||
<br />
|
<br />
|
||||||
{loadingString}
|
{loadingString}
|
||||||
@@ -478,7 +478,7 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
|
|||||||
</blockquote>
|
</blockquote>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{!isInPostPage && (
|
{!isInPostPage && !isPendingPostPage && (
|
||||||
<div className={styles.postLink}>
|
<div className={styles.postLink}>
|
||||||
<span className={styles.info}>
|
<span className={styles.info}>
|
||||||
{replyCount > 0 && `${replyCount} Replies`}
|
{replyCount > 0 && `${replyCount} Replies`}
|
||||||
@@ -553,7 +553,7 @@ const ReplyMobile = ({ reply, roles, openReplyModal }: PostProps) => {
|
|||||||
</Link>
|
</Link>
|
||||||
</span>
|
</span>
|
||||||
{!cid ? (
|
{!cid ? (
|
||||||
<span className={styles.pendingCid}>{state === 'failed' ? 'Failed' : 'Pending'}</span>
|
<span className={styles.pendingCid}>{state === 'failed' || stateString === 'Failed' ? 'Failed' : 'Pending'}</span>
|
||||||
) : (
|
) : (
|
||||||
<span className={styles.replyToPost} title={t('reply_to_post')} onClick={() => openReplyModal && openReplyModal(cid)}>
|
<span className={styles.replyToPost} title={t('reply_to_post')} onClick={() => openReplyModal && openReplyModal(cid)}>
|
||||||
{shortCid}
|
{shortCid}
|
||||||
@@ -582,7 +582,7 @@ const ReplyMobile = ({ reply, roles, openReplyModal }: PostProps) => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Markdown content={content} />
|
<Markdown content={content} />
|
||||||
{!cid && state === 'pending' && (
|
{!cid && state === 'pending' && stateString !== 'Failed' && (
|
||||||
<>
|
<>
|
||||||
<br />
|
<br />
|
||||||
{loadingString}
|
{loadingString}
|
||||||
|
|||||||
Reference in New Issue
Block a user