feature 10,11
This commit is contained in:
@ -33,6 +33,8 @@ interface EditorState {
|
||||
currentTime: number;
|
||||
duration: number;
|
||||
isPlaying: boolean;
|
||||
markInTime: number | null;
|
||||
markOutTime: number | null;
|
||||
|
||||
selectedWordIndices: number[];
|
||||
hoveredWordIndex: number | null;
|
||||
@ -58,6 +60,9 @@ interface EditorActions {
|
||||
setCurrentTime: (time: number) => void;
|
||||
setDuration: (duration: number) => void;
|
||||
setIsPlaying: (playing: boolean) => void;
|
||||
setMarkInTime: (time: number | null) => void;
|
||||
setMarkOutTime: (time: number | null) => void;
|
||||
clearMarkRange: () => void;
|
||||
setSelectedWordIndices: (indices: number[]) => void;
|
||||
setHoveredWordIndex: (index: number | null) => void;
|
||||
deleteSelectedWords: () => void;
|
||||
@ -120,6 +125,8 @@ const initialState: EditorState = {
|
||||
currentTime: 0,
|
||||
duration: 0,
|
||||
isPlaying: false,
|
||||
markInTime: null,
|
||||
markOutTime: null,
|
||||
selectedWordIndices: [],
|
||||
hoveredWordIndex: null,
|
||||
isTranscribing: false,
|
||||
@ -232,6 +239,9 @@ export const useEditorStore = create<EditorState & EditorActions>()(
|
||||
setCurrentTime: (time) => set({ currentTime: time }),
|
||||
setDuration: (duration) => set({ duration }),
|
||||
setIsPlaying: (playing) => set({ isPlaying: playing }),
|
||||
setMarkInTime: (time) => set({ markInTime: time }),
|
||||
setMarkOutTime: (time) => set({ markOutTime: time }),
|
||||
clearMarkRange: () => set({ markInTime: null, markOutTime: null }),
|
||||
setSelectedWordIndices: (indices) => set({ selectedWordIndices: indices }),
|
||||
setHoveredWordIndex: (index) => set({ hoveredWordIndex: index }),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user