fix: expose fal preset quick add button
This commit is contained in:
parent
7e0f482bad
commit
ba896cb132
@ -6222,6 +6222,31 @@ export function AdminSettingsClient() {
|
||||
}
|
||||
};
|
||||
|
||||
const handleQuickAddFalImageModelsFromToolbar = async () => {
|
||||
const falProvider = (providersData?.providers || []).find(
|
||||
(provider) => provider.type === "fal-image" && provider.isEnabled
|
||||
) || (providersData?.providers || []).find(
|
||||
(provider) => provider.type === "fal-image"
|
||||
);
|
||||
|
||||
if (falProvider) {
|
||||
await handleQuickAddFalImageModels(falProvider.id);
|
||||
return;
|
||||
}
|
||||
|
||||
setProviderForm({
|
||||
id: "",
|
||||
name: "FAL 图片",
|
||||
type: "fal-image",
|
||||
baseUrl: PROVIDER_DEFAULT_BASE_URL["fal-image"],
|
||||
apiKey: "",
|
||||
isEnabled: true,
|
||||
});
|
||||
setEditingProvider(null);
|
||||
setShowProviderDialog(true);
|
||||
toast.info("还没有 FAL 图片服务商,已为你预填创建表单。保存后会自动添加 GPT Image 2 Edit 预设。");
|
||||
};
|
||||
|
||||
const handleUseBltcyVideoProviderPreset = () => {
|
||||
setProviderForm({
|
||||
id: "",
|
||||
@ -13445,6 +13470,12 @@ export function AdminSettingsClient() {
|
||||
>
|
||||
<ImageIcon className="mr-2 h-4 w-4" /> 柏拉图BFL异步
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={handleQuickAddFalImageModelsFromToolbar}
|
||||
>
|
||||
<ImageIcon className="mr-2 h-4 w-4" /> FAL 图片预设
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={handleUseLemonProviderPreset}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user