feat(project): add icon_url_override field to projects (#23955)

This commit is contained in:
Brendan Allan 2026-04-23 18:57:04 +08:00 committed by GitHub
commit 6002500bc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 1545 additions and 77 deletions

View file

@ -22,9 +22,7 @@ const OPENCODE_PROJECT_ID = "4b0ea68d7af9a6031a7ffda7ad66e0cb83315750"
export function getProjectAvatarSource(id?: string, icon?: { color?: string; url?: string; override?: string }) {
return id === OPENCODE_PROJECT_ID
? "https://opencode.ai/favicon.svg"
: icon?.color
? undefined
: icon?.override || icon?.url
: (icon?.override ?? (icon?.color ? undefined : icon?.url))
}
export const ProjectIcon = (props: { project: LocalProject; class?: string; notify?: boolean }): JSX.Element => {