mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
Replace multi-page portal with hash-routed SPA, DFTE shell placeholders, and data-first JSON APIs. Remove legacy routes, root-template override path, and HTML-derived info pipeline. Add bootstrap feature flags, in-DOM toast/dialog UX, OTA via POST /u, and tests for shell, bootstrap, API JSON, and captive host rule. Rewrite README as fork disclaimer and modernization overview.
46 lines
1.4 KiB
C
46 lines
1.4 KiB
C
/**
|
|
* RootShell.h
|
|
*
|
|
* @author alexhopeoconnor
|
|
* @license MIT
|
|
*
|
|
* Single-page portal shell: only HTML document served for GET /.
|
|
* Dynamic UI is driven by embedded JS + JSON APIs under /api/...
|
|
*/
|
|
|
|
#ifndef _WM_ROOT_SHELL_TEMPLATE_H_
|
|
#define _WM_ROOT_SHELL_TEMPLATE_H_
|
|
|
|
#include <Arduino.h>
|
|
|
|
const char WM_ROOT_SHELL_TEMPLATE[] PROGMEM =
|
|
"<!DOCTYPE html>"
|
|
"<html lang='en'>"
|
|
"<head>"
|
|
"<meta name='format-detection' content='telephone=no'>"
|
|
"<meta charset='UTF-8'/>"
|
|
"<meta name='viewport' content='width=device-width,initial-scale=1,user-scalable=no'/>"
|
|
"<title>%PAGE_TITLE%</title>"
|
|
"%SCRIPTS%"
|
|
"%STYLES%"
|
|
"</head>"
|
|
"<body class='portal'>"
|
|
"<div id='wm-toast' class='wm-toast' aria-live='polite' role='status' style='display:none'></div>"
|
|
"<div id='wm-dialog' class='wm-dialog' style='display:none' aria-hidden='true'>"
|
|
"<div class='wm-dialog-backdrop' id='wm-dialog-backdrop'></div>"
|
|
"<div class='wm-dialog-panel'>"
|
|
"<p class='wm-dialog-msg' id='wm-dialog-msg'></p>"
|
|
"<div class='wm-dialog-actions'>"
|
|
"<button type='button' id='wm-dialog-cancel'>Cancel</button>"
|
|
"<button type='button' id='wm-dialog-ok' class='wm-dialog-ok'>OK</button>"
|
|
"</div></div></div>"
|
|
"<div id='app'></div>"
|
|
"<script id='wm-bootstrap' type='application/json'>%BOOTSTRAP_JSON%</script>"
|
|
"<script>"
|
|
"%PORTAL_APP_JS%"
|
|
"</script>"
|
|
"</body>"
|
|
"</html>";
|
|
|
|
#endif // _WM_ROOT_SHELL_TEMPLATE_H_
|