feat(lib): add support for external images in items (#291)

* feat: add support for external images in items

Add image_external field to Item type and update HeaderView to prefer external images over internal ones when available.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: prettier formatting for external image feature

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Anton Tranelis 2025-08-06 15:04:52 +02:00 committed by GitHub
parent 7e0d44dac8
commit 945e5b066a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -57,7 +57,9 @@ export function HeaderView({
const [imageLoaded, setImageLoaded] = useState(false)
const avatar = item.image && appState.assetsApi.url + item.image + '?width=160&heigth=160'
const avatar =
item.image_external ||
(item.image && appState.assetsApi.url + item.image + '?width=160&heigth=160')
const title = item.name
const subtitle = item.subname

View File

@ -46,6 +46,7 @@ export interface Item {
slug?: string
user_created?: UserItem
image?: string
image_external?: string
group_type?: string
offers?: TagIds
needs?: TagIds