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

more cleanup

上级 f56a4a92
......@@ -86,13 +86,6 @@ const apiMenus: IAPIMenu[] = [
proposed: true,
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',
id: MenuId.SCMTitle,
......
......@@ -191,21 +191,24 @@ export class HomeActivityActionViewItem extends MenuActivityActionViewItem {
super(MenuId.MenubarWebHomeMenu, action, colors, themeService, menuService, contextMenuService, contextKeyService, configurationService, environmentService);
}
protected async resolveActions(accountsMenu: IMenu, disposables: DisposableStore): Promise<IAction[]> {
const actions = await super.resolveActions(accountsMenu, disposables);
if (actions.length) {
actions.push(disposables.add(new Separator()));
}
protected async resolveActions(homeMenu: IMenu, disposables: DisposableStore): Promise<IAction[]> {
const actions = [];
// 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 Separator()));
actions.push(
disposables.add(new Separator()),
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);
}))
);
// Contributed
const contributedActions = await super.resolveActions(homeMenu, disposables);
actions.push(...contributedActions);
// 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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册