mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
added link to whole catalog thread
This commit is contained in:
@@ -342,51 +342,51 @@ const Catalog = () => {
|
|||||||
const commentMediaInfo = getCommentMediaInfo(thread);
|
const commentMediaInfo = getCommentMediaInfo(thread);
|
||||||
const fallbackImgUrl = "/assets/filedeleted-res.gif";
|
const fallbackImgUrl = "/assets/filedeleted-res.gif";
|
||||||
return (
|
return (
|
||||||
<div key={`thread-${thread.cid}`} className="thread">
|
<Link style={{all: "unset", cursor: "pointer"}} key={`a-${thread.cid}`} to={`/${selectedAddress}/thread/${thread.cid}`} onClick={() => handleClickThread(thread.cid)}>
|
||||||
<Link key={`a-${thread.cid}`} to={`/${selectedAddress}/thread/${thread.cid}`} onClick={() => handleClickThread(thread.cid)}>
|
<div key={`thread-${thread.cid}`} className="thread">
|
||||||
{commentMediaInfo?.url ? (
|
{commentMediaInfo?.url ? (
|
||||||
<Fragment key="f-catalog">
|
<Fragment key="f-catalog">
|
||||||
{commentMediaInfo?.type === "webpage" ? (
|
{commentMediaInfo?.type === "webpage" ? (
|
||||||
<img key={`img-${thread.cid}`} alt="thread" src={commentMediaInfo.url}
|
<img key={`img-${thread.cid}`} alt="thread" src={commentMediaInfo.url}
|
||||||
onError={(e) => {
|
onError={(e) => {
|
||||||
e.target.src = fallbackImgUrl
|
e.target.src = fallbackImgUrl
|
||||||
e.target.onerror = null;}} />
|
e.target.onerror = null;}} />
|
||||||
) : null}
|
) : null}
|
||||||
{commentMediaInfo?.type === "image" ? (
|
{commentMediaInfo?.type === "image" ? (
|
||||||
<img key={`img-${thread.cid}`} alt="thread" src={commentMediaInfo.url}
|
<img key={`img-${thread.cid}`} alt="thread" src={commentMediaInfo.url}
|
||||||
onError={(e) => {
|
onError={(e) => {
|
||||||
e.target.src = fallbackImgUrl
|
e.target.src = fallbackImgUrl
|
||||||
e.target.onerror = null;}} />
|
e.target.onerror = null;}} />
|
||||||
) : null}
|
) : null}
|
||||||
{commentMediaInfo?.type === "video" ? (
|
{commentMediaInfo?.type === "video" ? (
|
||||||
<VideoThumbnail
|
<VideoThumbnail
|
||||||
videoUrl={commentMediaInfo.url}
|
videoUrl={commentMediaInfo.url}
|
||||||
thumbnailHandler={(thumbnail) => {
|
thumbnailHandler={(thumbnail) => {
|
||||||
const img = document.querySelector(`img[key="img-${thread.cid}"]`);
|
const img = document.querySelector(`img[key="img-${thread.cid}"]`);
|
||||||
if (img) {
|
if (img) {
|
||||||
img.src = thumbnail;
|
img.src = thumbnail;
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
{commentMediaInfo?.type === "audio" ? (
|
{commentMediaInfo?.type === "audio" ? (
|
||||||
<audio controls key={`fti-${thread.cid}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
<audio controls key={`fti-${thread.cid}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||||
) : null}
|
) : null}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
) : null}
|
) : null}
|
||||||
</Link>
|
{/* <div key={`ti-${thread.cid}`} className="thread-icons" >
|
||||||
{/* <div key={`ti-${thread.cid}`} className="thread-icons" >
|
<span key={`si-${thread.cid}`} className="thread-icon sticky-icon" title="Sticky"></span>
|
||||||
<span key={`si-${thread.cid}`} className="thread-icon sticky-icon" title="Sticky"></span>
|
</div> */}
|
||||||
</div> */}
|
<div key={`meta-${thread.cid}`} className="meta" title="(R)eplies / (I)mage Replies" >
|
||||||
<div key={`meta-${thread.cid}`} className="meta" title="(R)eplies / (I)mage Replies" >
|
R:
|
||||||
R:
|
<b key={`b-${thread.cid}`}>{thread.replyCount}</b>
|
||||||
<b key={`b-${thread.cid}`}>{thread.replyCount}</b>
|
</div>
|
||||||
|
<div key={`t-${thread.cid}`} className="teaser">
|
||||||
|
<b key={`b2-${thread.cid}`}>{thread.title ? `${thread.title}` : null}</b>
|
||||||
|
{thread.content ? `: ${thread.content}` : null}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div key={`t-${thread.cid}`} className="teaser">
|
</Link>
|
||||||
<b key={`b2-${thread.cid}`}>{thread.title ? `${thread.title}` : null}</b>
|
|
||||||
{thread.content ? `: ${thread.content}` : null}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)})}
|
)})}
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user