mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fixed UI in posting modals
This commit is contained in:
@@ -11,7 +11,8 @@ const CaptchaModal = () => {
|
|||||||
pendingComment,
|
pendingComment,
|
||||||
selectedStyle,
|
selectedStyle,
|
||||||
setCaptchaResponse,
|
setCaptchaResponse,
|
||||||
isCaptchaOpen, setIsCaptchaOpen
|
isCaptchaOpen, setIsCaptchaOpen,
|
||||||
|
selectedShortCid,
|
||||||
} = useGeneralStore(state => state);
|
} = useGeneralStore(state => state);
|
||||||
|
|
||||||
const [imageSources, setImageSources] = useState([]);
|
const [imageSources, setImageSources] = useState([]);
|
||||||
@@ -57,7 +58,7 @@ const CaptchaModal = () => {
|
|||||||
<div className="modal-content" ref={nodeRef}>
|
<div className="modal-content" ref={nodeRef}>
|
||||||
<div className="modal-header">
|
<div className="modal-header">
|
||||||
{pendingComment.parentCid ?
|
{pendingComment.parentCid ?
|
||||||
("Challenges for Reply c/" + pendingComment.cid) :
|
("Challenges for Reply to c/" + selectedShortCid) :
|
||||||
"Challenges for New Thread"}
|
"Challenges for New Thread"}
|
||||||
<button className="icon" onClick={() => setIsCaptchaOpen(false)} title="close" />
|
<button className="icon" onClick={() => setIsCaptchaOpen(false)} title="close" />
|
||||||
</div>
|
</div>
|
||||||
@@ -102,13 +103,19 @@ const CaptchaModal = () => {
|
|||||||
<span style={{lineHeight: '1.7'}}>
|
<span style={{lineHeight: '1.7'}}>
|
||||||
Challenge {currentChallengeIndex + 1} of {totalChallenges}
|
Challenge {currentChallengeIndex + 1} of {totalChallenges}
|
||||||
</span>
|
</span>
|
||||||
<button id="nav" onClick={() => {
|
<button
|
||||||
setCurrentChallengeIndex((currentChallengeIndex + 1) % totalChallenges)
|
id="nav"
|
||||||
}
|
onClick={() => {
|
||||||
}>></button>
|
if (currentChallengeIndex + 1 < totalChallenges) {
|
||||||
<button id="nav" onClick={()=> {
|
setCurrentChallengeIndex((currentChallengeIndex + 1) % totalChallenges);
|
||||||
setCurrentChallengeIndex((currentChallengeIndex - 1 + totalChallenges) % totalChallenges)
|
} else {
|
||||||
}}><</button>
|
setCaptchaResponse(responseRef.current.value);
|
||||||
|
setIsCaptchaOpen(false);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{currentChallengeIndex + 1 < totalChallenges ? "Next" : "Post"}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export const StyledModal = styled(Modal)`
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
left: 5px;
|
left: 5px;
|
||||||
color: #999;
|
color: black;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -308,12 +308,12 @@ const Thread = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div id="post-form-link-desktop">
|
<div id="post-form-link-desktop">
|
||||||
[
|
[
|
||||||
<a onClick={handleClickForm} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply</a>
|
<a onClick={() => {handleClickForm(); setSelectedShortCid(comment.shortCid)}} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply</a>
|
||||||
]
|
]
|
||||||
</div>
|
</div>
|
||||||
<div id="post-form-link-mobile">
|
<div id="post-form-link-mobile">
|
||||||
<span className="btn-wrap">
|
<span className="btn-wrap">
|
||||||
<a onClick={handleClickForm} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply</a>
|
<a onClick={() => {handleClickForm(); setSelectedShortCid(comment.shortCid)}} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</ReplyFormLink>
|
</ReplyFormLink>
|
||||||
|
|||||||
Reference in New Issue
Block a user