♻️ (admin): Construye piezas del panel con new()

AdminSection, AdminPage, AdminTask y AdminAction pasan a campos
privados con constructores y pesos Weight.
This commit is contained in:
Manuel Cillero 2026-11-07 07:58:01 +01:00
parent 8e0c887ba6
commit 71ea609088
11 changed files with 616 additions and 445 deletions

View file

@ -12,12 +12,7 @@ use super::FnActionDeclareAdminSections;
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// fn declare_sections(bag: &mut AdminSectionBag) {
/// bag.add(AdminSection {
/// key: "tools".to_owned(),
/// path: "tools".to_owned(),
/// title: Lc::n("Tools"),
/// weight: 60,
/// });
/// bag.add(AdminSection::new("tools", Lc::n("Tools")).with_weight(60));
/// }
/// // En Extension::actions():
/// // action::admin::DeclareAdminSections::new(declare_sections)