Skip to content

Commit

Permalink
ability to remove projects from project manager
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Jun 4, 2024
1 parent e2d5a67 commit 3779d21
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions project-manager/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,17 @@ impl ProjectManager {
}

if let Some(index) = self.selection {
if let Some(_project) = self.settings.projects.get(index) {
if let Some(project) = self.settings.projects.get(index) {
if button == self.edit {
// TODO: Edit project.
} else if button == self.run {
// TODO: Delete project.
// TODO: Run project.
} else if button == self.delete {
if let Some(dir) = project.manifest_path.parent() {
let _ = std::fs::remove_dir_all(dir);
}
self.settings.projects.remove(index);
self.refresh(ui);
}
}
}
Expand Down

0 comments on commit 3779d21

Please sign in to comment.