add restricted mode to created issues (#125537)
This commit is contained in:
parent
5f7166fd91
commit
89d750cd68
4 changed files with 11 additions and 0 deletions
|
@ -140,6 +140,7 @@ export class IssueReporter extends Disposable {
|
|||
this.applyStyles(configuration.data.styles);
|
||||
this.handleExtensionData(configuration.data.enabledExtensions);
|
||||
this.updateExperimentsInfo(configuration.data.experiments);
|
||||
this.updateRestrictedMode(configuration.data.restrictedMode);
|
||||
}
|
||||
|
||||
render(): void {
|
||||
|
@ -1159,6 +1160,10 @@ export class IssueReporter extends Disposable {
|
|||
}
|
||||
}
|
||||
|
||||
private updateRestrictedMode(restrictedMode: boolean) {
|
||||
this.issueReporterModel.update({ restrictedMode });
|
||||
}
|
||||
|
||||
private updateExperimentsInfo(experimentInfo: string | undefined) {
|
||||
this.issueReporterModel.update({ experimentInfo });
|
||||
const target = document.querySelector<HTMLElement>('.block-experiments .block-info');
|
||||
|
|
|
@ -32,6 +32,7 @@ export interface IssueReporterData {
|
|||
query?: string;
|
||||
filterResultCount?: number;
|
||||
experimentInfo?: string;
|
||||
restrictedMode?: boolean;
|
||||
}
|
||||
|
||||
export class IssueReporterModel {
|
||||
|
@ -67,6 +68,7 @@ ${this._data.issueDescription}
|
|||
${this.getExtensionVersion()}
|
||||
VS Code version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion}
|
||||
OS version: ${this._data.versionInfo && this._data.versionInfo.os}
|
||||
Restricted Mode: ${this._data.restrictedMode ? 'Yes' : 'No'}
|
||||
${this.getRemoteOSes()}
|
||||
${this.getInfos()}
|
||||
<!-- generated by issue reporter -->`;
|
||||
|
|
|
@ -58,6 +58,7 @@ export interface IssueReporterData extends WindowData {
|
|||
issueType?: IssueType;
|
||||
extensionId?: string;
|
||||
experiments?: string;
|
||||
restrictedMode: boolean;
|
||||
githubAccessToken: string;
|
||||
readonly issueTitle?: string;
|
||||
readonly issueBody?: string;
|
||||
|
|
|
@ -19,6 +19,7 @@ import { IProductService } from 'vs/platform/product/common/productService';
|
|||
import { ITASExperimentService } from 'vs/workbench/services/experiment/common/experimentService';
|
||||
import { IAuthenticationService } from 'vs/workbench/services/authentication/browser/authenticationService';
|
||||
import { registerMainProcessRemoteService } from 'vs/platform/ipc/electron-sandbox/services';
|
||||
import { IWorkspaceTrustManagementService } from 'vs/platform/workspace/common/workspaceTrust';
|
||||
|
||||
export class WorkbenchIssueService implements IWorkbenchIssueService {
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
@ -29,6 +30,7 @@ export class WorkbenchIssueService implements IWorkbenchIssueService {
|
|||
@IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService,
|
||||
@IWorkbenchExtensionEnablementService private readonly extensionEnablementService: IWorkbenchExtensionEnablementService,
|
||||
@INativeWorkbenchEnvironmentService private readonly environmentService: INativeWorkbenchEnvironmentService,
|
||||
@IWorkspaceTrustManagementService private readonly workspaceTrustManagementService: IWorkspaceTrustManagementService,
|
||||
@IProductService private readonly productService: IProductService,
|
||||
@ITASExperimentService private readonly experimentService: ITASExperimentService,
|
||||
@IAuthenticationService private readonly authenticationService: IAuthenticationService
|
||||
|
@ -86,6 +88,7 @@ export class WorkbenchIssueService implements IWorkbenchIssueService {
|
|||
zoomLevel: getZoomLevel(),
|
||||
enabledExtensions: extensionData,
|
||||
experiments: experiments?.join('\n'),
|
||||
restrictedMode: !this.workspaceTrustManagementService.isWorkpaceTrusted(),
|
||||
githubAccessToken,
|
||||
}, dataOverrides);
|
||||
return this.issueService.openReporter(issueReporterData);
|
||||
|
|
Loading…
Reference in a new issue