1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-21 18:02:35 +01:00

err also if all segments match expr

#2059
This commit is contained in:
Mikael Finstad 2024-08-15 22:41:25 +02:00
parent ed3fb95c51
commit c2e504ccc6
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26
2 changed files with 3 additions and 2 deletions

View File

@ -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 { GlobeIcon, CleanIcon, CogIcon, Button, NumericalIcon, FolderCloseIcon, DocumentIcon, TimeIcon, CrossIcon } from 'evergreen-ui';
import { useTranslation } from 'react-i18next';
@ -30,7 +30,7 @@ const Row = (props: HTMLMotionProps<'tr'>) => (
/>
);
// 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 }) => (
<Row className={styles['header']}>

View File

@ -497,6 +497,7 @@ function useSegments({ filePath, workingRef, setWorking, setCutProgress, videoSt
if (v.trim().length === 0) return i18n.t('Please enter a JavaScript expression.');
const segments = await getSegmentsToEnable(v);
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;
} catch (err) {
if (err instanceof Error) {