diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index ad70212..6274507 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -4,8 +4,8 @@ import { useAuth } from '@/contexts/AuthContext';
import { useForum } from '@/contexts/ForumContext';
import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
-import { ShieldCheck, LogOut, Terminal, Wifi, WifiOff, Eye, MessageSquare, RefreshCw, Key } from 'lucide-react';
-import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
+import { ShieldCheck, LogOut, Terminal, Wifi, WifiOff, AlertTriangle, CheckCircle, Key, RefreshCw, CircleSlash } from 'lucide-react';
+import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
const Header = () => {
const {
@@ -37,20 +37,18 @@ const Header = () => {
await delegateKey();
};
- // Format delegation time remaining for display
const formatDelegationTime = () => {
if (!isDelegationValid()) return null;
const timeRemaining = delegationTimeRemaining();
const hours = Math.floor(timeRemaining / (1000 * 60 * 60));
const minutes = Math.floor((timeRemaining % (1000 * 60 * 60)) / (1000 * 60));
-
- return `${hours}h ${minutes}m`;
+
+ return `${hours}h ${minutes}m`;
};
const renderDelegationButton = () => {
- // Only show delegation button for verified Ordinal owners
- if (verificationStatus !== 'verified-owner') return null;
+ if (verificationStatus !== 'verified-owner') return null;
const hasValidDelegation = isDelegationValid();
const timeRemaining = formatDelegationTime();
@@ -61,22 +59,20 @@ const Header = () => {
-
+
{hasValidDelegation ? (
- You have a delegated browser key active for {timeRemaining}.
- You won't need to sign messages with your wallet for most actions.
+ Browser key active for ~{timeRemaining}. Wallet signatures not needed for most actions.
) : (
- Delegate a browser key to avoid signing every action with your wallet.
- Improves UX by reducing wallet popups for 24 hours.
+ Delegate a browser key for 24h to avoid constant wallet signing.
)}
@@ -86,15 +82,23 @@ const Header = () => {
const renderAccessBadge = () => {
if (verificationStatus === 'unverified') {
return (
-
+
+
+
+
+
+ Action Required
+ Verify your Ordinal ownership to enable posting, commenting, and voting.
+
+
);
}
@@ -102,86 +106,54 @@ const Header = () => {
return (
- Verifying...
+ [VERIFYING...]
);
}
if (verificationStatus === 'verified-none') {
return (
-
-
-
-
-
- Read-Only Access
-
-
-
- Wallet Verified - No Ordinals Found
- Your wallet has been verified but does not contain any Ordinal Operators.
- You can browse content but cannot post, comment, or vote.
-
-
-
-
-
-
-
- Verify again
-
-
-
+
+
+
+
+ [VERIFIED | READ-ONLY]
+
+
+
+ Wallet Verified - No Ordinals
+ No Ordinal Operators found. Read-only access granted.
+
+
+
);
}
+ // Verified - Ordinal Owner
if (verificationStatus === 'verified-owner') {
return (
-
-
-
-
-
- Full Access
-
-
-
- Ordinal Operators Verified!
- You have full forum access with permission to post, comment, and vote.
-
-
-
-
-
-
-
- Verify again
-
-
-
+
+
+
+
+ [OWNER ✔]
+
+
+
+ Ordinal Owner Verified!
+ Full forum access granted.
+
+
+
);
}
@@ -189,44 +161,38 @@ const Header = () => {
};
return (
-
-
+
+
OpChan
-
- PoC v0.1
-
+
-
+
-
-
- {isNetworkConnected ? (
- <>
-
- Connected
- >
- ) : (
- <>
-
- Offline
- >
- )}
-
-
+
+ {isNetworkConnected ? (
+ <>
+
+ WAKU: Connected
+ >
+ ) : (
+ <>
+
+ WAKU: Offline
+ >
+ )}
+
-
- {isNetworkConnected
- ? "Connected to Waku network"
- : "Not connected to Waku network. Some features may be unavailable."}
+
+ {isNetworkConnected ? "Waku network connection active." : "Waku network connection lost."}
{isRefreshing && Refreshing data...
}
@@ -236,25 +202,38 @@ const Header = () => {
variant="outline"
size="sm"
onClick={handleConnect}
+ className="text-xs px-2 h-7"
>
Connect Wallet
) : (
- <>
+
{renderAccessBadge()}
{renderDelegationButton()}
-
- {currentUser.address.slice(0, 6)}...{currentUser.address.slice(-4)}
-
-
- >
+
+
+
+ {currentUser.address.slice(0, 5)}...{currentUser.address.slice(-4)}
+
+
+
+ {currentUser.address}
+
+
+
+
+
+
+ Disconnect Wallet
+
+
)}
diff --git a/src/components/PostDetail.tsx b/src/components/PostDetail.tsx
index 90081f1..5b10591 100644
--- a/src/components/PostDetail.tsx
+++ b/src/components/PostDetail.tsx
@@ -4,8 +4,7 @@ import { useForum } from '@/contexts/ForumContext';
import { useAuth } from '@/contexts/AuthContext';
import { Button } from '@/components/ui/button';
import { Textarea } from '@/components/ui/textarea';
-import { Skeleton } from '@/components/ui/skeleton';
-import { ArrowLeft, ArrowUp, ArrowDown, Clock, MessageCircle, Send, RefreshCw, Eye } from 'lucide-react';
+import { ArrowLeft, ArrowUp, ArrowDown, Clock, MessageCircle, Send, RefreshCw, Eye, Loader2 } from 'lucide-react';
import { formatDistanceToNow } from 'date-fns';
import { Comment } from '@/types';
import { CypherImage } from './ui/CypherImage';
@@ -35,15 +34,9 @@ const PostDetail = () => {
if (isInitialLoading) {
return (
-
-
-
-
-
-
-
-
-
+
);
}
@@ -116,42 +109,44 @@ const PostDetail = () => {
Back to /{cell?.name || 'cell'}/
-
-
-
-
{post.upvotes.length - post.downvotes.length}
-
-
-
-
-
{post.title}
-
{post.content}
-
-
-
- {formatDistanceToNow(post.timestamp, { addSuffix: true })}
-
-
-
- {postComments.length} {postComments.length === 1 ? 'comment' : 'comments'}
-
-
- {post.authorAddress.slice(0, 6)}...{post.authorAddress.slice(-4)}
-
+
+
+
+
+
{post.upvotes.length - post.downvotes.length}
+
+
+
+
+
{post.title}
+
{post.content}
+
+
+
+ {formatDistanceToNow(post.timestamp, { addSuffix: true })}
+
+
+
+ {postComments.length} {postComments.length === 1 ? 'comment' : 'comments'}
+
+
+ {post.authorAddress.slice(0, 6)}...{post.authorAddress.slice(-4)}
+
+
@@ -165,7 +160,7 @@ const PostDetail = () => {
placeholder="Add a comment..."
value={newComment}
onChange={(e) => setNewComment(e.target.value)}
- className="flex-1 bg-cyber-muted/50 border-cyber-muted resize-none"
+ className="flex-1 bg-secondary/40 border-muted resize-none rounded-sm text-sm p-2"
disabled={isPostingComment}
/>
) : verificationStatus === 'verified-none' ? (
-
-
-
+
+
+
Read-Only Mode
-
+
Your wallet has been verified but does not contain any Ordinal Operators.
You can browse threads but cannot comment or vote.
) : (
-
-
Connect wallet and verify Ordinal ownership to comment
+
+
Connect wallet and verify Ordinal ownership to comment
@@ -200,25 +195,25 @@ const PostDetail = () => {
{postComments.length === 0 ? (
-
+
) : (
postComments.map(comment => (
-
+