3 Commits

Author SHA1 Message Date
d2108fa6fc ♻️ Remove duplicated if statement 2024-09-22 19:39:06 +02:00
44ba3d4d23 🐛 script_include is not used anymore (since Dioxus #2258) 2024-09-22 19:36:43 +02:00
5206fb13c8 ♻️ Use of manganis for wallpaper pattern 2024-09-22 18:51:48 +02:00
4 changed files with 8 additions and 7 deletions

View File

@@ -10,7 +10,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8" />
{style_include}
{script_include}
</head>
<body>
<div id="main">

View File

@@ -91,15 +91,12 @@ fn app() -> Element {
if !SESSION.read().is_logged {
login_coro.send(false);
}
if SESSION.read().is_logged {
rsx! {
Conversations {}
Login {}
}
} else {
rsx! {
Login {}
Conversations {}
}
}
}

View File

@@ -7,6 +7,11 @@ turf::style_sheet!("src/ui/components/wallpaper.scss");
#[component]
pub fn Wallpaper(display_version: Option<bool>) -> Element {
let background_image = format!(
"url({})",
manganis::mg!(file("public/images/wallpaper-pattern.svg"))
);
let version = display_version.map(|flag| if flag { Some(GIT_VERSION) } else { None });
rsx! {
@@ -17,6 +22,7 @@ pub fn Wallpaper(display_version: Option<bool>) -> Element {
div {
class: ClassName::WALLPAPER_CONTENT,
background_image: "{background_image}",
}
div {

View File

@@ -12,7 +12,6 @@
overflow: hidden;
&__content {
background-image: url("./images/wallpaper-pattern.svg");
background-position: center;
width: 150%;