Fixed the problems delete the branch revert ASAP
This commit is contained in:
parent
799794e123
commit
918a3f2d7c
3 changed files with 89 additions and 96 deletions
|
@ -56,14 +56,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
|||
const [timeZone, setTimeZone] = useState(() => localStorage.getItem('timeZone') || 'GMT');
|
||||
|
||||
// Online AI and chat history settings
|
||||
const [selectedOption, setSelectedOption] = useState(() => {
|
||||
// Check if openSourceMode exists in localStorage
|
||||
const openSourceMode = localStorage.getItem("openSourceMode");
|
||||
|
||||
// If it exists and is "true", set selectedOption to None (Foss), otherwise set it to None
|
||||
return openSourceMode === "true" ? "None (FOSS)" : "None";
|
||||
});
|
||||
|
||||
const [selectedOption, setSelectedOption] = useState('Offline'); // Default to 'Offline'
|
||||
const [disableChatHistory, setDisableChatHistory] = useState(() => getItemFromLocalStorage('disableChatHistory'));
|
||||
const [disableAIMemory, setDisableAIMemory] = useState(() => getItemFromLocalStorage('disableAIMemory'));
|
||||
const [openSourceMode, setOpenSourceMode] = useState(() => getItemFromLocalStorage('openSourceMode'));
|
||||
|
@ -112,6 +105,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
|||
const [closeButtonHoverColor, setCloseButtonHoverColor] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--close-button-hover-color').trim());
|
||||
const [applyButtonColor, setApplyButtonColor] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--apply-button-color').trim());
|
||||
const [applyButtonHoverColor, setApplyButtonHoverColor] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--apply-button-hover-color').trim());
|
||||
|
||||
// Per default a purple color gradient
|
||||
const [primaryColor, setPrimaryColor] = useState(localStorage.getItem("primaryColor") || "#dc8add");
|
||||
const [secondaryColor, setSecondaryColor] = useState(localStorage.getItem("secondaryColor") || "#c061cb");
|
||||
|
@ -123,6 +117,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
|||
const [selectedTheme, setSelectedTheme] = useState<string>('');
|
||||
|
||||
// API Keys
|
||||
|
||||
const [mistral, setMistral] = useState(localStorage.getItem('mistral') || "");
|
||||
const [openai, setOpenai] = useState(localStorage.getItem('openai') || "");
|
||||
const [anthropic, setAnthropic] = useState(localStorage.getItem('anthropic') || "");
|
||||
|
@ -455,6 +450,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
|||
return (
|
||||
<div className="settings-section">
|
||||
<h2>Privacy Settings</h2>
|
||||
|
||||
<PrivacySettings
|
||||
selectedOption={selectedOption}
|
||||
handleRadioChange={handleRadioChange}
|
||||
|
@ -576,8 +572,8 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
|||
<TextSettings
|
||||
label="New Name"
|
||||
value={newName}
|
||||
type='text'
|
||||
setValue={setNewName}
|
||||
type="text"
|
||||
placeholder={localStorage.getItem("accountName") || "Current Name"} // Show current name or a default
|
||||
/>
|
||||
<TextSettings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue