提交 8f2e85ab 编写于 作者: J Jackson Kearl

Fix #116574: Make it easier to jump from one Getting Started section to the next

上级 8806d063
......@@ -178,7 +178,9 @@
display: none;
}
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .task-description-container {
width: 100%;
}
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .task-description {
padding-top: 8px;
......
......@@ -435,6 +435,13 @@ export class GettingStartedPage extends EditorPane {
private buildCategorySlide(categoryID: string, selectedItem?: string) {
const category = this.gettingStartedCategories.find(category => category.id === categoryID);
let foundNext = false;
const nextCategory = this.gettingStartedCategories.find(category => {
if (foundNext && category.content.type === 'items') { return true; }
if (category.id === categoryID) { foundNext = true; }
return false;
});
if (!category) { throw Error('could not find category with ID ' + categoryID); }
if (category.content.type !== 'items') { throw Error('category with ID ' + categoryID + ' is not of items type'); }
......@@ -473,10 +480,10 @@ export class GettingStartedPage extends EditorPane {
: []),
...(
arr[i + 1]
? [
$('button.task-next',
{ 'x-dispatch': 'selectTask:' + arr[i + 1].id }, localize('next', "Next")),
] : []
? [$('button.task-next', { 'x-dispatch': 'selectTask:' + arr[i + 1].id }, localize('next', "Next")),]
: nextCategory
? [$('button.task-next', { 'x-dispatch': 'selectCategory:' + nextCategory.id }, localize('nextPage', "Next Page")),]
: []
))
)));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册