mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
enable hide localization toggle (#4004)
## What type of PR is this? (check all applicable) - [ ] Refactor - [ ] Feature - [ ] Bug Fix - [ ] Optimization - [ ] Documentation Update - [ ] Community Node Submission ## Have you discussed this change with the InvokeAI team? - [ ] Yes - [ ] No, because: ## Have you updated all relevant documentation? - [ ] Yes - [ ] No ## Description ## Related Tickets & Documents <!-- For pull requests that relate or close an issue, please include them below. For example having the text: "closes #1234" would connect the current pull request to issue 1234. And when we merge the pull request, Github will automatically close the issue. --> - Related Issue # - Closes # ## QA Instructions, Screenshots, Recordings <!-- Please provide steps on how to test changes, any hardware or software specifications as well as any other pertinent information. --> ## Added/updated tests? - [ ] Yes - [ ] No : _please replace this line with details on why tests have not been included_ ## [optional] Are there any post deployment tasks we need to perform?
This commit is contained in:
commit
13ac5c6899
@ -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,6 +328,7 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
|
|||||||
onChange={handleToggleNodes}
|
onChange={handleToggleNodes}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{shouldShowLocalizationToggle && (
|
||||||
<IAIMantineSelect
|
<IAIMantineSelect
|
||||||
disabled={!isLocalizationEnabled}
|
disabled={!isLocalizationEnabled}
|
||||||
label={t('common.languagePickerLabel')}
|
label={t('common.languagePickerLabel')}
|
||||||
@ -335,6 +339,7 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
|
|||||||
}))}
|
}))}
|
||||||
onChange={handleLanguageChanged}
|
onChange={handleLanguageChanged}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</StyledFlex>
|
</StyledFlex>
|
||||||
|
|
||||||
{shouldShowDeveloperSettings && (
|
{shouldShowDeveloperSettings && (
|
||||||
|
Loading…
Reference in New Issue
Block a user