diff --git a/src/components/event/textNote/MentionedEventDisplay.tsx b/src/components/event/textNote/MentionedEventDisplay.tsx index 813ea67..c473d1f 100644 --- a/src/components/event/textNote/MentionedEventDisplay.tsx +++ b/src/components/event/textNote/MentionedEventDisplay.tsx @@ -1,5 +1,7 @@ import { Show } from 'solid-js'; +import { Kind } from 'nostr-tools'; + // eslint-disable-next-line import/no-cycle import EventDisplayById from '@/components/event/EventDisplayById'; import EventLink from '@/components/EventLink'; @@ -20,6 +22,7 @@ const MentionedEventDisplay = (props: MentionedEventDisplayProps) => { eventId={props.mentionedEvent.eventId} embedding={false} actions={false} + ensureKinds={[Kind.Text]} /> diff --git a/src/components/event/textNote/TextNoteContentDisplay.tsx b/src/components/event/textNote/TextNoteContentDisplay.tsx index 0521838..cdc9da8 100644 --- a/src/components/event/textNote/TextNoteContentDisplay.tsx +++ b/src/components/event/textNote/TextNoteContentDisplay.tsx @@ -107,9 +107,9 @@ const TextNoteContentDisplay = (props: TextNoteContentDisplayProps) => { if (emojiUrl == null) return {item.content}; return ( {item.shortcode} ); } diff --git a/src/components/timeline/Notification.tsx b/src/components/timeline/Notification.tsx index f6c822a..fd8370b 100644 --- a/src/components/timeline/Notification.tsx +++ b/src/components/timeline/Notification.tsx @@ -1,4 +1,4 @@ -import { For, Switch, Match, type Component } from 'solid-js'; +import { For, Switch, Match, type Component, Show } from 'solid-js'; import { Kind, type Event as NostrEvent } from 'nostr-tools'; @@ -6,33 +6,38 @@ import ColumnItem from '@/components/ColumnItem'; import Reaction from '@/components/event/Reaction'; import Repost from '@/components/event/Repost'; import TextNote from '@/components/event/TextNote'; +import useConfig from '@/core/useConfig'; export type NotificationProps = { events: NostrEvent[]; }; const Notification: Component = (props) => { + const { shouldMuteEvent } = useConfig(); + return ( {(event) => ( - unknown event}> - - - - - - - - - - - {/* TODO ちゃんとnotification用のコンポーネント使う */} - - - - - - + + unknown event}> + + + + + + + + + + + {/* TODO ちゃんとnotification用のコンポーネント使う */} + + + + + + + )} ); diff --git a/src/utils/imageUrl.ts b/src/utils/imageUrl.ts index 4cbcd9f..4e0b2ee 100644 --- a/src/utils/imageUrl.ts +++ b/src/utils/imageUrl.ts @@ -1,7 +1,7 @@ export const isImageUrl = (urlString: string): boolean => { try { const url = new URL(urlString); - return /\.(jpeg|jpg|png|gif|webp|apng)$/i.test(url.pathname); + return /\.(jpeg|jpg|png|gif|webp|apng|svg)$/i.test(url.pathname); } catch { return false; }