chore: dalle2

This commit is contained in:
lencx
2023-01-06 22:58:26 +08:00
parent 8022594ace
commit de5533d942
7 changed files with 20 additions and 22 deletions

View File

@@ -61,7 +61,7 @@ pub fn reset_chat_conf() -> ChatConfJson {
#[command]
pub fn run_check_update(app: AppHandle, silent: bool, has_msg: Option<bool>) {
utils::run_check_update(app, silent, has_msg).unwrap();
utils::run_check_update(app, silent, has_msg);
}
#[command]

View File

@@ -229,7 +229,7 @@ pub fn menu_handler(event: WindowMenuEvent<tauri::Wry>) {
);
}
"check_update" => {
utils::run_check_update(app, false, None).unwrap();
utils::run_check_update(app, false, None);
}
// Preferences
"control_center" => window::control_window(&app),

View File

@@ -100,7 +100,7 @@ pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>
if chat_conf.auto_update != "Disable" {
info!("stepup::run_check_update");
let app = app.handle();
utils::run_check_update(app, chat_conf.auto_update == "Silent", None).unwrap();
utils::run_check_update(app, chat_conf.auto_update == "Silent", None);
}
Ok(())

View File

@@ -50,7 +50,7 @@ pub fn dalle2_window(handle: &tauri::AppHandle, query: Option<String>, title: Op
WindowBuilder::new(
&app,
format!("dalle2_{}", timestamp),
WindowUrl::App("https://labs.openai.com/".into()),
WindowUrl::App("https://labs.openai.com".into()),
)
.title(title.unwrap_or_else(|| "DALL·E 2".to_string()))
.resizable(true)