Skip to content

The swiss army knife of lossless video/audio editing

add clear working dir button

Mikael Finstad305b23fb20e0
diff --git a/src/renderer/src/components/Settings.tsx b/src/renderer/src/components/Settings.tsx
index e79fd93a..7532360c 100644
--- a/src/renderer/src/components/Settings.tsx
+++ b/src/renderer/src/components/Settings.tsx
@@ -1,6 +1,6 @@
import { CSSProperties, ChangeEventHandler, memo, useCallback, useMemo, useState } from 'react';
import { FaYinYang, FaKeyboard } from 'react-icons/fa';
-import { GlobeIcon, CleanIcon, CogIcon, Button, NumericalIcon, FolderCloseIcon, DocumentIcon, TimeIcon } from 'evergreen-ui';
+import { GlobeIcon, CleanIcon, CogIcon, Button, NumericalIcon, FolderCloseIcon, DocumentIcon, TimeIcon, CrossIcon } from 'evergreen-ui';
import { useTranslation } from 'react-i18next';
import { HTMLMotionProps, motion } from 'framer-motion';
import invariant from 'tiny-invariant';
@@ -47,12 +47,14 @@ const Settings = memo(({
askForCleanupChoices,
toggleStoreProjectInWorkingDir,
simpleMode,
+ clearOutDir,
}: {
onTunerRequested: (type: TunerType) => void,
onKeyboardShortcutsDialogRequested: () => void,
askForCleanupChoices: () => Promise<void>,
toggleStoreProjectInWorkingDir: () => Promise<void>,
simpleMode: boolean,
+ clearOutDir: () => Promise<void>,
}) => {
const { t } = useTranslation();
const [showAdvanced, setShowAdvanced] = useState(!simpleMode);
@@ -205,6 +207,15 @@ const Settings = memo(({
{customOutDir ? t('Custom working directory') : t('Same directory as input file')}...
</Button>
<div>{customOutDir}</div>
+ {customOutDir && (
+ <Button
+ height={20}
+ iconBefore={CrossIcon}
+ onClick={clearOutDir}
+ >
+ {t('Clear working directory')}
+ </Button>
+ )}
</td>
</Row>