Skip to content

Commit e5c7853

Browse files
authored
Merge pull request #334 from Geode-solutions/feat/is_active
feat(isActive): adds is_active mesh_components objects
2 parents 3924b74 + 8943627 commit e5c7853

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

app/components/Viewer/TreeComponent.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,21 @@ async function onSelectionChange(current) {
123123
<template #title="{ item }">
124124
<span
125125
class="treeview-item"
126+
:class="{ 'inactive-item': item.is_active === false }"
126127
@contextmenu.prevent.stop="emit('show-menu', { event: $event, itemId: item })"
127128
>
128129
{{ item.title }}
130+
<v-tooltip v-if="item.category" activator="parent" location="right">
131+
<div class="d-flex flex-column pa-1">
132+
<span class="text-caption"><strong>ID:</strong> {{ item.id }}</span>
133+
<span v-if="item.title" class="text-caption"
134+
><strong>Name:</strong> {{ item.title }}</span
135+
>
136+
<span class="text-caption font-italic border-t-sm d-flex align-center">
137+
<strong class="mr-1">Status:</strong> {{ item.is_active ? "Active" : "Inactive" }}
138+
</span>
139+
</div>
140+
</v-tooltip>
129141
</span>
130142
</template>
131143
</v-treeview>
@@ -139,6 +151,10 @@ async function onSelectionChange(current) {
139151
max-width: 100%;
140152
display: inline-block;
141153
}
154+
.inactive-item {
155+
opacity: 0.4;
156+
font-style: italic;
157+
}
142158
143159
.transparent-treeview {
144160
background-color: transparent;

app/stores/data.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const useDataStore = defineStore("data", () => {
6262
id: meshComponent.geode_id,
6363
title: meshComponent.name,
6464
category: meshComponent.type,
65+
is_active: meshComponent.is_active,
6566
})),
6667
}));
6768
}
@@ -115,6 +116,7 @@ export const useDataStore = defineStore("data", () => {
115116
type: component.type,
116117
viewer_id: component.viewer_id,
117118
name: component.name,
119+
is_active: component.is_active,
118120
});
119121
}
120122
}

0 commit comments

Comments
 (0)