feat(app): delete workspace

This commit is contained in:
Adam
2026-01-15 12:48:54 -06:00
parent 06d03dec3b
commit f26de6c52f
6 changed files with 345 additions and 60 deletions

View File

@@ -317,4 +317,19 @@ export namespace Project {
}
return valid
}
export async function removeSandbox(projectID: string, directory: string) {
const result = await Storage.update<Info>(["project", projectID], (draft) => {
const sandboxes = draft.sandboxes ?? []
draft.sandboxes = sandboxes.filter((sandbox) => sandbox !== directory)
draft.time.updated = Date.now()
})
GlobalBus.emit("event", {
payload: {
type: Event.Updated.type,
properties: result,
},
})
return result
}
}