提交 7c1c326e 编写于 作者: I isidor

show 'folders' when there are mutliple roots

上级 ec463ce2
......@@ -120,9 +120,11 @@ export class ExplorerView extends CollapsibleView {
public renderHeader(container: HTMLElement): void {
const titleDiv = $('div.title').appendTo(container);
const titleSpan = $('span').appendTo(titleDiv);
const setHeader = () => {
const title = this.contextService.getWorkspace2().roots.map(root => labels.getPathLabel(root.fsPath, void 0, this.environmentService)).join();
$('span').text(this.name).title(title).appendTo(titleDiv);
const roots = this.contextService.getWorkspace2().roots;
const title = roots.map(root => labels.getPathLabel(root.fsPath, void 0, this.environmentService)).join();
titleSpan.text(roots.length === 1 ? this.name : nls.localize('folders', "Folders")).title(title);
};
this.toDispose.push(this.contextService.onDidChangeWorkspaceRoots(() => setHeader()));
setHeader();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册