Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)

This commit is contained in:
Cory Rivera
2021-08-25 16:28:29 -07:00
committed by GitHub
parent ab1112bfb3
commit cb7b7da0a4
1752 changed files with 59525 additions and 33878 deletions

View File

@@ -6,7 +6,6 @@
import 'vs/css!./welcomePage';
import 'sql/workbench/contrib/welcome/page/browser/az_data_welcome_page';
import { URI } from 'vs/base/common/uri';
import * as strings from 'vs/base/common/strings';
import { ICommandService } from 'vs/platform/commands/common/commands';
import * as arrays from 'vs/base/common/arrays';
import { WalkThroughInput } from 'vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput';
@@ -31,7 +30,8 @@ import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/com
import { tileBorder, gradientOne, gradientTwo, gradientBackground, extensionPackHeaderShadow, extensionPackGradientColorOneColor, extensionPackGradientColorTwoColor, tileBoxShadow, hoverShadow } from 'sql/platform/theme/common/colorRegistry';
import { registerColor, foreground, textLinkActiveForeground, descriptionForeground, activeContrastBorder, buttonForeground, menuBorder, menuForeground, editorWidgetBorder, selectBackground, buttonHoverBackground, selectBorder, iconForeground, textLinkForeground, inputBackground, focusBorder, listFocusBackground, listFocusForeground, buttonSecondaryBackground, buttonSecondaryBorder, buttonDisabledForeground, buttonDisabledBackground, buttonSecondaryForeground, buttonSecondaryHoverBackground } from 'vs/platform/theme/common/colorRegistry';
import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
import { EditorInput, IEditorInputSerializer } from 'vs/workbench/common/editor';
import { IEditorInputSerializer } from 'vs/workbench/common/editor';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
import { TimeoutTimer } from 'vs/base/common/async';
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
@@ -88,7 +88,7 @@ export class WelcomePageContribution implements IWorkbenchContribution {
try {
const folder = await this.fileService.resolve(folderUri);
const files = folder.children ? folder.children.map(child => child.name) : [];
const file = files.sort().find(file => strings.startsWith(file.toLowerCase(), 'readme'));
const file = files.sort().find(file => file.toLowerCase().startsWith('readme'));
if (file) {
return joinPath(folderUri, file);
}
@@ -100,7 +100,7 @@ export class WelcomePageContribution implements IWorkbenchContribution {
arrays.coalesceInPlace(readmes);
if (!this.editorService.activeEditor) {
if (readmes.length) {
const isMarkDown = (readme: URI) => strings.endsWith(readme.path.toLowerCase(), '.md');
const isMarkDown = (readme: URI) => readme.path.toLowerCase().endsWith('.md');
await Promise.all([
this.commandService.executeCommand('markdown.showPreview', null, readmes.filter(isMarkDown), { locked: true }),
this.editorService.openEditors(readmes.filter(readme => !isMarkDown(readme)).map(readme => ({ resource: readme }))),
@@ -666,7 +666,7 @@ class WelcomePage extends Disposable {
extensionId: extensionSuggestion.id,
});
this.instantiationService.invokeFunction(getInstalledExtensions).then(extensions => {
const installedExtension = arrays.first(extensions, extension => areSameExtensions(extension.identifier, { id: extensionSuggestion.id }));
const installedExtension = extensions.find(extension => areSameExtensions(extension.identifier, { id: extensionSuggestion.id }));
if (installedExtension && installedExtension.globallyEnabled) {
/* __GDPR__FRAGMENT__
"WelcomePageInstalled-1" : {