🦺 Include code to use the new API actions
This commit is contained in:
parent
23dc58c2ac
commit
7a68cf9be7
2 changed files with 10 additions and 1 deletions
|
|
@ -18,7 +18,11 @@ impl ModuleTrait for Admin {
|
|||
}
|
||||
|
||||
fn actions(&self) -> Vec<Action> {
|
||||
actions![action::page::BeforePrepareBody::with(before_prepare_body)]
|
||||
actions![
|
||||
action::page::BeforePrepareBody::with(before_prepare_body),
|
||||
action::component::BeforePrepareComponent::<Menu>::with(before_prepare_menu)
|
||||
.filtering_id("admin-menu-test"),
|
||||
]
|
||||
}
|
||||
|
||||
fn configure_service(&self, scfg: &mut service::web::ServiceConfig) {
|
||||
|
|
@ -31,3 +35,7 @@ impl ModuleTrait for Admin {
|
|||
fn before_prepare_body(page: &mut Page) {
|
||||
page.alter_body_classes(ClassesOp::Add, "test-admin");
|
||||
}
|
||||
|
||||
fn before_prepare_menu(component: &mut Menu, _cx: &mut Context) {
|
||||
component.alter_id("admin-menu-test-altered");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue