Add model management and macOS integration

This commit is contained in:
Georg Bauer
2026-07-24 15:18:35 +02:00
parent ec77ab94fb
commit ad7167e84a
11 changed files with 1486 additions and 251 deletions

View File

@@ -1,19 +1,24 @@
mod app;
mod database;
mod model;
#[cfg(target_os = "macos")]
mod native_menu;
mod schema;
use app::{App, app_theme};
use iced::{Size, Task};
use app::{App, Message, app_icon, app_theme};
use iced::{Size, window};
fn main() -> iced::Result {
iced::application("DS4Server", App::update, App::view)
iced::daemon(App::title, App::update, App::view)
.subscription(App::subscription)
.theme(|_| app_theme())
.window(iced::window::Settings {
size: Size::new(1120.0, 720.0),
min_size: Some(Size::new(760.0, 480.0)),
..Default::default()
.theme(|_, _| app_theme())
.run_with(|| {
let (main_window, open) = window::open(window::Settings {
size: Size::new(1120.0, 720.0),
min_size: Some(Size::new(760.0, 480.0)),
icon: Some(app_icon()),
..Default::default()
});
(App::load(main_window), open.map(Message::WindowOpened))
})
.run_with(|| (App::load(), Task::none()))
}