mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix verified author actions
This commit is contained in:
@@ -849,40 +849,44 @@ const All = () => {
|
|||||||
>
|
>
|
||||||
<ul className="post-menu-catalog">
|
<ul className="post-menu-catalog">
|
||||||
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
||||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (
|
||||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
<>
|
<>
|
||||||
<li onClick={() => {handleAuthorEditClick(thread); setSelectedAddress(thread.subplebbitAddress);}}>Edit post</li>
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => {handleAuthorDeleteClick(thread); setSelectedAddress(thread.subplebbitAddress);}}>Delete post</li>
|
authorAddress === account?.signer.address ? (
|
||||||
|
<>
|
||||||
|
<li onClick={() => handleAuthorEditClick(thread)}>Edit post</li>
|
||||||
|
<li onClick={() => handleAuthorDeleteClick(thread)}>Delete post</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
{isModerator ? (
|
||||||
|
<>
|
||||||
|
{authorAddress === account?.author.address ||
|
||||||
|
authorAddress === account?.signer.address ? (
|
||||||
|
null
|
||||||
|
) : (
|
||||||
|
<li onClick={() => {
|
||||||
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
|
setModeratingCommentCid(thread.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(thread.cid);
|
||||||
|
setDeletePost(true);
|
||||||
|
}}>
|
||||||
|
Delete post
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
<li
|
||||||
|
onClick={() => {
|
||||||
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
|
setModeratingCommentCid(thread.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(thread.cid);
|
||||||
|
}}>
|
||||||
|
Mod tools
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
</>
|
</>
|
||||||
) : null}
|
)}</VerifiedAuthor>
|
||||||
{isModerator ? (
|
|
||||||
<>
|
|
||||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
|
||||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
null
|
|
||||||
) : (
|
|
||||||
<li onClick={() => {
|
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
|
||||||
setModeratingCommentCid(thread.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(thread.cid);
|
|
||||||
setDeletePost(true);
|
|
||||||
}}>
|
|
||||||
Delete post
|
|
||||||
</li>
|
|
||||||
)}
|
|
||||||
<li
|
|
||||||
onClick={() => {
|
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
|
||||||
setModeratingCommentCid(thread.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(thread.cid);
|
|
||||||
}}>
|
|
||||||
Mod tools
|
|
||||||
</li>
|
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
{(commentMediaInfo && (
|
{(commentMediaInfo && (
|
||||||
commentMediaInfo.type === 'image' ||
|
commentMediaInfo.type === 'image' ||
|
||||||
(commentMediaInfo.type === 'webpage' &&
|
(commentMediaInfo.type === 'webpage' &&
|
||||||
@@ -1139,40 +1143,44 @@ const All = () => {
|
|||||||
>
|
>
|
||||||
<ul className="post-menu-catalog">
|
<ul className="post-menu-catalog">
|
||||||
<li onClick={() => handleOptionClick(reply.cid)}>Hide post</li>
|
<li onClick={() => handleOptionClick(reply.cid)}>Hide post</li>
|
||||||
{<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (
|
||||||
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
<>
|
<>
|
||||||
<li onClick={() => {handleAuthorEditClick(reply); setSelectedAddress(thread.subplebbitAddress);}}>Edit post</li>
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => {handleAuthorDeleteClick(reply); setSelectedAddress(thread.subplebbitAddress);}}>Delete post</li>
|
authorAddress === account?.signer.address ? (
|
||||||
</>
|
<>
|
||||||
) : null}
|
<li onClick={() => handleAuthorEditClick(reply)}>Edit post</li>
|
||||||
{isModerator ? (
|
<li onClick={() => handleAuthorDeleteClick(reply)}>Delete post</li>
|
||||||
<>
|
</>
|
||||||
{<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
) : null}
|
||||||
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
{isModerator ? (
|
||||||
null
|
<>
|
||||||
) : (
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => {
|
authorAddress === account?.signer.address ? (
|
||||||
|
null
|
||||||
|
) : (
|
||||||
|
<li onClick={() => {
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
setModeratingCommentCid(reply.cid)
|
setModeratingCommentCid(reply.cid)
|
||||||
setIsModerationOpen(true);
|
setIsModerationOpen(true);
|
||||||
handleOptionClick(reply.cid);
|
handleOptionClick(reply.cid);
|
||||||
setDeletePost(true);
|
setDeletePost(true);
|
||||||
|
}}>
|
||||||
|
Delete post
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
<li
|
||||||
|
onClick={() => {
|
||||||
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
|
setModeratingCommentCid(reply.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(reply.cid);
|
||||||
}}>
|
}}>
|
||||||
Delete post
|
Mod tools
|
||||||
</li>
|
</li>
|
||||||
)}
|
</>
|
||||||
<li
|
) : null}
|
||||||
onClick={() => {
|
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
|
||||||
setModeratingCommentCid(reply.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(reply.cid);
|
|
||||||
}}>
|
|
||||||
Mod tools
|
|
||||||
</li>
|
|
||||||
</>
|
</>
|
||||||
) : null}
|
)}</VerifiedAuthor>
|
||||||
{(replyMediaInfo && (
|
{(replyMediaInfo && (
|
||||||
replyMediaInfo.type === 'image' ||
|
replyMediaInfo.type === 'image' ||
|
||||||
(replyMediaInfo.type === 'webpage' &&
|
(replyMediaInfo.type === 'webpage' &&
|
||||||
|
|||||||
@@ -560,40 +560,44 @@ const AllCatalog = () => {
|
|||||||
>
|
>
|
||||||
<ul className="post-menu-catalog">
|
<ul className="post-menu-catalog">
|
||||||
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
||||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (
|
||||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
<>
|
<>
|
||||||
<li onClick={() => handleAuthorEditClick(thread)}>Edit post</li>
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => handleAuthorDeleteClick(thread)}>Delete post</li>
|
authorAddress === account?.signer.address ? (
|
||||||
|
<>
|
||||||
|
<li onClick={() => handleAuthorEditClick(thread)}>Edit post</li>
|
||||||
|
<li onClick={() => handleAuthorDeleteClick(thread)}>Delete post</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
{isModerator ? (
|
||||||
|
<>
|
||||||
|
{authorAddress === account?.author.address ||
|
||||||
|
authorAddress === account?.signer.address ? (
|
||||||
|
null
|
||||||
|
) : (
|
||||||
|
<li onClick={() => {
|
||||||
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
|
setModeratingCommentCid(thread.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(thread.cid);
|
||||||
|
setDeletePost(true);
|
||||||
|
}}>
|
||||||
|
Delete post
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
<li
|
||||||
|
onClick={() => {
|
||||||
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
|
setModeratingCommentCid(thread.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(thread.cid);
|
||||||
|
}}>
|
||||||
|
Mod tools
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
</>
|
</>
|
||||||
) : null}
|
)}</VerifiedAuthor>
|
||||||
{isModerator ? (
|
|
||||||
<>
|
|
||||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
|
||||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
null
|
|
||||||
) : (
|
|
||||||
<li onClick={() => {
|
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
|
||||||
setModeratingCommentCid(thread.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(thread.cid);
|
|
||||||
setDeletePost(true);
|
|
||||||
}}>
|
|
||||||
Delete post
|
|
||||||
</li>
|
|
||||||
)}
|
|
||||||
<li
|
|
||||||
onClick={() => {
|
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
|
||||||
setModeratingCommentCid(thread.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(thread.cid);
|
|
||||||
}}>
|
|
||||||
Mod tools
|
|
||||||
</li>
|
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
{(commentMediaInfo && (
|
{(commentMediaInfo && (
|
||||||
commentMediaInfo.type === 'image' ||
|
commentMediaInfo.type === 'image' ||
|
||||||
(commentMediaInfo.type === 'webpage' &&
|
(commentMediaInfo.type === 'webpage' &&
|
||||||
|
|||||||
+1382
-1372
File diff suppressed because it is too large
Load Diff
@@ -1008,38 +1008,42 @@ const Catalog = () => {
|
|||||||
>
|
>
|
||||||
<ul className="post-menu-catalog">
|
<ul className="post-menu-catalog">
|
||||||
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
||||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (
|
||||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
<>
|
<>
|
||||||
<li onClick={() => handleAuthorEditClick(thread)}>Edit post</li>
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => handleAuthorDeleteClick(thread)}>Delete post</li>
|
authorAddress === account?.signer.address ? (
|
||||||
|
<>
|
||||||
|
<li onClick={() => handleAuthorEditClick(thread)}>Edit post</li>
|
||||||
|
<li onClick={() => handleAuthorDeleteClick(thread)}>Delete post</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
{isModerator ? (
|
||||||
|
<>
|
||||||
|
{authorAddress === account?.author.address ||
|
||||||
|
authorAddress === account?.signer.address ? (
|
||||||
|
null
|
||||||
|
) : (
|
||||||
|
<li onClick={() => {
|
||||||
|
setModeratingCommentCid(thread.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(thread.cid);
|
||||||
|
setDeletePost(true);
|
||||||
|
}}>
|
||||||
|
Delete post
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
<li
|
||||||
|
onClick={() => {
|
||||||
|
setModeratingCommentCid(thread.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(thread.cid);
|
||||||
|
}}>
|
||||||
|
Mod tools
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
</>
|
</>
|
||||||
) : null}
|
)}</VerifiedAuthor>
|
||||||
{isModerator ? (
|
|
||||||
<>
|
|
||||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
|
||||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
null
|
|
||||||
) : (
|
|
||||||
<li onClick={() => {
|
|
||||||
setModeratingCommentCid(thread.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(thread.cid);
|
|
||||||
setDeletePost(true);
|
|
||||||
}}>
|
|
||||||
Delete post
|
|
||||||
</li>
|
|
||||||
)}
|
|
||||||
<li
|
|
||||||
onClick={() => {
|
|
||||||
setModeratingCommentCid(thread.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(thread.cid);
|
|
||||||
}}>
|
|
||||||
Mod tools
|
|
||||||
</li>
|
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
{(commentMediaInfo && (
|
{(commentMediaInfo && (
|
||||||
commentMediaInfo.type === 'image' ||
|
commentMediaInfo.type === 'image' ||
|
||||||
(commentMediaInfo.type === 'webpage' &&
|
(commentMediaInfo.type === 'webpage' &&
|
||||||
|
|||||||
@@ -860,40 +860,44 @@ const Subscriptions = () => {
|
|||||||
>
|
>
|
||||||
<ul className="post-menu-catalog">
|
<ul className="post-menu-catalog">
|
||||||
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
||||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (
|
||||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
<>
|
<>
|
||||||
<li onClick={() => {handleAuthorEditClick(thread); setSelectedAddress(thread.subplebbitAddress);}}>Edit post</li>
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => {handleAuthorDeleteClick(thread); setSelectedAddress(thread.subplebbitAddress);}}>Delete post</li>
|
authorAddress === account?.signer.address ? (
|
||||||
|
<>
|
||||||
|
<li onClick={() => handleAuthorEditClick(thread)}>Edit post</li>
|
||||||
|
<li onClick={() => handleAuthorDeleteClick(thread)}>Delete post</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
{isModerator ? (
|
||||||
|
<>
|
||||||
|
{authorAddress === account?.author.address ||
|
||||||
|
authorAddress === account?.signer.address ? (
|
||||||
|
null
|
||||||
|
) : (
|
||||||
|
<li onClick={() => {
|
||||||
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
|
setModeratingCommentCid(thread.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(thread.cid);
|
||||||
|
setDeletePost(true);
|
||||||
|
}}>
|
||||||
|
Delete post
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
<li
|
||||||
|
onClick={() => {
|
||||||
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
|
setModeratingCommentCid(thread.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(thread.cid);
|
||||||
|
}}>
|
||||||
|
Mod tools
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
</>
|
</>
|
||||||
) : null}
|
)}</VerifiedAuthor>
|
||||||
{isModerator ? (
|
|
||||||
<>
|
|
||||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
|
||||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
null
|
|
||||||
) : (
|
|
||||||
<li onClick={() => {
|
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
|
||||||
setModeratingCommentCid(thread.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(thread.cid);
|
|
||||||
setDeletePost(true);
|
|
||||||
}}>
|
|
||||||
Delete post
|
|
||||||
</li>
|
|
||||||
)}
|
|
||||||
<li
|
|
||||||
onClick={() => {
|
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
|
||||||
setModeratingCommentCid(thread.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(thread.cid);
|
|
||||||
}}>
|
|
||||||
Mod tools
|
|
||||||
</li>
|
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
{(commentMediaInfo && (
|
{(commentMediaInfo && (
|
||||||
commentMediaInfo.type === 'image' ||
|
commentMediaInfo.type === 'image' ||
|
||||||
(commentMediaInfo.type === 'webpage' &&
|
(commentMediaInfo.type === 'webpage' &&
|
||||||
@@ -1150,40 +1154,44 @@ const Subscriptions = () => {
|
|||||||
>
|
>
|
||||||
<ul className="post-menu-catalog">
|
<ul className="post-menu-catalog">
|
||||||
<li onClick={() => handleOptionClick(reply.cid)}>Hide post</li>
|
<li onClick={() => handleOptionClick(reply.cid)}>Hide post</li>
|
||||||
{<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (
|
||||||
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
<>
|
<>
|
||||||
<li onClick={() => {handleAuthorEditClick(reply); setSelectedAddress(thread.subplebbitAddress);}}>Edit post</li>
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => {handleAuthorDeleteClick(reply); setSelectedAddress(thread.subplebbitAddress);}}>Delete post</li>
|
authorAddress === account?.signer.address ? (
|
||||||
</>
|
<>
|
||||||
) : null}
|
<li onClick={() => handleAuthorEditClick(reply)}>Edit post</li>
|
||||||
{isModerator ? (
|
<li onClick={() => handleAuthorDeleteClick(reply)}>Delete post</li>
|
||||||
<>
|
</>
|
||||||
{<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
) : null}
|
||||||
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
{isModerator ? (
|
||||||
null
|
<>
|
||||||
) : (
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => {
|
authorAddress === account?.signer.address ? (
|
||||||
|
null
|
||||||
|
) : (
|
||||||
|
<li onClick={() => {
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
setModeratingCommentCid(reply.cid)
|
setModeratingCommentCid(reply.cid)
|
||||||
setIsModerationOpen(true);
|
setIsModerationOpen(true);
|
||||||
handleOptionClick(reply.cid);
|
handleOptionClick(reply.cid);
|
||||||
setDeletePost(true);
|
setDeletePost(true);
|
||||||
|
}}>
|
||||||
|
Delete post
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
<li
|
||||||
|
onClick={() => {
|
||||||
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
|
setModeratingCommentCid(reply.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(reply.cid);
|
||||||
}}>
|
}}>
|
||||||
Delete post
|
Mod tools
|
||||||
</li>
|
</li>
|
||||||
)}
|
</>
|
||||||
<li
|
) : null}
|
||||||
onClick={() => {
|
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
|
||||||
setModeratingCommentCid(reply.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(reply.cid);
|
|
||||||
}}>
|
|
||||||
Mod tools
|
|
||||||
</li>
|
|
||||||
</>
|
</>
|
||||||
) : null}
|
)}</VerifiedAuthor>
|
||||||
{(replyMediaInfo && (
|
{(replyMediaInfo && (
|
||||||
replyMediaInfo.type === 'image' ||
|
replyMediaInfo.type === 'image' ||
|
||||||
(replyMediaInfo.type === 'webpage' &&
|
(replyMediaInfo.type === 'webpage' &&
|
||||||
|
|||||||
@@ -564,40 +564,44 @@ const SubscriptionsCatalog = () => {
|
|||||||
>
|
>
|
||||||
<ul className="post-menu-catalog">
|
<ul className="post-menu-catalog">
|
||||||
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
<li onClick={() => handleOptionClick(thread.cid)}>Hide thread</li>
|
||||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (
|
||||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
<>
|
<>
|
||||||
<li onClick={() => handleAuthorEditClick(thread)}>Edit post</li>
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => handleAuthorDeleteClick(thread)}>Delete post</li>
|
authorAddress === account?.signer.address ? (
|
||||||
|
<>
|
||||||
|
<li onClick={() => handleAuthorEditClick(thread)}>Edit post</li>
|
||||||
|
<li onClick={() => handleAuthorDeleteClick(thread)}>Delete post</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
{isModerator ? (
|
||||||
|
<>
|
||||||
|
{authorAddress === account?.author.address ||
|
||||||
|
authorAddress === account?.signer.address ? (
|
||||||
|
null
|
||||||
|
) : (
|
||||||
|
<li onClick={() => {
|
||||||
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
|
setModeratingCommentCid(thread.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(thread.cid);
|
||||||
|
setDeletePost(true);
|
||||||
|
}}>
|
||||||
|
Delete post
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
<li
|
||||||
|
onClick={() => {
|
||||||
|
setSelectedAddress(thread.subplebbitAddress);
|
||||||
|
setModeratingCommentCid(thread.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(thread.cid);
|
||||||
|
}}>
|
||||||
|
Mod tools
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
</>
|
</>
|
||||||
) : null}
|
)}</VerifiedAuthor>
|
||||||
{isModerator ? (
|
|
||||||
<>
|
|
||||||
{<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
|
||||||
<VerifiedAuthor commentCid={thread.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
null
|
|
||||||
) : (
|
|
||||||
<li onClick={() => {
|
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
|
||||||
setModeratingCommentCid(thread.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(thread.cid);
|
|
||||||
setDeletePost(true);
|
|
||||||
}}>
|
|
||||||
Delete post
|
|
||||||
</li>
|
|
||||||
)}
|
|
||||||
<li
|
|
||||||
onClick={() => {
|
|
||||||
setSelectedAddress(thread.subplebbitAddress);
|
|
||||||
setModeratingCommentCid(thread.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(thread.cid);
|
|
||||||
}}>
|
|
||||||
Mod tools
|
|
||||||
</li>
|
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
{(commentMediaInfo && (
|
{(commentMediaInfo && (
|
||||||
commentMediaInfo.type === 'image' ||
|
commentMediaInfo.type === 'image' ||
|
||||||
(commentMediaInfo.type === 'webpage' &&
|
(commentMediaInfo.type === 'webpage' &&
|
||||||
|
|||||||
@@ -1024,38 +1024,42 @@ const Thread = () => {
|
|||||||
>
|
>
|
||||||
<ul className="post-menu-catalog">
|
<ul className="post-menu-catalog">
|
||||||
<li onClick={() => handleOptionClick(comment.cid)}>Hide thread</li>
|
<li onClick={() => handleOptionClick(comment.cid)}>Hide thread</li>
|
||||||
{<VerifiedAuthor commentCid={comment.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
<VerifiedAuthor commentCid={comment.cid}>{({ authorAddress }) => (
|
||||||
<VerifiedAuthor commentCid={comment.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
<>
|
<>
|
||||||
<li onClick={() => handleAuthorEditClick(comment)}>Edit post</li>
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => handleAuthorDeleteClick(comment)}>Delete post</li>
|
authorAddress === account?.signer.address ? (
|
||||||
</>
|
<>
|
||||||
) : null}
|
<li onClick={() => handleAuthorEditClick(comment)}>Edit post</li>
|
||||||
{isModerator ? (
|
<li onClick={() => handleAuthorDeleteClick(comment)}>Delete post</li>
|
||||||
<>
|
</>
|
||||||
{<VerifiedAuthor commentCid={comment.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
) : null}
|
||||||
<VerifiedAuthor commentCid={comment.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
{isModerator ? (
|
||||||
null
|
<>
|
||||||
) : (
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => {
|
authorAddress === account?.signer.address ? (
|
||||||
|
null
|
||||||
|
) : (
|
||||||
|
<li onClick={() => {
|
||||||
|
setModeratingCommentCid(comment.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(comment.cid);
|
||||||
|
setDeletePost(true);
|
||||||
|
}}>
|
||||||
|
Delete post
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
<li
|
||||||
|
onClick={() => {
|
||||||
setModeratingCommentCid(comment.cid)
|
setModeratingCommentCid(comment.cid)
|
||||||
setIsModerationOpen(true);
|
setIsModerationOpen(true);
|
||||||
handleOptionClick(comment.cid);
|
handleOptionClick(comment.cid);
|
||||||
setDeletePost(true);
|
|
||||||
}}>
|
}}>
|
||||||
Delete post
|
Mod tools
|
||||||
</li>
|
</li>
|
||||||
)}
|
</>
|
||||||
<li
|
) : null}
|
||||||
onClick={() => {
|
</>
|
||||||
setModeratingCommentCid(comment.cid)
|
)}</VerifiedAuthor>
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(comment.cid);
|
|
||||||
}}>
|
|
||||||
Mod tools
|
|
||||||
</li>
|
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
{(commentMediaInfo && (
|
{(commentMediaInfo && (
|
||||||
commentMediaInfo.type === 'image' ||
|
commentMediaInfo.type === 'image' ||
|
||||||
(commentMediaInfo.type === 'webpage' &&
|
(commentMediaInfo.type === 'webpage' &&
|
||||||
@@ -1272,38 +1276,42 @@ const Thread = () => {
|
|||||||
>
|
>
|
||||||
<ul className="post-menu-catalog">
|
<ul className="post-menu-catalog">
|
||||||
<li onClick={() => handleOptionClick(reply.cid)}>Hide post</li>
|
<li onClick={() => handleOptionClick(reply.cid)}>Hide post</li>
|
||||||
{<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (
|
||||||
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
<>
|
<>
|
||||||
<li onClick={() => handleAuthorEditClick(reply)}>Edit post</li>
|
{authorAddress === account?.author.address ||
|
||||||
<li onClick={() => handleAuthorDeleteClick(reply)}>Delete post</li>
|
authorAddress === account?.signer.address ? (
|
||||||
|
<>
|
||||||
|
<li onClick={() => handleAuthorEditClick(reply)}>Edit post</li>
|
||||||
|
<li onClick={() => handleAuthorDeleteClick(reply)}>Delete post</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
{isModerator ? (
|
||||||
|
<>
|
||||||
|
{authorAddress === account?.author.address ||
|
||||||
|
authorAddress === account?.signer.address ? (
|
||||||
|
null
|
||||||
|
) : (
|
||||||
|
<li onClick={() => {
|
||||||
|
setModeratingCommentCid(reply.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(reply.cid);
|
||||||
|
setDeletePost(true);
|
||||||
|
}}>
|
||||||
|
Delete post
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
<li
|
||||||
|
onClick={() => {
|
||||||
|
setModeratingCommentCid(reply.cid)
|
||||||
|
setIsModerationOpen(true);
|
||||||
|
handleOptionClick(reply.cid);
|
||||||
|
}}>
|
||||||
|
Mod tools
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
</>
|
</>
|
||||||
) : null}
|
)}</VerifiedAuthor>
|
||||||
{isModerator ? (
|
|
||||||
<>
|
|
||||||
{<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.author.address ||
|
|
||||||
<VerifiedAuthor commentCid={reply.cid}>{({ authorAddress }) => (authorAddress)}</VerifiedAuthor> === account?.signer.address ? (
|
|
||||||
null
|
|
||||||
) : (
|
|
||||||
<li onClick={() => {
|
|
||||||
setModeratingCommentCid(reply.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(reply.cid);
|
|
||||||
setDeletePost(true);
|
|
||||||
}}>
|
|
||||||
Delete post
|
|
||||||
</li>
|
|
||||||
)}
|
|
||||||
<li
|
|
||||||
onClick={() => {
|
|
||||||
setModeratingCommentCid(reply.cid)
|
|
||||||
setIsModerationOpen(true);
|
|
||||||
handleOptionClick(reply.cid);
|
|
||||||
}}>
|
|
||||||
Mod tools
|
|
||||||
</li>
|
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
{(replyMediaInfo && (
|
{(replyMediaInfo && (
|
||||||
replyMediaInfo.type === 'image' ||
|
replyMediaInfo.type === 'image' ||
|
||||||
(replyMediaInfo.type === 'webpage' &&
|
(replyMediaInfo.type === 'webpage' &&
|
||||||
|
|||||||
Reference in New Issue
Block a user