提交 9bd1b18a 编写于 作者: S Sandeep Somavarapu

Fix Microsoft/vscode-remote/issues/1447

上级 87fd1d45
......@@ -2599,7 +2599,9 @@ export class DisabledLabelAction extends ExtensionAction {
export class SystemDisabledWarningAction extends ExtensionAction {
private static readonly Class = 'disable-warning';
private static readonly CLASS = 'system-disable';
private static readonly WARNING_CLASS = `${SystemDisabledWarningAction.CLASS} warning`;
private static readonly INFO_CLASS = `${SystemDisabledWarningAction.CLASS} info`;
updateWhenCounterExtensionChanges: boolean = true;
private disposables: IDisposable[] = [];
......@@ -2613,7 +2615,7 @@ export class SystemDisabledWarningAction extends ExtensionAction {
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
@IExtensionService private readonly extensionService: IExtensionService,
) {
super('extensions.install', '', `${SystemDisabledWarningAction.Class} hide`, false);
super('extensions.install', '', `${SystemDisabledWarningAction.CLASS} hide`, false);
this.labelService.onDidChangeFormatters(() => this.update(), this, this.disposables);
this.extensionService.onDidChangeExtensions(this.updateRunningExtensions, this, this.disposables);
this.updateRunningExtensions();
......@@ -2625,7 +2627,7 @@ export class SystemDisabledWarningAction extends ExtensionAction {
}
update(): void {
this.class = `${SystemDisabledWarningAction.Class} hide`;
this.class = `${SystemDisabledWarningAction.CLASS} hide`;
this.tooltip = '';
if (
!this.extension ||
......@@ -2645,24 +2647,24 @@ export class SystemDisabledWarningAction extends ExtensionAction {
const localExtensionServer = localExtension ? localExtension.server : null;
if (this.extension.server === this.extensionManagementServerService.localExtensionManagementServer && !isUIExtension(this.extension.local.manifest, this.configurationService)) {
if (runningExtensionServer === this.extensionManagementServerService.remoteExtensionManagementServer) {
this.class = `${SystemDisabledWarningAction.Class}`;
this.class = `${SystemDisabledWarningAction.INFO_CLASS}`;
this.tooltip = localize('disabled locally', "Extension is enabled on '{0}' and disabled locally.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer));
return;
}
if (localExtensionServer !== this.extensionManagementServerService.remoteExtensionManagementServer) {
this.class = `${SystemDisabledWarningAction.Class}`;
this.class = `${SystemDisabledWarningAction.WARNING_CLASS}`;
this.tooltip = localize('Install in remote server', "Install the extension on '{0}' to enable.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer));
return;
}
}
if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer && isUIExtension(this.extension.local.manifest, this.configurationService)) {
if (runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer) {
this.class = `${SystemDisabledWarningAction.Class}`;
this.class = `${SystemDisabledWarningAction.INFO_CLASS}`;
this.tooltip = localize('disabled remotely', "Extension is enabled locally and disabled on '{0}'.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer));
return;
}
if (localExtensionServer !== this.extensionManagementServerService.localExtensionManagementServer) {
this.class = `${SystemDisabledWarningAction.Class}`;
this.class = `${SystemDisabledWarningAction.WARNING_CLASS}`;
this.tooltip = localize('Install in local server', "Install the extension locally to enable.");
return;
}
......
......@@ -38,7 +38,7 @@
.monaco-action-bar .action-item.disabled .action-label.extension-action.extension-editor-dropdown-action,
.monaco-action-bar .action-item.disabled .action-label.extension-action.reload,
.monaco-action-bar .action-item.disabled .action-label.disable-status.hide,
.monaco-action-bar .action-item.disabled .action-label.disable-warning.hide,
.monaco-action-bar .action-item.disabled .action-label.system-disable.hide,
.monaco-action-bar .action-item.disabled .action-label.extension-status-label.hide,
.monaco-action-bar .action-item.disabled .action-label.malicious-status.not-malicious {
display: none;
......@@ -70,23 +70,33 @@
padding-left: 0;
}
.extension-editor > .header > .details > .actions > .monaco-action-bar > .actions-container > .action-item > .action-label.disable-warning,
.extensions-viewlet>.extensions .extension>.details>.footer>.monaco-action-bar .action-item .action-label.disable-warning {
margin: 0.1em;
.extension-editor > .header > .details > .actions > .monaco-action-bar > .actions-container > .action-item > .action-label.system-disable,
.extensions-viewlet>.extensions .extension>.details>.footer>.monaco-action-bar .action-item .action-label.system-disable {
margin: 0.15em;
}
.monaco-action-bar .action-item .action-label.disable-warning.icon {
.monaco-action-bar .action-item .action-label.system-disable.icon {
opacity: 1;
height: 18px;
width: 10px;
}
.vs-dark .monaco-action-bar .action-item .action-label.system-disable.warning.icon {
background: url('status-warning.svg') center center no-repeat;
margin-top: 0.15em
}
.vs-dark .monaco-action-bar .action-item .action-label.disable-warning.icon {
.vs-dark .monaco-action-bar .action-item .action-label.system-disable.warning.icon {
background: url('status-warning-inverse.svg') center center no-repeat;
}
.vs-dark .monaco-action-bar .action-item .action-label.system-disable.info.icon {
background: url('status-info.svg') center center no-repeat;
}
.vs-dark .monaco-action-bar .action-item .action-label.system-disable.info.icon {
background: url('status-info-inverse.svg') center center no-repeat;
}
.extension-editor>.header>.details>.actions>.monaco-action-bar .action-item .action-label.extension-status-label,
.extension-editor>.header>.details>.actions>.monaco-action-bar .action-item .action-label.disable-status,
.extension-editor>.header>.details>.actions>.monaco-action-bar .action-item .action-label.malicious-status {
......
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16" height="16" width="16"><circle cx="8.5" cy="7.5" r="5.5" fill="#1E1E1E"/><path d="M8.5 3C6.015 3 4 5.015 4 7.5S6.015 12 8.5 12 13 9.985 13 7.5 10.985 3 8.5 3zm.5 8H8V6h1v5zm0-6H8V4h1v1z" fill="#1BA1E2"/><path d="M8 6h1v5H8V6zm0-2v1h1V4H8z" fill="#252526"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16" height="16" width="16"><circle cx="8.5" cy="7.5" r="5.5" fill="#F6F6F6"/><path d="M8.5 3C6.015 3 4 5.015 4 7.5S6.015 12 8.5 12 13 9.985 13 7.5 10.985 3 8.5 3zm.5 8H8V6h1v5zm0-6H8V4h1v1z" fill="#1BA1E2"/><path d="M8 6h1v5H8V6zm0-2v1h1V4H8z" fill="#fff"/></svg>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册