mirror of
https://github.com/dergigi/boris.git
synced 2025-12-29 20:44:37 +01:00
feat(bookmarks): add sticky note icon for text-only bookmarks without URLs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react'
|
||||
import { faBookOpen, faPlay, faEye, faNewspaper, faGlobe } from '@fortawesome/free-solid-svg-icons'
|
||||
import { faBookOpen, faPlay, faEye, faNewspaper, faGlobe, faStickyNote } from '@fortawesome/free-solid-svg-icons'
|
||||
import { IconDefinition } from '@fortawesome/fontawesome-svg-core'
|
||||
import { useEventModel } from 'applesauce-react/hooks'
|
||||
import { Models } from 'applesauce-core'
|
||||
@@ -71,6 +71,7 @@ export const BookmarkItem: React.FC<BookmarkItemProps> = ({ bookmark, index, onS
|
||||
const getContentTypeIcon = (): IconDefinition => {
|
||||
if (isArticle) return faNewspaper
|
||||
if (isWebBookmark) return faGlobe
|
||||
if (!hasUrls) return faStickyNote // Just a text note
|
||||
if (firstUrlClassification?.type === 'youtube' || firstUrlClassification?.type === 'video') return faPlay
|
||||
return faBookOpen
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user