mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
init
This commit is contained in:
27
src-tauri/src/main.rs
Normal file
27
src-tauri/src/main.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
#![cfg_attr(
|
||||
all(not(debug_assertions), target_os = "windows"),
|
||||
windows_subsystem = "windows"
|
||||
)]
|
||||
|
||||
mod utils;
|
||||
mod wa;
|
||||
|
||||
use tauri::SystemTray;
|
||||
use wa::{cmd, menu, setup};
|
||||
|
||||
fn main() {
|
||||
let context = tauri::generate_context!();
|
||||
|
||||
tauri::Builder::default()
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
cmd::drag_window,
|
||||
cmd::fullscreen,
|
||||
])
|
||||
.setup(setup::init)
|
||||
.menu(menu::init(&context))
|
||||
.system_tray(SystemTray::new())
|
||||
.on_menu_event(menu::menu_handler)
|
||||
.on_system_tray_event(menu::tray_handler)
|
||||
.run(context)
|
||||
.expect("error while running ChatGPT application");
|
||||
}
|
||||
Reference in New Issue
Block a user