delete item button
This commit is contained in:
parent
83fe3442d3
commit
72177644ad
|
@ -8,6 +8,10 @@ small {
|
|||
color: $brand-primary !important;
|
||||
}
|
||||
|
||||
.text-danger {
|
||||
color: $brand-danger !important;
|
||||
}
|
||||
|
||||
.text-success {
|
||||
color: $brand-success !important;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -100,4 +100,9 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
|
|||
}
|
||||
return confirmed;
|
||||
}
|
||||
|
||||
async delete() {
|
||||
await super.delete();
|
||||
this.router.navigate(['/tabs/vault']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue