mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): remove clear temp folder canvas button
This button is nonfunctional. Soon we will introduce a different way to handle clearing out intermediate images (likely automated).
This commit is contained in:
parent
05a19753c6
commit
813f79f0f9
@ -16,7 +16,6 @@ import {
|
||||
setShouldShowIntermediates,
|
||||
setShouldSnapToGrid,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import EmptyTempFolderButtonModal from 'features/system/components/ClearTempFolderButtonModal';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { ChangeEvent } from 'react';
|
||||
@ -159,7 +158,6 @@ const IAICanvasSettingsButtonPopover = () => {
|
||||
onChange={(e) => dispatch(setShouldAntialias(e.target.checked))}
|
||||
/>
|
||||
<ClearCanvasHistoryButtonModal />
|
||||
<EmptyTempFolderButtonModal />
|
||||
</Flex>
|
||||
</IAIPopover>
|
||||
);
|
||||
|
@ -1,41 +0,0 @@
|
||||
// import { emptyTempFolder } from 'app/socketio/actions';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import IAIAlertDialog from 'common/components/IAIAlertDialog';
|
||||
import IAIButton from 'common/components/IAIButton';
|
||||
import { isStagingSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import {
|
||||
clearCanvasHistory,
|
||||
resetCanvas,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FaTrash } from 'react-icons/fa';
|
||||
|
||||
const EmptyTempFolderButtonModal = () => {
|
||||
const isStaging = useAppSelector(isStagingSelector);
|
||||
const dispatch = useAppDispatch();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const acceptCallback = () => {
|
||||
dispatch(emptyTempFolder());
|
||||
dispatch(resetCanvas());
|
||||
dispatch(clearCanvasHistory());
|
||||
};
|
||||
|
||||
return (
|
||||
<IAIAlertDialog
|
||||
title={t('unifiedCanvas.emptyTempImageFolder')}
|
||||
acceptCallback={acceptCallback}
|
||||
acceptButtonText={t('unifiedCanvas.emptyFolder')}
|
||||
triggerComponent={
|
||||
<IAIButton leftIcon={<FaTrash />} size="sm" isDisabled={isStaging}>
|
||||
{t('unifiedCanvas.emptyTempImageFolder')}
|
||||
</IAIButton>
|
||||
}
|
||||
>
|
||||
<p>{t('unifiedCanvas.emptyTempImagesFolderMessage')}</p>
|
||||
<br />
|
||||
<p>{t('unifiedCanvas.emptyTempImagesFolderConfirm')}</p>
|
||||
</IAIAlertDialog>
|
||||
);
|
||||
};
|
||||
export default EmptyTempFolderButtonModal;
|
@ -12,7 +12,6 @@ import {
|
||||
setShouldShowCanvasDebugInfo,
|
||||
setShouldShowIntermediates,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import EmptyTempFolderButtonModal from 'features/system/components/ClearTempFolderButtonModal';
|
||||
|
||||
import { FaWrench } from 'react-icons/fa';
|
||||
|
||||
@ -105,7 +104,6 @@ const UnifiedCanvasSettings = () => {
|
||||
onChange={(e) => dispatch(setShouldAntialias(e.target.checked))}
|
||||
/>
|
||||
<ClearCanvasHistoryButtonModal />
|
||||
<EmptyTempFolderButtonModal />
|
||||
</Flex>
|
||||
</IAIPopover>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user