From d8ebc229df717716ecfb579a65265c7fc9f45a94 Mon Sep 17 00:00:00 2001 From: Mary Hipp Date: Fri, 7 Jul 2023 14:02:07 -0400 Subject: [PATCH] add option to settings modal to hide advanced settings toggle --- .../SettingsModal/SettingsModal.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx index c8eb9cc34a..43a487ba5a 100644 --- a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx +++ b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx @@ -90,6 +90,7 @@ type ConfigOptions = { shouldShowDeveloperSettings: boolean; shouldShowResetWebUiText: boolean; shouldShowBetaLayout: boolean; + shouldShowAdvancedOptionsSettings: boolean; }; type SettingsModalProps = { @@ -106,6 +107,8 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => { const shouldShowDeveloperSettings = config?.shouldShowDeveloperSettings ?? true; const shouldShowResetWebUiText = config?.shouldShowResetWebUiText ?? true; + const shouldShowAdvancedOptionsSettings = + config?.shouldShowAdvancedOptionsSettings ?? true; useEffect(() => { if (!shouldShowDeveloperSettings) { @@ -193,13 +196,15 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => { dispatch(setShouldConfirmOnDelete(e.target.checked)) } /> - ) => - dispatch(setShouldShowAdvancedOptions(e.target.checked)) - } - /> + {shouldShowAdvancedOptionsSettings && ( + ) => + dispatch(setShouldShowAdvancedOptions(e.target.checked)) + } + /> + )}