Skip to content

Commit f86d0d1

Browse files
Mary HippMary Hipp
Mary Hipp
authored and
Mary Hipp
committed
hide localization toggle
1 parent 385483f commit f86d0d1

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx

+15-10
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ type ConfigOptions = {
104104
shouldShowAdvancedOptionsSettings: boolean;
105105
shouldShowClearIntermediates: boolean;
106106
shouldShowNodesToggle: boolean;
107+
shouldShowLocalizationToggle: boolean;
107108
};
108109

109110
type SettingsModalProps = {
@@ -125,6 +126,8 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
125126
const shouldShowClearIntermediates =
126127
config?.shouldShowClearIntermediates ?? true;
127128
const shouldShowNodesToggle = config?.shouldShowNodesToggle ?? true;
129+
const shouldShowLocalizationToggle =
130+
config?.shouldShowLocalizationToggle ?? true;
128131

129132
useEffect(() => {
130133
if (!shouldShowDeveloperSettings) {
@@ -325,16 +328,18 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
325328
onChange={handleToggleNodes}
326329
/>
327330
)}
328-
<IAIMantineSelect
329-
disabled={!isLocalizationEnabled}
330-
label={t('common.languagePickerLabel')}
331-
value={language}
332-
data={Object.entries(LANGUAGES).map(([value, label]) => ({
333-
value,
334-
label,
335-
}))}
336-
onChange={handleLanguageChanged}
337-
/>
331+
{shouldShowLocalizationToggle && (
332+
<IAIMantineSelect
333+
disabled={!isLocalizationEnabled}
334+
label={t('common.languagePickerLabel')}
335+
value={language}
336+
data={Object.entries(LANGUAGES).map(([value, label]) => ({
337+
value,
338+
label,
339+
}))}
340+
onChange={handleLanguageChanged}
341+
/>
342+
)}
338343
</StyledFlex>
339344

340345
{shouldShowDeveloperSettings && (

0 commit comments

Comments
 (0)