1
0
mirror of https://github.com/lencx/ChatGPT.git synced 2024-10-01 01:06:13 -04:00

Merge pull request #155 from Irene-123/chore-dalle2

This commit is contained in:
lencx 2023-01-06 08:36:07 +08:00 committed by GitHub
commit cd2b7832d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,6 +70,7 @@ pub fn init() -> Menu {
CustomMenuItem::new("control_center".to_string(), "Control Center")
.accelerator("CmdOrCtrl+Shift+P")
.into(),
CustomMenuItem::new("dall_e2".to_string(), "Search DALLE-2").into(),
MenuItem::Separator.into(),
Submenu::new(
"Theme",
@ -215,7 +216,7 @@ pub fn menu_handler(event: WindowMenuEvent<tauri::Wry>) {
let core_window = app.get_window("core").unwrap();
let menu_handle = core_window.menu_handle();
let query = String::from("");
match menu_id {
// App
"about" => {
@ -231,6 +232,7 @@ pub fn menu_handler(event: WindowMenuEvent<tauri::Wry>) {
}
// Preferences
"control_center" => window::control_window(&app),
"dall_e2"=> window::dalle2_window(&app, query),
"restart" => tauri::api::process::restart(&app.env()),
"inject_script" => open(&app, script_path),
"go_conf" => utils::open_file(utils::chat_root()),