diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Dimmer.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Dimmer.vue index 5ec7324a6..2a77229cd 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Dimmer.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Dimmer.vue @@ -18,16 +18,26 @@ :class="{'fa-angle-up': expanded, 'fa-angle-down': !expanded}" /> + v-text="parsedValue" + v-if="parsedValue != null" />
-
- +
+
+ +
+
+ +
+
+
+
+ +
@@ -51,13 +61,11 @@ export default { }, computed: { - valuePercent() { + parsedValue() { if (this.value?.is_write_only || this.value?.value == null) return null - const min = this.value.min || 0 - const max = this.value.max || 100 - return (100 * this.value.value) / (max - min) + return this.value.value } }, @@ -68,8 +76,10 @@ export default { }, async setValue(event) { - this.$emit('loading', true) + if (!event.target.value?.length) + return + this.$emit('loading', true) try { await this.request('entities.execute', { id: this.value.id, @@ -112,11 +122,19 @@ export default { } .input { - width: calc(100% - 2em); + width: calc(100% - 1em); + display: flex; + align-items: center; :deep(.slider) { margin-top: 0.5em; } + + .value { + input { + width: 100%; + } + } } } }