diff --git a/src/App.jsx b/src/App.jsx index 922c53d..75065c0 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -48,8 +48,9 @@ import { save as edlStoreSave, load as edlStoreLoad } from './edlStore'; import { getOutPath, formatDuration, toast, errorToast, showFfmpegFail, setFileNameTitle, promptTimeOffset, generateColor, getOutDir, withBlur, checkDirWriteAccess, dirExists, - openDirToast, askForHtml5ifySpeed, + openDirToast, askForHtml5ifySpeed, isMasBuild, isStoreBuild, } from './util'; +import { openSendReportDialog } from './reporting'; import loadingLottie from './7077-magic-flow.json'; @@ -61,7 +62,6 @@ const trash = window.require('trash'); const { unlink, exists } = window.require('fs-extra'); const { extname } = window.require('path'); - const { dialog, app } = electron.remote; const ReactSwal = withReactContent(Swal); @@ -109,9 +109,6 @@ const calcShouldShowKeyframes = (zoomedDuration) => (zoomedDuration != null && z const commonFormats = ['mov', 'mp4', 'matroska', 'mp3', 'ipod']; -const isMasBuild = window.process.mas; -const isStoreBuild = isMasBuild || window.process.windowsStore; - // TODO flex const topBarHeight = 32; const timelineHeight = 36; @@ -892,49 +889,20 @@ const App = memo(() => { const outSegments = useMemo(() => (invertCutSegments ? inverseCutSegments : apparentCutSegments), [invertCutSegments, inverseCutSegments, apparentCutSegments]); - const openSendReportDialog = useCallback(async (err) => { - const reportInstructions = isStoreBuild - ?
Please send an email to electron.shell.openExternal('mailto:losslesscut@yankee.no')}>losslesscut@yankee.no where you describe what you were doing.
- :Please create an issue at electron.shell.openExternal('https://github.com/mifi/lossless-cut/issues')}>https://github.com/mifi/lossless-cut/issues where you describe what you were doing.
; + const openSendReportDialogWithState = useCallback(async (err) => { + const state = { + filePath, + fileFormat, + externalStreamFiles, + mainStreams, + copyStreamIdsByFile, + cutSegments, + fileFormatData, + rotation, + shortestFlag, + }; - ReactSwal.fire({ - showCloseButton: true, - title: i18n.t('Send problem report'), - html: ( -Include the following text:
- -Please send an email to electron.shell.openExternal('mailto:losslesscut@yankee.no')}>losslesscut@yankee.no where you describe what you were doing.
+ :Please create an issue at electron.shell.openExternal('https://github.com/mifi/lossless-cut/issues')}>https://github.com/mifi/lossless-cut/issues where you describe what you were doing.
; + + ReactSwal.fire({ + showCloseButton: true, + title: i18n.t('Send problem report'), + html: ( +Include the following text:
+ +