mirror of
https://github.com/dergigi/boris.git
synced 2025-12-31 05:24:36 +01:00
feat(ui): resolve nprofile strings to human-readable names
- Add extractNprofilePubkeys utility to parse nprofile strings from content - Create ContentWithResolvedProfiles component using applesauce ProfileModel - Replace nprofile strings with @displayName in bookmark content - Update BookmarkItem to use resolved content rendering - Improves readability by showing names instead of long nprofile strings
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
import { useEventModel } from 'applesauce-react/hooks'
|
||||
import { Models } from 'applesauce-core'
|
||||
import { IndividualBookmark } from '../types/bookmarks'
|
||||
import { formatDate, renderParsedContent } from '../utils/bookmarkUtils'
|
||||
import { formatDate, renderParsedContent, ContentWithResolvedProfiles } from '../utils/bookmarkUtils'
|
||||
import { extractUrlsFromContent } from '../services/bookmarkHelpers'
|
||||
|
||||
interface BookmarkItemProps {
|
||||
@@ -142,9 +142,7 @@ export const BookmarkItem: React.FC<BookmarkItemProps> = ({ bookmark, index, onS
|
||||
{renderParsedContent(bookmark.parsedContent)}
|
||||
</div>
|
||||
) : bookmark.content && (
|
||||
<div className="bookmark-content">
|
||||
<p>{bookmark.content}</p>
|
||||
</div>
|
||||
<ContentWithResolvedProfiles content={bookmark.content} />
|
||||
)}
|
||||
|
||||
<div className="bookmark-meta">
|
||||
|
||||
Reference in New Issue
Block a user