[Entities UI] Don't hide variables with null values.

Otherwise, the `variables` panel will still appear, but empty, and
offering no way of actually removing or resetting those variables.
This commit is contained in:
Fabio Manganiello 2023-10-14 14:00:31 +02:00
parent 01c7d230f1
commit 0aecb50590
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="entity variable-container" v-if="value.value != null"> <div class="entity variable-container">
<div class="head" :class="{collapsed: collapsed}"> <div class="head" :class="{collapsed: collapsed}">
<div class="icon"> <div class="icon">
<EntityIcon :entity="value" :loading="loading" :error="error" /> <EntityIcon :entity="value" :loading="loading" :error="error" />
@ -10,7 +10,7 @@
</div> </div>
<div class="value-and-toggler" @click.stop="collapsed = !collapsed"> <div class="value-and-toggler" @click.stop="collapsed = !collapsed">
<div class="value" v-text="value.value" v-if="value?.value != null" /> <div class="value" v-text="value.value" />
<div class="collapse-toggler" @click.stop="collapsed = !collapsed"> <div class="collapse-toggler" @click.stop="collapsed = !collapsed">
<i class="fas" :class="{'fa-chevron-down': collapsed, 'fa-chevron-up': !collapsed}" /> <i class="fas" :class="{'fa-chevron-down': collapsed, 'fa-chevron-up': !collapsed}" />
</div> </div>