提交 9b1f263a 编写于 作者: R Rob Lourens

Fix #67587

上级 9a766eaa
......@@ -99,7 +99,7 @@
position: relative;
}
.settings-editor > .settings-body > .no-results {
.settings-editor > .settings-body > .no-results-message {
display: none;
max-width: 1000px;
margin: auto;
......@@ -109,7 +109,16 @@
box-sizing: border-box;
}
.settings-editor > .settings-body > .no-results a.prominent {
.settings-editor.no-results > .settings-body .settings-toc-container,
.settings-editor.no-results > .settings-body .settings-tree-container {
display: none;
}
.settings-editor.no-results > .settings-body > .no-results-message {
display: block;
}
.settings-editor > .settings-body > .no-results-message a.prominent {
text-decoration: underline;
}
......
......@@ -455,7 +455,7 @@ export class SettingsEditor2 extends BaseEditor {
private createBody(parent: HTMLElement): void {
const bodyContainer = DOM.append(parent, $('.settings-body'));
this.noResultsMessage = DOM.append(bodyContainer, $('.no-results'));
this.noResultsMessage = DOM.append(bodyContainer, $('.no-results-message'));
this.noResultsMessage.innerText = localize('noResults', "No Settings Found");
......@@ -950,6 +950,8 @@ export class SettingsEditor2 extends BaseEditor {
}
}
this.renderResultCountMessages();
if (key) {
const elements = this.currentSettingsModel.getElementsByName(key);
if (elements && elements.length) {
......@@ -1034,13 +1036,13 @@ export class SettingsEditor2 extends BaseEditor {
// Added a filter model
this.tocTree.setSelection([]);
this.tocTree.expandAll();
this.refreshTree();
this.renderResultCountMessages();
this.refreshTree();
} else {
// Leaving search mode
this.tocTree.collapseAll();
this.refreshTree();
this.renderResultCountMessages();
this.refreshTree();
}
this.refreshTOCTree();
......@@ -1147,9 +1149,7 @@ export class SettingsEditor2 extends BaseEditor {
return Promise.all([
this.filterOrSearchPreferences(query, SearchResultIdx.Remote, remoteSearchProvider, token),
this.filterOrSearchPreferences(query, SearchResultIdx.NewExtensions, newExtSearchProvider, token)
]).then(() => {
this.renderResultCountMessages();
});
]).then(() => { });
}
private filterOrSearchPreferences(query: string, type: SearchResultIdx, searchProvider: ISearchProvider, token?: CancellationToken): Promise<ISearchResult> {
......@@ -1164,7 +1164,6 @@ export class SettingsEditor2 extends BaseEditor {
this.searchResultModel.setResult(type, result);
this.tocTreeModel.currentSearchModel = this.searchResultModel;
this.onSearchModeToggled();
this.refreshTree();
} else {
this.searchResultModel.setResult(type, result);
this.tocTreeModel.update();
......@@ -1174,7 +1173,7 @@ export class SettingsEditor2 extends BaseEditor {
this.viewState.filterToCategory = null;
this.tocTree.expandAll();
return this.renderTree().then(() => result);
return this.renderTree(undefined, true).then(() => result);
});
}
......@@ -1192,7 +1191,7 @@ export class SettingsEditor2 extends BaseEditor {
}
this.countElement.style.display = 'block';
this.noResultsMessage.style.display = count === 0 ? 'block' : 'none';
DOM.toggleClass(this.rootElement, 'no-results', count === 0);
this.clearFilterLinkContainer.style.display = this.viewState.tagFilters && this.viewState.tagFilters.size > 0
? 'initial'
: 'none';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册