mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
fix: windows can't start
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 92 KiB |
@@ -1,4 +1,5 @@
|
||||
use crate::{app::window, conf::ChatConfJson, utils};
|
||||
use log::info;
|
||||
use tauri::{utils::config::WindowUrl, window::WindowBuilder, App, GlobalShortcutManager, Manager};
|
||||
|
||||
pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>> {
|
||||
@@ -11,12 +12,15 @@ pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>
|
||||
window::tray_window(&handle);
|
||||
});
|
||||
|
||||
info!("stepup");
|
||||
|
||||
{
|
||||
info!("global_shortcut_start");
|
||||
let handle = app.app_handle();
|
||||
let mut shortcut = app.global_shortcut_manager();
|
||||
let is_mini_key = shortcut.is_registered("CmdOrCtrl+Shift+O");
|
||||
|
||||
if !is_mini_key.unwrap() {
|
||||
if is_mini_key.is_ok() {
|
||||
shortcut
|
||||
.register("CmdOrCtrl+Shift+O", move || {
|
||||
if let Some(w) = handle.get_window("core") {
|
||||
@@ -30,6 +34,7 @@ pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>
|
||||
})
|
||||
.unwrap();
|
||||
};
|
||||
info!("global_shortcut_end");
|
||||
}
|
||||
|
||||
if chat_conf.hide_dock_icon {
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
}
|
||||
},
|
||||
"systemTray": {
|
||||
"iconPath": "icons/tray-icon.png",
|
||||
"iconAsTemplate": true,
|
||||
"iconPath": "icons/tray-icon-light.png",
|
||||
"iconAsTemplate": false,
|
||||
"menuOnLeftClick": false
|
||||
},
|
||||
"bundle": {
|
||||
|
||||
Reference in New Issue
Block a user