diff --git a/src/services/workspaces/getWorkspaceMenuTemplate.ts b/src/services/workspaces/getWorkspaceMenuTemplate.ts index f85027fe..90ab7377 100644 --- a/src/services/workspaces/getWorkspaceMenuTemplate.ts +++ b/src/services/workspaces/getWorkspaceMenuTemplate.ts @@ -18,7 +18,7 @@ interface IWorkspaceMenuRequiredServices { context: Pick; git: Pick; native: Pick; - view: Pick; + view: Pick; wiki: Pick; wikiGitWorkspace: Pick; window: Pick; @@ -88,17 +88,6 @@ export async function getWorkspaceMenuTemplate( label: t('WorkspaceSelector.OpenWorkspaceFolderInGitGUI'), click: async () => await service.native.openInGitGuiApp(wikiFolderLocation), }, - { - label: t('ContextMenu.Reload'), - click: async () => await service.view.reloadViewsWebContents(id), - }, - { - label: t('ContextMenu.RestartService'), - click: async () => { - await service.workspaceView.restartWorkspaceViewService(id); - await service.workspaceView.realignActiveWorkspace(id); - }, - }, ]; if (gitUrl !== null && gitUrl.length > 0 && storageService !== SupportedStorageServices.local) { @@ -125,6 +114,22 @@ export async function getWorkspaceMenuTemplate( }); } + if (!isSubWiki) { + template.push( + { + label: t('ContextMenu.RestartService'), + click: async () => { + await service.workspaceView.restartWorkspaceViewService(id); + await service.workspaceView.realignActiveWorkspace(id); + }, + }, + { + label: t('ContextMenu.Reload'), + click: async () => await service.view.reloadViewsWebContents(id), + }, + ); + } + if (!active && !isSubWiki) { template.splice(1, 0, { label: hibernated ? t('WorkspaceSelector.WakeUpWorkspace') : t('WorkspaceSelector.HibernateWorkspace'),