cryptnox-pos 1.0.0
Standalone USDC payment terminal firmware (ESP32 + Cryptnox smart card)
Loading...
Searching...
No Matches
portal_page.h File Reference

The config portal's document — the HTML/CSS half and the script half. More...

#include "card_front.h"
#include "portal_fonts.h"
Include dependency graph for portal_page.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PORTAL_IP   "192.168.4.1"
#define PORTAL_URL   "http://" PORTAL_IP "/"

Variables

static const char *const PAGE_HTML
static const char *const PAGE_JS

Detailed Description

The config portal's document — the HTML/CSS half and the script half.

Lifted out of provision.cpp, which is the HTTP server: the two literals below were ~700 of its 2100 lines and are read by exactly one function there (page_get, which concatenates them into one chunked response). Nothing else includes this, so the statics are one copy in one translation unit.

Checked by tools/check_portal_page.py, which extracts both literals from this file, verifies the script parses and that every id the script reaches for exists in the markup — and emits the script for tools/test_portal_render.js. Edit the page here; the checks run from scripts/checks.sh.

Definition in file portal_page.h.

Macro Definition Documentation

◆ PORTAL_IP

#define PORTAL_IP   "192.168.4.1"

Definition at line 33 of file portal_page.h.

◆ PORTAL_URL

#define PORTAL_URL   "http://" PORTAL_IP "/"

Definition at line 34 of file portal_page.h.

Referenced by apple_probe(), prov_start(), and redirect().

Variable Documentation

◆ PAGE_HTML

const char* const PAGE_HTML
static

Definition at line 40 of file portal_page.h.

Referenced by page_get().

◆ PAGE_JS

const char* const PAGE_JS
static

Definition at line 528 of file portal_page.h.

Referenced by page_get().