1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-25 11:43:17 +01:00

improve success dialog

This commit is contained in:
Mikael Finstad 2023-01-03 18:12:38 +08:00
parent 5d8103e805
commit d76c923730
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26
2 changed files with 12 additions and 11 deletions

View File

@ -1,5 +1,5 @@
import React, { useState, useCallback, useRef, useEffect } from 'react';
import { UnorderedList, ListItem, WarningSignIcon, InfoSignIcon, Button, TextInputField, Checkbox, RadioGroup, Paragraph, LinkIcon } from 'evergreen-ui';
import { HelpIcon, TickCircleIcon, UnorderedList, ListItem, WarningSignIcon, InfoSignIcon, Button, TextInputField, Checkbox, RadioGroup, Paragraph, LinkIcon } from 'evergreen-ui';
import Swal from 'sweetalert2';
import i18n from 'i18next';
import { Trans } from 'react-i18next';
@ -615,15 +615,14 @@ export async function openDirToast({ filePath, text, html, ...props }) {
export async function openCutFinishedToast({ filePath, warnings, notices }) {
const html = (
<>
<div>
{i18n.t('Done! Note: cutpoints may be inaccurate. Make sure you test the output files in your desired player/editor before you delete the source. If output does not look right, see the HELP page.')}
</div>
<UnorderedList>
{warnings.map((msg) => <ListItem key={msg} icon={WarningSignIcon} iconColor="warning">{msg}</ListItem>)}
{notices.map((msg) => <ListItem key={msg} icon={InfoSignIcon} iconColor="info">{msg}</ListItem>)}
</UnorderedList>
</>
<UnorderedList>
<ListItem icon={TickCircleIcon} iconColor="success" fontWeight="bold">{i18n.t('Export is done!')}</ListItem>
<ListItem icon={InfoSignIcon}>{i18n.t('Note: cutpoints may be inaccurate. Please test the output files in your desired player/editor before you delete the source file.')}</ListItem>
<ListItem icon={HelpIcon}>{i18n.t('If output does not look right, see the Help menu.')}</ListItem>
{notices.map((msg) => <ListItem key={msg} icon={InfoSignIcon} iconColor="info">{msg}</ListItem>)}
{warnings.map((msg) => <ListItem key={msg} icon={WarningSignIcon} iconColor="warning">{msg}</ListItem>)}
</UnorderedList>
);
await openDirToast({ filePath, html, width: '90%', position: 'center', timer: 15000 });
await openDirToast({ filePath, html, width: 800, position: 'center', timer: 15000 });
}

View File

@ -748,6 +748,8 @@ export function isIphoneHevc(format, streams) {
}
export function isProblematicAvc1(outFormat, streams) {
// it seems like this only happens for files that are also 4.2.2 10bit (yuv422p10le)
// https://trac.ffmpeg.org/wiki/Chroma%20Subsampling
return isMov(outFormat) && streams.some((s) => s.codec_name === 'h264' && s.codec_tag === '0x31637661' && s.codec_tag_string === 'avc1' && s.pix_fmt === 'yuv422p10le');
}