🚚 Rename context operation for adding base assets
This commit is contained in:
parent
e8e7f62d6c
commit
3e9dbac21d
4 changed files with 8 additions and 8 deletions
|
|
@ -110,7 +110,7 @@ impl ThemeTrait for Bootsier {
|
|||
.with_version("5.1.3")
|
||||
.with_weight(-99),
|
||||
))
|
||||
.alter_context(ContextOp::AddAssetsForBase);
|
||||
.alter_context(ContextOp::AddBaseAssets);
|
||||
}
|
||||
|
||||
fn render_component(&self, component: &dyn ComponentTrait, cx: &mut Context) -> Option<Markup> {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ impl ThemeTrait for Bulmix {
|
|||
.with_version("0.9.4")
|
||||
.with_weight(-99),
|
||||
))
|
||||
.alter_context(ContextOp::AddAssetsForBase);
|
||||
.alter_context(ContextOp::AddBaseAssets);
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ impl ThemeTrait for Inception {
|
|||
.with_version("8.0.1")
|
||||
.with_weight(-90),
|
||||
))
|
||||
.alter_context(ContextOp::AddAssetsForBase)
|
||||
.alter_context(ContextOp::AddBaseAssets)
|
||||
.alter_context(ContextOp::AddStyleSheet(
|
||||
StyleSheet::at("/base/css/styles.css")
|
||||
.with_version("0.0.1")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use crate::base::component::add_assets_for_base;
|
||||
use crate::base::component::add_base_assets;
|
||||
use crate::core::theme::all::{theme_by_single_name, THEME};
|
||||
use crate::core::theme::ThemeRef;
|
||||
use crate::html::{html, Assets, HeadScript, HeadStyles, JavaScript, Markup, StyleSheet};
|
||||
|
|
@ -24,8 +24,8 @@ pub enum ContextOp {
|
|||
// Scripts in head.
|
||||
AddHeadScript(HeadScript),
|
||||
RemoveHeadScript(&'static str),
|
||||
// Add assets to properly use the base components.
|
||||
AddAssetsForBase,
|
||||
// Add assets to properly use base components.
|
||||
AddBaseAssets,
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
|
|
@ -80,8 +80,8 @@ impl Context {
|
|||
ContextOp::AddHeadScript(script) => { self.headscript.add(script); }
|
||||
ContextOp::RemoveHeadScript(path) => { self.headscript.remove(path); }
|
||||
|
||||
// Add assets to properly use the base components.
|
||||
ContextOp::AddAssetsForBase => { add_assets_for_base(self); }
|
||||
// Add assets to properly use base components.
|
||||
ContextOp::AddBaseAssets => { add_base_assets(self); }
|
||||
}
|
||||
self
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue