improved feature 11 and UI

This commit is contained in:
2026-04-15 21:25:47 -06:00
parent 3fa67383c4
commit 168676a9e9
3 changed files with 111 additions and 41 deletions

View File

@ -48,9 +48,12 @@ export default function App() {
language,
isTranscribing,
transcriptionStatus,
markInTime,
markOutTime,
loadVideo,
setProjectFilePath,
setBackendUrl,
clearMarkRange,
setTranscription,
setTranscriptionModel,
setTranscribing,
@ -333,6 +336,17 @@ export default function App() {
};
const handleCut = () => {
if (markInTime !== null && markOutTime !== null) {
const startTime = Math.min(markInTime, markOutTime);
const endTime = Math.max(markInTime, markOutTime);
if (endTime - startTime >= 0.01) {
addCutRange(startTime, endTime);
setActivePanel('zones');
}
clearMarkRange();
return;
}
if (selectedWordIndices.length > 0) {
// If words are selected, apply cut immediately
const sorted = [...selectedWordIndices].sort((a, b) => a - b);
@ -349,6 +363,17 @@ export default function App() {
};
const handleMute = () => {
if (markInTime !== null && markOutTime !== null) {
const startTime = Math.min(markInTime, markOutTime);
const endTime = Math.max(markInTime, markOutTime);
if (endTime - startTime >= 0.01) {
addMuteRange(startTime, endTime);
setActivePanel('zones');
}
clearMarkRange();
return;
}
if (selectedWordIndices.length > 0) {
// If words are selected, apply mute immediately
const sorted = [...selectedWordIndices].sort((a, b) => a - b);
@ -365,6 +390,17 @@ export default function App() {
};
const handleGain = () => {
if (markInTime !== null && markOutTime !== null) {
const startTime = Math.min(markInTime, markOutTime);
const endTime = Math.max(markInTime, markOutTime);
if (endTime - startTime >= 0.01) {
addGainRange(startTime, endTime, gainModeDb);
setActivePanel('zones');
}
clearMarkRange();
return;
}
if (selectedWordIndices.length > 0) {
const sorted = [...selectedWordIndices].sort((a, b) => a - b);
const startTime = words[sorted[0]].start;
@ -379,6 +415,17 @@ export default function App() {
};
const handleSpeed = () => {
if (markInTime !== null && markOutTime !== null) {
const startTime = Math.min(markInTime, markOutTime);
const endTime = Math.max(markInTime, markOutTime);
if (endTime - startTime >= 0.01) {
addSpeedRange(startTime, endTime, speedModeValue);
setActivePanel('zones');
}
clearMarkRange();
return;
}
if (selectedWordIndices.length > 0) {
const sorted = [...selectedWordIndices].sort((a, b) => a - b);
const startTime = words[sorted[0]].start;