Skip to content

The swiss army knife of lossless video/audio editing

err also if all segments match expr

Mikael Finstadc2e504ccc6c3
diff --git a/src/renderer/src/components/Settings.tsx b/src/renderer/src/components/Settings.tsx
index 3881d400..b73171c7 100644
--- a/src/renderer/src/components/Settings.tsx
+++ b/src/renderer/src/components/Settings.tsx
@@ -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']}>
diff --git a/src/renderer/src/hooks/useSegments.ts b/src/renderer/src/hooks/useSegments.ts
index b90611fb..34370550 100644
--- a/src/renderer/src/hooks/useSegments.ts
+++ b/src/renderer/src/hooks/useSegments.ts
@@ -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) {