✨ context menu for file tree
This commit is contained in:
@@ -48,6 +48,9 @@ interface EditorState {
|
||||
// File tree reordering
|
||||
moveNode: (dirPath: string, fromIdx: number, toIdx: number) => void
|
||||
|
||||
// Clear active file (e.g. after deletion)
|
||||
clearActiveFile: () => void
|
||||
|
||||
// Word counts
|
||||
projectWordCount: number
|
||||
setProjectWordCount: (count: number) => void
|
||||
@@ -115,6 +118,8 @@ export const useEditorStore = create<EditorState>((set, get) => ({
|
||||
})
|
||||
},
|
||||
|
||||
clearActiveFile: () => set({ activeFilePath: null, activeFileContent: '', isDirty: false }),
|
||||
|
||||
activeFilePath: null,
|
||||
activeFileContent: '',
|
||||
isDirty: false,
|
||||
|
||||
Reference in New Issue
Block a user