upgrade swal

pull/1898/head
Mikael Finstad 2 years ago
parent 5fdf86feac
commit ecc57047e4
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

@ -106,7 +106,7 @@
"sharp": "^0.32.6", "sharp": "^0.32.6",
"smpte-timecode": "^1.2.3", "smpte-timecode": "^1.2.3",
"sortablejs": "^1.13.0", "sortablejs": "^1.13.0",
"sweetalert2": "^11.0.0", "sweetalert2": "^11.11.0",
"sweetalert2-react-content": "^5.0.7", "sweetalert2-react-content": "^5.0.7",
"tiny-invariant": "^1.3.3", "tiny-invariant": "^1.3.3",
"tsx": "^4.7.1", "tsx": "^4.7.1",

@ -905,9 +905,7 @@ function App() {
setTotalProgress(); setTotalProgress();
} }
// @ts-expect-error todo if (failedFiles.length > 0) toast.fire({ title: `${i18n.t('Failed to convert files:')} ${failedFiles.join(' ')}`, timer: null as unknown as undefined, showConfirmButton: true });
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (failedFiles.length > 0) toast.fire({ title: `${i18n.t('Failed to convert files:')} ${failedFiles.join(' ')}`, timer: null as any as undefined, showConfirmButton: true });
} catch (err) { } catch (err) {
errorToast(i18n.t('Failed to batch convert to supported format')); errorToast(i18n.t('Failed to batch convert to supported format'));
console.error('Failed to html5ify', err); console.error('Failed to html5ify', err);

@ -318,7 +318,6 @@ const SegmentList = memo(({
const onReorderSegs = useCallback(async (index: number) => { const onReorderSegs = useCallback(async (index: number) => {
if (apparentCutSegments.length < 2) return; if (apparentCutSegments.length < 2) return;
// @ts-expect-error todo
const { value } = await Swal.fire({ const { value } = await Swal.fire({
title: `${t('Change order of segment')} ${index + 1}`, title: `${t('Change order of segment')} ${index + 1}`,
text: `Please enter a number from 1 to ${apparentCutSegments.length} to be the new order for the current segment`, text: `Please enter a number from 1 to ${apparentCutSegments.length} to be the new order for the current segment`,

@ -20,7 +20,6 @@ const { dialog } = window.require('@electron/remote');
const ReactSwal = withReactContent(Swal); const ReactSwal = withReactContent(Swal);
export async function promptTimeOffset({ initialValue, title, text, inputPlaceholder, parseTimecode }: { initialValue?: string | undefined, title: string, text?: string | undefined, inputPlaceholder: string, parseTimecode: ParseTimecode }) { export async function promptTimeOffset({ initialValue, title, text, inputPlaceholder, parseTimecode }: { initialValue?: string | undefined, title: string, text?: string | undefined, inputPlaceholder: string, parseTimecode: ParseTimecode }) {
// @ts-expect-error todo
const { value } = await Swal.fire({ const { value } = await Swal.fire({
title, title,
text, text,
@ -474,9 +473,7 @@ export async function showExportFailedDialog({ fileFormat, safeOutputFileName })
</div> </div>
); );
// @ts-expect-error todo const { value } = await ReactSwal.fire({ title: i18n.t('Unable to export this file'), html, timer: null as unknown as undefined, showConfirmButton: true, showCancelButton: true, cancelButtonText: i18n.t('OK'), confirmButtonText: i18n.t('Report'), reverseButtons: true, focusCancel: true });
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const { value } = await ReactSwal.fire({ title: i18n.t('Unable to export this file'), html, timer: null as any as undefined, showConfirmButton: true, showCancelButton: true, cancelButtonText: i18n.t('OK'), confirmButtonText: i18n.t('Report'), reverseButtons: true, focusCancel: true });
return value; return value;
} }
@ -496,9 +493,7 @@ export async function showConcatFailedDialog({ fileFormat }) {
</div> </div>
); );
// @ts-expect-error todo const { value } = await ReactSwal.fire({ title: i18n.t('Unable to merge files'), html, timer: null as unknown as undefined, showConfirmButton: true, showCancelButton: true, cancelButtonText: i18n.t('OK'), confirmButtonText: i18n.t('Report'), reverseButtons: true, focusCancel: true });
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const { value } = await ReactSwal.fire({ title: i18n.t('Unable to merge files'), html, timer: null as any as undefined, showConfirmButton: true, showCancelButton: true, cancelButtonText: i18n.t('OK'), confirmButtonText: i18n.t('Report'), reverseButtons: true, focusCancel: true });
return value; return value;
} }
@ -611,7 +606,6 @@ export async function openExportFinishedToast({ filePath, warnings, notices }) {
</UnorderedList> </UnorderedList>
); );
// @ts-expect-error todo
await openDirToast({ filePath, html, width: 800, position: 'center', timer: hasWarnings ? undefined : 30000 }); await openDirToast({ filePath, html, width: 800, position: 'center', timer: hasWarnings ? undefined : 30000 });
} }

@ -66,7 +66,6 @@ export async function showParametersDialog({ title, description, parameters: par
}; };
const promise2 = (async () => { const promise2 = (async () => {
// @ts-expect-error todo
const { isConfirmed } = await ReactSwal.fire({ const { isConfirmed } = await ReactSwal.fire({
title, title,
html: <ParametersInput description={description} parameters={parameters} onChange={(newParameters) => { parameters = newParameters; }} onSubmit={handleSubmit} docUrl={docUrl} />, html: <ParametersInput description={description} parameters={parameters} onChange={(newParameters) => { parameters = newParameters; }} onSubmit={handleSubmit} docUrl={docUrl} />,

@ -7974,7 +7974,7 @@ __metadata:
smpte-timecode: "npm:^1.2.3" smpte-timecode: "npm:^1.2.3"
sortablejs: "npm:^1.13.0" sortablejs: "npm:^1.13.0"
string-to-stream: "npm:^3.0.1" string-to-stream: "npm:^3.0.1"
sweetalert2: "npm:^11.0.0" sweetalert2: "npm:^11.11.0"
sweetalert2-react-content: "npm:^5.0.7" sweetalert2-react-content: "npm:^5.0.7"
tiny-invariant: "npm:^1.3.3" tiny-invariant: "npm:^1.3.3"
tsx: "npm:^4.7.1" tsx: "npm:^4.7.1"
@ -11058,10 +11058,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"sweetalert2@npm:^11.0.0": "sweetalert2@npm:^11.11.0":
version: 11.3.5 version: 11.11.0
resolution: "sweetalert2@npm:11.3.5" resolution: "sweetalert2@npm:11.11.0"
checksum: 69c8d48f34d0e1ab4be1970b780771dcd63a45fb81e9e3c08451a881022310e5c514af4afbcc384a7794c3a456824d7373ef3951d2246e8850acee9aa75c3e85 checksum: 8a5ead894f4e15b9f74a7bb95077972b85c92367dd157401bfe7b4cd933382d23640f634105fc984760c0ed02a9910f4a54a357eaebd999cbac3cd10e1f03237
languageName: node languageName: node
linkType: hard linkType: hard

Loading…
Cancel
Save