2017-10-05 10:26:07 +02:00
|
|
|
component Inventory(inventory *arn.Inventory, viewUser *arn.User, user *arn.User)
|
|
|
|
ShopTabs(user)
|
2017-11-13 16:46:33 +01:00
|
|
|
|
2017-10-05 13:48:16 +02:00
|
|
|
h1.page-title Inventory
|
|
|
|
|
2017-10-05 09:39:37 +02:00
|
|
|
.inventory(data-api="/api/inventory/" + viewUser.ID)
|
2017-10-04 13:39:59 +02:00
|
|
|
for index, slot := range inventory.Slots
|
|
|
|
if slot.ItemID == ""
|
|
|
|
.inventory-slot.mountable(draggable="false", data-index=index)
|
|
|
|
else
|
2018-04-18 13:42:38 +02:00
|
|
|
.inventory-slot.tip.mountable(aria-label=slot.Item().Name, draggable="true", data-index=index, data-item-id=slot.ItemID, data-consumable=slot.Item().Consumable)
|
2018-04-08 22:10:45 +02:00
|
|
|
.shop-item-icon
|
2017-10-06 12:44:55 +02:00
|
|
|
Icon(slot.Item().Icon)
|
2017-10-04 13:39:59 +02:00
|
|
|
if slot.Quantity > 1
|
2017-10-06 08:44:29 +02:00
|
|
|
.inventory-slot-quantity= slot.Quantity
|
2017-11-13 16:46:33 +01:00
|
|
|
|
|
|
|
.footer.mountable
|
2017-10-06 08:44:29 +02:00
|
|
|
p You can consume items by double-clicking them.
|