✨ Add a parameter to the Wallpaper widget to show the app version
This commit is contained in:
@@ -5,7 +5,10 @@ const GIT_VERSION: &str = git_version!();
|
||||
|
||||
turf::style_sheet!("src/ui/components/wallpaper.scss");
|
||||
|
||||
pub fn Wallpaper() -> Element {
|
||||
#[component]
|
||||
pub fn Wallpaper(display_version: Option<bool>) -> Element {
|
||||
let version = display_version.map(|flag| if flag { Some(GIT_VERSION) } else { None });
|
||||
|
||||
rsx! {
|
||||
style { {STYLE_SHEET} },
|
||||
div {
|
||||
@@ -17,7 +20,7 @@ pub fn Wallpaper() -> Element {
|
||||
|
||||
div {
|
||||
class: ClassName::WALLPAPER_VERSION,
|
||||
{GIT_VERSION},
|
||||
{version},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user