mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix 404 check, add 404 page mobile style, fix description/rules custom comment
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ const BoardLayout = () => {
|
||||
|
||||
const isValidAccountCommentIndex = !accountCommentIndex || (!isNaN(parseInt(accountCommentIndex)) && parseInt(accountCommentIndex) >= 0);
|
||||
const isValidCommentCid = !commentCid || /^Qm[a-zA-Z0-9]{44}$/.test(commentCid);
|
||||
const isValidSubplebbitAddress = subplebbitAddress && (subplebbitAddress.includes('.') || /^12D3K[a-zA-Z0-9]{44}$/.test(subplebbitAddress));
|
||||
const isValidSubplebbitAddress = !subplebbitAddress || subplebbitAddress.includes('.') || /^12D3K[a-zA-Z0-9]{44}$/.test(subplebbitAddress);
|
||||
|
||||
if (!isValidAccountCommentIndex || !isValidCommentCid || !isValidSubplebbitAddress) {
|
||||
return <NotFound />;
|
||||
|
||||
@@ -194,7 +194,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
|
||||
)}
|
||||
</blockquote>
|
||||
)}
|
||||
{(replies.length > 5 || (pinned && replies.length > 0)) && !isInPostPage && (
|
||||
{!isDescription && !isRules && (replies.length > 5 || (pinned && replies.length > 0)) && !isInPostPage && (
|
||||
<span className={styles.summary}>
|
||||
<span className={styles.expandButtonWrapper}>
|
||||
<span className={styles.expandButton} />
|
||||
@@ -212,6 +212,8 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
|
||||
</span>
|
||||
)}
|
||||
{!(pinned && !isInPostPage) &&
|
||||
!isDescription &&
|
||||
!isRules &&
|
||||
replies &&
|
||||
(showAllReplies ? replies : replies.slice(-5)).map((reply, index) => (
|
||||
<div key={index} className={styles.replyContainer}>
|
||||
@@ -486,6 +488,8 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
|
||||
)}
|
||||
</div>
|
||||
{!(pinned && !isInPostPage) &&
|
||||
!isDescription &&
|
||||
!isRules &&
|
||||
replies &&
|
||||
(showAllReplies ? replies : replies.slice(-5)).map((reply, index) => (
|
||||
<div key={reply.cid} className={styles.replyContainer}>
|
||||
|
||||
@@ -53,4 +53,16 @@
|
||||
|
||||
.backToBoard a {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.content {
|
||||
min-width: 0;
|
||||
width: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.boxContent img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user