web - remoteIndicator => windowIndicator

This commit is contained in:
Benjamin Pasero 2020-08-21 08:43:11 +02:00
parent d50e84208f
commit 38f8b223ff
4 changed files with 18 additions and 18 deletions

View file

@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IWorkbenchConstructionOptions, create, ICredentialsProvider, IURLCallbackProvider, IWorkspaceProvider, IWorkspace, IRemoteIndicator, ICommand, IHomeIndicator, IProductQualityChangeHandler } from 'vs/workbench/workbench.web.api';
import { IWorkbenchConstructionOptions, create, ICredentialsProvider, IURLCallbackProvider, IWorkspaceProvider, IWorkspace, IWindowIndicator, ICommand, IHomeIndicator, IProductQualityChangeHandler } from 'vs/workbench/workbench.web.api';
import product from 'vs/platform/product/common/product';
import { URI, UriComponents } from 'vs/base/common/uri';
import { Event, Emitter } from 'vs/base/common/event';
@ -279,7 +279,7 @@ class WorkspaceProvider implements IWorkspaceProvider {
}
}
class RemoteIndicator implements IRemoteIndicator {
class WindowIndicator implements IWindowIndicator {
readonly onDidChange = Event.None;
@ -401,10 +401,10 @@ class RemoteIndicator implements IRemoteIndicator {
// Commands
const commands: ICommand[] = [];
// Remote indicator
const remoteIndicator = new RemoteIndicator(workspace);
if (remoteIndicator.commandImpl) {
commands.push(remoteIndicator.commandImpl);
// Window indicator
const windowIndicator = new WindowIndicator(workspace);
if (windowIndicator.commandImpl) {
commands.push(windowIndicator.commandImpl);
}
// Product Quality Change Handler
@ -427,7 +427,7 @@ class RemoteIndicator implements IRemoteIndicator {
...config,
homeIndicator,
commands,
remoteIndicator,
windowIndicator,
productQualityChangeHandler,
workspaceProvider: new WorkspaceProvider(workspace, payload),
urlCallbackProvider: new PollingURLCallbackProvider(),

View file

@ -309,7 +309,7 @@ import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuratio
const base = '${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}';
if (isWeb) {
return base + '${separator}${remoteName}'; // Web: always show remote indicator
return base + '${separator}${remoteName}'; // Web: always show remote name
}
return base;

View file

@ -119,7 +119,7 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr
this._register(this.labelService.onDidChangeFormatters(() => this.updateRemoteStatusIndicator()));
// Update based on remote indicator changes if any
const remoteIndicator = this.environmentService.options?.remoteIndicator;
const remoteIndicator = this.environmentService.options?.windowIndicator;
if (remoteIndicator) {
this._register(remoteIndicator.onDidChange(() => this.updateRemoteStatusIndicator()));
}
@ -188,7 +188,7 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr
private updateRemoteStatusIndicator(): void {
// Remote indicator: show if provided via options
const remoteIndicator = this.environmentService.options?.remoteIndicator;
const remoteIndicator = this.environmentService.options?.windowIndicator;
if (remoteIndicator) {
this.renderRemoteStatusIndicator(remoteIndicator.label, remoteIndicator.tooltip, remoteIndicator.command);
}

View file

@ -121,28 +121,28 @@ interface IHomeIndicator {
title: string;
}
interface IRemoteIndicator {
interface IWindowIndicator {
/**
* Triggering this event will cause the remote indicator to update.
* Triggering this event will cause the window indicator to update.
*/
onDidChange: Event<void>;
/**
* Label of the remote indicator may include octicons
* Label of the window indicator may include octicons
* e.g. `$(remote) label`
*/
label: string;
/**
* Tooltip of the remote indicator should not include
* Tooltip of the window indicator should not include
* octicons and be descriptive.
*/
tooltip: string;
/**
* If provided, overrides the default command that
* is executed when clicking on the remote indicator.
* is executed when clicking on the window indicator.
*/
command?: string;
}
@ -377,9 +377,9 @@ interface IWorkbenchConstructionOptions {
readonly productConfiguration?: Partial<IProductConfiguration>;
/**
* Optional override for properties of the remote window indicator in the status bar.
* Optional override for properties of the window indicator in the status bar.
*/
readonly remoteIndicator?: IRemoteIndicator;
readonly windowIndicator?: IWindowIndicator;
//#endregion
@ -535,7 +535,7 @@ export {
// Branding
IHomeIndicator,
IProductConfiguration,
IRemoteIndicator,
IWindowIndicator,
// Default layout
IDefaultView,