mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
hide localization toggle
This commit is contained in:
parent
385483ff8e
commit
f86d0d1b69
@ -104,6 +104,7 @@ type ConfigOptions = {
|
|||||||
shouldShowAdvancedOptionsSettings: boolean;
|
shouldShowAdvancedOptionsSettings: boolean;
|
||||||
shouldShowClearIntermediates: boolean;
|
shouldShowClearIntermediates: boolean;
|
||||||
shouldShowNodesToggle: boolean;
|
shouldShowNodesToggle: boolean;
|
||||||
|
shouldShowLocalizationToggle: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
type SettingsModalProps = {
|
type SettingsModalProps = {
|
||||||
@ -125,6 +126,8 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
|
|||||||
const shouldShowClearIntermediates =
|
const shouldShowClearIntermediates =
|
||||||
config?.shouldShowClearIntermediates ?? true;
|
config?.shouldShowClearIntermediates ?? true;
|
||||||
const shouldShowNodesToggle = config?.shouldShowNodesToggle ?? true;
|
const shouldShowNodesToggle = config?.shouldShowNodesToggle ?? true;
|
||||||
|
const shouldShowLocalizationToggle =
|
||||||
|
config?.shouldShowLocalizationToggle ?? true;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!shouldShowDeveloperSettings) {
|
if (!shouldShowDeveloperSettings) {
|
||||||
@ -325,16 +328,18 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
|
|||||||
onChange={handleToggleNodes}
|
onChange={handleToggleNodes}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<IAIMantineSelect
|
{shouldShowLocalizationToggle && (
|
||||||
disabled={!isLocalizationEnabled}
|
<IAIMantineSelect
|
||||||
label={t('common.languagePickerLabel')}
|
disabled={!isLocalizationEnabled}
|
||||||
value={language}
|
label={t('common.languagePickerLabel')}
|
||||||
data={Object.entries(LANGUAGES).map(([value, label]) => ({
|
value={language}
|
||||||
value,
|
data={Object.entries(LANGUAGES).map(([value, label]) => ({
|
||||||
label,
|
value,
|
||||||
}))}
|
label,
|
||||||
onChange={handleLanguageChanged}
|
}))}
|
||||||
/>
|
onChange={handleLanguageChanged}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</StyledFlex>
|
</StyledFlex>
|
||||||
|
|
||||||
{shouldShowDeveloperSettings && (
|
{shouldShowDeveloperSettings && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user