mirror of
https://github.com/lencx/ChatGPT.git
synced 2024-10-01 01:06:13 -04:00
chore: spawn
This commit is contained in:
parent
4c86477d6f
commit
53a240953f
@ -10,7 +10,7 @@ pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>
|
|||||||
let theme = ChatConfJson::theme();
|
let theme = ChatConfJson::theme();
|
||||||
let handle = app.app_handle();
|
let handle = app.app_handle();
|
||||||
|
|
||||||
tokio::spawn(async move {
|
tauri::async_runtime::spawn(async move {
|
||||||
window::tray_window(&handle);
|
window::tray_window(&handle);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>
|
|||||||
app.set_activation_policy(tauri::ActivationPolicy::Accessory);
|
app.set_activation_policy(tauri::ActivationPolicy::Accessory);
|
||||||
} else {
|
} else {
|
||||||
let app = app.handle();
|
let app = app.handle();
|
||||||
tokio::spawn(async move {
|
tauri::async_runtime::spawn(async move {
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
WindowBuilder::new(&app, "core", WindowUrl::App(url.into()))
|
WindowBuilder::new(&app, "core", WindowUrl::App(url.into()))
|
||||||
.title("ChatGPT")
|
.title("ChatGPT")
|
||||||
|
@ -6,7 +6,7 @@ pub fn tray_window(handle: &tauri::AppHandle) {
|
|||||||
let theme = conf::ChatConfJson::theme();
|
let theme = conf::ChatConfJson::theme();
|
||||||
let app = handle.clone();
|
let app = handle.clone();
|
||||||
|
|
||||||
tokio::spawn(async move {
|
tauri::async_runtime::spawn(async move {
|
||||||
WindowBuilder::new(&app, "tray", WindowUrl::App(chat_conf.origin.into()))
|
WindowBuilder::new(&app, "tray", WindowUrl::App(chat_conf.origin.into()))
|
||||||
.title("ChatGPT")
|
.title("ChatGPT")
|
||||||
.resizable(false)
|
.resizable(false)
|
||||||
@ -28,7 +28,7 @@ pub fn tray_window(handle: &tauri::AppHandle) {
|
|||||||
|
|
||||||
pub fn control_window(handle: &tauri::AppHandle) {
|
pub fn control_window(handle: &tauri::AppHandle) {
|
||||||
let app = handle.clone();
|
let app = handle.clone();
|
||||||
tokio::spawn(async move {
|
tauri::async_runtime::spawn(async move {
|
||||||
WindowBuilder::new(&app, "main", WindowUrl::App("index.html".into()))
|
WindowBuilder::new(&app, "main", WindowUrl::App("index.html".into()))
|
||||||
.title("Control Center")
|
.title("Control Center")
|
||||||
.resizable(true)
|
.resizable(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user