diff --git a/src/components/styled/views/Board.styled.jsx b/src/components/styled/views/Board.styled.jsx index 0779b1fc..f3ef6856 100644 --- a/src/components/styled/views/Board.styled.jsx +++ b/src/components/styled/views/Board.styled.jsx @@ -2153,7 +2153,7 @@ export const BoardForm = styled.div` } .op-container { - display: inline; + display: grid; } .op { @@ -2327,7 +2327,7 @@ export const BoardForm = styled.div` } .op-container { - display: inline; + display: grid; } .op { @@ -2500,7 +2500,7 @@ export const BoardForm = styled.div` } .op-container { - display: inline; + display: grid; } .op { @@ -2671,7 +2671,7 @@ export const BoardForm = styled.div` } .op-container { - display: inline; + display: grid; } .op { @@ -2839,7 +2839,7 @@ export const BoardForm = styled.div` } .op-container { - display: inline; + display: grid; } .op { @@ -3017,7 +3017,7 @@ export const BoardForm = styled.div` } .op-container { - display: inline; + display: grid; } .op { diff --git a/src/components/views/Board.jsx b/src/components/views/Board.jsx index 2153687b..c645eaf4 100755 --- a/src/components/views/Board.jsx +++ b/src/components/views/Board.jsx @@ -66,13 +66,20 @@ const Board = () => { selectedStyle, setSelectedThread, setSelectedText, - selectedTitle, setSelectedTitle, + setSelectedTitle, showPostForm, showPostFormLink, setTriggerInsertion, } = useGeneralStore(state => state); const { anonymousMode } = useAnonModeStore(); + + // temporary hardcode + const plebtokenRules = [ + "This community is strictly SFW. Any NSFW language or content will be removed.", + Only post about the plebbit token ($PLEB). For general cryptocurrency discussion, go to p/business-and-finance.eth., + "FUD is allowed unless blatantly meaningless and spammy." + ] const account = useAccount(); const navigate = useNavigate(); @@ -623,7 +630,7 @@ const Board = () => { return ( <> - {((selectedTitle ? selectedTitle : selectedAddress) + " - plebchan")} + {((subplebbit.title ? subplebbit.title : subplebbit.address) + " - plebchan")} { {subplebbit?.state === "failed" ? ( null ) : ( - feed.length > 0 ? ( + subplebbit?.state === "succeeded" ? ( <> {subplebbit.rules ? <> @@ -958,13 +965,136 @@ const Board = () => { - : null} + : subplebbit.address === "plebtoken.eth" ? ( + <> +
+
+
+
+
+ + Rules +   + {setIsAdminListOpen(!isAdminListOpen)}} + >## Board Admins +   + {getDate(subplebbit.createdAt)} +   + Sticky +   + Closed +   + [ + Reply + ] + + { + threadMenuRefs.current["rules"] = el; + }} + className='post-menu-button' + rotated={openMenuCid === "rules"} + onClick={(event) => { + event.stopPropagation(); + const rect = threadMenuRefs.current["rules"].getBoundingClientRect(); + setMenuPosition({top: rect.top + window.scrollY, left: rect.left}); + setOpenMenuCid(prevCid => (prevCid === "rules" ? null : "rules")); + }} + > + ▶ + + {createPortal( + {postMenuCatalogRef.current = el}} + onClick={(event) => event.stopPropagation()} + style={{position: "absolute", + top: menuPosition.top + 7, + left: menuPosition.left}}> +
+
    +
  • handleOptionClick("rules")}>Hide thread
  • + {/* {isModerator ? ( + <> + change rules + + ) : null} */} +
+
+
, document.body + )} +
+
+
+ {plebtokenRules.map((rule, index) => ( + + {index + 1}. {rule} +
+
+ ))} +
+
+
+
+
+
+
+
+
+
+
+ + + {setIsAdminListOpen(!isAdminListOpen)}} + >## Board Admins +   + + Sticky +   + Closed + +
+ Rules +   +
+ {getDate(subplebbit.createdAt)} +   +
+
+
+ {plebtokenRules.map((rule, index) => ( + + {index + 1}. {rule} +
+
+ ))} +
+
+
+
+ View Thread +
+
+
+ + ) : null} {subplebbit.description ? <>
-
+

@@ -2549,7 +2679,7 @@ const Board = () => { }} endReached={tryLoadMore} useWindowScroll={true} - components={{ Footer: hasMore ? () => : null }} + components={{ Footer: hasMore && feed.length > 0 ? () => : null }} /> ) : () diff --git a/src/components/views/Rules.jsx b/src/components/views/Rules.jsx index c7f4a6f0..6405d94a 100644 --- a/src/components/views/Rules.jsx +++ b/src/components/views/Rules.jsx @@ -28,6 +28,13 @@ const Rules = () => { selectedThread, setSelectedThread, setSelectedTitle, } = useGeneralStore(state => state); + + // temporary hardcode + const plebtokenRules = [ + "This community is strictly SFW. Any NSFW language or content will be removed.", + Only post about the plebbit token ($PLEB). For general cryptocurrency discussion, go to p/business-and-finance.eth., + "FUD is allowed unless blatantly meaningless and spammy." + ] const navigate = useNavigate(); @@ -332,12 +339,21 @@ const Rules = () => {
- {subplebbit.rules?.map((rule, index) => ( - - {index + 1}. {rule} -
-
- ))} + {subplebbit.address === "plebtoken.eth" ? ( + plebtokenRules.map((rule, index) => ( + + {index + 1}. {rule} +
+
+ )) + ) : ( + subplebbit.rules?.map((rule, index) => ( + + {index + 1}. {rule} +
+
+ )) + )}
@@ -373,12 +389,21 @@ const Rules = () => {
- {subplebbit.rules?.map((rule, index) => ( - - {index + 1}. {rule} -
-
- ))} + {subplebbit.address === "plebtoken.eth" ? ( + plebtokenRules.map((rule, index) => ( + + {index + 1}. {rule} +
+
+ )) + ) : ( + subplebbit.rules?.map((rule, index) => ( + + {index + 1}. {rule} +
+
+ )) + )}