2024-01-19 16:36:40 -08:00
|
|
|
use dioxus::desktop::{use_asset_handler, wry::http::Response};
|
2023-12-17 17:14:55 -06:00
|
|
|
use dioxus::prelude::*;
|
|
|
|
|
|
|
|
fn main() {
|
2024-01-16 11:45:02 -06:00
|
|
|
launch_desktop(app);
|
2023-12-17 17:14:55 -06:00
|
|
|
}
|
|
|
|
|
2024-01-13 20:51:37 -08:00
|
|
|
fn app() -> Element {
|
|
|
|
use_asset_handler("logos", |request, response| {
|
2024-01-21 13:38:25 -08:00
|
|
|
// We get the original path - make sure you handle that!
|
|
|
|
if request.uri().path() != "/logos/logo.png" {
|
2024-01-05 18:08:04 -08:00
|
|
|
return;
|
2023-12-17 17:14:55 -06:00
|
|
|
}
|
2024-01-05 18:08:04 -08:00
|
|
|
|
|
|
|
response.respond(Response::new(include_bytes!("./assets/logo.png").to_vec()));
|
2023-12-17 17:14:55 -06:00
|
|
|
});
|
|
|
|
|
2024-01-16 13:18:46 -06:00
|
|
|
rsx! {
|
2023-12-17 17:14:55 -06:00
|
|
|
div {
|
2024-01-11 12:11:27 -08:00
|
|
|
img { src: "/logos/logo.png" }
|
2023-12-17 17:14:55 -06:00
|
|
|
}
|
2024-01-11 12:11:27 -08:00
|
|
|
}
|
2023-12-17 17:14:55 -06:00
|
|
|
}
|