This commit is contained in:
Danish Arora 2025-09-15 13:59:37 +05:30
parent 5c1de2c77b
commit 55a753d6aa
No known key found for this signature in database
GPG Key ID: 1C6EF37CDAE1426E
4 changed files with 12 additions and 22 deletions

View File

@ -83,7 +83,7 @@ const PostCard: React.FC<PostCardProps> = ({ post, commentCount = 0 }) => {
}`} }`}
onClick={e => handleVote(e, true)} onClick={e => handleVote(e, true)}
disabled={!canVote || isVoting} disabled={!canVote || isVoting}
title={canVote ? 'Upvote' : 'Connect wallet and verify to vote'} title={canVote ? 'Upvote' : 'Connect wallet to vote'}
> >
<ArrowUp className="w-5 h-5" /> <ArrowUp className="w-5 h-5" />
</button> </button>
@ -108,7 +108,7 @@ const PostCard: React.FC<PostCardProps> = ({ post, commentCount = 0 }) => {
}`} }`}
onClick={e => handleVote(e, false)} onClick={e => handleVote(e, false)}
disabled={!canVote || isVoting} disabled={!canVote || isVoting}
title={canVote ? 'Downvote' : 'Connect wallet and verify to vote'} title={canVote ? 'Downvote' : 'Connect wallet to vote'}
> >
<ArrowDown className="w-5 h-5" /> <ArrowDown className="w-5 h-5" />
</button> </button>

View File

@ -175,9 +175,7 @@ const PostDetail = () => {
}`} }`}
onClick={() => handleVotePost(true)} onClick={() => handleVotePost(true)}
disabled={!canVote || isVoting} disabled={!canVote || isVoting}
title={ title={canVote ? 'Upvote post' : 'Connect wallet to vote'}
canVote ? 'Upvote post' : 'Connect wallet and verify to vote'
}
> >
<ArrowUp className="w-4 h-4" /> <ArrowUp className="w-4 h-4" />
</button> </button>
@ -188,11 +186,7 @@ const PostDetail = () => {
}`} }`}
onClick={() => handleVotePost(false)} onClick={() => handleVotePost(false)}
disabled={!canVote || isVoting} disabled={!canVote || isVoting}
title={ title={canVote ? 'Downvote post' : 'Connect wallet to vote'}
canVote
? 'Downvote post'
: 'Connect wallet and verify to vote'
}
> >
<ArrowDown className="w-4 h-4" /> <ArrowDown className="w-4 h-4" />
</button> </button>

View File

@ -249,18 +249,18 @@ const PostList = () => {
)} )}
{!canPost && {!canPost &&
verificationStatus === EVerificationStatus.WALLET_CONNECTED && ( verificationStatus === EVerificationStatus.WALLET_UNCONNECTED && (
<div className="section-spacing content-card-sm"> <div className="section-spacing content-card-sm">
<div className="flex items-center gap-2 mb-2"> <div className="flex items-center gap-2 mb-2">
<Eye className="w-4 h-4 text-cyber-neutral" /> <Eye className="w-4 h-4 text-cyber-neutral" />
<h3 className="font-medium">Read-Only Mode</h3> <h3 className="font-medium">Read-Only Mode</h3>
</div> </div>
<p className="text-sm text-cyber-neutral mb-2"> <p className="text-sm text-cyber-neutral mb-2">
Your wallet does not contain any Ordinal Operators. You can browse You are not connected. You can browse threads but cannot post or
threads but cannot post or interact. interact.
</p> </p>
<Badge variant="outline" className="text-xs"> <Badge variant="outline" className="text-xs">
No Ordinals Found Wallet Not Connected
</Badge> </Badge>
</div> </div>
)} )}
@ -284,7 +284,7 @@ const PostList = () => {
<p className="empty-state-description"> <p className="empty-state-description">
{canPost {canPost
? 'Be the first to post in this cell!' ? 'Be the first to post in this cell!'
: 'Connect your wallet and verify Ordinal ownership to start a thread.'} : 'Connect your wallet to start a thread.'}
</p> </p>
</div> </div>
) : ( ) : (
@ -296,9 +296,7 @@ const PostList = () => {
className={`p-1 rounded-sm hover:bg-cyber-muted/50 ${getPostVoteType(post.id) === 'upvote' ? 'text-cyber-accent' : ''}`} className={`p-1 rounded-sm hover:bg-cyber-muted/50 ${getPostVoteType(post.id) === 'upvote' ? 'text-cyber-accent' : ''}`}
onClick={() => handleVotePost(post.id, true)} onClick={() => handleVotePost(post.id, true)}
disabled={!canVote || isVoting} disabled={!canVote || isVoting}
title={ title={canVote ? 'Upvote' : 'Connect wallet to vote'}
canVote ? 'Upvote' : 'Connect wallet and verify to vote'
}
> >
<ArrowUp className="w-4 h-4" /> <ArrowUp className="w-4 h-4" />
</button> </button>
@ -309,9 +307,7 @@ const PostList = () => {
className={`p-1 rounded-sm hover:bg-cyber-muted/50 ${getPostVoteType(post.id) === 'downvote' ? 'text-cyber-accent' : ''}`} className={`p-1 rounded-sm hover:bg-cyber-muted/50 ${getPostVoteType(post.id) === 'downvote' ? 'text-cyber-accent' : ''}`}
onClick={() => handleVotePost(post.id, false)} onClick={() => handleVotePost(post.id, false)}
disabled={!canVote || isVoting} disabled={!canVote || isVoting}
title={ title={canVote ? 'Downvote' : 'Connect wallet to vote'}
canVote ? 'Downvote' : 'Connect wallet and verify to vote'
}
> >
<ArrowDown className="w-4 h-4" /> <ArrowDown className="w-4 h-4" />
</button> </button>

View File

@ -154,7 +154,7 @@ export function useForumActions(): ForumActions {
if (!permissions.canPost) { if (!permissions.canPost) {
toast({ toast({
title: 'Permission Denied', title: 'Permission Denied',
description: 'You need to verify Ordinal ownership to create posts.', description: permissions.postReason,
variant: 'destructive', variant: 'destructive',
}); });
return null; return null;