improve success dialog

pull/1255/head
Mikael Finstad 4 years ago
parent 5d8103e805
commit d76c923730
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

@ -1,5 +1,5 @@
import React, { useState, useCallback, useRef, useEffect } from 'react'; 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 Swal from 'sweetalert2';
import i18n from 'i18next'; import i18n from 'i18next';
import { Trans } from 'react-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 }) { export async function openCutFinishedToast({ filePath, warnings, notices }) {
const html = ( const html = (
<> <UnorderedList>
<div> <ListItem icon={TickCircleIcon} iconColor="success" fontWeight="bold">{i18n.t('Export is done!')}</ListItem>
{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.')} <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>
</div> <ListItem icon={HelpIcon}>{i18n.t('If output does not look right, see the Help menu.')}</ListItem>
<UnorderedList> {notices.map((msg) => <ListItem key={msg} icon={InfoSignIcon} iconColor="info">{msg}</ListItem>)}
{warnings.map((msg) => <ListItem key={msg} icon={WarningSignIcon} iconColor="warning">{msg}</ListItem>)} {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>
</>
); );
await openDirToast({ filePath, html, width: '90%', position: 'center', timer: 15000 });
await openDirToast({ filePath, html, width: 800, position: 'center', timer: 15000 });
} }

@ -748,6 +748,8 @@ export function isIphoneHevc(format, streams) {
} }
export function isProblematicAvc1(outFormat, 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'); return isMov(outFormat) && streams.some((s) => s.codec_name === 'h264' && s.codec_tag === '0x31637661' && s.codec_tag_string === 'avc1' && s.pix_fmt === 'yuv422p10le');
} }

Loading…
Cancel
Save