Skip to content

Commit

Permalink
chore: dalle2 (lencx#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
Irene-123 committed Jan 5, 2023
1 parent a361ce5 commit 72cd576
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src-tauri/src/app/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,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",
Expand Down Expand Up @@ -189,7 +190,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" => {
Expand All @@ -205,6 +206,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()),
Expand Down

0 comments on commit 72cd576

Please sign in to comment.