Inventory items can now be equipped

This commit is contained in:
Thaum Rystra
2020-05-18 23:03:34 +02:00
parent fe11c9ec23
commit 4352ca5f0d
8 changed files with 127 additions and 48 deletions

View File

@@ -0,0 +1,24 @@
import PROPERTIES from '/imports/constants/PROPERTIES.js';
import PropertyIcon from '/imports/ui/properties/shared/PropertyIcon.vue';
export default {
components: {
PropertyIcon,
},
props: {
model: {
type: Object,
default: () => ({}),
},
selected: Boolean,
},
computed: {
title(){
let model = this.model;
if (!model) return;
if (model.name) return model.name;
let prop = PROPERTIES[model.type]
return prop && prop.name;
}
}
}