File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11import { Menu , MenuItem , PredefinedMenuItem , Submenu } from "@tauri-apps/api/menu"
22import { type as ostype } from "@tauri-apps/plugin-os"
3+ import { invoke } from "@tauri-apps/api/core"
4+ import { relaunch } from "@tauri-apps/plugin-process"
35
46import { runUpdater , UPDATER_ENABLED } from "./updater"
57import { installCli } from "./cli"
@@ -24,6 +26,17 @@ export async function createMenu() {
2426 action : ( ) => installCli ( ) ,
2527 text : "Install CLI..." ,
2628 } ) ,
29+ await MenuItem . new ( {
30+ action : async ( ) => window . location . reload ( ) ,
31+ text : "Reload Webview" ,
32+ } ) ,
33+ await MenuItem . new ( {
34+ action : async ( ) => {
35+ await invoke ( "kill_sidecar" ) . catch ( ( ) => undefined )
36+ await relaunch ( ) . catch ( ( ) => undefined )
37+ } ,
38+ text : "Restart" ,
39+ } ) ,
2740 await PredefinedMenuItem . new ( {
2841 item : "Separator" ,
2942 } ) ,
You can’t perform that action at this time.
0 commit comments