mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-22 05:34:04 +02:00
back to normal setup methods
This commit is contained in:
parent
69686f7514
commit
75583ac6ce
6 changed files with 56 additions and 106 deletions
|
@ -1,19 +1,10 @@
|
|||
use tauri::AppHandle;
|
||||
use tauri::plugin::TauriPlugin;
|
||||
use tauri::Manager;
|
||||
use tauri::menu::{MenuBuilder, MenuItemBuilder};
|
||||
use tauri::tray::{MouseButton, TrayIconBuilder, TrayIconEvent};
|
||||
use tauri::{
|
||||
Manager,
|
||||
menu::{MenuBuilder, MenuItemBuilder},
|
||||
tray::{MouseButton, TrayIconBuilder, TrayIconEvent},
|
||||
};
|
||||
|
||||
pub fn init() -> TauriPlugin<tauri::Wry> {
|
||||
tauri::plugin::Builder::new("tray")
|
||||
.setup(|app, _api| {
|
||||
setup(app)?;
|
||||
Ok(())
|
||||
})
|
||||
.build()
|
||||
}
|
||||
|
||||
fn setup(app: &AppHandle) -> Result<(), Box<dyn std::error::Error>> {
|
||||
pub fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let window = app.get_webview_window("main").unwrap();
|
||||
let window_clone_for_tray = window.clone();
|
||||
let window_clone_for_click = window.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue