Revert community conditional, rename Feed Tabs to Home Feed Tabs

- Undo conditional rendering of community management section
- Rename 'Feed Tabs' section header to 'Home Feed Tabs'
This commit is contained in:
Mary Kate Fain
2026-03-07 18:44:58 -06:00
parent e65485a44b
commit 5f22bbf79b
+59 -61
View File
@@ -38,7 +38,7 @@ export function ContentSettings() {
{/* Feed Tabs Section */}
<div>
<div className="relative px-3 py-3.5">
<h2 className="text-base font-semibold">Feed Tabs</h2>
<h2 className="text-base font-semibold">Home Feed Tabs</h2>
<div className="absolute bottom-0 left-0 right-0 h-1 bg-primary rounded-full" />
</div>
<div className="pb-4">
@@ -436,71 +436,69 @@ function FeedTabsSection() {
</div>
</div>
{showCommunityFeed && (
<div className="px-3 py-4 space-y-4">
<div className="px-3 py-4 space-y-4">
{/* Community Management */}
<div className="space-y-3">
<div>
<div className="flex items-center gap-2 mb-1">
<Users className="h-4 w-4 text-muted-foreground" />
<Label className="text-sm font-medium">Community</Label>
</div>
<p className="text-xs text-muted-foreground">
Set a community domain. We'll download the NIP-05 user list to show posts only from verified members.
</p>
{/* Community Management */}
<div className="space-y-3">
<div>
<div className="flex items-center gap-2 mb-1">
<Users className="h-4 w-4 text-muted-foreground" />
<Label className="text-sm font-medium">Community</Label>
</div>
<p className="text-xs text-muted-foreground">
Set a community domain. We'll download the NIP-05 user list to show posts only from verified members.
</p>
</div>
{!community ? (
<div className="flex gap-2">
<Input
placeholder="ditto.pub"
value={communityDomain}
onChange={(e) => setCommunityDomain(e.target.value)}
onKeyDown={(e) => {
if (e.key === 'Enter') {
handleDownloadCommunity();
}
}}
className="h-9"
disabled={isDownloading}
/>
<Button
onClick={handleDownloadCommunity}
disabled={isDownloading || !communityDomain.trim()}
size="sm"
className="h-9"
>
{isDownloading ? (
<Loader2 className="h-4 w-4 animate-spin" />
) : (
<Download className="h-4 w-4" />
)}
</Button>
</div>
) : (
<div className="flex items-center justify-between">
<div className="flex items-center gap-2 flex-1 min-w-0">
<div className="min-w-0">
<p className="text-sm font-medium truncate">{community.label}</p>
<p className="text-xs text-muted-foreground truncate">
{community.domain} {community.userCount} {community.userCount === 1 ? 'user' : 'users'}
</p>
</div>
{!community ? (
<div className="flex gap-2">
<Input
placeholder="ditto.pub"
value={communityDomain}
onChange={(e) => setCommunityDomain(e.target.value)}
onKeyDown={(e) => {
if (e.key === 'Enter') {
handleDownloadCommunity();
}
}}
className="h-9"
disabled={isDownloading}
/>
<Button
onClick={handleDownloadCommunity}
disabled={isDownloading || !communityDomain.trim()}
size="sm"
className="h-9"
>
{isDownloading ? (
<Loader2 className="h-4 w-4 animate-spin" />
) : (
<Download className="h-4 w-4" />
)}
</Button>
</div>
) : (
<div className="flex items-center justify-between">
<div className="flex items-center gap-2 flex-1 min-w-0">
<div className="min-w-0">
<p className="text-sm font-medium truncate">{community.label}</p>
<p className="text-xs text-muted-foreground truncate">
{community.domain} {community.userCount} {community.userCount === 1 ? 'user' : 'users'}
</p>
</div>
<Button
variant="ghost"
size="sm"
onClick={handleRemoveCommunity}
className="shrink-0 h-8 w-8 p-0"
>
<X className="h-4 w-4 text-destructive" />
</Button>
</div>
)}
</div>
</div>
)}
<Button
variant="ghost"
size="sm"
onClick={handleRemoveCommunity}
className="shrink-0 h-8 w-8 p-0"
>
<X className="h-4 w-4 text-destructive" />
</Button>
</div>
)}
</div>
</div>
{/* Saved Feeds */}
<SavedFeedsSection />