Bump to v0.4.1 — media players, YouTube/Spotify cards, feed fix

Add inline video/audio players for direct media URLs, rich link cards
for YouTube (with thumbnails), Vimeo, Spotify, and Tidal. Fix video
clicks navigating to thread by splitting NoteContent into inline/media
modes. Fix published notes not appearing on Following tab.
This commit is contained in:
Jure
2026-03-15 12:32:00 +01:00
parent e965cf9427
commit 35fac6bab9
9 changed files with 389 additions and 51 deletions
+9 -5
View File
@@ -5,7 +5,7 @@ import { useUserStore } from "../../stores/user";
import { useFeedStore } from "../../stores/feed";
import { shortenPubkey } from "../../lib/utils";
export function ComposeBox({ onPublished }: { onPublished?: () => void }) {
export function ComposeBox({ onPublished, onNoteInjected }: { onPublished?: () => void; onNoteInjected?: (event: import("@nostr-dev-kit/ndk").NDKEvent) => void }) {
const [text, setText] = useState("");
const [publishing, setPublishing] = useState(false);
const [uploading, setUploading] = useState(false);
@@ -62,10 +62,14 @@ export function ComposeBox({ onPublished }: { onPublished?: () => void }) {
try {
const event = await publishNote(text.trim());
// Inject into feed immediately so the user sees their post
const { notes } = useFeedStore.getState();
useFeedStore.setState({
notes: [event, ...notes],
});
if (onNoteInjected) {
onNoteInjected(event);
} else {
const { notes } = useFeedStore.getState();
useFeedStore.setState({
notes: [event, ...notes],
});
}
setText("");
textareaRef.current?.focus();
onPublished?.();