mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): add tooltip to clear intermediates button when disabled
This commit is contained in:
parent
95cca9493c
commit
1c099e0abb
@ -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.",
|
||||
|
@ -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() {
|
||||
<StyledFlex>
|
||||
<Heading size="sm">{t('settings.clearIntermediates')}</Heading>
|
||||
<IAIButton
|
||||
tooltip={
|
||||
hasPendingItems ? t('settings.clearIntermediatesDisabled') : undefined
|
||||
}
|
||||
colorScheme="warning"
|
||||
onClick={handleClickClearIntermediates}
|
||||
isLoading={isLoadingClearIntermediates}
|
||||
|
Loading…
Reference in New Issue
Block a user