mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 05:53:44 +08:00
fix: remove unused imports to resolve compile warnings
This commit is contained in:
parent
ac07397818
commit
10a2655288
@ -1,4 +1,3 @@
|
||||
use super::tray::Tray;
|
||||
use crate::config::*;
|
||||
use crate::core::{clash_api, handle, service};
|
||||
use crate::log_err;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use anyhow::{bail, Result};
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
use sysinfo::{Pid, System, Signal};
|
||||
use sysinfo::{Pid, System};
|
||||
use crate::utils::dirs;
|
||||
use std::time::Duration;
|
||||
|
||||
|
@ -79,10 +79,10 @@ impl Tray {
|
||||
)?;
|
||||
|
||||
// 使用 TrayIconBuilder 构建托盘
|
||||
let tray = tauri::tray::TrayIconBuilder::<Wry>::with_id(TrayIconId::new("main"))
|
||||
let _tray = tauri::tray::TrayIconBuilder::<Wry>::with_id(TrayIconId::new("main"))
|
||||
.menu(&initial_menu) // 先设置菜单
|
||||
.show_menu_on_left_click(false) // 再禁用左键菜单
|
||||
.on_tray_icon_event(move |tray, event| {
|
||||
.on_tray_icon_event(move |_tray, event| {
|
||||
// 处理左键点击事件
|
||||
if let TrayIconEvent::Click {
|
||||
button,
|
||||
@ -96,7 +96,7 @@ impl Tray {
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
// 确保菜单不会显示
|
||||
let _ = tray.set_show_menu_on_left_click(false);
|
||||
let _ = _tray.set_show_menu_on_left_click(false);
|
||||
}
|
||||
|
||||
// 获取并执行自定义事件
|
||||
|
@ -14,11 +14,12 @@ use anyhow::{bail, Result};
|
||||
use reqwest_dav::list_cmd::ListFile;
|
||||
use serde_yaml::{Mapping, Value};
|
||||
use std::fs;
|
||||
use tauri::{Manager, tray::TrayIcon};
|
||||
use tauri::Manager;
|
||||
use tauri_plugin_clipboard_manager::ClipboardExt;
|
||||
use tauri_plugin_window_state::{AppHandleExt, StateFlags};
|
||||
|
||||
// 打开面板
|
||||
#[allow(dead_code)]
|
||||
pub fn open_or_close_dashboard() {
|
||||
println!("Attempting to open/close dashboard");
|
||||
log::info!(target: "app", "Attempting to open/close dashboard");
|
||||
|
Loading…
x
Reference in New Issue
Block a user