mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-21 18:02:35 +01:00
parent
ed3fb95c51
commit
c2e504ccc6
@ -1,4 +1,4 @@
|
|||||||
import { CSSProperties, ChangeEventHandler, memo, useCallback, useMemo, useState } from 'react';
|
import { CSSProperties, ChangeEventHandler, TdHTMLAttributes, memo, useCallback, useMemo, useState } from 'react';
|
||||||
import { FaYinYang, FaKeyboard } from 'react-icons/fa';
|
import { FaYinYang, FaKeyboard } from 'react-icons/fa';
|
||||||
import { GlobeIcon, CleanIcon, CogIcon, Button, NumericalIcon, FolderCloseIcon, DocumentIcon, TimeIcon, CrossIcon } from 'evergreen-ui';
|
import { GlobeIcon, CleanIcon, CogIcon, Button, NumericalIcon, FolderCloseIcon, DocumentIcon, TimeIcon, CrossIcon } from 'evergreen-ui';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@ -30,7 +30,7 @@ const Row = (props: HTMLMotionProps<'tr'>) => (
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||||
const KeyCell = (props) => <td {...props} />;
|
const KeyCell = (props: TdHTMLAttributes<HTMLTableCellElement>) => <td {...props} />;
|
||||||
|
|
||||||
const Header = ({ title }: { title: string }) => (
|
const Header = ({ title }: { title: string }) => (
|
||||||
<Row className={styles['header']}>
|
<Row className={styles['header']}>
|
||||||
|
@ -497,6 +497,7 @@ function useSegments({ filePath, workingRef, setWorking, setCutProgress, videoSt
|
|||||||
if (v.trim().length === 0) return i18n.t('Please enter a JavaScript expression.');
|
if (v.trim().length === 0) return i18n.t('Please enter a JavaScript expression.');
|
||||||
const segments = await getSegmentsToEnable(v);
|
const segments = await getSegmentsToEnable(v);
|
||||||
if (segments.length === 0) return i18n.t('No segments match this expression.');
|
if (segments.length === 0) return i18n.t('No segments match this expression.');
|
||||||
|
if (segments.length === cutSegments.length) return i18n.t('All segments match this expression.');
|
||||||
return undefined;
|
return undefined;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof Error) {
|
if (err instanceof Error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user