From 1c099e0abb9221483bdac0a567394d1b493cbece Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 15 Oct 2023 17:27:25 +1100 Subject: [PATCH] feat(ui): add tooltip to clear intermediates button when disabled --- invokeai/frontend/web/public/locales/en.json | 1 + .../components/SettingsModal/SettingsClearIntermediates.tsx | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index dd96193d5d..dc6c54f025 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -1115,6 +1115,7 @@ "showProgressInViewer": "Show Progress Images in Viewer", "ui": "User Interface", "useSlidersForAll": "Use Sliders For All Options", + "clearIntermediatesDisabled": "Queue must be empty to clear intermediates", "clearIntermediatesDesc1": "Clearing intermediates will reset your Canvas and ControlNet state.", "clearIntermediatesDesc2": "Intermediate images are byproducts of generation, different from the result images in the gallery. Clearing intermediates will free disk space.", "clearIntermediatesDesc3": "Your gallery images will not be deleted.", diff --git a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsClearIntermediates.tsx b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsClearIntermediates.tsx index 648a4b5162..fbe5692431 100644 --- a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsClearIntermediates.tsx +++ b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsClearIntermediates.tsx @@ -3,12 +3,12 @@ import { useAppDispatch } from 'app/store/storeHooks'; import { controlAdaptersReset } from 'features/controlAdapters/store/controlAdaptersSlice'; import { useCallback, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; +import { useGetQueueStatusQuery } from 'services/api/endpoints/queue'; import IAIButton from '../../../../common/components/IAIButton'; import { useClearIntermediatesMutation, useGetIntermediatesCountQuery, } from '../../../../services/api/endpoints/images'; -import { useGetQueueStatusQuery } from 'services/api/endpoints/queue'; import { resetCanvas } from '../../../canvas/store/canvasSlice'; import { addToast } from '../../store/systemSlice'; import StyledFlex from './StyledFlex'; @@ -64,6 +64,9 @@ export default function SettingsClearIntermediates() { {t('settings.clearIntermediates')}