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",
|
"showProgressInViewer": "Show Progress Images in Viewer",
|
||||||
"ui": "User Interface",
|
"ui": "User Interface",
|
||||||
"useSlidersForAll": "Use Sliders For All Options",
|
"useSlidersForAll": "Use Sliders For All Options",
|
||||||
|
"clearIntermediatesDisabled": "Queue must be empty to clear intermediates",
|
||||||
"clearIntermediatesDesc1": "Clearing intermediates will reset your Canvas and ControlNet state.",
|
"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.",
|
"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.",
|
"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 { controlAdaptersReset } from 'features/controlAdapters/store/controlAdaptersSlice';
|
||||||
import { useCallback, useEffect } from 'react';
|
import { useCallback, useEffect } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { useGetQueueStatusQuery } from 'services/api/endpoints/queue';
|
||||||
import IAIButton from '../../../../common/components/IAIButton';
|
import IAIButton from '../../../../common/components/IAIButton';
|
||||||
import {
|
import {
|
||||||
useClearIntermediatesMutation,
|
useClearIntermediatesMutation,
|
||||||
useGetIntermediatesCountQuery,
|
useGetIntermediatesCountQuery,
|
||||||
} from '../../../../services/api/endpoints/images';
|
} from '../../../../services/api/endpoints/images';
|
||||||
import { useGetQueueStatusQuery } from 'services/api/endpoints/queue';
|
|
||||||
import { resetCanvas } from '../../../canvas/store/canvasSlice';
|
import { resetCanvas } from '../../../canvas/store/canvasSlice';
|
||||||
import { addToast } from '../../store/systemSlice';
|
import { addToast } from '../../store/systemSlice';
|
||||||
import StyledFlex from './StyledFlex';
|
import StyledFlex from './StyledFlex';
|
||||||
@ -64,6 +64,9 @@ export default function SettingsClearIntermediates() {
|
|||||||
<StyledFlex>
|
<StyledFlex>
|
||||||
<Heading size="sm">{t('settings.clearIntermediates')}</Heading>
|
<Heading size="sm">{t('settings.clearIntermediates')}</Heading>
|
||||||
<IAIButton
|
<IAIButton
|
||||||
|
tooltip={
|
||||||
|
hasPendingItems ? t('settings.clearIntermediatesDisabled') : undefined
|
||||||
|
}
|
||||||
colorScheme="warning"
|
colorScheme="warning"
|
||||||
onClick={handleClickClearIntermediates}
|
onClick={handleClickClearIntermediates}
|
||||||
isLoading={isLoadingClearIntermediates}
|
isLoading={isLoadingClearIntermediates}
|
||||||
|
Loading…
Reference in New Issue
Block a user