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