No, it DOES change. Which is why I added a clientId
which will be stable for the browser until it is completely restarted.
A timed notification. I don't often use notifications though but the notify command should time out by default.
This msg
content creates a popover that goes away automatically after 10 seconds:
"_ui": [
{
"method": "notify",
"variant": "info",
"title": "A Manual Title",
"content": "A message from low-code",
"payload": "This is a message from the payload",
"topic": "show-popup",
"autoHideDelay": 10000,
"autohide": true
}
],
Here is a simple flow:
[{"id":"4349922788703674","type":"link out","z":"778eb3505a1c57cf","name":"link out 73","mode":"link","links":["0711e37d3a8911b0"],"x":955,"y":440,"wires":[]},{"id":"bf862bbd0cfe2ff0","type":"inject","z":"778eb3505a1c57cf","name":"Show an on-page notification (method: notify)","props":[{"p":"_ui","v":"{\"method\":\"notify\",\"variant\":\"info\",\"title\":\"A Manual Title\",\"content\":\"A message from low-code\"}","vt":"json"},{"p":"topic","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"show-popup","payload":"This is a message from the payload","payloadType":"str","x":310,"y":440,"wires":[["4349922788703674"]],"info":"Note that this is different to the `notification` uib command,\r\nthat shows an OS toast notification, this shows an on-page\r\npop-over.\r\n\r\nThe difference between this and the \"alert\" method is that\r\nthis does autohides by default and it has no warning icon.\r\n\r\nOtherwise, it is the same and both use the `showDialog`\r\nmethod under the skin."},{"id":"415adea0247fbd47","type":"inject","z":"778eb3505a1c57cf","name":"Show an on-page notification (method: alert)","props":[{"p":"_ui","v":"{\"method\":\"alert\",\"variant\":\"info\",\"title\":\"A Manual Title\",\"content\":\"A message from low-code\"}","vt":"json"},{"p":"topic","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"show-popup","payload":"This is a message from the payload","payloadType":"str","x":310,"y":480,"wires":[["4349922788703674"]],"info":"Note that this is different to the `notification` uib command,\r\nthat shows an OS toast notification, this shows an on-page\r\npop-over.\r\n\r\nThe difference between this and the \"notify\" method is that\r\nthis does not autohide and it has a warning icon.\r\n\r\nOtherwise, it is the same and both use the `showDialog`\r\nmethod under the skin."},{"id":"1259b61fd05d7e1f","type":"group","z":"778eb3505a1c57cf","name":"Base node. Change ALL URL's to match.","style":{"label":true,"fill":"#ffffbf","fill-opacity":"0.28","color":"#3f3f3f"},"nodes":["5e8cef7a75c274e9","f6768800e8264e5b","3c3912ba1979a325","8e45322c03ef2242","8cb6282875850f48","05c8d0d1e7edc284","0711e37d3a8911b0","397cdb56724e22b1","70b3cb25d897b7f3","e3208e97a697d27f","609e62d7e38c2c5c","c55028d432f00c22","bc4ada305fa307f9","c012c86ba02b3767","569fa7fdb720f802","f9cbec6afedd2d2e","d11899a22de0067f"],"x":114,"y":79,"w":882,"h":262},{"id":"5e8cef7a75c274e9","type":"uibuilder","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"","topic":"","url":"low-code-tests","okToGo":true,"fwdInMessages":false,"allowScripts":false,"allowStyles":false,"copyIndex":true,"templateFolder":"blank","extTemplate":"","showfolder":false,"reload":true,"sourceFolder":"src","deployedVersion":"6.8.0","showMsgUib":true,"title":"Zero-code examples","descr":"A collection of flows that demonstrate and test all of the uib-element node's output types.","editurl":"vscode://file/src/uibRoot/low-code-tests/?windowId=_blank","x":620,"y":180,"wires":[["f6768800e8264e5b"],["c012c86ba02b3767"]],"info":"This example uses the default blank template.\r\n\r\nIt does not use any front-end framework, just\r\npure HTML, CSS and JavaScript."},{"id":"f6768800e8264e5b","type":"debug","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"uibuilder standard output","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"","statusType":"counter","x":755,"y":160,"wires":[],"l":false,"info":"This shows the data coming out of the\r\nuibuilder node's Port #1 (top) which is\r\nthe standard output.\r\n\r\nHere you will see any standard msg sent from\r\nyour front-end code."},{"id":"3c3912ba1979a325","type":"debug","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"uibuilder control output","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"","statusType":"counter","x":905,"y":200,"wires":[],"l":false,"info":"This shows the data coming out of the\r\nuibuilder node's Port #2 (bottom) which is\r\nthe control output.\r\n\r\nHere you will see any control msg either sent\r\nby the node itself or from the front-end library.\r\n\r\nFor example the \"client disconnect\" and\r\n\"client connect\" messages. Or the \"visibility\"\r\nmessages from the client.\r\n\r\nLoop the \"client connect\", \"cache replay\" and\r\n\"cache clear\" messages back to a `uib-cache`\r\nnode before the input to uibuilder in order\r\nto control the output of the cache."},{"id":"8e45322c03ef2242","type":"inject","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"Reload","props":[{"p":"_ui","v":"{\"method\":\"reload\"}","vt":"json"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"reload","x":210,"y":180,"wires":[["05c8d0d1e7edc284"]],"info":"Sends a pre-formatted msg to the front-end that\r\ncauses the page to reload itself."},{"id":"8cb6282875850f48","type":"comment","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"Chk Description in each node","info":"","x":560,"y":140,"wires":[]},{"id":"05c8d0d1e7edc284","type":"junction","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","x":420,"y":180,"wires":[["5e8cef7a75c274e9"]]},{"id":"0711e37d3a8911b0","type":"link in","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"link in to low-code-tests","links":["4349922788703674","bc4ada305fa307f9"],"x":285,"y":140,"wires":[["5e8cef7a75c274e9","f9cbec6afedd2d2e"]]},{"id":"397cdb56724e22b1","type":"inject","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"Toggle Visible Msgs","props":[{"p":"_uib","v":"{\"command\":\"showMsg\", \"pageName\": \"index.html\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":250,"y":220,"wires":[["05c8d0d1e7edc284"]]},{"id":"70b3cb25d897b7f3","type":"inject","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"Log Lvl 5","props":[{"p":"_uib","v":"{\"command\":\"set\",\"prop\":\"logLevel\",\"value\":5}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":220,"y":260,"wires":[["d11899a22de0067f"]]},{"id":"e3208e97a697d27f","type":"inject","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"Log Lvl 0","props":[{"p":"_uib","v":"{\"command\":\"set\",\"prop\":\"logLevel\",\"value\":0}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":220,"y":300,"wires":[["d11899a22de0067f"]]},{"id":"609e62d7e38c2c5c","type":"switch","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"Connect Only","property":"uibuilderCtrl","propertyType":"msg","rules":[{"t":"eq","v":"client connect","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":805,"y":260,"wires":[["569fa7fdb720f802"]],"l":false},{"id":"c55028d432f00c22","type":"uib-element","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"Set title/heading on load","topic":"","elementtype":"title","parent":"body","parentSource":"","parentSourceType":"str","elementid":"myh1","elementId":"","elementIdSourceType":"str","heading":"","headingSourceType":"str","headingLevel":"h2","position":"first","positionSourceType":"str","confData":{},"x":905,"y":260,"wires":[["bc4ada305fa307f9"]],"l":false},{"id":"bc4ada305fa307f9","type":"link out","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"Set title/heading on page load","mode":"link","links":["0711e37d3a8911b0"],"x":955,"y":260,"wires":[]},{"id":"c012c86ba02b3767","type":"junction","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","x":720,"y":200,"wires":[["3c3912ba1979a325","609e62d7e38c2c5c"]]},{"id":"569fa7fdb720f802","type":"change","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","name":"Set title text","rules":[{"t":"set","p":"payload","pt":"msg","to":"uib-element tests","tot":"str"},{"t":"delete","p":"uibuilderCtrl","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":855,"y":260,"wires":[["c55028d432f00c22"]],"l":false},{"id":"f9cbec6afedd2d2e","type":"debug","z":"778eb3505a1c57cf","d":true,"g":"1259b61fd05d7e1f","name":"uibuilder standard output","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"","statusType":"counter","x":395,"y":120,"wires":[],"l":false,"info":"This shows the data coming out of the\r\nuibuilder node's Port #1 (top) which is\r\nthe standard output.\r\n\r\nHere you will see any standard msg sent from\r\nyour front-end code."},{"id":"d11899a22de0067f","type":"junction","z":"778eb3505a1c57cf","g":"1259b61fd05d7e1f","x":420,"y":260,"wires":[["5e8cef7a75c274e9"]]}]
It also automatically blurs the background. You don't actually need to set autohide
as that is the default. But you might want to set the autoHideDelay
as the default is 10 seconds.