Skip to content

Commit

Permalink
Pull caption from product.json (microsoft#83844)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdias authored and chrmarti committed Nov 4, 2019
1 parent 2b30c13 commit e8a6f3f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import { joinPath } from 'vs/base/common/resources';
import { IRecentlyOpened, isRecentWorkspace, IRecentWorkspace, IRecentFolder, isRecentFolder, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces';
import { CancellationToken } from 'vs/base/common/cancellation';
import { IHostService } from 'vs/workbench/services/host/browser/host';
import { IProductService } from 'vs/platform/product/common/productService';

const configurationKey = 'workbench.startupEditor';
const oldConfigurationKey = 'workbench.welcome.enabled';
Expand Down Expand Up @@ -263,7 +264,9 @@ class WelcomePage extends Disposable {
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
@ILifecycleService lifecycleService: ILifecycleService,
@ITelemetryService private readonly telemetryService: ITelemetryService,
@IHostService private readonly hostService: IHostService
@IHostService private readonly hostService: IHostService,
@IProductService private readonly productService: IProductService,

) {
super();
this._register(lifecycleService.onShutdown(() => this.dispose()));
Expand Down Expand Up @@ -298,6 +301,11 @@ class WelcomePage extends Disposable {
this.configurationService.updateValue(configurationKey, showOnStartup.checked ? 'welcomePage' : 'newUntitledFile', ConfigurationTarget.USER);
});

const prodName = container.querySelector('.welcomePage .title .caption') as HTMLElement;
if (prodName) {
prodName.innerHTML = this.productService.nameLong;
}

recentlyOpened.then(({ workspaces }) => {
// Filter out the current workspace
workspaces = workspaces.filter(recent => !this.contextService.isCurrentWorkspace(isRecentWorkspace(recent) ? recent.workspace : recent.folderUri));
Expand Down

0 comments on commit e8a6f3f

Please sign in to comment.