add obktype in app html - in case we need the webapp to adapt....

Add a link to webapp in native cfg
This commit is contained in:
btsimonh
2022-02-16 09:12:35 +00:00
parent 438e587008
commit 819628ef39
2 changed files with 14 additions and 1 deletions

View File

@ -999,6 +999,7 @@ int HTTP_ProcessPacket(http_request_t *request) {
poststr(request,"<form action=\"cmd_single\"><input type=\"submit\" value=\"Execute custom command\"/></form>");
poststr(request,"<form action=\"flash_read_tool\"><input type=\"submit\" value=\"Flash Read Tool\"/></form>");
poststr(request,"<a href=\"/app\" target=\"_blank\">Launch Web Application</a><br/>");
poststr(request,htmlReturnToMenu);
HTTP_AddBuildFooter(request);
@ -1229,7 +1230,7 @@ int HTTP_ProcessPacket(http_request_t *request) {
<label for=\"host\">URL for new bin file:</label><br>\
<input type=\"text\" id=\"host\" name=\"host\" value=\"");
poststr(request,"\"><br>\
<input type=\"submit\" value=\"Submit\" onclick=\"return confirm('Are you sure? Please check MQTT data twice?')\">\
<input type=\"submit\" value=\"Submit\" onclick=\"return confirm('Are you sure?')\">\
</form> ");
poststr(request,htmlReturnToMenu);
HTTP_AddBuildFooter(request);

View File

@ -61,8 +61,20 @@ const char *apppage1 =
" <head>"
" <script>"
" var root = '";
#if WINDOWS
const char * apppage2 = "';"
" var obktype = 'windows';"
" var device = 'http://";
#elif PLATFORM_XR809
const char * apppage2 = "';"
" var obktype = 'XR809';"
" var device = 'http://";
#else
const char * apppage2 = "';"
" var obktype = 'beken';"
" var device = 'http://";
#endif
const char * apppage3 = "';"
" </script>"
" <script src=\"";