♻️ (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:
parent
8e0c887ba6
commit
71ea609088
11 changed files with 616 additions and 445 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue