1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 02:12:30 +01:00

implement task bar progress

closes #1511
This commit is contained in:
Mikael Finstad 2024-08-06 21:16:39 +02:00
parent c5af789121
commit 1abf243735
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26
2 changed files with 5 additions and 1 deletions

View File

@ -406,3 +406,5 @@ export function quitApp() {
}
export const hasDisabledNetworking = () => !!disableNetworking;
export const setProgressBar = (v: number) => mainWindow?.setProgressBar(v);

View File

@ -97,7 +97,7 @@ const { exists } = window.require('fs-extra');
const { lstat } = window.require('fs/promises');
const { parse: parsePath, join: pathJoin, basename, dirname } = window.require('path');
const { focusWindow, hasDisabledNetworking, quitApp, pathToFileURL } = window.require('@electron/remote').require('./index.js');
const { focusWindow, hasDisabledNetworking, quitApp, pathToFileURL, setProgressBar } = window.require('@electron/remote').require('./index.js');
const videoStyle: CSSProperties = { width: '100%', height: '100%', objectFit: 'contain' };
@ -191,6 +191,8 @@ function App() {
useEffect(() => setDocumentTitle({ filePath, working: working?.text, cutProgress }), [cutProgress, filePath, working?.text]);
useEffect(() => setProgressBar(cutProgress ?? -1), [cutProgress]);
const zoom = Math.floor(zoomUnrounded);
const durationSafe = isDurationValid(duration) ? duration : 1;