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 fallbackImgUrl = "/assets/filedeleted-res.gif";
|
||||
return (
|
||||
<div key={`thread-${thread.cid}`} className="thread">
|
||||
<Link key={`a-${thread.cid}`} to={`/${selectedAddress}/thread/${thread.cid}`} onClick={() => handleClickThread(thread.cid)}>
|
||||
{commentMediaInfo?.url ? (
|
||||
<Fragment key="f-catalog">
|
||||
{commentMediaInfo?.type === "webpage" ? (
|
||||
<img key={`img-${thread.cid}`} alt="thread" src={commentMediaInfo.url}
|
||||
onError={(e) => {
|
||||
e.target.src = fallbackImgUrl
|
||||
e.target.onerror = null;}} />
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "image" ? (
|
||||
<img key={`img-${thread.cid}`} alt="thread" src={commentMediaInfo.url}
|
||||
onError={(e) => {
|
||||
e.target.src = fallbackImgUrl
|
||||
e.target.onerror = null;}} />
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "video" ? (
|
||||
<VideoThumbnail
|
||||
videoUrl={commentMediaInfo.url}
|
||||
thumbnailHandler={(thumbnail) => {
|
||||
const img = document.querySelector(`img[key="img-${thread.cid}"]`);
|
||||
if (img) {
|
||||
img.src = thumbnail;
|
||||
}
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "audio" ? (
|
||||
<audio controls key={`fti-${thread.cid}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
) : null}
|
||||
</Fragment>
|
||||
) : null}
|
||||
</Link>
|
||||
{/* <div key={`ti-${thread.cid}`} className="thread-icons" >
|
||||
<span key={`si-${thread.cid}`} className="thread-icon sticky-icon" title="Sticky"></span>
|
||||
</div> */}
|
||||
<div key={`meta-${thread.cid}`} className="meta" title="(R)eplies / (I)mage Replies" >
|
||||
R:
|
||||
<b key={`b-${thread.cid}`}>{thread.replyCount}</b>
|
||||
<Link style={{all: "unset", cursor: "pointer"}} key={`a-${thread.cid}`} to={`/${selectedAddress}/thread/${thread.cid}`} onClick={() => handleClickThread(thread.cid)}>
|
||||
<div key={`thread-${thread.cid}`} className="thread">
|
||||
{commentMediaInfo?.url ? (
|
||||
<Fragment key="f-catalog">
|
||||
{commentMediaInfo?.type === "webpage" ? (
|
||||
<img key={`img-${thread.cid}`} alt="thread" src={commentMediaInfo.url}
|
||||
onError={(e) => {
|
||||
e.target.src = fallbackImgUrl
|
||||
e.target.onerror = null;}} />
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "image" ? (
|
||||
<img key={`img-${thread.cid}`} alt="thread" src={commentMediaInfo.url}
|
||||
onError={(e) => {
|
||||
e.target.src = fallbackImgUrl
|
||||
e.target.onerror = null;}} />
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "video" ? (
|
||||
<VideoThumbnail
|
||||
videoUrl={commentMediaInfo.url}
|
||||
thumbnailHandler={(thumbnail) => {
|
||||
const img = document.querySelector(`img[key="img-${thread.cid}"]`);
|
||||
if (img) {
|
||||
img.src = thumbnail;
|
||||
}
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "audio" ? (
|
||||
<audio controls key={`fti-${thread.cid}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
) : null}
|
||||
</Fragment>
|
||||
) : null}
|
||||
{/* <div key={`ti-${thread.cid}`} className="thread-icons" >
|
||||
<span key={`si-${thread.cid}`} className="thread-icon sticky-icon" title="Sticky"></span>
|
||||
</div> */}
|
||||
<div key={`meta-${thread.cid}`} className="meta" title="(R)eplies / (I)mage Replies" >
|
||||
R:
|
||||
<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 key={`t-${thread.cid}`} className="teaser">
|
||||
<b key={`b2-${thread.cid}`}>{thread.title ? `${thread.title}` : null}</b>
|
||||
{thread.content ? `: ${thread.content}` : null}
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
)})}
|
||||
</InfiniteScroll>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user