From 565844f8c8fdbfbd861a3a0b7884fa91fc17b5f3 Mon Sep 17 00:00:00 2001
From: jimtng <2554958+jimtng@users.noreply.github.com>
Date: Tue, 27 Feb 2024 02:21:15 +1000
Subject: [PATCH] Blockly Editor: combine renderer selection and show item
label icons (#2415)
The current icons are too crowded for mobile devices. This PR combines
the renderer choice and the show labels into one icon.
Before
After
---------
Signed-off-by: Jimmy Tanagra
---
.../settings/rules/script/script-edit.vue | 38 ++++++++++++-------
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-edit.vue b/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-edit.vue
index 430c8e3808..b3dd84e40c 100644
--- a/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-edit.vue
+++ b/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-edit.vue
@@ -30,16 +30,26 @@
:tooltip="rule.status.description" />
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -541,12 +551,12 @@ export default {
this.blocklyRenderer = this.$refs.blocklyEditor.getCurrentRenderer()
this.blocklyRenderers = this.$refs.blocklyEditor.getRenderers()
},
- setBlocklyRenderer (event) {
- this.blocklyRenderer = event.target.value
+ setBlocklyRenderer (newRenderer) {
+ this.blocklyRenderer = newRenderer
this.$refs.blocklyEditor.changeRenderer(this.blocklyRenderer)
},
- toggleBlocklyItemLabelId () {
- this.blocklyShowLabels = !this.blocklyShowLabels
+ setBlocklyShowLabels (showLabels) {
+ this.blocklyShowLabels = showLabels
this.$refs.blocklyEditor.showHideLabels(this.blocklyShowLabels)
},
showBlocklyCode () {