Made Patrick happy

This commit is contained in:
sageTheDM 2024-10-09 16:28:35 +02:00
parent dd00c15f34
commit f1f124147d

View file

@ -111,6 +111,9 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
// Theme selection // Theme selection
const [selectedTheme, setSelectedTheme] = useState<string>(''); const [selectedTheme, setSelectedTheme] = useState<string>('');
// Weather selection
const [weatherInfo, setWeatherInfo] = useState(localStorage.getItem('weatherInfo') || "");
// API Keys // API Keys
const [mistral, setMistral] = useState(localStorage.getItem('mistral') || ""); const [mistral, setMistral] = useState(localStorage.getItem('mistral') || "");
@ -132,6 +135,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
disableChatHistory, disableChatHistory,
disableAIMemory, disableAIMemory,
openSourceMode, openSourceMode,
weatherInfo,
myBoolean myBoolean
}, },
theme: { theme: {
@ -405,7 +409,13 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
checked={myBoolean} checked={myBoolean}
setChecked={setMyBoolean} setChecked={setMyBoolean}
/> />
<TextSettings
label="Nearest City"
value={weatherInfo}
type='text'
setValue={setWeatherInfo}
placeholder={localStorage.getItem("weatherInfo") || "Enter nearest city"} // Show current name or a default
/>
<DropdownSetting <DropdownSetting
label="Preferred Language" label="Preferred Language"
value={preferredLanguage} value={preferredLanguage}