The swiss army knife of lossless video/audio editing
use about dialog
Mikael Finstadf8c24260d62d
diff --git a/public/electron.js b/public/electron.jsindex 4965209d..324f9a00 100644--- a/public/electron.js+++ b/public/electron.js@@ -30,7 +30,23 @@ unhandled({showDialog: true,});-app.name = 'LosslessCut';+const appName = 'LosslessCut';++app.name = appName;++const isStoreBuild = process.windowsStore || process.mas;++const showVersion = !isStoreBuild;++const aboutPanelOptions = { applicationName: appName };+if (!showVersion) {+ // version will be wrong in Store builds+ aboutPanelOptions.applicationVersion = '';+ aboutPanelOptions.version = '';+}++// https://www.electronjs.org/docs/latest/api/app#appsetaboutpaneloptionsoptions+app.setAboutPanelOptions(aboutPanelOptions);let filesToOpen = [];@@ -45,8 +61,6 @@ let disableNetworking;const openFiles = (paths) => mainWindow.webContents.send('openFiles', paths);-const isStoreBuild = process.windowsStore || process.mas;-// https://github.com/electron/electron/issues/526#issuecomment-563010533function getSizeOptions() {const bounds = configStore.get('windowBounds');diff --git a/public/menu.js b/public/menu.jsindex 20936e3e..569c44ef 100644--- a/public/menu.js+++ b/public/menu.js@@ -376,12 +376,7 @@ module.exports = ({ app, mainWindow, newVersion, isStoreBuild }) => {label: esc(t('Report an error')),click() { mainWindow.webContents.send('openSendReportDialog'); },},- ...(!isStoreBuild ? [- {- label: esc(t('Version')),- click() { mainWindow.webContents.send('openAbout'); },- },- ] : []),+ ...(process.platform !== 'darwin' ? [{ role: 'about' }] : []),],},];diff --git a/src/App.jsx b/src/App.jsxindex 82f4eec0..7fccd94e 100644--- a/src/App.jsx+++ b/src/App.jsx@@ -73,7 +73,7 @@ import { formatDuration } from './util/duration';import { adjustRate } from './util/rate-calculator';import { askExtractFramesAsImages } from './dialogs/extractFrames';import { askForHtml5ifySpeed } from './dialogs/html5ify';-import { askForOutDir, askForImportChapters, promptTimeOffset, askForFileOpenAction, confirmExtractAllStreamsDialog, showCleanupFilesDialog, showDiskFull, showExportFailedDialog, showConcatFailedDialog, openYouTubeChaptersDialog, openAbout, showRefuseToOverwrite, openDirToast, openCutFinishedToast, openConcatFinishedToast, showOpenDialog } from './dialogs';+import { askForOutDir, askForImportChapters, promptTimeOffset, askForFileOpenAction, confirmExtractAllStreamsDialog, showCleanupFilesDialog, showDiskFull, showExportFailedDialog, showConcatFailedDialog, openYouTubeChaptersDialog, showRefuseToOverwrite, openDirToast, openCutFinishedToast, openConcatFinishedToast, showOpenDialog } from './dialogs';import { openSendReportDialog } from './reporting';import { fallbackLng } from './i18n';import { createSegment, getCleanCutSegments, findSegmentsAtCursor, sortSegments, getSegmentTags, convertSegmentsToChapters, hasAnySegmentOverlap, isDurationValid, playOnlyCurrentSegment } from './segments';@@ -2062,7 +2062,6 @@ const App = memo(() => {toggleLastCommands,toggleKeyboardShortcuts,toggleSettings,- openAbout,openSendReportDialog: () => { openSendReportDialogWithState(); },clearSegments,shuffleSegments,diff --git a/src/dialogs/index.jsx b/src/dialogs/index.jsxindex 969fcfad..e80b822a 100644--- a/src/dialogs/index.jsx+++ b/src/dialogs/index.jsx@@ -494,14 +494,6 @@ export async function selectSegmentsByLabelDialog(currentName) {return value;}-export function openAbout() {- Swal.fire({- icon: 'info',- title: i18n.t('About LosslessCut'),- text: i18n.t('You are running version {{version}}', { version: app.getVersion() }),- });-}-export async function showEditableJsonDialog({ text, title, inputLabel, inputValue, inputValidator }) {const { value } = await Swal.fire({input: 'textarea',