mirror of
https://github.com/hoornet/vega.git
synced 2026-06-08 06:01:57 -07:00
Polish pass 3 — theme tokens, debug logging, remaining ellipses
- Move DMView console.log/error behind debug.log/error (silent in prod) - Replace hard-coded text-[#ffffff] with text-white in NoteContent overlay - Theme-ify Vimeo and Tidal media cards (bg-accent/15 instead of bg-black/40 and bg-white/10) so they adapt to light themes - Convert Vimeo play icon SVG to currentColor for theme-aware tinting - Add aria-label to update banner dismiss button - Replace remaining '...' with unicode ellipsis in loading states
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ function UpdateBanner() {
|
||||
>
|
||||
{installing ? "Installing…" : "Update & restart"}
|
||||
</button>
|
||||
<button onClick={dismiss} className="text-text-dim hover:text-text transition-colors">×</button>
|
||||
<button onClick={dismiss} aria-label="Dismiss update" className="text-text-dim hover:text-text transition-colors">×</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -95,7 +95,7 @@ export function ArticleFeed() {
|
||||
{/* Articles list */}
|
||||
<div className="flex-1 overflow-y-auto">
|
||||
{loading && (
|
||||
<div className="px-4 py-8 text-text-dim text-[12px] text-center">Loading articles...</div>
|
||||
<div className="px-4 py-8 text-text-dim text-[12px] text-center">Loading articles…</div>
|
||||
)}
|
||||
|
||||
{!loading && articles.length === 0 && (
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useNotificationsStore } from "../../stores/notifications";
|
||||
import { fetchDMConversations, fetchDMThread, sendDM, decryptDM, getNDK } from "../../lib/nostr";
|
||||
import { useProfile } from "../../hooks/useProfile";
|
||||
import { timeAgo, shortenPubkey, profileName } from "../../lib/utils";
|
||||
import { debug } from "../../lib/debug";
|
||||
|
||||
// ── Helpers ──────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -141,7 +142,7 @@ function ThreadPanel({
|
||||
setMessages([]);
|
||||
fetchDMThread(myPubkey, partnerPubkey)
|
||||
.then(setMessages)
|
||||
.catch((err) => console.error("Failed to fetch DM thread:", err))
|
||||
.catch((err) => debug.error("Failed to fetch DM thread:", err))
|
||||
.finally(() => setLoading(false));
|
||||
}, [partnerPubkey, myPubkey]);
|
||||
|
||||
@@ -155,17 +156,17 @@ function ThreadPanel({
|
||||
setSending(true);
|
||||
setSendError(null);
|
||||
try {
|
||||
console.log("[DM-UI] sending to", partnerPubkey.slice(0, 8));
|
||||
debug.log("[DM-UI] sending to", partnerPubkey.slice(0, 8));
|
||||
await sendDM(partnerPubkey, content);
|
||||
console.log("[DM-UI] send completed, re-fetching thread...");
|
||||
debug.log("[DM-UI] send completed, re-fetching thread");
|
||||
setText("");
|
||||
// Re-fetch thread to include the sent message
|
||||
const updated = await fetchDMThread(myPubkey, partnerPubkey);
|
||||
console.log("[DM-UI] re-fetch got", updated.length, "messages");
|
||||
debug.log("[DM-UI] re-fetch got", updated.length, "messages");
|
||||
setMessages(updated);
|
||||
textareaRef.current?.focus();
|
||||
} catch (err) {
|
||||
console.error("[DM-UI] send failed:", err);
|
||||
debug.error("[DM-UI] send failed:", err);
|
||||
setSendError(String(err));
|
||||
} finally {
|
||||
setSending(false);
|
||||
@@ -321,7 +322,7 @@ export function DMView() {
|
||||
}));
|
||||
useNotificationsStore.getState().computeDMUnread(convList);
|
||||
})
|
||||
.catch((err) => console.error("Failed to fetch DM conversations:", err))
|
||||
.catch((err) => debug.error("Failed to fetch DM conversations:", err))
|
||||
.finally(() => setLoading(false));
|
||||
}, [pubkey, hasSigner]);
|
||||
|
||||
|
||||
@@ -103,8 +103,8 @@ export function VimeoCard({ seg }: { seg: ContentSegment }) {
|
||||
rel="noopener noreferrer"
|
||||
className="mt-2 flex items-center gap-3 rounded-sm bg-bg-raised border border-border p-3 hover:bg-bg-hover transition-colors cursor-pointer"
|
||||
>
|
||||
<div className="w-10 h-10 rounded-full bg-black/40 flex items-center justify-center shrink-0">
|
||||
<svg width="14" height="14" viewBox="0 0 20 20" fill="white"><polygon points="6,3 17,10 6,17" /></svg>
|
||||
<div className="w-10 h-10 rounded-full bg-accent/15 text-accent flex items-center justify-center shrink-0">
|
||||
<svg width="14" height="14" viewBox="0 0 20 20" fill="currentColor"><polygon points="6,3 17,10 6,17" /></svg>
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<div className="text-[11px] text-text-muted">Vimeo</div>
|
||||
@@ -141,8 +141,8 @@ export function TidalCard({ seg }: { seg: ContentSegment }) {
|
||||
rel="noopener noreferrer"
|
||||
className="mt-2 flex items-center gap-3 rounded-sm bg-bg-raised border border-border p-3 hover:bg-bg-hover transition-colors cursor-pointer"
|
||||
>
|
||||
<div className="w-10 h-10 rounded-full bg-white/10 flex items-center justify-center shrink-0">
|
||||
<span className="text-white text-lg font-bold">T</span>
|
||||
<div className="w-10 h-10 rounded-full bg-accent/15 text-accent flex items-center justify-center shrink-0">
|
||||
<span className="text-lg font-bold">T</span>
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<div className="text-[11px] text-text-muted">Tidal · {seg.mediaType}</div>
|
||||
|
||||
@@ -101,7 +101,7 @@ function ImageGrid({ images, onImageClick }: { images: string[]; onImageClick: (
|
||||
className="absolute inset-0 bg-black/50 flex items-center justify-center rounded-sm cursor-zoom-in"
|
||||
onClick={(e) => { e.stopPropagation(); onImageClick(idx); }}
|
||||
>
|
||||
<span className="text-[#ffffff] text-lg font-semibold">+{extraCount}</span>
|
||||
<span className="text-white text-lg font-semibold">+{extraCount}</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -116,7 +116,7 @@ export function PodcastsView() {
|
||||
</div>
|
||||
)
|
||||
) : loading ? (
|
||||
<div className="text-text-dim text-[12px]">Loading...</div>
|
||||
<div className="text-text-dim text-[12px]">Loading…</div>
|
||||
) : displayShows.length === 0 ? (
|
||||
<div className="text-text-dim text-[12px]">
|
||||
{tab === "search" ? "No results. Try a different search." : "No trending podcasts found."}
|
||||
|
||||
Reference in New Issue
Block a user