Action cards now show their decendants
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<template lang="html">
|
||||
<div class="layout align-center justify-start">
|
||||
<property-icon
|
||||
v-if="!hideIcon"
|
||||
class="mr-2"
|
||||
:model="model"
|
||||
:color="model.color"
|
||||
:class="selected && 'primary--text'"
|
||||
/>
|
||||
<div class="text-no-wrap text-truncate">
|
||||
<template v-if="model.dc && Number.isFinite(model.dc.value)">
|
||||
DC {{ model.dc.value }}
|
||||
</template>
|
||||
{{ title }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import treeNodeViewMixin from '/imports/ui/properties/treeNodeViews/treeNodeViewMixin.js';
|
||||
import PROPERTIES from '/imports/constants/PROPERTIES.js';
|
||||
|
||||
export default {
|
||||
mixins: [treeNodeViewMixin],
|
||||
computed: {
|
||||
title() {
|
||||
let model = this.model;
|
||||
if (!model) return;
|
||||
if (model.name) return model.name;
|
||||
if (model.stat) return model.stat;
|
||||
let prop = PROPERTIES[model.type]
|
||||
return prop && prop.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -7,6 +7,7 @@ import EffectTreeNode from '/imports/ui/properties/treeNodeViews/EffectTreeNode.
|
||||
import ClassLevelTreeNode from '/imports/ui/properties/treeNodeViews/ClassLevelTreeNode.vue';
|
||||
import ProficiencyTreeNode from '/imports/ui/properties/treeNodeViews/ProficiencyTreeNode.vue';
|
||||
import ReferenceTreeNode from '/imports/ui/properties/treeNodeViews/ReferenceTreeNode.vue';
|
||||
import SavingThrowTreeNode from '/imports/ui/properties/treeNodeViews/SavingThrowTreeNode.vue';
|
||||
|
||||
export default {
|
||||
default: DefaultTreeNode,
|
||||
@@ -18,4 +19,5 @@ export default {
|
||||
item: ItemTreeNode,
|
||||
proficiency: ProficiencyTreeNode,
|
||||
reference: ReferenceTreeNode,
|
||||
savingThrow: SavingThrowTreeNode,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user