mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 18:32:34 +01:00
parent
91bf47eb5c
commit
f1a9ea0e1d
15
src/App.jsx
15
src/App.jsx
@ -97,6 +97,11 @@ const { focusWindow } = remote.require('./electron');
|
||||
const calcShouldShowWaveform = (zoomedDuration) => (zoomedDuration != null && zoomedDuration < ffmpegExtractWindow * 8);
|
||||
const calcShouldShowKeyframes = (zoomedDuration) => (zoomedDuration != null && zoomedDuration < ffmpegExtractWindow * 8);
|
||||
|
||||
function setDocumentExtraTitle(extra) {
|
||||
const baseTitle = 'LosslessCut';
|
||||
if (extra != null) document.title = `${baseTitle} - ${extra}`;
|
||||
else document.title = baseTitle;
|
||||
}
|
||||
|
||||
const videoStyle = { width: '100%', height: '100%', objectFit: 'contain' };
|
||||
const bottomMotionStyle = { background: controlsBackground };
|
||||
@ -196,6 +201,16 @@ const App = memo(() => {
|
||||
setWorkingState(val);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!working || cutProgress == null) setDocumentExtraTitle();
|
||||
else {
|
||||
const parts = [];
|
||||
if (working) parts.push(working);
|
||||
if (cutProgress != null) parts.push(`${(cutProgress * 100).toFixed(1)}%`);
|
||||
setDocumentExtraTitle(parts.join(' '));
|
||||
}
|
||||
}, [cutProgress, working]);
|
||||
|
||||
const zoom = Math.floor(zoomUnrounded);
|
||||
|
||||
const durationSafe = isDurationValid(duration) ? duration : 1;
|
||||
|
Loading…
Reference in New Issue
Block a user