add sticky and closed

This commit is contained in:
Tom
2023-05-19 08:20:18 +02:00
parent a7b1ad2fee
commit a27f566f00
5 changed files with 55 additions and 5 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

+7
View File
@@ -58,6 +58,13 @@ export const Threads = styled.div`
display: inline-block;
}
.closed-icon {
background-image: url(assets/closed.gif);
width: 16px;
height: 16px;
display: inline-block;
}
.meta {
cursor: help;
font-size: 11px;
+25 -1
View File
@@ -415,7 +415,7 @@ const Board = () => {
}));
}, [commentCid]);
useEffect(() => {
if (publishCommentEditOptions && triggerPublishCommentEdit) {
(async () => {
@@ -779,6 +779,20 @@ const Board = () => {
]
</span>
</span>&nbsp;
{thread.pinned ? (
<>
&nbsp;
<img src="assets/sticky.gif" alt="Sticky" title="Sticky"
style={{marginBottom: "-3px"}} />
</>
) : null}
{thread.locked ? (
<>
&nbsp;
<img src="assets/closed.gif" alt="Closed" title="Closed"
style={{marginBottom: "-3px"}} />
</>
) : null}
<PostMenu
key={`pmb-${index}`}
title="Post menu"
@@ -1185,6 +1199,16 @@ const Board = () => {
</span>
)&nbsp;
</span>
<span key={`ti-mob-${index}`} className="thread-icons-mobile" style={{float: "right", marginRight: "18px"}}>
{thread.pinned ? (
<img src="assets/sticky.gif" alt="Sticky" title="Sticky"
style={{marginBottom: "-3px", marginRight: "2px"}} />
) : null}
{thread.locked ? (
<img src="assets/closed.gif" alt="Closed" title="Closed"
style={{marginBottom: "-3px", marginRight: "2px"}} />
) : null}
</span>
<br key={`mob-br1-${index}`} />
{thread.title ? (
thread.title.length > 30 ?
+8 -3
View File
@@ -515,9 +515,14 @@ const Catalog = () => {
) : null}
</Fragment>
) : null}
{/* <div key={`ti-${index}`} className="thread-icons" >
<span key={`si-${index}`} className="thread-icon sticky-icon" title="Sticky"></span>
</div> */}
<div key={`ti-${index}`} className="thread-icons" >
{thread.pinned ? (
<span key={`si-${index}`} className="thread-icon sticky-icon" title="Sticky" />
) : null}
{thread.locked ? (
<span key={`li-${index}`} className="thread-icon closed-icon" title="Closed" />
) : null}
</div>
<div key={`meta-${index}`} className="meta" title="(R)eplies / (I)mage Replies" >
R:
<b key={`b-${index}`}>{thread.replyCount}</b>
+15 -1
View File
@@ -736,7 +736,21 @@ const Thread = () => {
<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>&nbsp;&nbsp;
</span>&nbsp;
{comment.pinned ? (
<>
&nbsp;
<img src="assets/sticky.gif" alt="Sticky" title="Sticky"
style={{marginBottom: "-3px"}} />
</>
) : null}
{comment.locked ? (
<>
&nbsp;
<img src="assets/closed.gif" alt="Closed" title="Closed"
style={{marginBottom: "-3px"}} />
</>
) : null}
<PostMenu
key={`pmb-${index}`}
title="Post menu"