speed zones work now
This commit is contained in:
@ -37,7 +37,6 @@ export default function App() {
|
||||
exportedAudioPath,
|
||||
words,
|
||||
segments,
|
||||
deletedRanges,
|
||||
cutRanges,
|
||||
muteRanges,
|
||||
gainRanges,
|
||||
@ -61,6 +60,7 @@ export default function App() {
|
||||
} = useEditorStore();
|
||||
|
||||
const [activePanel, setActivePanel] = useState<Panel>(null);
|
||||
const [projectName, setProjectName] = useState<string | null>(null);
|
||||
const [whisperModel, setWhisperModel] = useState('base');
|
||||
useEffect(() => { if (transcriptionModel) setWhisperModel(transcriptionModel); }, [transcriptionModel]);
|
||||
const [cutMode, setCutMode] = useState(false);
|
||||
@ -81,7 +81,6 @@ export default function App() {
|
||||
exportedAudioPath,
|
||||
words,
|
||||
segments,
|
||||
deletedRanges,
|
||||
cutRanges,
|
||||
muteRanges,
|
||||
gainRanges,
|
||||
@ -96,7 +95,6 @@ export default function App() {
|
||||
exportedAudioPath,
|
||||
words,
|
||||
segments,
|
||||
deletedRanges,
|
||||
cutRanges,
|
||||
muteRanges,
|
||||
gainRanges,
|
||||
@ -116,8 +114,7 @@ export default function App() {
|
||||
exportedAudioPath: data.exportedAudioPath ?? null,
|
||||
words: data.words || [],
|
||||
segments: data.segments || [],
|
||||
deletedRanges: data.deletedRanges || [],
|
||||
cutRanges: data.cutRanges || [],
|
||||
cutRanges: [...(data.cutRanges || []), ...(data.deletedRanges || []).map((r: any) => ({ id: r.id, start: r.start, end: r.end }))],
|
||||
muteRanges: data.muteRanges || [],
|
||||
gainRanges: data.gainRanges || [],
|
||||
speedRanges: data.speedRanges || [],
|
||||
@ -183,6 +180,7 @@ export default function App() {
|
||||
const content = await window.electronAPI!.readFile(projectPath);
|
||||
const data = JSON.parse(content);
|
||||
loadProjectFromData(data);
|
||||
setProjectName(projectPath.split(/[/\\]/).pop()?.replace(/\.aive$/i, '') ?? null);
|
||||
} catch (err) {
|
||||
console.error('Failed to load project:', err);
|
||||
alert(`Failed to load project: ${err}`);
|
||||
@ -197,6 +195,7 @@ export default function App() {
|
||||
const data = useEditorStore.getState().saveProject();
|
||||
const path = savePath.endsWith('.aive') ? savePath : `${savePath}.aive`;
|
||||
await window.electronAPI!.writeFile(path, JSON.stringify(data, null, 2));
|
||||
setProjectName(path.split(/[/\\]/).pop()?.replace(/\.aive$/i, '') ?? null);
|
||||
if (projectSignature) {
|
||||
setLastSavedSignature(projectSignature);
|
||||
}
|
||||
@ -599,7 +598,13 @@ export default function App() {
|
||||
<div className="w-1/2 border-l border-editor-border flex flex-col min-h-0">
|
||||
{videoPath && (
|
||||
<div className="flex items-center gap-2 px-3 py-1.5 border-b border-editor-border shrink-0 bg-editor-surface/50">
|
||||
<span className="text-xs font-medium truncate text-editor-text">{videoPath.split(/[\/]/).pop()}</span>
|
||||
{projectName && (
|
||||
<span className="text-xs font-semibold text-editor-accent shrink-0">{projectName}</span>
|
||||
)}
|
||||
<span className="text-xs font-medium truncate text-editor-text">{videoPath.split(/[/\\]/).pop()}</span>
|
||||
<span className="text-xs text-editor-text-muted ml-auto shrink-0">
|
||||
{words.length} words · {cutRanges.length} cuts · {muteRanges.length} mutes · {gainRanges.length} gains · {speedRanges.length} speeds
|
||||
</span>
|
||||
{transcriptionModel && (
|
||||
<span className="px-1.5 py-0.5 rounded border border-editor-border bg-editor-surface text-[10px] uppercase tracking-wide text-editor-text-muted shrink-0">
|
||||
{transcriptionModel}
|
||||
|
||||
Reference in New Issue
Block a user