linuxrouter/docker/routlin-dash/app/pages/captiveportal/content.json
2026-06-07 14:21:40 -04:00

112 lines
3.2 KiB
JSON

{
"client_requirement": "client_is_administrator+",
"items": [
{
"type": "header_page_title",
"items": [
{
"type": "h1",
"text": "Captive Portal"
},
{
"type": "p",
"text": "Redirect unauthenticated guests on captive portal VLANs to a login page before allowing internet access."
}
]
},
{
"type": "info_bar",
"variant": "info",
"text": "%CAPTIVE_STATUS_TEXT%"
},
{
"type": "card",
"label": "Options",
"client_requirement": "client_is_administrator+",
"items": [
{
"type": "form",
"action": "/action/captiveportal/options_save",
"method": "post",
"items": [
{
"type": "field",
"label": "HTTP Port",
"name": "http_port",
"input_type": "number",
"value": "%CAPTIVE_HTTP_PORT%",
"min": 1024,
"max": 65535,
"hint": "Port the captive portal service listens on. nftables redirects unauthenticated HTTP traffic from captive portal VLANs to this port."
},
{
"type": "field",
"label": "HTTPS Domain",
"name": "https_domain",
"input_type": "text",
"value": "%CAPTIVE_HTTPS_DOMAIN%",
"hint": "Domain with an existing Caddy + Let's Encrypt certificate. The portal login page is served at https://<domain>/. Leave blank for HTTP-only."
},
{
"type": "button_row",
"items": [
{
"type": "button_primary",
"text": "Save"
},
{
"type": "button_cancel",
"text": "Cancel"
}
]
}
]
}
]
},
{
"type": "card",
"label": "Splash Screen",
"client_requirement": "client_is_administrator+",
"items": [
{
"type": "form",
"action": "/action/captiveportal/splash_save",
"method": "post",
"items": [
{
"type": "field",
"label": "Welcome Text",
"name": "splash_text",
"input_type": "text",
"value": "%CAPTIVE_SPLASH_TEXT%",
"hint": "Welcome message shown at the top of the login page."
},
{
"type": "editable_list",
"label": "Terms",
"name": "terms",
"items": "%CAPTIVE_TERMS%",
"add_label": "Add Term",
"item_placeholder": "e.g. I agree to the acceptable use policy.",
"hint": "Each term renders as a required checkbox the user must tick before submitting credentials."
},
{
"type": "button_row",
"items": [
{
"type": "button_primary",
"text": "Save"
},
{
"type": "button_cancel",
"text": "Cancel"
}
]
}
]
}
]
}
]
}