💄 Manage config per target and remove menu bar from the desktop one
This commit is contained in:
17
src/main.rs
17
src/main.rs
@@ -10,6 +10,9 @@ use async_std::task;
|
||||
use dioxus::prelude::*;
|
||||
use log::{debug, LevelFilter};
|
||||
|
||||
#[cfg(feature = "desktop")]
|
||||
use dioxus::desktop::Config;
|
||||
|
||||
use crate::base::{login, sync_rooms};
|
||||
use crate::base::{APP_SETTINGS, ROOMS, SESSION};
|
||||
use crate::ui::components::loading::LoadingPage;
|
||||
@@ -110,7 +113,17 @@ fn app() -> Element {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
launch(app);
|
||||
dioxus_logger::init(LevelFilter::Info).expect("failed to init logger");
|
||||
|
||||
#[cfg(feature = "desktop")]
|
||||
{
|
||||
let config = Config::new().with_menu(None);
|
||||
let builder = LaunchBuilder::new().with_cfg(config);
|
||||
builder.launch(app);
|
||||
}
|
||||
#[cfg(feature = "web")]
|
||||
{
|
||||
let builder = LaunchBuilder::new();
|
||||
builder.launch(app);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user