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;
|
||||
shouldShowClearIntermediates: boolean;
|
||||
shouldShowNodesToggle: boolean;
|
||||
shouldShowLocalizationToggle: boolean;
|
||||
};
|
||||
|
||||
type SettingsModalProps = {
|
||||
@ -125,6 +126,8 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
|
||||
const shouldShowClearIntermediates =
|
||||
config?.shouldShowClearIntermediates ?? true;
|
||||
const shouldShowNodesToggle = config?.shouldShowNodesToggle ?? true;
|
||||
const shouldShowLocalizationToggle =
|
||||
config?.shouldShowLocalizationToggle ?? true;
|
||||
|
||||
useEffect(() => {
|
||||
if (!shouldShowDeveloperSettings) {
|
||||
@ -325,16 +328,18 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
|
||||
onChange={handleToggleNodes}
|
||||
/>
|
||||
)}
|
||||
<IAIMantineSelect
|
||||
disabled={!isLocalizationEnabled}
|
||||
label={t('common.languagePickerLabel')}
|
||||
value={language}
|
||||
data={Object.entries(LANGUAGES).map(([value, label]) => ({
|
||||
value,
|
||||
label,
|
||||
}))}
|
||||
onChange={handleLanguageChanged}
|
||||
/>
|
||||
{shouldShowLocalizationToggle && (
|
||||
<IAIMantineSelect
|
||||
disabled={!isLocalizationEnabled}
|
||||
label={t('common.languagePickerLabel')}
|
||||
value={language}
|
||||
data={Object.entries(LANGUAGES).map(([value, label]) => ({
|
||||
value,
|
||||
label,
|
||||
}))}
|
||||
onChange={handleLanguageChanged}
|
||||
/>
|
||||
)}
|
||||
</StyledFlex>
|
||||
|
||||
{shouldShowDeveloperSettings && (
|
||||
|
Loading…
Reference in New Issue
Block a user