From da8a84866e4469ced470849c7f28cc05137be967 Mon Sep 17 00:00:00 2001 From: sawka Date: Fri, 27 Dec 2024 15:55:42 -0800 Subject: [PATCH] allow right-click to control hide/unhide nav --- frontend/app/view/webview/webview.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/app/view/webview/webview.tsx b/frontend/app/view/webview/webview.tsx index e0326bd4c..67f3fa72e 100644 --- a/frontend/app/view/webview/webview.tsx +++ b/frontend/app/view/webview/webview.tsx @@ -495,6 +495,7 @@ export class WebViewModel implements ViewModel { zoomSubMenu.push(makeZoomFactorMenuItem("175%", 1.75)); zoomSubMenu.push(makeZoomFactorMenuItem("200%", 2)); + const isNavHidden = globalStore.get(this.hideNav); return [ { label: "Set Block Homepage", @@ -507,6 +508,16 @@ export class WebViewModel implements ViewModel { { type: "separator", }, + { + label: isNavHidden ? "Un-Hide Navigation" : "Hide Navigation", + click: () => + fireAndForget(() => { + return RpcApi.SetMetaCommand(TabRpcClient, { + oref: WOS.makeORef("block", this.blockId), + meta: { "web:hidenav": !isNavHidden }, + }); + }), + }, { label: "Set Zoom Factor", submenu: zoomSubMenu,