@@ -65,6 +65,7 @@ import {
6565 ServiceProvider ,
6666 SlotID ,
6767 UPDATE_URL ,
68+ Stability ,
6869} from "../constant" ;
6970import { Prompt , SearchService , usePromptStore } from "../store/prompt" ;
7071import { ErrorBoundary } from "./error" ;
@@ -1041,6 +1042,45 @@ export function Settings() {
10411042 </ >
10421043 ) ;
10431044
1045+ const stabilityConfigComponent = accessStore . provider ===
1046+ ServiceProvider . Stability && (
1047+ < >
1048+ < ListItem
1049+ title = { Locale . Settings . Access . Stability . Endpoint . Title }
1050+ subTitle = {
1051+ Locale . Settings . Access . Stability . Endpoint . SubTitle +
1052+ Stability . ExampleEndpoint
1053+ }
1054+ >
1055+ < input
1056+ type = "text"
1057+ value = { accessStore . stabilityUrl }
1058+ placeholder = { Stability . ExampleEndpoint }
1059+ onChange = { ( e ) =>
1060+ accessStore . update (
1061+ ( access ) => ( access . stabilityUrl = e . currentTarget . value ) ,
1062+ )
1063+ }
1064+ > </ input >
1065+ </ ListItem >
1066+ < ListItem
1067+ title = { Locale . Settings . Access . Stability . ApiKey . Title }
1068+ subTitle = { Locale . Settings . Access . Stability . ApiKey . SubTitle }
1069+ >
1070+ < PasswordInput
1071+ value = { accessStore . stabilityApiKey }
1072+ type = "text"
1073+ placeholder = { Locale . Settings . Access . Stability . ApiKey . Placeholder }
1074+ onChange = { ( e ) => {
1075+ accessStore . update (
1076+ ( access ) => ( access . stabilityApiKey = e . currentTarget . value ) ,
1077+ ) ;
1078+ } }
1079+ />
1080+ </ ListItem >
1081+ </ >
1082+ ) ;
1083+
10441084 return (
10451085 < ErrorBoundary >
10461086 < div className = "window-header" data-tauri-drag-region >
@@ -1324,6 +1364,7 @@ export function Settings() {
13241364 { baiduConfigComponent }
13251365 { byteDanceConfigComponent }
13261366 { alibabaConfigComponent }
1367+ { stabilityConfigComponent }
13271368 </ >
13281369 ) }
13291370 </ >
0 commit comments