refactor: rename DTree to DValue

This commit is contained in:
udo
2026-06-12 11:05:52 +00:00
parent 941f5aea08
commit 7066da3cde
157 changed files with 1203 additions and 1074 deletions
@@ -4,10 +4,10 @@ COMPONENT(Request& context)
{
String main_html = context.call["fragments"]["main"].to_string();
DTree nav_props;
DValue nav_props;
nav_props["account_wrapper_class"] = "nav-account nav-menu";
DTree footer_props;
DValue footer_props;
<>
<!doctype html>
@@ -4,7 +4,7 @@ COMPONENT(Request& context)
{
String main_html = context.call["fragments"]["main"].to_string();
DTree footer_props;
DValue footer_props;
<>
<!doctype html>
@@ -5,10 +5,10 @@ COMPONENT(Request& context)
String main_html = context.call["fragments"]["main"].to_string();
String current_path = context.call["route"]["l_path"].to_string();
DTree global_props;
DValue global_props;
global_props["cookie_consent"].set_bool(false);
DTree account_props;
DValue account_props;
account_props["wrapper_class"] = "admin-account-card";
account_props["links_wrapper_class"] = "admin-account-links";
account_props["name_class"] = "admin-account-name";
@@ -28,7 +28,7 @@ COMPONENT(Request& context)
<img class="admin-nav-logo-img" src="<?= app_asset_url("themes/localfirst/img/local_first_logo.png", context) ?>" alt="<?= context.cfg.get_by_path("site/name").to_string() ?>" />
</a>
</div>
<? context.cfg.get_by_path("menu").each([&](DTree menu_item, String menu_key) {
<? context.cfg.get_by_path("menu").each([&](DValue menu_item, String menu_key) {
if(menu_item["hidden"].to_string() == "1")
return;
bool active = menu_key != "" && (current_path == menu_key || current_path.rfind(menu_key + "/", 0) == 0);
@@ -4,10 +4,10 @@ COMPONENT(Request& context)
{
String main_html = context.call["fragments"]["main"].to_string();
DTree nav_props;
DValue nav_props;
nav_props["account_wrapper_class"] = "nav-account nav-menu";
DTree footer_props;
DValue footer_props;
<>
<!doctype html>
@@ -4,7 +4,7 @@ COMPONENT(Request& context)
{
String main_html = context.call["fragments"]["main"].to_string();
DTree footer_props;
DValue footer_props;
footer_props["inner_class"] = "footer-inner";
<>
@@ -4,10 +4,10 @@ COMPONENT(Request& context)
{
String main_html = context.call["fragments"]["main"].to_string();
DTree nav_props;
DValue nav_props;
nav_props["account_wrapper_class"] = "nav-account nav-menu";
DTree footer_props;
DValue footer_props;
<>
<!doctype html>