mirror of
https://github.com/hoornet/vega.git
synced 2026-06-13 08:23:31 -07:00
Polish pass 7 — sentence case across profile, thread, follows, podcasts
- ProfileView: Cancel/Back, Edit profile, Zap, Follow/Unfollow, Mute/Unmute, Message, Notes/Articles/Media tab labels - ThreadView: Back, Retry, Reply/Posting…/Replied ✓; console.error → debug.error - ThreadNode: Reply/Posting…/Replied ✓ - FollowsView: Follow/Unfollow, Followers/Following tabs, Follows header - EpisodeList: Back, Loading episodes…, amber → zap theme token on V4V badge - AccountSwitcher: Login, Add account, Sign out, Remove - PodcastCard: + Subscribe / Subscribed
This commit is contained in:
@@ -77,7 +77,7 @@ function FollowRow({
|
||||
: "bg-accent hover:bg-accent-hover text-accent-text"
|
||||
}`}
|
||||
>
|
||||
{isFollowing ? "unfollow" : "follow"}
|
||||
{isFollowing ? "Unfollow" : "Follow"}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
@@ -151,15 +151,15 @@ export function FollowsView() {
|
||||
const followersSet = new Set(followers);
|
||||
|
||||
const tabs: Array<{ id: "followers" | "following"; label: string; count?: number }> = [
|
||||
{ id: "followers", label: "followers", count: followersFetched ? followers.length : undefined },
|
||||
{ id: "following", label: "following", count: follows.length },
|
||||
{ id: "followers", label: "Followers", count: followersFetched ? followers.length : undefined },
|
||||
{ id: "following", label: "Following", count: follows.length },
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="h-full flex flex-col">
|
||||
{/* Header */}
|
||||
<div className="border-b border-border px-4 py-2.5 flex items-center gap-4 shrink-0">
|
||||
<span className="text-text font-medium text-[13px]">follows</span>
|
||||
<span className="text-text font-medium text-[13px]">Follows</span>
|
||||
<div className="flex gap-3 ml-auto">
|
||||
{tabs.map((t) => (
|
||||
<button
|
||||
|
||||
@@ -67,7 +67,7 @@ export function EpisodeList({ show, onBack }: EpisodeListProps) {
|
||||
onClick={onBack}
|
||||
className="text-text-muted hover:text-accent text-[12px] mt-1 shrink-0"
|
||||
>
|
||||
back
|
||||
Back
|
||||
</button>
|
||||
{show.artworkUrl && (
|
||||
<img
|
||||
@@ -96,7 +96,7 @@ export function EpisodeList({ show, onBack }: EpisodeListProps) {
|
||||
{/* Episodes */}
|
||||
<div className="flex-1 overflow-y-auto">
|
||||
{loading ? (
|
||||
<div className="p-4 text-text-dim text-[12px]">Loading episodes...</div>
|
||||
<div className="p-4 text-text-dim text-[12px]">Loading episodes…</div>
|
||||
) : episodes.length === 0 ? (
|
||||
<div className="p-4 text-text-dim text-[12px]">No episodes found</div>
|
||||
) : (
|
||||
@@ -132,7 +132,7 @@ export function EpisodeList({ show, onBack }: EpisodeListProps) {
|
||||
<span className="text-[10px] text-accent">resumed</span>
|
||||
)}
|
||||
{ep.value && ep.value.length > 0 && (
|
||||
<span className="text-[10px] text-amber-400 bg-amber-500/10 px-1.5 py-0.5 rounded-sm font-medium">
|
||||
<span className="text-[10px] text-zap bg-zap/10 px-1.5 py-0.5 rounded-sm font-medium">
|
||||
⚡ V4V
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -48,7 +48,7 @@ export function PodcastCard({ show, onClick }: PodcastCardProps) {
|
||||
: "border-border text-text-muted hover:text-accent hover:border-accent/40"
|
||||
}`}
|
||||
>
|
||||
{subscribed ? "subscribed" : "+ subscribe"}
|
||||
{subscribed ? "Subscribed" : "+ Subscribe"}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -143,7 +143,7 @@ export function ProfileView() {
|
||||
onClick={editing ? () => setEditing(false) : goBack}
|
||||
className="text-text-dim hover:text-text text-[11px] transition-colors"
|
||||
>
|
||||
← {editing ? "cancel" : "back"}
|
||||
← {editing ? "Cancel" : "Back"}
|
||||
</button>
|
||||
<h1 className="text-text text-sm font-medium">{isOwn ? "Your Profile" : "Profile"}</h1>
|
||||
{isOwn && !getNDK().signer && (
|
||||
@@ -157,7 +157,7 @@ export function ProfileView() {
|
||||
onClick={() => setEditing(true)}
|
||||
className="text-[11px] px-3 py-1 border border-border text-text-muted hover:text-accent hover:border-accent/40 transition-colors"
|
||||
>
|
||||
edit profile
|
||||
Edit profile
|
||||
</button>
|
||||
)}
|
||||
{!isOwn && loggedIn && (
|
||||
@@ -167,7 +167,7 @@ export function ProfileView() {
|
||||
onClick={() => setShowZap(true)}
|
||||
className="text-[11px] px-3 py-1 border border-border text-zap hover:border-zap/40 hover:bg-zap/5 transition-colors"
|
||||
>
|
||||
⚡ zap
|
||||
⚡ Zap
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
@@ -179,7 +179,7 @@ export function ProfileView() {
|
||||
: "border-accent/60 text-accent hover:bg-accent hover:text-accent-text"
|
||||
}`}
|
||||
>
|
||||
{followPending ? "…" : isFollowing ? "unfollow" : "follow"}
|
||||
{followPending ? "…" : isFollowing ? "Unfollow" : "Follow"}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => isMuted ? unmute(pubkey) : mute(pubkey)}
|
||||
@@ -189,13 +189,13 @@ export function ProfileView() {
|
||||
: "border-border text-text-dim hover:text-danger hover:border-danger/40"
|
||||
}`}
|
||||
>
|
||||
{isMuted ? "unmute" : "mute"}
|
||||
{isMuted ? "Unmute" : "Mute"}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => openDM(pubkey)}
|
||||
className="text-[11px] px-3 py-1 border border-border text-text-muted hover:text-accent hover:border-accent/40 transition-colors"
|
||||
>
|
||||
✉ message
|
||||
✉ Message
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
@@ -334,7 +334,7 @@ export function ProfileView() {
|
||||
: "border-transparent text-text-dim hover:text-text"
|
||||
}`}
|
||||
>
|
||||
{t}
|
||||
{t === "notes" ? "Notes" : t === "articles" ? "Articles" : "Media"}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -76,7 +76,7 @@ export function AccountSwitcher() {
|
||||
onClick={() => setShowAddLogin(true)}
|
||||
className="w-full px-2 py-1.5 text-[11px] border border-border text-text-muted hover:text-accent hover:border-accent/40 transition-colors"
|
||||
>
|
||||
login
|
||||
Login
|
||||
</button>
|
||||
</div>
|
||||
{showAddLogin && <LoginModal onClose={() => setShowAddLogin(false)} />}
|
||||
@@ -116,7 +116,7 @@ export function AccountSwitcher() {
|
||||
className="w-full flex items-center gap-2 px-3 py-2 text-text-dim hover:text-accent hover:bg-bg-hover text-[11px] transition-colors"
|
||||
>
|
||||
<span className="w-6 text-center text-[12px]">+</span>
|
||||
<span>add account</span>
|
||||
<span>Add account</span>
|
||||
</button>
|
||||
|
||||
<div className="border-t border-border mx-3 my-1" />
|
||||
@@ -126,13 +126,13 @@ export function AccountSwitcher() {
|
||||
onClick={() => { setOpen(false); logout(); }}
|
||||
className="text-text-dim hover:text-danger text-[10px] transition-colors"
|
||||
>
|
||||
sign out
|
||||
Sign out
|
||||
</button>
|
||||
<button
|
||||
onClick={() => { setOpen(false); removeAccount(pubkey); }}
|
||||
className="text-text-dim hover:text-danger text-[10px] transition-colors"
|
||||
>
|
||||
remove
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -100,7 +100,7 @@ function InlineThreadReply({ replyTo, rootEvent, onPublished }: {
|
||||
disabled={!text.trim() || replying}
|
||||
className="px-3 py-1 text-[11px] bg-accent hover:bg-accent-hover text-accent-text rounded-sm transition-colors disabled:opacity-30 disabled:cursor-not-allowed"
|
||||
>
|
||||
{sent ? "replied ✓" : replying ? "posting…" : "reply"}
|
||||
{sent ? "Replied ✓" : replying ? "Posting…" : "Reply"}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ import { useMuteStore } from "../../stores/mute";
|
||||
import { fetchNoteById, fetchThreadEvents, fetchAncestors, publishReply, getNDK, ensureConnected } from "../../lib/nostr";
|
||||
import { buildThreadTree, getRootEventId } from "../../lib/threadTree";
|
||||
import type { ThreadNode } from "../../lib/threadTree";
|
||||
import { debug } from "../../lib/debug";
|
||||
import { AncestorChain } from "./AncestorChain";
|
||||
import { ThreadNodeComponent } from "./ThreadNode";
|
||||
import { NoteCard } from "../feed/NoteCard";
|
||||
@@ -99,7 +100,7 @@ export function ThreadView() {
|
||||
const built = buildThreadTree(root.id, allEvents);
|
||||
setTree(built);
|
||||
} catch (err) {
|
||||
console.error("Failed to load thread:", err);
|
||||
debug.error("Failed to load thread:", err);
|
||||
if (!cancelled) setLoadError(`Failed to load: ${err}`);
|
||||
}
|
||||
}
|
||||
@@ -160,7 +161,7 @@ export function ThreadView() {
|
||||
onClick={goBack}
|
||||
className="text-text-dim hover:text-text text-[11px] transition-colors"
|
||||
>
|
||||
← back
|
||||
← Back
|
||||
</button>
|
||||
<h1 className="text-text text-sm font-medium">Thread</h1>
|
||||
</header>
|
||||
@@ -174,7 +175,7 @@ export function ThreadView() {
|
||||
onClick={() => setRetryCount((c) => c + 1)}
|
||||
className="text-[11px] text-accent hover:text-accent-hover transition-colors px-2 py-0.5 border border-accent/30 hover:border-accent"
|
||||
>
|
||||
retry
|
||||
Retry
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
@@ -250,7 +251,7 @@ export function ThreadView() {
|
||||
disabled={!replyText.trim() || replying}
|
||||
className="px-3 py-1 text-[11px] bg-accent hover:bg-accent-hover text-accent-text rounded-sm transition-colors disabled:opacity-30 disabled:cursor-not-allowed"
|
||||
>
|
||||
{replySent ? "replied ✓" : replying ? "posting…" : "reply"}
|
||||
{replySent ? "Replied ✓" : replying ? "Posting…" : "Reply"}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -286,7 +287,7 @@ export function ThreadView() {
|
||||
onClick={() => setRetryCount((c) => c + 1)}
|
||||
className="text-[11px] text-accent hover:text-accent-hover transition-colors px-3 py-1 border border-accent/30 hover:border-accent"
|
||||
>
|
||||
retry
|
||||
Retry
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user