提交 0937991c 编写于 作者: J João Moreno

fixes #93910

上级 9ed339fc
......@@ -53,8 +53,9 @@
width: 100%;
height: 100%;
padding: 0 20px 0 20px;
position: absolute;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.monaco-workbench .pane > .pane-body:not(.welcome) > .welcome-view,
......
......@@ -437,14 +437,11 @@ export abstract class ViewPane extends Pane implements IView {
continue;
}
const p = append(this.viewWelcomeContainer, $('p'));
const linkedText = parseLinkedText(line);
for (const node of linkedText.nodes) {
if (typeof node === 'string') {
append(p, document.createTextNode(node));
} else if (linkedText.nodes.length === 1) {
const button = new Button(p, { title: node.title });
if (linkedText.nodes.length === 1 && typeof linkedText.nodes[0] !== 'string') {
const node = linkedText.nodes[0];
const button = new Button(this.viewWelcomeContainer, { title: node.title });
button.label = node.label;
button.onDidClick(_ => {
this.telemetryService.publicLog2<{ viewId: string, uri: string }, WelcomeActionClassification>('views.welcomeAction', { viewId: this.id, uri: node.href });
......@@ -468,6 +465,12 @@ export abstract class ViewPane extends Pane implements IView {
}
buttonIndex++;
} else {
const p = append(this.viewWelcomeContainer, $('p'));
for (const node of linkedText.nodes) {
if (typeof node === 'string') {
append(p, document.createTextNode(node));
} else {
const link = this.instantiationService.createInstance(Link, node);
append(p, link.el);
......@@ -477,6 +480,7 @@ export abstract class ViewPane extends Pane implements IView {
}
}
}
}
this.viewWelcomeDisposable = disposables;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册