allow right-click to control hide/unhide nav

This commit is contained in:
sawka 2024-12-27 15:55:42 -08:00
parent 12bc0afdab
commit da8a84866e

View File

@ -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,