Show orgs in project card when a project is owned by an org (#5892)

* fix: link to user using id instead of username

* feat: show org in project card

* fix: account for outdated documents

* refactor: use struct to store owner information

* fix: default new fields

* fix lint
This commit is contained in:
Sychic
2026-04-23 13:32:19 -04:00
committed by GitHub
parent 16e1bf4611
commit 6862cf5ab2
9 changed files with 167 additions and 87 deletions

View File

@@ -190,11 +190,15 @@ const maxResultsOptions = computed<ComboboxOption<number>[]>(() =>
:title="result.title"
:icon-url="result.icon_url"
:author="{
name: result.author,
name: result.organization == null ? result.author : result.organization,
link:
ctx.variant === 'web'
? `/user/${result.author}`
: `https://modrinth.com/user/${result.author}`,
result.organization_id == null
? ctx.variant === 'web'
? `/user/${result.author_id ?? result.author}`
: `https://modrinth.com/user/${result.author_id ?? result.author}`
: ctx.variant === 'web'
? `/organization/${result.organization_id}`
: `https://modrinth.com/organization/${result.organization_id}`,
}"
:date-updated="result.date_modified"
:date-published="result.date_created"