Moved UI to client folder to fix HMR

This commit is contained in:
Stefan Zermatten
2022-11-19 17:51:50 +02:00
parent 060b5f93ca
commit e3644eb9e8
358 changed files with 1069 additions and 1066 deletions

View File

@@ -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/client/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>