Add delete button

This commit is contained in:
2017-12-30 20:24:40 +01:00
parent 220888a7c5
commit ab637deb33
3 changed files with 31 additions and 0 deletions

View File

@@ -12,4 +12,21 @@ export default Controller.extend({
queryParams: ['path'],
actions: {
deleteItem () {
if (window.confirm('Sure?')) {
this.get('storage.client')
.remove(this.get('path')).then(() => {
this.transitionToRoute('index', {
queryParams: {
path: this.get('currentDirPath')
}
});
});
}
}
}
});