mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
updated reply modal states
This commit is contained in:
@@ -16,7 +16,8 @@ const ReplyModal = ({ isOpen, closeModal }) => {
|
||||
setIsCaptchaOpen,
|
||||
setPendingComment,
|
||||
selectedAddress,
|
||||
selectedReply,
|
||||
selectedParentCid,
|
||||
selectedShortCid,
|
||||
selectedStyle,
|
||||
selectedThread,
|
||||
} = useGeneralStore(state => state);
|
||||
@@ -113,7 +114,7 @@ const ReplyModal = ({ isOpen, closeModal }) => {
|
||||
displayName: nameRef.current.value || undefined,
|
||||
content: commentRef.current.value || undefined,
|
||||
link: linkRef.current.value || undefined,
|
||||
parentCid: selectedReply,
|
||||
parentCid: selectedParentCid,
|
||||
}));
|
||||
};
|
||||
|
||||
@@ -172,7 +173,7 @@ const ReplyModal = ({ isOpen, closeModal }) => {
|
||||
<Draggable handle=".modal-header" nodeRef={nodeRef}>
|
||||
<div className="modal-content" ref={nodeRef}>
|
||||
<div className="modal-header">
|
||||
Reply to c/{selectedReply}
|
||||
Reply to c/{selectedShortCid}
|
||||
<button className="icon" onClick={() => closeModal()} title="close" />
|
||||
</div>
|
||||
<div id="form">
|
||||
|
||||
@@ -29,7 +29,8 @@ const Board = () => {
|
||||
isSettingsOpen, setIsSettingsOpen,
|
||||
setPendingComment,
|
||||
selectedAddress, setSelectedAddress,
|
||||
setSelectedReply,
|
||||
setSelectedParentCid,
|
||||
setSelectedShortCid,
|
||||
selectedStyle,
|
||||
setSelectedThread,
|
||||
selectedTitle, setSelectedTitle,
|
||||
@@ -479,7 +480,7 @@ const Board = () => {
|
||||
<Link to="" key={`pl1-${thread.cid}`} onClick={() => {}} title="Link to this post">c/</Link>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} key={`pl2-${thread.cid}`}
|
||||
onClick={() => {
|
||||
setIsReplyOpen(true); setSelectedReply(thread.shortCid);
|
||||
setIsReplyOpen(true); setSelectedShortCid(thread.shortCid); setSelectedParentCid(thread.cid);
|
||||
}} title="Reply to this post">{thread.shortCid}</button>
|
||||
|
||||
<span key={`rl1-${thread.cid}`}>
|
||||
@@ -572,7 +573,7 @@ const Board = () => {
|
||||
<Link to="" key={`pl1-${reply.cid}`} onClick={() => {}} title="Link to this post">c/</Link>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} key={`pl2-${reply.cid}`}
|
||||
onClick={() => {
|
||||
setIsReplyOpen(true); setSelectedReply(reply.shortCid);
|
||||
setIsReplyOpen(true); setSelectedShortCid(reply.shortCid); setSelectedParentCid(reply.cid);
|
||||
}} title="Reply to this post">{reply.shortCid}</button>
|
||||
</span>
|
||||
<button key={`pmb-${reply.cid}`} className="post-menu-button" onClick={() => {}} title="Post menu" style={{ all: 'unset', cursor: 'pointer' }} data-cmd="post-menu">▶</button>
|
||||
@@ -714,7 +715,7 @@ const Board = () => {
|
||||
|
||||
<Link to="" key={`mob-no-${thread.cid}`} onClick={() => {}} title="Link to this post">c/</Link>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} key={`mob-no2-${thread.cid}`} onClick={() => {
|
||||
setIsReplyOpen(true); setSelectedReply(thread.shortCid);
|
||||
setIsReplyOpen(true); setSelectedShortCid(thread.shortCid); setSelectedParentCid(thread.cid);
|
||||
}} title="Reply to this post">{thread.shortCid}</button>
|
||||
</span>
|
||||
</div>
|
||||
@@ -810,7 +811,7 @@ const Board = () => {
|
||||
{getDate(reply.timestamp)}
|
||||
<Link to="" key={`mob-pl1-${reply.cid}`} onClick={() => {}} title="Link to this post">c/</Link>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} key={`mob-pl2-${reply.cid}`} onClick={() => {
|
||||
setIsReplyOpen(true); setSelectedReply(reply.shortCid);
|
||||
setIsReplyOpen(true); setSelectedShortCid(reply.shortCid); setSelectedParentCid(reply.cid)
|
||||
}} title="Reply to this post">{reply.shortCid}</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -29,6 +29,8 @@ const Thread = () => {
|
||||
isSettingsOpen, setIsSettingsOpen,
|
||||
setPendingComment,
|
||||
selectedAddress, setSelectedAddress,
|
||||
setSelectedParentCid,
|
||||
setSelectedShortCid,
|
||||
selectedStyle,
|
||||
selectedThread, setSelectedThread,
|
||||
selectedTitle, setSelectedTitle,
|
||||
@@ -483,7 +485,9 @@ const Thread = () => {
|
||||
|
||||
<span className="post-number">
|
||||
<Link to="" onClick={() => {}} title="Link to this post">c/</Link>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} onClick={() => setIsReplyOpen(true)} title="Reply to this post">{comment.shortCid}</button>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} onClick={() => {
|
||||
setIsReplyOpen(true); setSelectedParentCid(comment.cid); setSelectedShortCid(comment.shortCid);
|
||||
}} title="Reply to this post">{comment.shortCid}</button>
|
||||
</span>
|
||||
<button key={`pmb-${comment.cid}`} className="post-menu-button" onClick={() => {}} title="Post menu" style={{ all: 'unset', cursor: 'pointer' }}>▶</button>
|
||||
<div id="backlink-id" className="backlink">
|
||||
@@ -548,7 +552,9 @@ const Thread = () => {
|
||||
|
||||
<span key={`pn-${reply.cid}`} className="post-number">
|
||||
<Link to="" key={`pl1-${reply.cid}`} onClick={() => {}} title="Link to this post">c/</Link>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} key={`pl2-${reply.cid}`} onClick={() => setIsReplyOpen(true)} title="Reply to this post">{reply.shortCid}</button>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} key={`pl2-${reply.cid}`} onClick={() => {
|
||||
setIsReplyOpen(true); setSelectedParentCid(reply.cid); setSelectedShortCid(reply.shortCid);
|
||||
}} title="Reply to this post">{reply.shortCid}</button>
|
||||
</span>
|
||||
<button key={`pmb-${reply.cid}`} className="post-menu-button" onClick={() => {}} title="Post menu" style={{ all: 'unset', cursor: 'pointer' }}>▶</button>
|
||||
<div id="backlink-id" className="backlink">
|
||||
@@ -671,8 +677,10 @@ const Thread = () => {
|
||||
<span key={`mob-dt-${comment.cid}`} className="date-time-mobile">
|
||||
{getDate(comment?.timestamp)}
|
||||
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} key={`mob-no-${comment.cid}`} onClick={() => setIsReplyOpen(true)} title="Link to this post">c/</button>
|
||||
<Link to="" key={`mob-no2-${comment.cid}`} onClick={() => {}} title="Reply to this post">{comment.cid?.slice(0, 8)}</Link>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} key={`mob-no-${comment.cid}`} onClick={() => {
|
||||
setIsReplyOpen(true); setSelectedParentCid(comment.cid); setSelectedShortCid(comment.shortCid);
|
||||
}} title="Link to this post">c/</button>
|
||||
<Link to="" key={`mob-no2-${comment.cid}`} onClick={() => {}} title="Reply to this post">{comment.shortCid}</Link>
|
||||
</span>
|
||||
</div>
|
||||
{commentMediaInfo?.url ? (
|
||||
@@ -753,7 +761,9 @@ const Thread = () => {
|
||||
<span key={`mob-dt-${reply.cid}`} className="date-time-mobile">
|
||||
{getDate(reply?.timestamp)}
|
||||
<Link to="" key={`mob-pl1-${reply.cid}`} onClick={() => {}} title="Link to this post">c/</Link>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} key={`mob-pl2-${reply.cid}`} onClick={() => setIsReplyOpen(true)} title="Reply to this post">{reply.shortCid}</button>
|
||||
<button id="reply-button" style={{ all: 'unset', cursor: 'pointer' }} key={`mob-pl2-${reply.cid}`} onClick={() => {
|
||||
setIsReplyOpen(true); setSelectedParentCid(reply.cid); setSelectedShortCid(reply.shortCid);
|
||||
}} title="Reply to this post">{reply.shortCid}</button>
|
||||
</span>
|
||||
</div>
|
||||
<blockquote key={`mob-pm-${reply.cid}`} className="post-message-mobile">
|
||||
|
||||
Reference in New Issue
Block a user