mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix key attributes
This commit is contained in:
+174
-174
@@ -459,22 +459,22 @@ const Board = () => {
|
||||
loadMore={tryLoadMore}
|
||||
hasMore={hasMore}
|
||||
>
|
||||
{selectedFeed.map((thread) => {
|
||||
{selectedFeed.map((thread, index) => {
|
||||
const { displayedReplies, omittedCount } = filteredRepliesByThread[thread.cid] || {};
|
||||
const commentMediaInfo = getCommentMediaInfo(thread);
|
||||
const fallbackImgUrl = "/assets/filedeleted-res.gif";
|
||||
return (
|
||||
<Fragment key={`fr-${thread.cid}`}>
|
||||
<div key={`t-${thread.cid}`} className="thread">
|
||||
<div key={`c-${thread.cid}`} className="op-container">
|
||||
<div key={`po-${thread.cid}`} className="post op op-desktop">
|
||||
<hr key={`hr-${thread.cid}`} />
|
||||
<div key={`pi-${thread.cid}`} className="post-info">
|
||||
<Fragment key={`fr-${index}`}>
|
||||
<div key={`t-${index}`} className="thread">
|
||||
<div key={`c-${index}`} className="op-container">
|
||||
<div key={`po-${index}`} className="post op op-desktop">
|
||||
<hr key={`hr-${index}`} />
|
||||
<div key={`pi-${index}`} className="post-info">
|
||||
{commentMediaInfo?.url ? (
|
||||
<div key={`f-${thread.cid}`} className="file" style={{marginBottom: "5px"}}>
|
||||
<div key={`ft-${thread.cid}`} className="file-text">
|
||||
<div key={`f-${index}`} className="file" style={{marginBottom: "5px"}}>
|
||||
<div key={`ft-${index}`} className="file-text">
|
||||
Link:
|
||||
<a key={`fa-${thread.cid}`} href={commentMediaInfo.url} target="_blank"
|
||||
<a key={`fa-${index}`} href={commentMediaInfo.url} target="_blank"
|
||||
rel="noopener noreferrer">{
|
||||
commentMediaInfo?.url.length > 30 ?
|
||||
commentMediaInfo?.url.slice(0, 30) + "(...)" :
|
||||
@@ -482,70 +482,70 @@ const Board = () => {
|
||||
}</a> ({commentMediaInfo?.type})
|
||||
</div>
|
||||
{commentMediaInfo?.type === "webpage" ? (
|
||||
<span key={`fta-${thread.cid}`} className="file-thumb">
|
||||
<img key={`fti-${thread.cid}`} src={thread.thumbnailUrl} alt="thumbnail" onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<span key={`fta-${index}`} className="file-thumb">
|
||||
<img key={`fti-${index}`} src={thread.thumbnailUrl} alt="thumbnail" onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
</span>
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "image" ? (
|
||||
<span key={`fta-${thread.cid}`} className="file-thumb">
|
||||
<img key={`fti-${thread.cid}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<span key={`fta-${index}`} className="file-thumb">
|
||||
<img key={`fti-${index}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
</span>
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "video" ? (
|
||||
<span key={`fta-${thread.cid}`} className="file-thumb">
|
||||
<video controls width="" key={`fti-${thread.cid}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<span key={`fta-${index}`} className="file-thumb">
|
||||
<video controls width="" key={`fti-${index}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
</span>
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "audio" ? (
|
||||
<span key={`fta-${thread.cid}`} className="file-thumb">
|
||||
<audio controls key={`fti-${thread.cid}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<span key={`fta-${index}`} className="file-thumb">
|
||||
<audio controls key={`fti-${index}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
<span key={`nb-${thread.cid}`} className="name-block">
|
||||
<span key={`nb-${index}`} className="name-block">
|
||||
{thread.title ? (
|
||||
thread.title.length > 75 ?
|
||||
<Fragment key={`fragment2-${thread.cid}`}>
|
||||
<span key={`q-${thread.cid}`} className="title"
|
||||
<Fragment key={`fragment2-${index}`}>
|
||||
<span key={`q-${index}`} className="title"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={thread.title}
|
||||
data-tooltip-place="top">
|
||||
{thread.title.slice(0, 75) + " (...)"}
|
||||
</span>
|
||||
</Fragment>
|
||||
: <span key={`q-${thread.cid}`} className="title">
|
||||
: <span key={`q-${index}`} className="title">
|
||||
{thread.title}
|
||||
</span>)
|
||||
: null}
|
||||
{thread.author.displayName
|
||||
? thread.author.displayName.length > 20
|
||||
? <Fragment key={`fragment3-${thread.cid}`}>
|
||||
<span key={`n-${thread.cid}`} className="name"
|
||||
? <Fragment key={`fragment3-${index}`}>
|
||||
<span key={`n-${index}`} className="name"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={thread.author.displayName}
|
||||
data-tooltip-place="top">
|
||||
{thread.author.displayName.slice(0, 20) + " (...)"}
|
||||
</span>
|
||||
</Fragment>
|
||||
: <span key={`n-${thread.cid}`} className="name">
|
||||
: <span key={`n-${index}`} className="name">
|
||||
{thread.author.displayName}</span>
|
||||
: <span key={`n-${thread.cid}`} className="name">
|
||||
: <span key={`n-${index}`} className="name">
|
||||
Anonymous</span>}
|
||||
|
||||
(u/
|
||||
<span key={`pa-${thread.cid}`} className="poster-address address-desktop"
|
||||
<span key={`pa-${index}`} className="poster-address address-desktop"
|
||||
id="reply-button" style={{cursor: "pointer"}}
|
||||
onClick={() => handleAddressClick(thread.author.shortAddress)}
|
||||
>
|
||||
{thread.author.shortAddress}
|
||||
</span>)
|
||||
|
||||
<span key={`dt-${thread.cid}`} className="date-time" data-utc="data">{getDate(thread.timestamp)}</span>
|
||||
<span key={`dt-${index}`} className="date-time" data-utc="data">{getDate(thread.timestamp)}</span>
|
||||
|
||||
<span key={`pn-${thread.cid}`} className="post-number post-number-desktop">
|
||||
<Link to={() => {}} key={`pl1-${thread.cid}`} title="Link to this post">c/</Link>
|
||||
<Link to={`/p/${selectedAddress}/c/${thread.cid}`} id="reply-button" key={`pl2-${thread.cid}`}
|
||||
<span key={`pn-${index}`} className="post-number post-number-desktop">
|
||||
<Link to={() => {}} key={`pl1-${index}`} title="Link to this post">c/</Link>
|
||||
<Link to={`/p/${selectedAddress}/c/${thread.cid}`} id="reply-button" key={`pl2-${index}`}
|
||||
onClick={(e) => {
|
||||
if (e.button === 2) return;
|
||||
e.preventDefault();
|
||||
@@ -554,19 +554,19 @@ const Board = () => {
|
||||
setSelectedParentCid(thread.cid);
|
||||
}} title="Reply to this post">{thread.shortCid}</Link>
|
||||
|
||||
<span key={`rl1-${thread.cid}`}>
|
||||
<span key={`rl1-${index}`}>
|
||||
[
|
||||
<Link key={`rl2-${thread.cid}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="reply-link" >Reply</Link>
|
||||
<Link key={`rl2-${index}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="reply-link" >Reply</Link>
|
||||
]
|
||||
</span>
|
||||
</span>
|
||||
<button key={`pmb-${thread.cid}`} className="post-menu-button" title="Post menu" style={{ all: 'unset', cursor: 'pointer' }} data-cmd="post-menu">▶</button>
|
||||
<div key={`bi-${thread.cid}`} id="backlink-id" className="backlink">
|
||||
<button key={`pmb-${index}`} className="post-menu-button" title="Post menu" style={{ all: 'unset', cursor: 'pointer' }} data-cmd="post-menu">▶</button>
|
||||
<div key={`bi-${index}`} id="backlink-id" className="backlink">
|
||||
{thread.replies?.pages?.topAll.comments
|
||||
.sort((a, b) => a.timestamp - b.timestamp)
|
||||
.map((reply) => (
|
||||
<div key={`div-${reply.cid}`} style={{display: 'inline-block'}}>
|
||||
<Link key={`ql-${reply.cid}`}
|
||||
.map((reply, index) => (
|
||||
<div key={`div-${index}`} style={{display: 'inline-block'}}>
|
||||
<Link key={`ql-${index}`}
|
||||
to={() => {}} className="quote-link"
|
||||
onClick={(event) => handleQuoteClick(reply, null, event)}>
|
||||
c/{reply.shortCid}</Link>
|
||||
@@ -578,70 +578,70 @@ const Board = () => {
|
||||
</span>
|
||||
{thread.content ? (
|
||||
thread.content?.length > 1000 ?
|
||||
<Fragment key={`fragment5-${thread.cid}`}>
|
||||
<blockquote key={`bq-${thread.cid}`}>
|
||||
<Post content={thread.content?.slice(0, 1000)} key={`post-${thread.cid}`} />
|
||||
<span key={`ttl-s-${thread.cid}`} className="ttl"> (...)
|
||||
<br key={`ttl-s-br1-${thread.cid}`} /><br key={`ttl-s-br2${thread.cid}`} />
|
||||
<Fragment key={`fragment5-${index}`}>
|
||||
<blockquote key={`bq-${index}`}>
|
||||
<Post content={thread.content?.slice(0, 1000)} key={`post-${index}`} />
|
||||
<span key={`ttl-s-${index}`} className="ttl"> (...)
|
||||
<br key={`ttl-s-br1-${index}`} /><br key={`ttl-s-br2${thread.cid}`} />
|
||||
Post too long.
|
||||
<Link key={`ttl-l-${thread.cid}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="ttl-link">Click here</Link>
|
||||
<Link key={`ttl-l-${index}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="ttl-link">Click here</Link>
|
||||
to view. </span>
|
||||
</blockquote>
|
||||
</Fragment>
|
||||
: <blockquote key={`bq-${thread.cid}`}>
|
||||
<Post content={thread.content} key={`post-${thread.cid}`} />
|
||||
: <blockquote key={`bq-${index}`}>
|
||||
<Post content={thread.content} key={`post-${index}`} />
|
||||
</blockquote>)
|
||||
: null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span key={`summary-${thread.cid}`} className="summary">
|
||||
<span key={`summary-${index}`} className="summary">
|
||||
{omittedCount > 0 ? (
|
||||
<span key={`oc-${thread.cid}`} className="ttl">
|
||||
<span key={`oc1-${thread.cid}`}>
|
||||
<span key={`oc-${index}`} className="ttl">
|
||||
<span key={`oc1-${index}`}>
|
||||
{omittedCount} post{omittedCount > 1 ? "s" : ""} omitted. Click
|
||||
<Link key={`oc2-${thread.cid}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="ttl-link">here</Link>
|
||||
<Link key={`oc2-${index}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="ttl-link">here</Link>
|
||||
to view.
|
||||
</span>
|
||||
</span>) : null}
|
||||
</span>
|
||||
{displayedReplies?.map((reply) => {
|
||||
{displayedReplies?.map((reply, index) => {
|
||||
const replyMediaInfo = getCommentMediaInfo(reply);
|
||||
const fallbackImgUrl = "/assets/filedeleted-res.gif";
|
||||
const shortParentCid = findShortParentCid(reply.parentCid, selectedFeed);
|
||||
return (
|
||||
<div key={`rc-${reply.cid}`} className="reply-container">
|
||||
<div key={`sa-${reply.cid}`} className="side-arrows">{'>>'}</div>
|
||||
<div key={`pr-${reply.cid}`} className="post-reply post-reply-desktop">
|
||||
<div key={`pi-${reply.cid}`} className="post-info">
|
||||
<span key={`nb-${reply.cid}`} className="nameblock">
|
||||
<div key={`rc-${index}`} className="reply-container">
|
||||
<div key={`sa-${index}`} className="side-arrows">{'>>'}</div>
|
||||
<div key={`pr-${index}`} className="post-reply post-reply-desktop">
|
||||
<div key={`pi-${index}`} className="post-info">
|
||||
<span key={`nb-${index}`} className="nameblock">
|
||||
{reply.author.displayName
|
||||
? reply.author.displayName.length > 12
|
||||
? <Fragment key={`fragment6-${reply.cid}`}>
|
||||
<span key={`mob-n-${reply.cid}`} className="name"
|
||||
? <Fragment key={`fragment6-${index}`}>
|
||||
<span key={`mob-n-${index}`} className="name"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={reply.author.displayName}
|
||||
data-tooltip-place="top">
|
||||
{reply.author.displayName.slice(0, 12) + " (...)"}
|
||||
</span>
|
||||
</Fragment>
|
||||
: <span key={`mob-n-${reply.cid}`} className="name">
|
||||
: <span key={`mob-n-${index}`} className="name">
|
||||
{reply.author.displayName}</span>
|
||||
: <span key={`mob-n-${reply.cid}`} className="name">
|
||||
: <span key={`mob-n-${index}`} className="name">
|
||||
Anonymous</span>}
|
||||
|
||||
<span key={`pa-${reply.cid}`} className="poster-address address-desktop"
|
||||
<span key={`pa-${index}`} className="poster-address address-desktop"
|
||||
id="reply-button" style={{cursor: "pointer"}}
|
||||
onClick={() => handleAddressClick(reply.author.shortAddress)}
|
||||
>
|
||||
(u/
|
||||
{reply.author?.shortAddress ?
|
||||
(
|
||||
<span key={`mob-ha-${reply.cid}`}>
|
||||
<span key={`mob-ha-${index}`}>
|
||||
{reply.author?.shortAddress}
|
||||
</span>
|
||||
) : (
|
||||
<span key={`mob-ha-${reply.cid}`}
|
||||
<span key={`mob-ha-${index}`}
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={account?.author?.address}
|
||||
data-tooltip-place="top"
|
||||
@@ -654,12 +654,12 @@ const Board = () => {
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span key={`dt-${reply.cid}`} className="date-time" data-utc="data">{getDate(reply.timestamp)}</span>
|
||||
<span key={`dt-${index}`} className="date-time" data-utc="data">{getDate(reply.timestamp)}</span>
|
||||
|
||||
<span key={`pn-${reply.cid}`} className="post-number post-number-desktop">
|
||||
<Link to={() => {}} key={`pl1-${reply.cid}`} title="Link to this post">c/</Link>
|
||||
<span key={`pn-${index}`} className="post-number post-number-desktop">
|
||||
<Link to={() => {}} key={`pl1-${index}`} title="Link to this post">c/</Link>
|
||||
{reply.shortCid ? (
|
||||
<Link to={`/p/${selectedAddress}/c/${thread.cid}`} id="reply-button" key={`pl2-${reply.cid}`}
|
||||
<Link to={`/p/${selectedAddress}/c/${thread.cid}`} id="reply-button" key={`pl2-${index}`}
|
||||
onClick={(e) => {
|
||||
if (e.button === 2) return;
|
||||
e.preventDefault();
|
||||
@@ -671,13 +671,13 @@ const Board = () => {
|
||||
<span key="pending" style={{color: 'red', fontWeight: '700'}}>Pending</span>
|
||||
)}
|
||||
</span>
|
||||
<button key={`pmb-${reply.cid}`} className="post-menu-button" title="Post menu" style={{ all: 'unset', cursor: 'pointer' }} data-cmd="post-menu">▶</button>
|
||||
<button key={`pmb-${index}`} className="post-menu-button" title="Post menu" style={{ all: 'unset', cursor: 'pointer' }} data-cmd="post-menu">▶</button>
|
||||
<div id="backlink-id" className="backlink">
|
||||
{reply.replies?.pages?.topAll.comments
|
||||
.sort((a, b) => a.timestamp - b.timestamp)
|
||||
.map((reply) => (
|
||||
<div key={`div-${reply.cid}`} style={{display: 'inline-block'}}>
|
||||
<Link to={() => {}} key={`ql-${reply.cid}`}
|
||||
.map((reply, index) => (
|
||||
<div key={`div-${index}`} style={{display: 'inline-block'}}>
|
||||
<Link to={() => {}} key={`ql-${index}`}
|
||||
className="quote-link"
|
||||
onClick={(event) => handleQuoteClick(reply, reply.shortCid, event)}>
|
||||
c/{reply.shortCid}</Link>
|
||||
@@ -688,11 +688,11 @@ const Board = () => {
|
||||
</div>
|
||||
</div>
|
||||
{replyMediaInfo?.url ? (
|
||||
<div key={`f-${reply.cid}`} className="file"
|
||||
<div key={`f-${index}`} className="file"
|
||||
style={{marginBottom: "5px"}}>
|
||||
<div key={`ft-${reply.cid}`} className="reply-file-text">
|
||||
<div key={`ft-${index}`} className="reply-file-text">
|
||||
Link:
|
||||
<a key={`fa-${reply.cid}`} href={replyMediaInfo.url} target="_blank"
|
||||
<a key={`fa-${index}`} href={replyMediaInfo.url} target="_blank"
|
||||
rel="noopener noreferrer">{
|
||||
replyMediaInfo?.url.length > 30 ?
|
||||
replyMediaInfo?.url.slice(0, 30) + "(...)" :
|
||||
@@ -700,33 +700,33 @@ const Board = () => {
|
||||
}</a> ({replyMediaInfo?.type})
|
||||
</div>
|
||||
{replyMediaInfo?.type === "webpage" ? (
|
||||
<span key={`fta-${reply.cid}`} className="file-thumb-reply">
|
||||
<img key={`fti-${reply.cid}`}
|
||||
<span key={`fta-${index}`} className="file-thumb-reply">
|
||||
<img key={`fti-${index}`}
|
||||
src={reply.thumbnailUrl}
|
||||
alt="thumbnail"
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
</span>
|
||||
) : null}
|
||||
{replyMediaInfo?.type === "image" ? (
|
||||
<span key={`fta-${reply.cid}`} className="file-thumb-reply">
|
||||
<img key={`fti-${reply.cid}`}
|
||||
<span key={`fta-${index}`} className="file-thumb-reply">
|
||||
<img key={`fti-${index}`}
|
||||
src={replyMediaInfo.url}
|
||||
alt={replyMediaInfo.type}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
</span>
|
||||
) : null}
|
||||
{replyMediaInfo?.type === "video" ? (
|
||||
<span key={`fta-${reply.cid}`} className="file-thumb-reply">
|
||||
<span key={`fta-${index}`} className="file-thumb-reply">
|
||||
<video controls
|
||||
key={`fti-${reply.cid}`}
|
||||
key={`fti-${index}`}
|
||||
src={replyMediaInfo.url} alt={replyMediaInfo.type}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
</span>
|
||||
) : null}
|
||||
{replyMediaInfo?.type === "audio" ? (
|
||||
<span key={`fta-${reply.cid}`} className="file-thumb-reply">
|
||||
<span key={`fta-${index}`} className="file-thumb-reply">
|
||||
<audio controls
|
||||
key={`fti-${reply.cid}`}
|
||||
key={`fti-${index}`}
|
||||
src={replyMediaInfo.url} alt={replyMediaInfo.type}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
</span>
|
||||
@@ -735,24 +735,24 @@ const Board = () => {
|
||||
) : null}
|
||||
{reply.content ? (
|
||||
reply.content?.length > 500 ?
|
||||
<Fragment key={`fragment8-${reply.cid}`}>
|
||||
<blockquote key={`pm-${reply.cid}`} comment={reply} className="post-message">
|
||||
<Link to={() => {}} key={`r-pm-${reply.cid}`} className="quotelink" onClick={(event) => handleQuoteClick(reply, shortParentCid, thread.shortCid, event)}>
|
||||
<Fragment key={`fragment8-${index}`}>
|
||||
<blockquote key={`pm-${index}`} comment={reply} className="post-message">
|
||||
<Link to={() => {}} key={`r-pm-${index}`} className="quotelink" onClick={(event) => handleQuoteClick(reply, shortParentCid, thread.shortCid, event)}>
|
||||
{`c/${shortParentCid}`}{shortParentCid === thread.shortCid ? " (OP)" : null}
|
||||
</Link>
|
||||
<Post content={reply.content?.slice(0, 500)} key={`post-${reply.cid}`} />
|
||||
<span key={`ttl-s-${reply.cid}`} className="ttl"> (...)
|
||||
<br key={`ttl-s-br1-${reply.cid}`} /><br key={`ttl-s-br2${reply.cid}`} />
|
||||
<Post content={reply.content?.slice(0, 500)} key={`post-${index}`} />
|
||||
<span key={`ttl-s-${index}`} className="ttl"> (...)
|
||||
<br key={`ttl-s-br1-${index}`} /><br key={`ttl-s-br2${reply.cid}`} />
|
||||
Comment too long.
|
||||
<Link key={`ttl-l-${reply.cid}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="ttl-link">Click here</Link>
|
||||
<Link key={`ttl-l-${index}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="ttl-link">Click here</Link>
|
||||
to view. </span>
|
||||
</blockquote>
|
||||
</Fragment>
|
||||
: <blockquote key={`pm-${reply.cid}`} className="post-message">
|
||||
<Link to={() => {}} key={`r-pm-${reply.cid}`} className="quotelink" onClick={(event) => handleQuoteClick(reply, shortParentCid, thread.shortCid, event)}>
|
||||
: <blockquote key={`pm-${index}`} className="post-message">
|
||||
<Link to={() => {}} key={`r-pm-${index}`} className="quotelink" onClick={(event) => handleQuoteClick(reply, shortParentCid, thread.shortCid, event)}>
|
||||
{`c/${shortParentCid}`}{shortParentCid === thread.shortCid ? " (OP)" : null}
|
||||
</Link>
|
||||
<Post content={reply.content} key={`post-${reply.cid}`} comment={reply} />
|
||||
<Post content={reply.content} key={`post-${index}`} comment={reply} />
|
||||
</blockquote>)
|
||||
: null}
|
||||
</div>
|
||||
@@ -760,59 +760,59 @@ const Board = () => {
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
<div key={`mob-t-${thread.cid}`} className="thread-mobile">
|
||||
<hr key={`mob-hr-${thread.cid}`} />
|
||||
<div key={`mob-c-${thread.cid}`} className="op-container">
|
||||
<div key={`mob-po-${thread.cid}`} className="post op op-mobile">
|
||||
<div key={`mob-pi-${thread.cid}`} className="post-info-mobile">
|
||||
<button key={`mob-pb-${thread.cid}`} className="post-menu-button-mobile" style={{ all: 'unset', cursor: 'pointer' }}>...</button>
|
||||
<span key={`mob-nbm-${thread.cid}`} className="name-block-mobile">
|
||||
<div key={`mob-t-${index}`} className="thread-mobile">
|
||||
<hr key={`mob-hr-${index}`} />
|
||||
<div key={`mob-c-${index}`} className="op-container">
|
||||
<div key={`mob-po-${index}`} className="post op op-mobile">
|
||||
<div key={`mob-pi-${index}`} className="post-info-mobile">
|
||||
<button key={`mob-pb-${index}`} className="post-menu-button-mobile" style={{ all: 'unset', cursor: 'pointer' }}>...</button>
|
||||
<span key={`mob-nbm-${index}`} className="name-block-mobile">
|
||||
{thread.author.displayName
|
||||
? thread.author.displayName.length > 15
|
||||
? <Fragment key={`fragment9-${thread.cid}`}>
|
||||
<span key={`mob-n-${thread.cid}`} className="name-mobile"
|
||||
? <Fragment key={`fragment9-${index}`}>
|
||||
<span key={`mob-n-${index}`} className="name-mobile"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={thread.author.displayName}
|
||||
data-tooltip-place="top">
|
||||
{thread.author.displayName.slice(0, 15) + " (...)"}
|
||||
</span>
|
||||
</Fragment>
|
||||
: <span key={`mob-n-${thread.cid}`} className="name-mobile">
|
||||
: <span key={`mob-n-${index}`} className="name-mobile">
|
||||
{thread.author.displayName}</span>
|
||||
: <span key={`mob-n-${thread.cid}`} className="name-mobile">
|
||||
: <span key={`mob-n-${index}`} className="name-mobile">
|
||||
Anonymous</span>}
|
||||
|
||||
<span key={`mob-pa-${thread.cid}`} className="poster-address-mobile address-mobile"
|
||||
<span key={`mob-pa-${index}`} className="poster-address-mobile address-mobile"
|
||||
id="reply-button" style={{cursor: "pointer"}}
|
||||
onClick={() => handleAddressClick(thread.author.shortAddress)}
|
||||
>
|
||||
(u/
|
||||
<span key={`mob-ha-${thread.cid}`} className="highlight-address-mobile">
|
||||
<span key={`mob-ha-${index}`} className="highlight-address-mobile">
|
||||
{thread.author.shortAddress}
|
||||
</span>
|
||||
)
|
||||
</span>
|
||||
<br key={`mob-br1-${thread.cid}`} />
|
||||
<br key={`mob-br1-${index}`} />
|
||||
{thread.title ? (
|
||||
thread.title.length > 30 ?
|
||||
<Fragment key={`fragment11-${thread.cid}`}>
|
||||
<span key={`mob-t-${thread.cid}`} className="subject-mobile"
|
||||
<Fragment key={`fragment11-${index}`}>
|
||||
<span key={`mob-t-${index}`} className="subject-mobile"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={thread.title}
|
||||
data-tooltip-place="top">
|
||||
{thread.title.slice(0, 30) + " (...)"}
|
||||
</span>
|
||||
</Fragment>
|
||||
: <span key={`mob-t-${thread.cid}`} className="subject-mobile">
|
||||
: <span key={`mob-t-${index}`} className="subject-mobile">
|
||||
{thread.title}
|
||||
</span>)
|
||||
: null}
|
||||
</span>
|
||||
<span key={`mob-dt-${thread.cid}`} className="date-time-mobile post-number-mobile">
|
||||
<span key={`mob-dt-${index}`} className="date-time-mobile post-number-mobile">
|
||||
{getDate(thread.timestamp)}
|
||||
|
||||
<Link to={() => {}} key={`mob-no-${thread.cid}`} title="Link to this post">c/</Link>
|
||||
<Link to={`/p/${selectedAddress}/c/${thread.cid}`} id="reply-button" key={`mob-no2-${thread.cid}`}
|
||||
<Link to={() => {}} key={`mob-no-${index}`} title="Link to this post">c/</Link>
|
||||
<Link to={`/p/${selectedAddress}/c/${thread.cid}`} id="reply-button" key={`mob-no2-${index}`}
|
||||
onClick={(e) => {
|
||||
if (e.button === 2) return;
|
||||
e.preventDefault();
|
||||
@@ -824,33 +824,33 @@ const Board = () => {
|
||||
</span>
|
||||
</div>
|
||||
{thread.link ? (
|
||||
<div key={`mob-f-${thread.cid}`} className="file-mobile">
|
||||
<a key={`link-a-${thread.cid}`} href={commentMediaInfo?.url} target="_blank"
|
||||
<div key={`mob-f-${index}`} className="file-mobile">
|
||||
<a key={`link-a-${index}`} href={commentMediaInfo?.url} target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
{commentMediaInfo?.url ? (
|
||||
commentMediaInfo.type === "webpage" ? (
|
||||
<span key={`mob-ft${thread.cid}`} className="file-thumb-mobile">
|
||||
<img key={`mob-img-${thread.cid}`} src={thread.thumbnailUrl} alt="thumbnail" onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${thread.cid}`} className="file-info-mobile">{commentMediaInfo?.type}</div>
|
||||
<img key={`mob-img-${index}`} src={thread.thumbnailUrl} alt="thumbnail" onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${index}`} className="file-info-mobile">{commentMediaInfo?.type}</div>
|
||||
</span>
|
||||
) : commentMediaInfo.type === "image" ? (
|
||||
<span key={`mob-ft${thread.cid}`} className="file-thumb-mobile">
|
||||
<img key={`mob-img-${thread.cid}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${thread.cid}`} className="file-info-mobile">{commentMediaInfo?.type}</div>
|
||||
<img key={`mob-img-${index}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${index}`} className="file-info-mobile">{commentMediaInfo?.type}</div>
|
||||
</span>
|
||||
) : commentMediaInfo.type === "video" ? (
|
||||
<span key={`mob-ft${thread.cid}`} className="file-thumb-mobile">
|
||||
<video key={`fti-${thread.cid}`}
|
||||
<video key={`fti-${index}`}
|
||||
src={commentMediaInfo.url}
|
||||
alt={commentMediaInfo.type}
|
||||
style={{ pointerEvents: "none" }}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${thread.cid}`} className="file-info-mobile">{commentMediaInfo?.type}</div>
|
||||
<div key={`mob-fi-${index}`} className="file-info-mobile">{commentMediaInfo?.type}</div>
|
||||
</span>
|
||||
) : commentMediaInfo.type === "audio" ? (
|
||||
<span key={`mob-ft${thread.cid}`} className="file-thumb-mobile">
|
||||
<audio key={`mob-img-${thread.cid}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${thread.cid}`} className="file-info-mobile">{commentMediaInfo?.type}</div>
|
||||
<audio key={`mob-img-${index}`} src={commentMediaInfo.url} alt={commentMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${index}`} className="file-info-mobile">{commentMediaInfo?.type}</div>
|
||||
</span>
|
||||
) : null
|
||||
) : null}
|
||||
@@ -859,23 +859,23 @@ const Board = () => {
|
||||
) : null}
|
||||
{thread.content ? (
|
||||
thread.content?.length > 500 ?
|
||||
<Fragment key={`fragment12-${thread.cid}`}>
|
||||
<blockquote key={`mob-bq-${thread.cid}`} className="post-message-mobile">
|
||||
<Post content={thread.content?.slice(0, 500)} key={`post-mobile-${thread.cid}`} />
|
||||
<span key={`mob-ttl-s-${thread.cid}`} className="ttl"> (...)
|
||||
<br key={`mob-ttl-s-br1-${thread.cid}`} /><br key={`mob-ttl-s-br2${thread.cid}`} />
|
||||
<Fragment key={`fragment12-${index}`}>
|
||||
<blockquote key={`mob-bq-${index}`} className="post-message-mobile">
|
||||
<Post content={thread.content?.slice(0, 500)} key={`post-mobile-${index}`} />
|
||||
<span key={`mob-ttl-s-${index}`} className="ttl"> (...)
|
||||
<br key={`mob-ttl-s-br1-${index}`} /><br key={`mob-ttl-s-br2${thread.cid}`} />
|
||||
Post too long.
|
||||
<Link key={`mob-ttl-l-${thread.cid}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="ttl-link">Click here</Link>
|
||||
<Link key={`mob-ttl-l-${index}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="ttl-link">Click here</Link>
|
||||
to view. </span>
|
||||
</blockquote>
|
||||
</Fragment>
|
||||
: <blockquote key={`mob-bq-${thread.cid}`} className="post-message-mobile">
|
||||
<Post content={thread.content} key={`post-mobile-${thread.cid}`} />
|
||||
: <blockquote key={`mob-bq-${index}`} className="post-message-mobile">
|
||||
<Post content={thread.content} key={`post-mobile-${index}`} />
|
||||
</blockquote>)
|
||||
: null}
|
||||
</div>
|
||||
<div key={`mob-pl-${thread.cid}`} className="post-link-mobile">
|
||||
<span key={`mob-info-${thread.cid}`} className="info-mobile">{
|
||||
<div key={`mob-pl-${index}`} className="post-link-mobile">
|
||||
<span key={`mob-info-${index}`} className="info-mobile">{
|
||||
(thread.replyCount + pendingReplyCounts[thread.cid]) === 0 ?
|
||||
("No replies")
|
||||
: (thread.replyCount + pendingReplyCounts[thread.cid]) === 1 ?
|
||||
@@ -884,45 +884,45 @@ const Board = () => {
|
||||
((thread.replyCount + pendingReplyCounts[thread.cid]) + " replies")
|
||||
: null
|
||||
}</span>
|
||||
<Link key={`rl2-${thread.cid}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="button-mobile" >View Thread</Link>
|
||||
<Link key={`rl2-${index}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="button-mobile" >View Thread</Link>
|
||||
</div>
|
||||
</div>
|
||||
{displayedReplies?.map((reply) => {
|
||||
{displayedReplies?.map((reply, index) => {
|
||||
const replyMediaInfo = getCommentMediaInfo(reply);
|
||||
const shortParentCid = findShortParentCid(reply.parentCid, selectedFeed);
|
||||
return (
|
||||
<div key={`mob-rc-${reply.cid}`} className="reply-container">
|
||||
<div key={`mob-pr-${reply.cid}`} className="post-reply post-reply-mobile">
|
||||
<div key={`mob-pi-${reply.cid}`} className="post-info-mobile">
|
||||
<button key={`pmbm-${reply.cid}`} className="post-menu-button-mobile" title="Post menu" style={{ all: 'unset', cursor: 'pointer' }}>...</button>
|
||||
<span key={`mob-nb-${reply.cid}`} className="name-block-mobile">
|
||||
<div key={`mob-rc-${index}`} className="reply-container">
|
||||
<div key={`mob-pr-${index}`} className="post-reply post-reply-mobile">
|
||||
<div key={`mob-pi-${index}`} className="post-info-mobile">
|
||||
<button key={`pmbm-${index}`} className="post-menu-button-mobile" title="Post menu" style={{ all: 'unset', cursor: 'pointer' }}>...</button>
|
||||
<span key={`mob-nb-${index}`} className="name-block-mobile">
|
||||
{reply.author.displayName
|
||||
? reply.author.displayName.length > 12
|
||||
? <Fragment key={`fragment13-${reply.cid}`}>
|
||||
<span key={`mob-n-${reply.cid}`} className="name-mobile"
|
||||
? <Fragment key={`fragment13-${index}`}>
|
||||
<span key={`mob-n-${index}`} className="name-mobile"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={reply.author.displayName}
|
||||
data-tooltip-place="top">
|
||||
{reply.author.displayName.slice(0, 12) + " (...)"}
|
||||
</span>
|
||||
</Fragment>
|
||||
: <span key={`mob-n-${reply.cid}`} className="name-mobile">
|
||||
: <span key={`mob-n-${index}`} className="name-mobile">
|
||||
{reply.author.displayName}</span>
|
||||
: <span key={`mob-n-${reply.cid}`} className="name-mobile">
|
||||
: <span key={`mob-n-${index}`} className="name-mobile">
|
||||
Anonymous</span>}
|
||||
|
||||
<span key={`mob-pa-${reply.cid}`} className="poster-address-mobile address-mobile"
|
||||
<span key={`mob-pa-${index}`} className="poster-address-mobile address-mobile"
|
||||
id="reply-button" style={{cursor: "pointer"}}
|
||||
onClick={() => handleAddressClick(reply.author.shortAddress)}
|
||||
>
|
||||
(u/
|
||||
{reply.author?.shortAddress ?
|
||||
(
|
||||
<span key={`mob-ha-${reply.cid}`} className="highlight-address-mobile">
|
||||
<span key={`mob-ha-${index}`} className="highlight-address-mobile">
|
||||
{reply.author?.shortAddress}
|
||||
</span>
|
||||
) : (
|
||||
<span key={`mob-ha-${reply.cid}`}
|
||||
<span key={`mob-ha-${index}`}
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={account?.author?.address}
|
||||
data-tooltip-place="top"
|
||||
@@ -933,13 +933,13 @@ const Board = () => {
|
||||
}
|
||||
)
|
||||
</span>
|
||||
<br key={`mob-br-${reply.cid}`} />
|
||||
<br key={`mob-br-${index}`} />
|
||||
</span>
|
||||
<span key={`mob-dt-${reply.cid}`} className="date-time-mobile post-number-mobile">
|
||||
<span key={`mob-dt-${index}`} className="date-time-mobile post-number-mobile">
|
||||
{getDate(reply.timestamp)}
|
||||
<Link to={() => {}} key={`mob-pl1-${reply.cid}`} title="Link to this post">c/</Link>
|
||||
<Link to={() => {}} key={`mob-pl1-${index}`} title="Link to this post">c/</Link>
|
||||
{reply.shortCid ? (
|
||||
<Link to={`/p/${selectedAddress}/c/${thread.cid}`} id="reply-button" key={`mob-pl2-${reply.cid}`}
|
||||
<Link to={`/p/${selectedAddress}/c/${thread.cid}`} id="reply-button" key={`mob-pl2-${index}`}
|
||||
onClick={(e) => {
|
||||
if (e.button === 2) return;
|
||||
e.preventDefault();
|
||||
@@ -954,32 +954,32 @@ const Board = () => {
|
||||
</span>
|
||||
</div>
|
||||
{reply.link ? (
|
||||
<div key={`mob-f-${reply.cid}`} className="file-mobile">
|
||||
<a key={`link-a-${reply.cid}`} href={replyMediaInfo?.url} target="_blank" rel="noopener noreferrer">
|
||||
<div key={`mob-f-${index}`} className="file-mobile">
|
||||
<a key={`link-a-${index}`} href={replyMediaInfo?.url} target="_blank" rel="noopener noreferrer">
|
||||
{replyMediaInfo?.url ? (
|
||||
replyMediaInfo.type === "webpage" ? (
|
||||
<span key={`mob-ft${reply.cid}`} className="file-thumb-mobile">
|
||||
<img key={`mob-img-${reply.cid}`} src={reply.thumbnailUrl} alt="thumbnail" onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${reply.cid}`} className="file-info-mobile">{replyMediaInfo.type}</div>
|
||||
<img key={`mob-img-${index}`} src={reply.thumbnailUrl} alt="thumbnail" onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${index}`} className="file-info-mobile">{replyMediaInfo.type}</div>
|
||||
</span>
|
||||
) : replyMediaInfo.type === "image" ? (
|
||||
<span key={`mob-ft${reply.cid}`} className="file-thumb-mobile">
|
||||
<img key={`mob-img-${reply.cid}`} src={replyMediaInfo.url} alt={replyMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${reply.cid}`} className="file-info-mobile">{replyMediaInfo.type}</div>
|
||||
<img key={`mob-img-${index}`} src={replyMediaInfo.url} alt={replyMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${index}`} className="file-info-mobile">{replyMediaInfo.type}</div>
|
||||
</span>
|
||||
) : replyMediaInfo.type === "video" ? (
|
||||
<span key={`mob-ft${reply.cid}`} className="file-thumb-mobile">
|
||||
<video key={`fti-${reply.cid}`}
|
||||
<video key={`fti-${index}`}
|
||||
src={replyMediaInfo.url}
|
||||
alt={replyMediaInfo.type}
|
||||
style={{ pointerEvents: "none" }}
|
||||
onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${reply.cid}`} className="file-info-mobile">{replyMediaInfo.type}</div>
|
||||
<div key={`mob-fi-${index}`} className="file-info-mobile">{replyMediaInfo.type}</div>
|
||||
</span>
|
||||
) : replyMediaInfo.type === "audio" ? (
|
||||
<span key={`mob-ft${reply.cid}`} className="file-thumb-mobile">
|
||||
<audio key={`mob-img-${reply.cid}`} src={replyMediaInfo.url} alt={replyMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${reply.cid}`} className="file-info-mobile">{replyMediaInfo.type}</div>
|
||||
<audio key={`mob-img-${index}`} src={replyMediaInfo.url} alt={replyMediaInfo.type} onError={(e) => e.target.src = fallbackImgUrl} />
|
||||
<div key={`mob-fi-${index}`} className="file-info-mobile">{replyMediaInfo.type}</div>
|
||||
</span>
|
||||
) : null
|
||||
) : null}
|
||||
@@ -988,33 +988,33 @@ const Board = () => {
|
||||
) : null}
|
||||
{reply.content ? (
|
||||
reply.content?.length > 500 ?
|
||||
<Fragment key={`fragment15-${reply.cid}`}>
|
||||
<blockquote key={`mob-pm-${reply.cid}`} className="post-message">
|
||||
<Link to={() => {}} key={`mob-r-pm-${reply.cid}`} className="quotelink" onClick={(event) => handleQuoteClick(reply, shortParentCid, thread.shortCid, event)}>
|
||||
<Fragment key={`fragment15-${index}`}>
|
||||
<blockquote key={`mob-pm-${index}`} className="post-message">
|
||||
<Link to={() => {}} key={`mob-r-pm-${index}`} className="quotelink" onClick={(event) => handleQuoteClick(reply, shortParentCid, thread.shortCid, event)}>
|
||||
{`c/${shortParentCid}`}{shortParentCid === thread.shortCid ? " (OP)" : null}
|
||||
</Link>
|
||||
<Post content={reply.content?.slice(0, 500)} key={`post-mobile-${reply.cid}`} comment={reply} />
|
||||
<span key={`mob-ttl-s-${reply.cid}`} className="ttl"> (...)
|
||||
<br key={`mob-ttl-s-br1-${reply.cid}`} /><br key={`mob-ttl-s-br2${reply.cid}`} />
|
||||
<Post content={reply.content?.slice(0, 500)} key={`post-mobile-${index}`} comment={reply} />
|
||||
<span key={`mob-ttl-s-${index}`} className="ttl"> (...)
|
||||
<br key={`mob-ttl-s-br1-${index}`} /><br key={`mob-ttl-s-br2${reply.cid}`} />
|
||||
Comment too long.
|
||||
<Link key={`mob-ttl-l-${reply.cid}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="ttl-link">Click here</Link>
|
||||
<Link key={`mob-ttl-l-${index}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)} className="ttl-link">Click here</Link>
|
||||
to view. </span>
|
||||
</blockquote>
|
||||
</Fragment>
|
||||
: <blockquote key={`mob-pm-${reply.cid}`} className="post-message">
|
||||
<Link to={() => {}} key={`mob-r-pm-${reply.cid}`} className="quotelink" onClick={(event) => handleQuoteClick(reply, shortParentCid, thread.shortCid, event)}>
|
||||
: <blockquote key={`mob-pm-${index}`} className="post-message">
|
||||
<Link to={() => {}} key={`mob-r-pm-${index}`} className="quotelink" onClick={(event) => handleQuoteClick(reply, shortParentCid, thread.shortCid, event)}>
|
||||
{`c/${shortParentCid}`}{shortParentCid === thread.shortCid ? " (OP)" : null}
|
||||
</Link>
|
||||
<Post content={reply.content} key={`post-mobile-${reply.cid}`} comment={reply} />
|
||||
<Post content={reply.content} key={`post-mobile-${index}`} comment={reply} />
|
||||
</blockquote>)
|
||||
: null}
|
||||
{reply.replyCount > 0 ? (
|
||||
<div key={`back-mob-${reply.cid}`} className='backlink backlink-mobile'>
|
||||
<div key={`back-mob-${index}`} className='backlink backlink-mobile'>
|
||||
{reply.replies?.pages?.topAll.comments
|
||||
.sort((a, b) => a.timestamp - b.timestamp)
|
||||
.map((reply) => (
|
||||
<div key={`div-back${reply.cid}`} style={{display: 'inline-block'}}>
|
||||
<Link key={`ql-${reply.cid}`} to={() => {}}
|
||||
.map((reply, index) => (
|
||||
<div key={`div-back${index}`} style={{display: 'inline-block'}}>
|
||||
<Link key={`ql-${index}`} to={() => {}}
|
||||
onClick={(event) => handleQuoteClick(reply, reply.shortCid, event)} className="quote-link">
|
||||
c/{reply.shortCid}</Link>
|
||||
|
||||
|
||||
@@ -373,30 +373,30 @@ const Catalog = () => {
|
||||
loadMore={tryLoadMore}
|
||||
hasMore={hasMore}
|
||||
>
|
||||
{feed.map((thread) => {
|
||||
{feed.map((thread, index) => {
|
||||
const commentMediaInfo = getCommentMediaInfo(thread);
|
||||
const fallbackImgUrl = "/assets/filedeleted-res.gif";
|
||||
return (
|
||||
<Link style={{all: "unset", cursor: "pointer"}} key={`link-${thread.cid}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)}>
|
||||
<div key={`thread-${thread.cid}`} className="thread">
|
||||
<Link style={{all: "unset", cursor: "pointer"}} key={`link-${index}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)}>
|
||||
<div key={`thread-${index}`} className="thread">
|
||||
{commentMediaInfo?.url ? (
|
||||
<Fragment key="f-catalog">
|
||||
{commentMediaInfo?.type === "webpage" ? (
|
||||
<img key={`img-${thread.cid}`} alt="thread"
|
||||
<img key={`img-${index}`} 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"
|
||||
<img key={`img-${index}`} alt="thread"
|
||||
src={commentMediaInfo.url}
|
||||
onError={(e) => {
|
||||
e.target.src = fallbackImgUrl
|
||||
e.target.onerror = null;}} />
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "video" ? (
|
||||
<video key={`fti-${thread.cid}`}
|
||||
<video key={`fti-${index}`}
|
||||
src={commentMediaInfo.url}
|
||||
alt={commentMediaInfo.type}
|
||||
style={{ pointerEvents: "none" }}
|
||||
@@ -404,7 +404,7 @@ const Catalog = () => {
|
||||
) : null}
|
||||
{commentMediaInfo?.type === "audio" ? (
|
||||
<audio controls
|
||||
key={`fti-${thread.cid}`}
|
||||
key={`fti-${index}`}
|
||||
src={commentMediaInfo.url}
|
||||
alt={commentMediaInfo.type}
|
||||
style={{ pointerEvents: "none" }}
|
||||
@@ -412,15 +412,15 @@ const Catalog = () => {
|
||||
) : 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 key={`ti-${index}`} className="thread-icons" >
|
||||
<span key={`si-${index}`} className="thread-icon sticky-icon" title="Sticky"></span>
|
||||
</div> */}
|
||||
<div key={`meta-${thread.cid}`} className="meta" title="(R)eplies / (I)mage Replies" >
|
||||
<div key={`meta-${index}`} className="meta" title="(R)eplies / (I)mage Replies" >
|
||||
R:
|
||||
<b key={`b-${thread.cid}`}>{thread.replyCount}</b>
|
||||
<b key={`b-${index}`}>{thread.replyCount}</b>
|
||||
</div>
|
||||
<div key={`t-${thread.cid}`} className="teaser">
|
||||
<b key={`b2-${thread.cid}`}>{thread.title ? `${thread.title}` : null}</b>
|
||||
<div key={`t-${index}`} className="teaser">
|
||||
<b key={`b2-${index}`}>{thread.title ? `${thread.title}` : null}</b>
|
||||
{thread.content ? `: ${thread.content}` : null}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -793,7 +793,7 @@ const Thread = () => {
|
||||
const replyMediaInfo = getCommentMediaInfo(reply);
|
||||
const shortParentCid = findShortParentCid(reply.parentCid, comment);
|
||||
return (
|
||||
<div key={`${index}mob-rc-${index}`} className="reply-container">
|
||||
<div key={`mob-rc-${index}`} className="reply-container">
|
||||
<div key={`mob-pr-${index}`} className="post-reply post-reply-mobile">
|
||||
<div key={`mob-pi-${index}`} className="post-info-mobile">
|
||||
<button className="post-menu-button-mobile" title="Post menu" style={{ all: 'unset', cursor: 'pointer' }}>...</button>
|
||||
|
||||
Reference in New Issue
Block a user