Skip to content

The swiss army knife of lossless video/audio editing

add app version to title

Mikael Finstad251101e6c206
diff --git a/src/renderer/src/reporting.tsx b/src/renderer/src/reporting.tsx
index ee2158e5..0a4cdf3c 100644
--- a/src/renderer/src/reporting.tsx
+++ b/src/renderer/src/reporting.tsx
@@ -2,15 +2,13 @@ import i18n from 'i18next';
import { Trans } from 'react-i18next';
import CopyClipboardButton from './components/CopyClipboardButton';
-import { isStoreBuild, isMasBuild, isWindowsStoreBuild, isExecaError } from './util';
+import { isStoreBuild, isMasBuild, isWindowsStoreBuild, isExecaError, appVersion } from './util';
import { ReactSwal } from './swal';
const electron = window.require('electron');
const remote = window.require('@electron/remote');
-const { app } = remote;
-
const { platform, arch } = remote.require('./index.js');
@@ -34,8 +32,6 @@ export function openSendReportDialog({ err, message, state }: {
</Trans>
);
- const version = app.getVersion();
-
const errorText = (() => {
if (err == null) return 'No error occurred.';
return err instanceof Error ? err.stack : String(err);
@@ -57,7 +53,7 @@ export function openSendReportDialog({ err, message, state }: {
platform,
arch,
- version,
+ version: appVersion,
isWindowsStoreBuild,
isMasBuild,
}, null, 2);
diff --git a/src/renderer/src/util.ts b/src/renderer/src/util.ts
index 4be9b416..90562dad 100644
--- a/src/renderer/src/util.ts
+++ b/src/renderer/src/util.ts
@@ -21,7 +21,9 @@ const { ipcRenderer } = window.require('electron');
const remote = window.require('@electron/remote');
const { isWindows, isMac } = remote.require('./index.js');
-export { isWindows, isMac };
+const appVersion = remote.app.getVersion();
+
+export { isWindows, isMac, appVersion };
const trashFile = async (path: string) => ipcRenderer.invoke('tryTrashItem', path);
@@ -435,7 +437,7 @@ export function setDocumentTitle({ filePath, working, progress }: {
parts.push(basename(filePath));
}
- parts.push(appName);
+ parts.push(`${appName} ${appVersion}`);
document.title = parts.join(' - ');
}