mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 02:12:30 +01:00
add clear working dir button
in settings too
This commit is contained in:
parent
df03b33e36
commit
305b23fb20
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user