Jasonette Mobile App

Written By Brian Sathinathan (Super Administrator)

Updated at October 12th, 2020

Description

Please enter Jasonette style JSON into the app for mobile design once saved msg.payload will display the URL that you need to export to mobile app

Code For Above Flow

[{"id":"c4d3fe.70620c","type":"jasonette-mobile-app","z":"cb7e7ae0.322888","name":"jasonette","func":"{\n  \"$jason\": {\n    \"head\": {\n      \"title\": \"footer input\",\n      \"data\": {\n        \"messages\": [\n          \"Hi there\",\n          \"hey who are you\",\n          \"I'm doing good my man\",\n          \"OK shut up now\",\n          \"😤😤😤😤😤😤😤😤😤😤😤😤😤😤😤😤😤\"\n        ]\n      },\n      \"templates\": {\n        \"body\": {\n          \"header\": {\n            \"title\": {\n              \"type\": \"label\",\n              \"text\": \"ethan\",\n              \"style\": {\n                \"font\": \"HelveticaNeue-CondensedBold\"\n              }\n            },\n            \"style\": {\n              \"background\": \"#f00000\",\n              \"color\": \"#ffffff\"\n            }\n          },\n          \"sections\": [\n            {\n              \"items\": {\n                \"{{#each messages}}\": {\n                  \"type\": \"horizontal\",\n                  \"style\": {\n                    \"padding\": \"10\"\n                  },\n                  \"components\": [\n                    {\n                      \"{{#if $index%2 == 1}}\": [\n                        {\n                          \"type\": \"label\",\n                          \"text\": \"{{this}}\",\n                          \"class\": \"{{$index%2 == 1 ? 'left' : 'right'}}\",\n                          \"style\": {\n                            \"background\": \"#e4e6ea\",\n                            \"padding\": \"10\",\n                            \"corner_radius\": \"20\",\n                            \"color\": \"#000100\"\n                          }\n                        },\n                        {\n                          \"type\": \"space\"\n                        }\n                      ]\n                    },\n                    {\n                      \"{{#else}}\": [\n                        {\n                          \"type\": \"space\"\n                        },\n                        {\n                          \"type\": \"label\",\n                          \"text\": \"{{this}}\",\n                          \"class\": \"{{$index%2 == 1 ? 'left' : 'right'}}\",\n                          \"style\": {\n                            \"background\": \"#2e7cf6\",\n                            \"padding\": \"10\",\n                            \"corner_radius\": \"20\",\n                            \"color\": \"#ffffff\"\n                          }\n                        }\n                      ]\n                    }\n                  ]\n                }\n              }\n            }\n          ],\n          \"footer\": {\n            \"input\": {\n              \"style\": {\n                \"background\": \"#ebebeb\"\n              },\n              \"left\": {\n                \"image\": \"https://png.icons8.com/ios/100/000000/compact-camera.png\"\n              },\n              \"textfield\": {\n                \"placeholder\": \"Enter a message\",\n                \"style\": {\n                  \"background\": \"#ffffff\"\n                }\n              },\n              \"right\": {\n                \"text\": \"send\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}","x":240,"y":860,"wires":[["d8477dd4.30624"]]},{"id":"84084f8.ae01cb","type":"inject","z":"cb7e7ae0.322888","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":860,"wires":[["c4d3fe.70620c"]]},{"id":"d8477dd4.30624","type":"console","z":"cb7e7ae0.322888","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":390,"y":860,"wires":[]}]

Parameters

Function(JSON)The Jasonette style JSON describing the app

Output

payload (object)A message with the URL that your mobile app is running on.


Was this article helpful?