mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): progress alert config setting
- Add `invocationProgressAlert` as a disable-able feature. Hide the alert and the setting in system settings when disabled. - Fix merge conflict
This commit is contained in:
@@ -77,7 +77,7 @@ const SettingsMenu = () => {
|
||||
{t('common.hotkeysLabel')}
|
||||
</MenuItem>
|
||||
</HotkeysModal>
|
||||
<SettingsModal config={{ shouldShowInvocationProgressDetailToggle: false }}>
|
||||
<SettingsModal>
|
||||
<MenuItem as="button" icon={<PiToggleRightFill />}>
|
||||
{t('common.settingsLabel')}
|
||||
</MenuItem>
|
||||
|
||||
@@ -26,6 +26,7 @@ import { SettingsDeveloperLogLevel } from 'features/system/components/SettingsMo
|
||||
import { SettingsDeveloperLogNamespaces } from 'features/system/components/SettingsModal/SettingsDeveloperLogNamespaces';
|
||||
import { useClearIntermediates } from 'features/system/components/SettingsModal/useClearIntermediates';
|
||||
import { StickyScrollable } from 'features/system/components/StickyScrollable';
|
||||
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
||||
import {
|
||||
selectSystemShouldAntialiasProgressImage,
|
||||
selectSystemShouldConfirmOnDelete,
|
||||
@@ -58,7 +59,6 @@ type ConfigOptions = {
|
||||
shouldShowResetWebUiText?: boolean;
|
||||
shouldShowClearIntermediates?: boolean;
|
||||
shouldShowLocalizationToggle?: boolean;
|
||||
shouldShowInvocationProgressDetailToggle?: boolean;
|
||||
};
|
||||
|
||||
const defaultConfig: ConfigOptions = {
|
||||
@@ -66,7 +66,6 @@ const defaultConfig: ConfigOptions = {
|
||||
shouldShowResetWebUiText: true,
|
||||
shouldShowClearIntermediates: true,
|
||||
shouldShowLocalizationToggle: true,
|
||||
shouldShowInvocationProgressDetailToggle: true,
|
||||
};
|
||||
|
||||
type SettingsModalProps = {
|
||||
@@ -108,6 +107,7 @@ const SettingsModal = ({ config = defaultConfig, children }: SettingsModalProps)
|
||||
const shouldEnableModelDescriptions = useAppSelector(selectSystemShouldEnableModelDescriptions);
|
||||
const shouldConfirmOnNewSession = useAppSelector(selectSystemShouldConfirmOnNewSession);
|
||||
const shouldShowInvocationProgressDetail = useAppSelector(selectSystemShouldShowInvocationProgressDetail);
|
||||
const isInvocationProgressAlertEnabled = useFeatureStatus('invocationProgressAlert');
|
||||
const onToggleConfirmOnNewSession = useCallback(() => {
|
||||
dispatch(shouldConfirmOnNewSessionToggled());
|
||||
}, [dispatch]);
|
||||
@@ -233,7 +233,7 @@ const SettingsModal = ({ config = defaultConfig, children }: SettingsModalProps)
|
||||
onChange={handleChangeShouldAntialiasProgressImage}
|
||||
/>
|
||||
</FormControl>
|
||||
{Boolean(config?.shouldShowInvocationProgressDetailToggle) && (
|
||||
{isInvocationProgressAlertEnabled && (
|
||||
<FormControl>
|
||||
<FormLabel>{t('settings.showDetailedInvocationProgress')}</FormLabel>
|
||||
<Switch
|
||||
|
||||
Reference in New Issue
Block a user