mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 15:16:24 +08:00
feat: sd setting
This commit is contained in:
@@ -65,6 +65,7 @@ import {
|
||||
ServiceProvider,
|
||||
SlotID,
|
||||
UPDATE_URL,
|
||||
Stability,
|
||||
} from "../constant";
|
||||
import { Prompt, SearchService, usePromptStore } from "../store/prompt";
|
||||
import { ErrorBoundary } from "./error";
|
||||
@@ -1041,6 +1042,45 @@ export function Settings() {
|
||||
</>
|
||||
);
|
||||
|
||||
const stabilityConfigComponent = accessStore.provider ===
|
||||
ServiceProvider.Stability && (
|
||||
<>
|
||||
<ListItem
|
||||
title={Locale.Settings.Access.Stability.Endpoint.Title}
|
||||
subTitle={
|
||||
Locale.Settings.Access.Stability.Endpoint.SubTitle +
|
||||
Stability.ExampleEndpoint
|
||||
}
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
value={accessStore.stabilityUrl}
|
||||
placeholder={Stability.ExampleEndpoint}
|
||||
onChange={(e) =>
|
||||
accessStore.update(
|
||||
(access) => (access.stabilityUrl = e.currentTarget.value),
|
||||
)
|
||||
}
|
||||
></input>
|
||||
</ListItem>
|
||||
<ListItem
|
||||
title={Locale.Settings.Access.Stability.ApiKey.Title}
|
||||
subTitle={Locale.Settings.Access.Stability.ApiKey.SubTitle}
|
||||
>
|
||||
<PasswordInput
|
||||
value={accessStore.stabilityApiKey}
|
||||
type="text"
|
||||
placeholder={Locale.Settings.Access.Stability.ApiKey.Placeholder}
|
||||
onChange={(e) => {
|
||||
accessStore.update(
|
||||
(access) => (access.stabilityApiKey = e.currentTarget.value),
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<div className="window-header" data-tauri-drag-region>
|
||||
@@ -1324,6 +1364,7 @@ export function Settings() {
|
||||
{baiduConfigComponent}
|
||||
{byteDanceConfigComponent}
|
||||
{alibabaConfigComponent}
|
||||
{stabilityConfigComponent}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
Reference in New Issue
Block a user