chore: re-upload current web project code
This commit is contained in:
@@ -3,24 +3,6 @@ import type { ReactNode } from "react";
|
||||
import type { WorkbenchOption, WorkbenchFieldGroup } from "./workbenchConstants";
|
||||
import { getRatioOptionClassName, getSettingsGridColumnsClassName } from "./workbenchReferenceUtils";
|
||||
|
||||
const VIDEO_MODEL_ICON_URLS = {
|
||||
happyHorse: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/static/model-icons/HappyHorse.svg",
|
||||
pixverse: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/static/model-icons/Pixverse.svg",
|
||||
vidu: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/static/model-icons/viduQ3.svg",
|
||||
wanxiang: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/static/model-icons/wan.svg",
|
||||
kling: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/static/model-icons/kling.svg",
|
||||
} as const;
|
||||
|
||||
function getVideoModelIconUrl(option: WorkbenchOption): string | null {
|
||||
const text = `${option.value} ${option.label}`.toLowerCase();
|
||||
if (text.includes("happyhorse")) return VIDEO_MODEL_ICON_URLS.happyHorse;
|
||||
if (text.includes("pixverse")) return VIDEO_MODEL_ICON_URLS.pixverse;
|
||||
if (text.includes("vidu")) return VIDEO_MODEL_ICON_URLS.vidu;
|
||||
if (text.includes("wan") || text.includes("万相")) return VIDEO_MODEL_ICON_URLS.wanxiang;
|
||||
if (text.includes("kling") || text.includes("可灵")) return VIDEO_MODEL_ICON_URLS.kling;
|
||||
return null;
|
||||
}
|
||||
|
||||
export function SelectChip({
|
||||
chipId,
|
||||
value,
|
||||
@@ -74,7 +56,6 @@ export function SelectChip({
|
||||
>
|
||||
{options.map((option, index) => {
|
||||
const active = option.value === value;
|
||||
const iconUrl = chipId === "video-model" ? getVideoModelIconUrl(option) : null;
|
||||
return (
|
||||
<button
|
||||
key={option.value}
|
||||
@@ -90,11 +71,6 @@ export function SelectChip({
|
||||
>
|
||||
<span className="ai-workbench-select-chip__option-label">
|
||||
<span className="ai-workbench-select-chip__option-dot" aria-hidden="true" />
|
||||
{iconUrl ? (
|
||||
<span className="ai-workbench-select-chip__option-icon" aria-hidden="true">
|
||||
<img src={iconUrl} alt="" loading="lazy" />
|
||||
</span>
|
||||
) : null}
|
||||
<span className="ai-workbench-select-chip__option-copy">
|
||||
<span className="ai-workbench-select-chip__option-title">
|
||||
<span>{option.label}</span>
|
||||
@@ -285,4 +261,4 @@ export function InlineOptionChip({
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user