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:
t0ng7u
2025-08-10 01:18:36 +08:00
parent 459fce196f
commit 9572e16dcb
3 changed files with 64 additions and 14 deletions

View File

@@ -1862,7 +1862,7 @@
"请输入供应商描述": "Please enter the vendor description",
"供应商图标": "Vendor icon",
"请输入图标名称OpenAI、Claude.Color": "Please enter the icon name, such as: OpenAI, Claude.Color",
"图标使用@lobehub/icons库查询所有可用图标 ": "The icon uses the @lobehub/icons library, query all available icons ",
"图标使用@lobehub/icons库OpenAI、Claude.Color支持链式参数OpenAI.Avatar.type={'platform'}、OpenRouter.Avatar.shape={'square'}查询所有可用图标 ": "The icon uses the @lobehub/icons library, such as: OpenAI, Claude.Color, supports chain parameters: OpenAI.Avatar.type={'platform'}, OpenRouter.Avatar.shape={'square'}, query all available icons please ",
"请点击我": "Please click me",
"精确": "Exact",
"前缀": "Prefix",