Started trying out Dashboard 2 and have what I think must be an easy problem but it totally eludes me.
Using the standard template I am trying to change an icon color programmatically. here is my flow
[{"id":"8960b0e31897e48b","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"58678123cf0c29b5","type":"ui-template","z":"8960b0e31897e48b","group":"590d5f457d16fcac","page":"","ui":"","name":"","order":0,"width":"6","height":"5","head":"","format":"<template>\n <div>\n <h2>Counter</h2>\n <p class=\"a1\">Current Count: {{ count }}</p>\n <p class=\"my-class\">Formatted Count: {{ color }}</p>\n <v-btn @click=\"increase()\">{{mycolor}}</v-btn>\n <v-btn class=\"blank\" @click=\"decrease()\">Decrement</v-btn>\n <v-btn class=\"blank\" @click=\"decrease()\">Dn<v-icon right dark color={{color}}>mdi-arrow-down</v-icon></v-btn> \n <v-btn class=\"blank1\" @click=\"increase()\">Up<v-icon right dark color=\"red\">mdi-arrow-up</v-icon></v-btn>\n \n </div>\n</template>\n\n<script>\n export default {\n data() {\n // define variables available component-wide\n // (in <template> and component functions)\n return {\n count: 10,\n mycolor: \"red\",\n }\n },\n watch: {\n // watch for any changes of \"count\"\n count: function () {\n if (this.count % 5 === 0) {\n this.send({payload: 'Multiple of 5'})\n }\n }\n },\n computed: {\n // automatically compute this variable\n // whenever VueJS deems appropriate\n formattedCount: function () {\n return this.count + ' Cherries'\n }\n },\n methods: {\n // expose a method to our <template> and Vue Application\n increase: function () {\n this.count++\n this.send({payload: 'plus',\n topic: 'up'})\n if (this.count > 22){\n this.count=22 \n }\n },\n decrease: function () {\n this.count--\n this.send({payload: 'minus',\n topic: 'dn'})\n if (this.count < 10) {\n this.count = 10\n }\n }\n },\n mounted() {\n // code here when the component is first loaded\n this.color = \"red\"\n },\n unmounted() {\n // code here when the component is removed from the Dashboard\n // i.e. when the user navigates away from the page\n }\n }\n</script>\n<style>\n /* define any styles here - supports raw CSS */\n .my-class {\n color: red;\n }\n .your-class {\n color: green\n }\n.centerme {\ndisplay: flex;\ntext-align: center;\njustify-content: center;\nalign-items: center;\nmargin: 4px;\n}\n\n.roundme {\nborder: 2px solid black;\nborder-radius: 8px;\nbackground-color: #222222;\nbox-shadow: inset 2px 2px 3px 4px rgba(0, 0, 0, 0.1);\nbackground: rgb(5, 5, 5);\nbackground: linear-gradient(135deg, rgba(5, 5, 5, 1) 0%, rgba(42, 42, 42, 1) 100%);\nmargin: 3px;\n}\n\n.roundme2 {\nborder: 2px solid black;\nborder-radius: 8px;\nbackground-color: #222222;\nbox-shadow: inset 2px 2px 3px 4px rgba(0, 0, 0, 0.1);\nbackground: rgb(5, 5, 5);\nmargin: 3px;\n}\n\n.blank {\nborder: #303030;\nborder-radius: 8px;\nbackground-color: #303030;\nbox-shadow: inset 2px 2px 3px 4px #303030;\nbackground: #303030;\nbackground: linear-gradient(135deg, #303030 0%, #303030);\nmargin: 3px;\n}\n\n.blank1 {\nborder: #FF0000;\nborder-radius: 8px;\nbackground-color: #FF0000;\nbox-shadow: inset 2px 2px 2px 2px #FF0000;\nbackground: #303030;\nbackground: linear-gradient(135deg, #303030 0%, #303030);\nmargin: 3px;\n}\n.a {\n/* background-color:red; */\nheight: 25px;\nmargin-bottom: 1px;\nfont-size: 16px;\nfont-color: #000000;\npadding-bottom: 4px;\nborder-bottom: 2px solid #DD7F00;\n}\n\n.a1 {\n/* background-color:red; */\nheight: 25px;\nmargin-bottom: 1px;\nfont-size: 16px;\ncolor: #6689A1;\npadding-bottom: 4px;\nborder-bottom: 2px solid #DD7F00;\n}\n\n.a2 {\n/* background-color:red; */\nheight: 100%;\nmargin-top: 1px;\nfont-size: 60px;\ncolor: #D7DBDD;\n\n}\n\n.b1 {\ncolor: #6689A1;\nheight: 25px;\nmargin-bottom: 1px;\nfont-size: 16px;\npadding-bottom: 4px;\nborder-bottom: 2px solid #DD7F00;\n}\n\n.b2 {\nheight: 100%;\nmargin-top: 1px;\nfont-size: 28px;\ncolor: #D7DBDD;\n}\n\n.gradient-2 {\nbackground: linear-gradient(135deg, rgba(5, 5, 5, 1) 0%, rgba(42, 42, 42, 1) 100%) padding-box,\nlinear-gradient(to right, #F16F0F, #F43700) border-box;\nmargin-top: 14px;\nborder-radius: 20px;\nborder: 6px solid transparent;\n}\n\n.red_color {\ncolor: #FF0000;\n}\n\n.grey_color {\ncolor: #444444;\n}\n\n.green_color {\ncolor: #008000;\n}\n\n.blue_color {\ncolor: #00DAF4;\n}\n\n\n.otstatus {\npadding-left: 6px;\npadding-top: 2px;\nfont-size: 14px;\n}\n</style>","storeOutMessages":true,"passthru":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":400,"y":80,"wires":[["bffcce078a372ce8"]]},{"id":"bffcce078a372ce8","type":"debug","z":"8960b0e31897e48b","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":360,"y":180,"wires":[]},{"id":"590d5f457d16fcac","type":"ui-group","name":"Page1","page":"efac97e4288db043","width":"6","height":"4","order":-1,"showTitle":false,"className":"","visible":"true","disabled":"false"},{"id":"efac97e4288db043","type":"ui-page","name":"Page1","ui":"22de1f06fe4a8c37","path":"/page1","icon":"home","layout":"grid","theme":"af27d8bd1af493a2","order":-1,"className":"","visible":"true","disabled":"false"},{"id":"22de1f06fe4a8c37","type":"ui-base","name":"path","path":"/dashboard","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false},{"id":"af27d8bd1af493a2","type":"ui-theme","name":"Theme Name","colors":{"surface":"#ffffff","primary":"#0094ce","bgPage":"#eeeeee","groupBg":"#ffffff","groupOutline":"#cccccc"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]
when I open the page I would think the color would change, but nothing seems to work. When I click on a button then the word red appears in the formatted count field but the icon doesn't change no matter what I have tried. Point me in the right direction please?