working on documentation and more API functions

This commit is contained in:
udo
2026-04-29 12:09:37 +00:00
parent cd445f3c9b
commit 9f7625c7fd
94 changed files with 1896 additions and 458 deletions
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Login";
context.call["starter"]["page_title"] = "Login";
StarterUser users(context);
DTree result;
if(context.params["REQUEST_METHOD"] == "POST")
@@ -9,7 +9,7 @@ RENDER(Request& context)
starter_redirect("account/login", context);
return;
}
context.var["starter"]["page_title"] = "Profile";
context.call["starter"]["page_title"] = "Profile";
DTree user = users.current();
String roles = "";
user["roles"].each([&](DTree role, String key) {
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Register";
context.call["starter"]["page_title"] = "Register";
StarterUser users(context);
DTree result;
if(context.params["REQUEST_METHOD"] == "POST")
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "OAuth Callback";
context.call["starter"]["page_title"] = "OAuth Callback";
String code = context.get["code"];
String state = context.get["state"];
String error = context.get["error"];
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Auth";
context.call["starter"]["page_title"] = "Auth";
starter_register_css("views/marketing.css", context);
DTree props;
@@ -3,19 +3,19 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_type"] = "json";
context.call["starter"]["page_type"] = "json";
DTree body = json_decode(context.in);
if(context.params["REQUEST_METHOD"] == "POST" && body["oauth_service"].to_string() != "" && body["oauth_state"].to_string() != "")
{
context.session["oauth_service"] = body["oauth_service"].to_string();
context.session["oauth_state"] = body["oauth_state"].to_string();
context.var["starter"]["json"]["status"] = "success";
context.call["starter"]["json"]["status"] = "success";
}
else
{
context.set_status(400, "Bad Request");
context.var["starter"]["json"]["status"] = "error";
context.var["starter"]["json"]["message"] = "Invalid input";
context.call["starter"]["json"]["status"] = "error";
context.call["starter"]["json"]["message"] = "Invalid input";
}
}
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Dashboard";
context.call["starter"]["page_title"] = "Dashboard";
starter_register_css("views/dashboard.css", context);
DTree props;
+1 -1
View File
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Features";
context.call["starter"]["page_title"] = "Features";
starter_register_css("views/marketing.css", context);
<>
<h1>Features</h1>
+2 -2
View File
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Gauges";
context.call["starter"]["page_title"] = "Gauges";
starter_register_css("themes/common/css/gauges.css", context);
f64 pi = 3.14159265358979323846;
@@ -69,7 +69,7 @@ RENDER(Request& context)
props.clear();
props["id"] = "needle_demo";
props["title"] = "Needle Gauge";
props["subtitle"] = "The original analog gauge now uses the same elevated panels, typography, and theme-token palette as the arc gauges.";
props["subtitle"] = "The original analog gauge uses the same elevated panels, typography, and theme-token palette as the arc gauges.";
props["style"] = "flex:1 1 24rem";
props["listen"].set_bool(true);
props["label"] = "CPU";
+1 -1
View File
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Home";
context.call["starter"]["page_title"] = "Home";
starter_register_css("views/marketing.css", context);
DTree props;
+1 -1
View File
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Components";
context.call["starter"]["page_title"] = "Components";
starter_register_css("views/marketing.css", context);
<>
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_type"] = "blank";
context.call["starter"]["page_type"] = "blank";
<>
<?= std::to_string((u64)time()) ?> - Page 2 Section 1 loaded
<pre>UCE starter AJAX fragment response</pre>
+1 -1
View File
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Ajaxy";
context.call["starter"]["page_title"] = "Ajaxy";
<>
<h1>Ajax Demo</h1>
<div id="page2-section1">
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Theme Preview";
context.call["starter"]["page_title"] = "Theme Preview";
starter_register_css("views/themes.css", context);
String current_theme_key = context.cfg.get_by_path("theme/key").to_string();
String theme_label = first(context.cfg.get_by_path("theme/label").to_string(), current_theme_key);
+1 -1
View File
@@ -3,7 +3,7 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Themes";
context.call["starter"]["page_title"] = "Themes";
starter_register_css("views/themes.css", context);
String current_theme = context.cfg.get_by_path("theme/key").to_string();
@@ -3,8 +3,8 @@
RENDER(Request& context)
{
starter_boot(context);
context.var["starter"]["page_title"] = "Workspace";
String section = first(context.var["starter"]["route"]["param"].to_string(), "overview");
context.call["starter"]["page_title"] = "Workspace";
String section = first(context.call["starter"]["route"]["param"].to_string(), "overview");
if(section != "overview" && section != "projects" && section != "activity")
section = "overview";