improve reporting

pull/539/head
Mikael Finstad 2020-12-08 00:04:42 +01:00
rodzic 26c57fb6a7
commit 3045365a0f
1 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -3,9 +3,10 @@ import Swal from 'sweetalert2';
import withReactContent from 'sweetalert2-react-content';
import i18n from 'i18next';
import { isStoreBuild } from './util';
import { isStoreBuild, isMasBuild, isWindowsStoreBuild } from './util';
const electron = window.require('electron'); // eslint-disable-line
const os = window.require('os');
const ReactSwal = withReactContent(Swal);
@ -16,6 +17,9 @@ export function openSendReportDialog(err, state) {
? <p>Please send an email to <span style={{ fontWeight: 'bold' }} role="button" onClick={() => electron.shell.openExternal('mailto:losslesscut@yankee.no')}>losslesscut@yankee.no</span> where you describe what you were doing.</p>
: <p>Please create an issue at <span style={{ fontWeight: 'bold' }} role="button" onClick={() => electron.shell.openExternal('https://github.com/mifi/lossless-cut/issues')}>https://github.com/mifi/lossless-cut/issues</span> where you describe what you were doing.</p>;
const platform = os.platform();
const version = electron.remote.app.getVersion();
ReactSwal.fire({
showCloseButton: true,
title: i18n.t('Send problem report'),
@ -39,6 +43,11 @@ export function openSendReportDialog(err, state) {
},
state,
platform,
version,
isWindowsStoreBuild,
isMasBuild,
}, null, 2)}`}
</div>
</div>