2022-01-10 17:57:39 +00:00
|
|
|
use dioxus::prelude::*;
|
2022-09-13 23:22:27 +00:00
|
|
|
use dioxus_desktop::Config;
|
2022-01-10 17:57:39 +00:00
|
|
|
|
|
|
|
fn main() {
|
2022-09-13 23:22:27 +00:00
|
|
|
let cfg = Config::new().with_file_drop_handler(|_w, e| {
|
2023-01-28 02:35:46 +00:00
|
|
|
println!("{e:?}");
|
2022-09-13 23:22:27 +00:00
|
|
|
true
|
2022-01-10 17:57:39 +00:00
|
|
|
});
|
2022-09-13 23:22:27 +00:00
|
|
|
|
|
|
|
dioxus_desktop::launch_with_props(app, (), cfg);
|
2022-01-10 17:57:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn app(cx: Scope) -> Element {
|
|
|
|
cx.render(rsx!(
|
|
|
|
div {
|
2022-03-05 20:25:09 +00:00
|
|
|
h1 { "drag a file here and check your console" }
|
2022-01-10 17:57:39 +00:00
|
|
|
}
|
|
|
|
))
|
|
|
|
}
|