Delete InventorySlots
All checks were successful
E2E Testing / test (push) Successful in 1m32s

This commit is contained in:
Sebastian Böckelmann 2024-05-11 09:34:21 +02:00
parent 0e954f1b48
commit 19057fee93
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@
</mat-expansion-panel-header>
<div class="panel-actions">
<button mat-raised-button color="primary" (click)="renameInventorySlot(slot)">Rename</button>
<button mat-raised-button color="warn">Delete</button>
<button mat-raised-button color="warn" (click)="deleteInventorySlot(slot)">Delete</button>
</div>
</mat-expansion-panel>
<button mat-stroked-button class="add-btn" (click)="addInventorySlot()">Add Inventory-Slot</button>

View File

@ -37,5 +37,7 @@ export class InventorySlotEditorComponent {
})
}
protected readonly indexedDB = indexedDB;
deleteInventorySlot(inventorySlot: InventorySlot) {
this.character!.removeInventorySlot(inventorySlot)
}
}