mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
verify comment author addresses
This commit is contained in:
@@ -21,6 +21,7 @@ import Post from '../Post';
|
||||
import PostLoader from '../PostLoader';
|
||||
import PostOnHover from '../PostOnHover';
|
||||
import StateLabel from '../StateLabel';
|
||||
import VerifiedAuthor from '../VerifiedAuthor';
|
||||
import ReplyModal from '../modals/ReplyModal';
|
||||
import SettingsModal from '../modals/SettingsModal';
|
||||
import findShortParentCid from '../../utils/findShortParentCid';
|
||||
@@ -771,9 +772,9 @@ const All = () => {
|
||||
(u/
|
||||
<span key={`pa-${index}`} className="poster-address address-desktop"
|
||||
id="reply-button" style={{cursor: "pointer"}}
|
||||
onClick={() => handleAddressClick(thread.author.shortAddress)}
|
||||
onClick={() => handleAddressClick(<VerifiedAuthor commentCid={thread.cid}>{({ shortAuthorAddress }) => (shortAuthorAddress)}</VerifiedAuthor>)}
|
||||
>
|
||||
{thread.author.shortAddress}
|
||||
{<VerifiedAuthor commentCid={thread.cid}>{({ shortAuthorAddress }) => (shortAuthorAddress)}</VerifiedAuthor>}
|
||||
</span>)
|
||||
|
||||
<span key={`dt-${index}`} className="date-time" data-utc="data">{getDate(thread.timestamp)}</span>
|
||||
@@ -848,8 +849,8 @@ const All = () => {
|
||||
>
|
||||
<ul className="post-menu-catalog">
|
||||
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
||||
{thread.author.address === account?.author.address ||
|
||||
thread.author.address === account?.signer.address ? (
|
||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
||||
<>
|
||||
<li onClick={() => {handleAuthorEditClick(thread); setSelectedAddress(thread.subplebbitAddress);}}>Edit post</li>
|
||||
<li onClick={() => {handleAuthorDeleteClick(thread); setSelectedAddress(thread.subplebbitAddress);}}>Delete post</li>
|
||||
@@ -857,8 +858,8 @@ const All = () => {
|
||||
) : null}
|
||||
{isModerator ? (
|
||||
<>
|
||||
{thread.author.address === account?.author.address ||
|
||||
thread.author.address === account?.signer.address ? (
|
||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
||||
null
|
||||
) : (
|
||||
<li onClick={() => {
|
||||
@@ -1043,7 +1044,7 @@ const All = () => {
|
||||
|
||||
<span key={`pa-${index}`} className="poster-address address-desktop"
|
||||
id="reply-button" style={{cursor: "pointer"}}
|
||||
onClick={() => handleAddressClick(reply.author.shortAddress)}
|
||||
onClick={() => handleAddressClick(<VerifiedAuthor commentCid={reply.cid}>{({ shortAuthorAddress }) => (shortAuthorAddress)}</VerifiedAuthor>)}
|
||||
>
|
||||
(u/
|
||||
{reply.author?.shortAddress ?
|
||||
@@ -1138,8 +1139,8 @@ const All = () => {
|
||||
>
|
||||
<ul className="post-menu-catalog">
|
||||
<li onClick={() => handleOptionClick(reply.cid)}>Hide post</li>
|
||||
{reply.author.address === account?.author.address ||
|
||||
reply.author.address === account?.signer.address ? (
|
||||
{<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
||||
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
||||
<>
|
||||
<li onClick={() => {handleAuthorEditClick(reply); setSelectedAddress(thread.subplebbitAddress);}}>Edit post</li>
|
||||
<li onClick={() => {handleAuthorDeleteClick(reply); setSelectedAddress(thread.subplebbitAddress);}}>Delete post</li>
|
||||
@@ -1147,8 +1148,8 @@ const All = () => {
|
||||
) : null}
|
||||
{isModerator ? (
|
||||
<>
|
||||
{reply.author.address === account?.author.address ||
|
||||
reply.author.address === account?.signer.address ? (
|
||||
{<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
||||
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
||||
null
|
||||
) : (
|
||||
<li onClick={() => {
|
||||
@@ -1563,11 +1564,11 @@ const All = () => {
|
||||
|
||||
<span key={`mob-pa-${index}`} className="poster-address-mobile address-mobile"
|
||||
id="reply-button" style={{cursor: "pointer"}}
|
||||
onClick={() => handleAddressClick(thread.author.shortAddress)}
|
||||
onClick={() => handleAddressClick(<VerifiedAuthor commentCid={thread.cid}>{({ shortAuthorAddress }) => (shortAuthorAddress)}</VerifiedAuthor>)}
|
||||
>
|
||||
(u/
|
||||
<span key={`mob-ha-${index}`} className="highlight-address-mobile">
|
||||
{thread.author.shortAddress}
|
||||
{<VerifiedAuthor commentCid={thread.cid}>{({ shortAuthorAddress }) => (shortAuthorAddress)}</VerifiedAuthor>}
|
||||
</span>
|
||||
)
|
||||
</span>
|
||||
@@ -1803,7 +1804,7 @@ const All = () => {
|
||||
|
||||
<span key={`mob-pa-${index}`} className="poster-address-mobile address-mobile"
|
||||
id="reply-button" style={{cursor: "pointer"}}
|
||||
onClick={() => handleAddressClick(reply.author.shortAddress)}
|
||||
onClick={() => handleAddressClick(<VerifiedAuthor commentCid={reply.cid}>{({ shortAuthorAddress }) => (shortAuthorAddress)}</VerifiedAuthor>)}
|
||||
>
|
||||
(u/
|
||||
{reply.author?.shortAddress ?
|
||||
|
||||
Reference in New Issue
Block a user