Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
45d54c16
authored
Jun 01, 2026
by
同語
Committed by
GitHub
Jun 01, 2026
Browse files
Options
Browse Files
Download
Plain Diff
fix(pricing): sync custom model icons #5224
Merge pull request #5224 from QuantumNous/fix/pricing-model-icons
parents
0c7aceb8
08604465
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
web/default/src/features/pricing/components/model-card.tsx
+4
-3
web/default/src/features/pricing/components/model-details.tsx
+4
-3
web/default/src/features/pricing/components/pricing-columns.tsx
+4
-3
web/default/src/features/pricing/types.ts
+1
-0
No files found.
web/default/src/features/pricing/components/model-card.tsx
View file @
45d54c16
...
...
@@ -56,8 +56,9 @@ export const ModelCard = memo(function ModelCard(props: ModelCardProps) {
const
tags
=
parseTags
(
props
.
model
.
tags
)
const
groups
=
props
.
model
.
enable_groups
||
[]
const
endpoints
=
props
.
model
.
supported_endpoint_types
||
[]
const
vendorIcon
=
props
.
model
.
vendor_icon
?
getLobeIcon
(
props
.
model
.
vendor_icon
,
28
)
const
modelIconKey
=
props
.
model
.
icon
||
props
.
model
.
vendor_icon
const
modelIcon
=
modelIconKey
?
getLobeIcon
(
modelIconKey
,
28
)
:
null
const
initial
=
props
.
model
.
model_name
?.
charAt
(
0
).
toUpperCase
()
||
'?'
const
isDynamicPricing
=
...
...
@@ -97,7 +98,7 @@ export const ModelCard = memo(function ModelCard(props: ModelCardProps) {
<
div
className=
'flex items-start justify-between gap-2.5 sm:gap-3'
>
<
div
className=
'flex min-w-0 items-start gap-2.5 sm:gap-3'
>
<
div
className=
'bg-muted/40 flex size-9 shrink-0 items-center justify-center rounded-lg sm:size-10 sm:rounded-xl'
>
{
vendor
Icon
||
(
{
model
Icon
||
(
<
span
className=
'text-muted-foreground text-sm font-bold'
>
{
initial
}
</
span
>
...
...
web/default/src/features/pricing/components/model-details.tsx
View file @
45d54c16
...
...
@@ -268,8 +268,9 @@ function OverviewSummaryGrid(props: { model: PricingModel }) {
function
ModelHeader
(
props
:
{
model
:
PricingModel
})
{
const
{
t
}
=
useTranslation
()
const
model
=
props
.
model
const
vendorIcon
=
model
.
vendor_icon
?
getLobeIcon
(
model
.
vendor_icon
,
20
)
const
modelIconKey
=
model
.
icon
||
model
.
vendor_icon
const
modelIcon
=
modelIconKey
?
getLobeIcon
(
modelIconKey
,
20
)
:
null
const
description
=
model
.
description
||
model
.
vendor_description
||
null
const
tags
=
parseTags
(
model
.
tags
)
...
...
@@ -281,7 +282,7 @@ function ModelHeader(props: { model: PricingModel }) {
return
(
<
header
className=
'pb-4'
>
<
div
className=
'flex items-center gap-2.5'
>
{
vendor
Icon
}
{
model
Icon
}
<
h1
className=
'font-mono text-xl font-bold tracking-tight sm:text-2xl'
>
{
model
.
model_name
}
</
h1
>
...
...
web/default/src/features/pricing/components/pricing-columns.tsx
View file @
45d54c16
...
...
@@ -106,13 +106,14 @@ export function usePricingColumns(
),
cell
:
({
row
})
=>
{
const
model
=
row
.
original
const
vendorIcon
=
model
.
vendor_icon
?
getLobeIcon
(
model
.
vendor_icon
,
14
)
const
modelIconKey
=
model
.
icon
||
model
.
vendor_icon
const
modelIcon
=
modelIconKey
?
getLobeIcon
(
modelIconKey
,
14
)
:
null
return
(
<
div
className=
'flex min-w-[200px] items-center gap-2'
>
{
vendor
Icon
}
{
model
Icon
}
<
span
className=
'truncate font-mono text-sm font-medium'
>
{
model
.
model_name
}
</
span
>
...
...
web/default/src/features/pricing/types.ts
View file @
45d54c16
...
...
@@ -31,6 +31,7 @@ export type PricingModel = {
id
:
number
model_name
:
string
description
?:
string
icon
?:
string
vendor_id
?:
number
vendor_name
?:
string
vendor_icon
?:
string
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment