[
{
"id": "6e910c997dd4122a",
"type": "group",
"z": "9a66516c0bb63179",
"name": "login",
"style": {
"stroke": "#000000",
"fill": "#d1d1d1",
"label": true,
"color": "#000000"
},
"nodes": [
"34c67ce1cee54042",
"9beb98e668d28d1b",
"95426b336836aa36",
"f20750c38e05eb28",
"c05413d84624b36f",
"88632b1c944da58c",
"e81ccf951614e091",
"de768c84f28fec3c",
"76cfec3e75f57afc"
],
"x": 254,
"y": 2519,
"w": 672,
"h": 302
},
{
"id": "34c67ce1cee54042",
"type": "ui-template",
"z": "9a66516c0bb63179",
"g": "6e910c997dd4122a",
"group": "",
"page": "c10b3e0c7c4bdb0d",
"ui": "",
"name": "login",
"order": 0,
"width": 0,
"height": 0,
"head": "",
"format": "<template>\n <div class=\"card_login\" :class=\"{ 'background_login': active }\">\n <v-text-field class=\"input_login\" type=\"password\" label=\"Senha\" variant=\"outlined\" v-model=\"senha\"\n @keyup.enter=\"sendOTP\"></v-text-field>\n <v-btn class=\"button_login\" @click=\"sendOTP\">Autorizar</v-btn>\n </div>\n</template>\n\n\n<script>\n export default {\n data() {\n return { \n senha:'',\n active: false\n };\n },\n methods: { \n sendOTP() {\n this.active = true;\n setTimeout(() => {\n this.send({ payload: this.senha });\n this.senha = '';\n this.active = false;\n }, 1000);\n }, \n } \n }\n</script>\n\n\n<style>\n .card_login {\n display: flex;\n margin: auto;\n flex-direction: column;\n height: 130px !important;\n width: 250px !important;\n background-color: #4F4F4F;\n border: 1px solid #000000;\n border-radius: 18px;\n padding: 10px;\n }\n\n\n .background_login {\n background-color: #FF8C00;\n }\n\n\n .input_login {\n margin: auto;\n height: 20%;\n width: 90%;\n font-size: 25px;\n }\n\n\n .button_login {\n margin: auto;\n background-color: #4F4F4F;\n border: 1px solid #000000;\n border-radius: 10px;\n color: #000000;\n }\n</style>",
"storeOutMessages": true,
"passthru": false,
"resendOnRefresh": true,
"templateScope": "widget:page",
"className": "",
"x": 330,
"y": 2560,
"wires": [
[
"9beb98e668d28d1b",
"88632b1c944da58c"
]
]
},
{
"id": "9beb98e668d28d1b",
"type": "function",
"z": "9a66516c0bb63179",
"g": "6e910c997dd4122a",
"name": "senha 780705",
"func": "if (msg.payload === '780705') {\n \n node.send({ payload: { pages: { enable: ['Casa'] } } });\n \n node.send({ payload: { 'page': 'Casa' }});\n\n}\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 600,
"y": 2560,
"wires": [
[
"95426b336836aa36",
"e81ccf951614e091"
]
]
},
{
"id": "95426b336836aa36",
"type": "ui-control",
"z": "9a66516c0bb63179",
"g": "6e910c997dd4122a",
"name": "",
"ui": "85df8d80890b47f2",
"events": "all",
"x": 840,
"y": 2580,
"wires": [
[]
]
},
{
"id": "f20750c38e05eb28",
"type": "ui-template",
"z": "9a66516c0bb63179",
"g": "6e910c997dd4122a",
"group": "2756af9309917096",
"page": "",
"ui": "",
"name": "logoff",
"order": 0,
"width": "0",
"height": "0",
"head": "",
"format": "<template>\n <v-btn class=\"buton_logoff\" ref=\"botao\" stacked @click=\"start\">\n <div class=\"title_logoff\">Logoff</div>\n <v-icon class=\"icon_logoff\" ref=\"icon\" style=\"font-size: 40px;\">{{ icone }}</v-icon>\n </v-btn>\n</template>\n\n\n<script>\n export default {\n data() {\n return {\n icone: 'mdi-power-on'\n };\n },\n methods: {\n start: function () { \n this.icone = 'mdi-power-cycle';\n this.$refs.icon.$el.style.color = '#A9A9A9';\n this.$refs.icon.$el.style.textShadow = '0px 0px 0px'; \n \n setTimeout(() => {\n this.icone = 'mdi-power-off';\n this.$refs.icon.$el.style.color = '#A9A9A9';\n this.$refs.icon.$el.style.textShadow = '0px 0px 0px';\n }, 1000);\n\n\n setTimeout(() => {\n this.send({ payload: 'ON' });\n }, 2000);\n\n\n },\n }\n };\n</script>\n\n\n<style>\n .buton_logoff {\n display: flex;\n flex-direction: column;\n margin: auto;\n height: 50px;\n width: 50px;\n background-color: #FF8C00;\n color: #000000;\n border: 1px solid #000000;\n font-size: 14px;\n border-radius: 18px;\n }\n .title_logoff {\n font-size: 75%;\n }\n</style>",
"storeOutMessages": true,
"passthru": true,
"resendOnRefresh": true,
"templateScope": "local",
"className": "",
"x": 330,
"y": 2720,
"wires": [
[
"c05413d84624b36f",
"de768c84f28fec3c"
]
]
},
{
"id": "c05413d84624b36f",
"type": "function",
"z": "9a66516c0bb63179",
"g": "6e910c997dd4122a",
"name": "logoff",
"func": "node.send({ payload: { 'page': 'Login' }});\n\nnode.send({ payload: { pages: { disable: ['Casa'] } } });\n \n\n\n\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 650,
"y": 2720,
"wires": [
[
"95426b336836aa36"
]
]
},
{
"id": "88632b1c944da58c",
"type": "function",
"z": "9a66516c0bb63179",
"g": "6e910c997dd4122a",
"name": "senha 123",
"func": "if (msg.payload === '123') {\n \n node.send({ payload: { 'page': 'Neway Automações' }});\n\n\n setTimeout(function () {\n node.send({\n payload: {\n groups: {\n show: [\n 'Neway Automações:Luzes',\n 'Neway Automações:Fitas',\n 'Neway Automações:Movimento e Ocupação',\n 'Neway Automações:Utilitários',\n 'Neway Automações:Entretenimento',\n 'Neway Automações:Acionamento Individuais',\n 'Neway Automações:Logoff' \n ]\n }\n }\n });\n }, 10);\n\n\n setTimeout(function () {\n node.send({\n payload: {\n groups: {\n hide: [ \n 'Neway Automações:Fitas',\n 'Neway Automações:Movimento e Ocupação',\n 'Neway Automações:Utilitários',\n 'Neway Automações:Entretenimento',\n 'Neway Automações:Acionamento Individuais' \n ]\n }\n }\n });\n }, 20);\n\n\n setTimeout(function () {\n node.send({ payload: { pages: { hide: ['Neway Automações'] } } });\n }, 30);\n\n\n setTimeout(function () {\n node.send({ payload: { pages: { hide: ['Login'] } } });\n }, 40);\n}\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 610,
"y": 2600,
"wires": [
[
"95426b336836aa36",
"e81ccf951614e091"
]
]
},
{
"id": "e81ccf951614e091",
"type": "delay",
"z": "9a66516c0bb63179",
"g": "6e910c997dd4122a",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "minutes",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 480,
"y": 2660,
"wires": [
[
"c05413d84624b36f",
"76cfec3e75f57afc"
]
]
},
{
"id": "de768c84f28fec3c",
"type": "template",
"z": "9a66516c0bb63179",
"g": "6e910c997dd4122a",
"name": "reset",
"field": "reset",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "reset",
"output": "str",
"x": 390,
"y": 2780,
"wires": [
[
"e81ccf951614e091"
]
]
},
{
"id": "76cfec3e75f57afc",
"type": "delay",
"z": "9a66516c0bb63179",
"g": "6e910c997dd4122a",
"name": "",
"pauseType": "delay",
"timeout": "2",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 580,
"y": 2780,
"wires": [
[
"de768c84f28fec3c"
]
]
},
{
"id": "c10b3e0c7c4bdb0d",
"type": "ui-page",
"name": "Login",
"ui": "85df8d80890b47f2",
"path": "/login",
"icon": "home",
"layout": "grid",
"theme": "b6221fc08b602ea9",
"order": -1,
"className": "",
"visible": "true",
"disabled": "false"
},
{
"id": "85df8d80890b47f2",
"type": "ui-base",
"name": "Base",
"path": "/dashboard",
"includeClientData": true,
"acceptsClientConfig": [
"ui-notification",
"ui-control"
],
"showPathInSidebar": false,
"navigationStyle": "default"
},
{
"id": "2756af9309917096",
"type": "ui-group",
"name": "Logoff",
"page": "c4dcb127abec7894",
"width": "2",
"height": "1",
"order": 8,
"showTitle": true,
"className": "",
"visible": "true",
"disabled": "false"
},
{
"id": "b6221fc08b602ea9",
"type": "ui-theme",
"name": "Default Theme",
"colors": {
"surface": "#ffffff",
"primary": "#0094ce",
"bgPage": "#eeeeee",
"groupBg": "#ffffff",
"groupOutline": "#cccccc"
},
"sizes": {
"pagePadding": "12px",
"groupGap": "12px",
"groupBorderRadius": "4px",
"widgetGap": "12px"
}
},
{
"id": "c4dcb127abec7894",
"type": "ui-page",
"name": "Casa",
"ui": "85df8d80890b47f2",
"path": "/painel",
"icon": "home",
"layout": "flex",
"theme": "b6221fc08b602ea9",
"order": -1,
"className": "",
"visible": "true",
"disabled": "true"
}
]