mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-14 12:11:43 +01:00
web - allow to override product config as API
This commit is contained in:
@@ -160,7 +160,7 @@ class BrowserMain extends Disposable {
|
||||
serviceCollection.set(IWorkbenchEnvironmentService, environmentService);
|
||||
|
||||
// Product
|
||||
const productService: IProductService = { _serviceBrand: undefined, ...product };
|
||||
const productService: IProductService = { _serviceBrand: undefined, ...product, ...this.configuration.productConfiguration };
|
||||
serviceCollection.set(IProductService, productService);
|
||||
|
||||
// Remote
|
||||
|
||||
@@ -17,6 +17,7 @@ import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IWorkspaceProvider, IWorkspace } from 'vs/workbench/services/host/browser/browserHostService';
|
||||
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||
import { IProductConfiguration } from 'vs/platform/product/common/productService';
|
||||
|
||||
interface IResourceUriProvider {
|
||||
(uri: URI): URI;
|
||||
@@ -282,15 +283,25 @@ interface IWorkbenchConstructionOptions {
|
||||
*/
|
||||
readonly commands?: readonly ICommand[];
|
||||
|
||||
/**
|
||||
* Optional default layout to apply on first time the workspace is opened.
|
||||
*/
|
||||
readonly defaultLayout?: IDefaultLayout;
|
||||
|
||||
//#endregion
|
||||
|
||||
|
||||
//#region Branding
|
||||
|
||||
/**
|
||||
* Optional home indicator to appear above the hamburger menu in the activity bar.
|
||||
*/
|
||||
readonly homeIndicator?: IHomeIndicator;
|
||||
|
||||
/**
|
||||
* Optional default layout to apply on first time the workspace is opened.
|
||||
* Optional override for the product configuration properties.
|
||||
*/
|
||||
readonly defaultLayout?: IDefaultLayout;
|
||||
readonly productConfiguration?: Partial<IProductConfiguration>;
|
||||
|
||||
//#endregion
|
||||
|
||||
@@ -438,8 +449,9 @@ export {
|
||||
ICommand,
|
||||
commands,
|
||||
|
||||
// Home Indicator
|
||||
// Branding
|
||||
IHomeIndicator,
|
||||
IProductConfiguration,
|
||||
|
||||
// Default layout
|
||||
IDefaultView,
|
||||
|
||||
Reference in New Issue
Block a user