✨ feat: Support dot‑chained props for LobeHub icons
- render.js: Enhance getLobeHubIcon to parse dot‑chained props, e.g.:
- OpenAI.Avatar.type={'platform'}
- OpenRouter.Avatar.shape={'square'}
- Parses booleans/numbers/strings and {…} wrappers; keeps the 2nd arg `size` unless overridden by chain props. Backward compatible.
- EditVendorModal.jsx: Update UI copy — simplify placeholder; document chain‑parameter examples in extra text with doc link.
- en.json: Fix invalid escape sequences in the new i18n string to satisfy linter.
No behavioral changes outside icon rendering; lints pass.
This commit is contained in:
@@ -158,10 +158,10 @@ const EditVendorModal = ({ visible, handleClose, refresh, editingVendor }) => {
|
||||
<Form.Input
|
||||
field="icon"
|
||||
label={t('供应商图标')}
|
||||
placeholder={t('请输入图标名称,如:OpenAI、Claude.Color')}
|
||||
placeholder={t("请输入图标名称")}
|
||||
extraText={
|
||||
<span>
|
||||
{t('图标使用@lobehub/icons库,查询所有可用图标 ')}
|
||||
{t('图标使用@lobehub/icons库,如:OpenAI、Claude.Color,支持链式参数:OpenAI.Avatar.type={\'platform\'}、OpenRouter.Avatar.shape={\'square\'},查询所有可用图标请 ')}
|
||||
<Typography.Text
|
||||
link={{ href: 'https://icons.lobehub.com/components/lobe-hub', target: '_blank' }}
|
||||
icon={<IconLink />}
|
||||
|
||||
Reference in New Issue
Block a user