8 changed files with 119 additions and 75 deletions
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
<template> |
||||
<div class="container container-fluid" id="main-container"> |
||||
<div class="row"> |
||||
|
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import {ItemTypeFrameClasses} from "@/data/ItemTypes"; |
||||
|
||||
export default { |
||||
name: "BarnView", |
||||
methods: { |
||||
getFrameClass(type) { |
||||
return ItemTypeFrameClasses[type]; |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
#main-container { |
||||
margin-top: 5em; |
||||
} |
||||
|
||||
.item-icon { |
||||
height: 2.5em; |
||||
} |
||||
|
||||
.inventory-item { |
||||
font-size: 0.8em; |
||||
margin-bottom: 1em; |
||||
background-color: white; |
||||
border-radius: 20px; |
||||
} |
||||
</style> |
@ -1,64 +0,0 @@
@@ -1,64 +0,0 @@
|
||||
<template> |
||||
<div class="modal fade" id="inventoryModal" tabindex="-1" aria-labelledby="inventoryModalLabel" aria-hidden="true"> |
||||
<div class="modal-dialog modal-dialog-centered"> |
||||
<div class="modal-content steel-border"> |
||||
<div class="modal-header"> |
||||
<h5 class="modal-title" id="inventoryModalLabel">Inventory</h5> |
||||
<div class="float-right"> |
||||
<a href="javascript:" data-bs-dismiss="modal"> |
||||
<img src="/assets/gui/close.png" alt=""> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="modal-body"> |
||||
<div class="row"> |
||||
<div class="col-6" |
||||
v-for="item in $store.getters.getInventoryWithItemData" |
||||
v-bind:key="item" |
||||
data-bs-dismiss="modal"> |
||||
<div :class="'inventory-item ' + getFrameClass(item.type)"> |
||||
<div class="float-end"> |
||||
<img :src="item.icon" :alt="item.name" class="item-icon"> |
||||
</div> |
||||
{{ item.name }}<br/> |
||||
x{{ item.quantity }} |
||||
</div> |
||||
</div> |
||||
<div v-if="$store.state.inventory.length === 0"> |
||||
You don't have any items yet. |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="modal-footer"> |
||||
<button type="button" class="btn btn-pixel-border" data-bs-dismiss="modal">Exit</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import {ItemTypeFrameClasses} from "@/data/ItemTypes"; |
||||
|
||||
export default { |
||||
name: "InventoryDialog", |
||||
methods: { |
||||
getFrameClass(type) { |
||||
return ItemTypeFrameClasses[type]; |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
.item-icon { |
||||
height: 2.5em; |
||||
} |
||||
|
||||
.inventory-item { |
||||
font-size: 0.8em; |
||||
margin-bottom: 1em; |
||||
} |
||||
</style> |
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
<template> |
||||
<div class="container container-fluid" id="main-container"> |
||||
<div class="row"> |
||||
<div class="col-6" |
||||
v-for="item in $store.getters.getInventoryWithItemData" |
||||
v-bind:key="item" |
||||
data-bs-dismiss="modal"> |
||||
<div :class="'inventory-item ' + getFrameClass(item.type)"> |
||||
<div class="float-end"> |
||||
<img :src="item.icon" :alt="item.name" class="item-icon"> |
||||
</div> |
||||
{{ item.name }}<br/> |
||||
x{{ item.quantity }} |
||||
</div> |
||||
</div> |
||||
<div v-if="$store.state.inventory.length === 0"> |
||||
You don't have any items yet. |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import {ItemTypeFrameClasses} from "@/data/ItemTypes"; |
||||
|
||||
export default { |
||||
name: "InventoryView", |
||||
methods: { |
||||
getFrameClass(type) { |
||||
return ItemTypeFrameClasses[type]; |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
#main-container { |
||||
margin-top: 5em; |
||||
} |
||||
|
||||
.item-icon { |
||||
height: 2.5em; |
||||
} |
||||
|
||||
.inventory-item { |
||||
font-size: 0.8em; |
||||
margin-bottom: 1em; |
||||
background-color: white; |
||||
border-radius: 20px; |
||||
} |
||||
</style> |
Loading…
Reference in new issue