✨ feat: Add model icon support across backend and UI; prefer model icon over vendor; add icon column in Models table
Backend: - Model: Add `icon` field to `model.Model` (gorm: varchar(128)); auto-migrated via GORM. - Pricing API: Extend `model.Pricing` with `icon` and populate from model meta in `GetPricing()`. Frontend: - EditModelModal: Add `icon` input (with @lobehub/icons helper link); wire into init/load/submit flows. - ModelHeader / PricingCardView: Prefer rendering `model.icon`; fallback to `vendor_icon`; final fallback to initials avatar. - Models table: Add leading “Icon” column, rendering `model.icon` or `vendor` icon via `getLobeHubIcon`. Notes: - Backward-compatible. Existing data without `icon` remain unaffected. - No manual SQL needed; column is added by AutoMigrate. Affected files: - model/model_meta.go - model/pricing.go - web/src/components/table/models/modals/EditModelModal.jsx - web/src/components/table/model-pricing/modal/components/ModelHeader.jsx - web/src/components/table/model-pricing/view/card/PricingCardView.jsx - web/src/components/table/models/ModelsColumnDefs.js
This commit is contained in:
@@ -1907,5 +1907,12 @@
|
||||
"确定要禁用所有的密钥吗?": "Are you sure you want to disable all keys?",
|
||||
"确定要删除所有已自动禁用的密钥吗?": "Are you sure you want to delete all automatically disabled keys?",
|
||||
"此操作不可撤销,将永久删除已自动禁用的密钥": "This operation cannot be undone, and all automatically disabled keys will be permanently deleted.",
|
||||
"删除自动禁用密钥": "Delete auto disabled keys"
|
||||
"删除自动禁用密钥": "Delete auto disabled keys",
|
||||
"图标": "Icon",
|
||||
"模型图标": "Model icon",
|
||||
"请输入图标名称": "Please enter the icon name",
|
||||
"精确名称匹配": "Exact name matching",
|
||||
"前缀名称匹配": "Prefix name matching",
|
||||
"后缀名称匹配": "Suffix name matching",
|
||||
"包含名称匹配": "Contains name matching"
|
||||
}
|
||||
Reference in New Issue
Block a user