提交 754bbef0 编写于 作者: B Benjamin Pasero

more cleanup

上级 f56a4a92
...@@ -86,13 +86,6 @@ const apiMenus: IAPIMenu[] = [ ...@@ -86,13 +86,6 @@ const apiMenus: IAPIMenu[] = [
proposed: true, proposed: true,
supportsSubmenus: false supportsSubmenus: false
}, },
{
key: 'menuBar/webNavigation',
id: MenuId.MenubarWebNavigationMenu,
description: localize('menus.webNavigation', "The top level navigational menu (web only)"),
proposed: true,
supportsSubmenus: false
},
{ {
key: 'scm/title', key: 'scm/title',
id: MenuId.SCMTitle, id: MenuId.SCMTitle,
......
...@@ -191,21 +191,24 @@ export class HomeActivityActionViewItem extends MenuActivityActionViewItem { ...@@ -191,21 +191,24 @@ export class HomeActivityActionViewItem extends MenuActivityActionViewItem {
super(MenuId.MenubarWebHomeMenu, action, colors, themeService, menuService, contextMenuService, contextKeyService, configurationService, environmentService); super(MenuId.MenubarWebHomeMenu, action, colors, themeService, menuService, contextMenuService, contextKeyService, configurationService, environmentService);
} }
protected async resolveActions(accountsMenu: IMenu, disposables: DisposableStore): Promise<IAction[]> { protected async resolveActions(homeMenu: IMenu, disposables: DisposableStore): Promise<IAction[]> {
const actions = await super.resolveActions(accountsMenu, disposables); const actions = [];
if (actions.length) {
actions.push(disposables.add(new Separator()));
}
// Go Home
actions.push(disposables.add(new Action('goHome', nls.localize('goHome', "Go Home"), undefined, true, async () => window.location.href = this.goHomeHref))); actions.push(disposables.add(new Action('goHome', nls.localize('goHome', "Go Home"), undefined, true, async () => window.location.href = this.goHomeHref)));
actions.push(disposables.add(new Separator()));
actions.push( // Contributed
disposables.add(new Separator()), const contributedActions = await super.resolveActions(homeMenu, disposables);
disposables.add(new Action('hide', nls.localize('hide', "Hide"), undefined, true, async () => { actions.push(...contributedActions);
this.storageService.store(HomeActivityActionViewItem.HOME_BAR_VISIBILITY_PREFERENCE, false, StorageScope.GLOBAL, StorageTarget.USER);
})) // Hide
); if (contributedActions.length > 0) {
actions.push(disposables.add(new Separator()));
}
actions.push(disposables.add(new Action('hide', nls.localize('hide', "Hide"), undefined, true, async () => {
this.storageService.store(HomeActivityActionViewItem.HOME_BAR_VISIBILITY_PREFERENCE, false, StorageScope.GLOBAL, StorageTarget.USER);
})));
return actions; return actions;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册