Migrating UI for new data structures
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<v-btn
|
||||
icon
|
||||
outlined
|
||||
style="font-size: 18px;"
|
||||
style="font-size: 16px; letter-spacing: normal;"
|
||||
class="mr-2"
|
||||
:color="model.color || 'primary'"
|
||||
:loading="doActionLoading"
|
||||
@@ -65,7 +65,7 @@
|
||||
:action="model"
|
||||
/>
|
||||
<v-divider
|
||||
v-if="model.summary || children.length"
|
||||
v-if="model.summary"
|
||||
class="my-2"
|
||||
/>
|
||||
</template>
|
||||
@@ -73,17 +73,7 @@
|
||||
<property-description
|
||||
:model="model.summary"
|
||||
/>
|
||||
<v-divider
|
||||
v-if="children.length"
|
||||
class="my-2"
|
||||
/>
|
||||
</template>
|
||||
<tree-node-view
|
||||
v-for="child in children"
|
||||
:key="child._id"
|
||||
class="action-child"
|
||||
:model="child"
|
||||
/>
|
||||
</div>
|
||||
</v-card>
|
||||
</template>
|
||||
@@ -91,9 +81,7 @@
|
||||
<script lang="js">
|
||||
import { getPropertyName } from '/imports/constants/PROPERTIES.js';
|
||||
import numberToSignedString from '/imports/ui/utility/numberToSignedString.js';
|
||||
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties.js';
|
||||
//import doAction from '/imports/api/creature/actions/doAction.js';
|
||||
import TreeNodeView from '/imports/ui/properties/treeNodeViews/TreeNodeView.vue';
|
||||
import doAction from '/imports/api/engine/actions/doAction.js';
|
||||
import AttributeConsumedView from '/imports/ui/properties/components/actions/AttributeConsumedView.vue';
|
||||
import ItemConsumedView from '/imports/ui/properties/components/actions/ItemConsumedView.vue';
|
||||
import PropertyDescription from '/imports/ui/properties/viewers/shared/PropertyDescription.vue';
|
||||
@@ -101,7 +89,6 @@ import PropertyIcon from '/imports/ui/properties/shared/PropertyIcon.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
TreeNodeView,
|
||||
AttributeConsumedView,
|
||||
ItemConsumedView,
|
||||
PropertyDescription,
|
||||
@@ -130,8 +117,8 @@ export default {
|
||||
}},
|
||||
computed: {
|
||||
rollBonus(){
|
||||
if (!this.model.rollBonus) return;
|
||||
return numberToSignedString(this.model.rollBonus.value);
|
||||
if (!this.model.attackRoll) return;
|
||||
return numberToSignedString(this.model.attackRoll.value);
|
||||
},
|
||||
rollBonusTooLong(){
|
||||
return this.rollBonus && this.rollBonus.length > 3;
|
||||
@@ -152,17 +139,6 @@ export default {
|
||||
return `$vuetify.icons.${this.model.actionType}`;
|
||||
},
|
||||
},
|
||||
meteor: {
|
||||
children(){
|
||||
return CreatureProperties.find({
|
||||
'parent.id': this.model._id,
|
||||
removed: {$ne: true},
|
||||
inactive: {$ne: true},
|
||||
}, {
|
||||
sort: {order: 1}
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
click(e){
|
||||
this.$emit('click', e);
|
||||
|
||||
Reference in New Issue
Block a user