Loading screen - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9) +--- Thread: Loading screen (/showthread.php?tid=649) |
Loading screen - buuuudzik - 28.02.2017 Maybe somebody knows how can I prepare loading screen which would be shown until welcome page will be loaded? RE: Loading screen - Erwin van der Zwart - 28.02.2017 Hi, I don't think that is possible now as the custom JavaScript is loaded only when visu starts.. Only way you can bypass that is to skip default welcome screen by setting the default startpage in the user settings direct to the visu and create your own welcome screen. I don't think that that is your plan (; BR, Erwin RE: Loading screen - buuuudzik - 01.03.2017 Perfect would be when there will be no white or black screen and no unloaded screen without a screen "Please wait". RE: Loading screen - Erwin van der Zwart - 01.03.2017 Not possible, if you want that then it must be build in to all browsers, if that message would be server side (and for us it is) then it must first be loaded before it can even show the wanted message... RE: Loading screen - Thomas - 01.03.2017 Chrome web apps have little support for welcome screens https://developer.chrome.com/multidevice/android/installtohomescreen RE: Loading screen - Thomas - 07.03.2017 Hi I'm trying the solution from the link above. I need to add <link rel="manifest" href="manifest.json"> into page's HEAD. How can I do it? Is it possible through javascript in the same way as I inject my own icon? Code: $(function(){ I need to store manifest.json file in LM. Can I do it in Images/Background, icons etc? Is there a better solution? Thank you RE: Loading screen - admin - 07.03.2017 Code: $('<link rel="manifest" href="manifest.json">').appendTo('head') You can store data via io.writefile('/path/to/file', data) but keep in mind that it will be deleted after FW upgrade. RE: Loading screen - Thomas - 07.03.2017 Thank you admin. But I don't know LM's internal directory structure. Can I ask you about advice which '/path/to/file' should I use? I tried just janifest.json with no path and was looking for the file in root and in scada-vis directory but I haven't found it. Here is my simple code for generating the file in case someone else is interrested in. I'm planning to add this code to Init event for minimizing the FW update issue mentioned abowe. require('json') local lt_data= { name="Smart Home", short_name="SmartHome", start_url="/scada-vis/touch", display="fullscreen", background_color="#575656", description="Smarthome aplication for Eclipse building", orientation="portrait-primary", theme_color="aliceblue", icons={ { src="/scada/resources/icons/favicon.png", sizes="128x128", type="image/png" }, { src="/scada/resources/icons/favicon.png", sizes="192x192", type="image/png" } }, related_applications={ { platform="web" } } } ls_data = json.encode(lt_data) log(io.writefile('/www/scada/resources/chrome-manifest.json', ls_data)) RE: Loading screen - admin - 07.03.2017 All files accessible from the web UI are stored under /www/ RE: Loading screen - Thomas - 07.03.2017 Thank you. I changed the code |