♻️ Use of the assets management introduced by Dioxus 0.6.0
All checks were successful
ci/woodpecker/push/dockerize Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful

Cf. https://dioxuslabs.com/blog/release-060#stabilizing-manganis-asset-system
This commit is contained in:
2025-04-21 09:39:54 +02:00
parent 219fac87b1
commit 722d98f5d1
6 changed files with 220 additions and 236 deletions

View File

@@ -7,10 +7,8 @@ turf::style_sheet!("src/ui/components/wallpaper.scss");
#[component]
pub fn Wallpaper(display_version: Option<bool>) -> Element {
let background_image = format!(
"url({})",
manganis::asset!("public/images/wallpaper-pattern.svg")
);
let background_image_asset = asset!("/public/images/wallpaper-pattern.svg");
let background_image = format!("url({})", background_image_asset.to_string());
let version = display_version.map(|flag| if flag { Some(GIT_VERSION) } else { None });