generated from nhcarrigan/template
feat: add create and delete file/folder functionality to editor
- Add Tauri backend commands: create_file, create_directory, delete_file, delete_directory - Add editor store functions for create/delete with auto-refresh - Add FileContextMenu component with right-click support - Add InputDialog component for file/folder name input - Add ConfirmDialog component for delete confirmation - Add Ctrl+N keyboard shortcut for new file - Update keyboard shortcuts modal with new shortcuts - Auto-close tabs when their files are deleted - Auto-refresh file tree after create/delete operations
This commit is contained in:
@@ -238,6 +238,15 @@
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Ctrl+N - New file (when editor is visible)
|
||||
// Note: This just emits an event that FileBrowser listens to
|
||||
if (event.ctrlKey && event.key === "n" && get(editorStore.isEditorVisible)) {
|
||||
event.preventDefault();
|
||||
// Dispatch a custom event that FileBrowser will listen to
|
||||
window.dispatchEvent(new CustomEvent("editor-new-file"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
async function handleInterrupt() {
|
||||
|
||||
Reference in New Issue
Block a user