delete item button

This commit is contained in:
Kyle Spearrin 2018-04-11 16:23:05 -04:00
parent 83fe3442d3
commit 72177644ad
3 changed files with 23 additions and 0 deletions

View File

@ -8,6 +8,10 @@ small {
color: $brand-primary !important;
}
.text-danger {
color: $brand-danger !important;
}
.text-success {
color: $brand-success !important;
}

View File

@ -300,5 +300,19 @@
</div>
</div>
</div>
<div class="box list" *ngIf="editMode">
<div class="box-content single-line">
<a class="box-content-row" href="#" appStopClick appBlurClick
(click)="delete()" [appApiAction]="deletePromise" #deleteBtn>
<div class="row-main">
<div class="icon text-danger">
<i class="fa fa-trash-o fa-lg fa-fw" [hidden]="deleteBtn.loading"></i>
<i class="fa fa-spinner fa-spin fa-lg fa-fw" [hidden]="!deleteBtn.loading"></i>
</div>
<span class="text text-danger">{{'deleteItem' | i18n}}</span>
</div>
</a>
</div>
</div>
</content>
</form>

View File

@ -100,4 +100,9 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
}
return confirmed;
}
async delete() {
await super.delete();
this.router.navigate(['/tabs/vault']);
}
}