main #98

Merged
Patrick_Pluto merged 15 commits from main into revert 2024-10-03 19:28:09 +02:00
Showing only changes of commit 03881dc20f - Show all commits

View file

@ -124,10 +124,10 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
const [selectedTheme, setSelectedTheme] = useState<string>('');
// API Keys
const [mistral, setMistral] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--online-la-plateforme').trim());
const [openai, setOpenai] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--online-cheap-openai').trim());
const [anthropic, setAnthropic] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--online-cheap-anthropic').trim());
const [google, setGoogle] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--online-cheap-google').trim());
const [mistral, setMistral] = useState(localStorage.getItem('mistral') || "");
const [openai, setOpenai] = useState(localStorage.getItem('openai') || "");
const [anthropic, setAnthropic] = useState(localStorage.getItem('anthropic') || "");
const [google, setGoogle] = useState(localStorage.getItem('google') || "");
const [myBoolean, setMyBoolean] =useState<boolean | any>(() => getItemFromLocalStorage('myBoolean'));
const settings = {
@ -624,24 +624,28 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
value={mistral} // State variable for the input
setValue={setMistral} // State updater function
type="text" // Input type
placeholder={localStorage.getItem('mistral') || "Enter the API key"}
/>
<TextSettings
label="OpenAI" // Label for the input
value={openai} // State variable for the input
setValue={setOpenai} // State updater function
type="text" // Input type
placeholder={localStorage.getItem('openai') || "Enter the API key"}
/>
<TextSettings
label="Anthropic" // Label for the input
value={anthropic} // State variable for the input
setValue={setAnthropic} // State updater function
type="text" // Input type
placeholder={localStorage.getItem('anthropic') || "Enter the API key"}
/>
<TextSettings
label="Google" // Label for the input
value={google} // State variable for the input
setValue={setGoogle} // State updater function
type="text" // Input type
placeholder={localStorage.getItem('google') || "Enter the API key"}
/>
</div>
);