Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@
label: 'RDP resolution',
value: this.setting.graphics.rdp_resolution || 'auto'
},
{
type: 'select',
field: 'remote_microphone',
label: 'Remote microphone',
hidden: () => {
return !hasX || !this.protocol || this.protocol.name !== 'rdp';

Check warning on line 115 in src/app/elements/connect/connect-dialog/advanced-option/advanced-option.component.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer using an optional chain expression instead, as it's more concise and easier to read.

See more on https://sonarcloud.io/project/issues?id=jumpserver_luna&issues=AZ_nbFLSHB_X69K25--K&open=AZ_nbFLSHB_X69K25--K&pullRequest=1570
},
value: (this.setting.graphics.rdp_client_option || []).includes('remote_microphone'),
options: this.boolChoices
},
{
type: 'select',
field: 'backspaceAsCtrlH',
Expand Down
8 changes: 7 additions & 1 deletion src/app/elements/connect/connect.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ export class ElementConnectComponent implements OnInit, OnDestroy {
this._logger.debug('Connect info: ', connectInfo);

const connectMethod = connectInfo.connectMethod;
const connectOption = connectInfo.connectOption;
const connectOption = connectInfo.connectOption || {};
connectInfo.connectOption = connectOption;
if (connectInfo.protocol.name === 'rdp' && connectOption['remote_microphone'] === undefined) {
connectOption['remote_microphone'] = (
this._settingSvc.setting.graphics.rdp_client_option || []
).includes('remote_microphone');
}
const connToken = await this._connectTokenSvc.create(asset, connectInfo);

if (!connToken) {
Expand Down
3 changes: 3 additions & 0 deletions src/app/elements/nav/setting/setting.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
<label [(ngModel)]="rdpClientConfig.drives_redirect" nz-checkbox>
{{ 'Driver redirect' | translate }}
</label>
<label [(ngModel)]="rdpClientConfig.remote_microphone" nz-checkbox>

Check warning on line 93 in src/app/elements/nav/setting/setting.component.html

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

A form label must be associated with a control and have accessible text.

See more on https://sonarcloud.io/project/issues?id=jumpserver_luna&issues=AZ_nbFHWHB_X69K25--J&open=AZ_nbFHWHB_X69K25--J&pullRequest=1570
{{ 'Remote microphone' | translate }}
</label>
</nz-form-control>
</nz-form-item>

Expand Down
3 changes: 2 additions & 1 deletion src/app/elements/nav/setting/setting.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export class ElementSettingComponent implements OnInit, OnDestroy {
rdpClientConfig = {
full_screen: false,
multi_screen: false,
drives_redirect: false
drives_redirect: false,
remote_microphone: false
};

currentTheme = '';
Expand Down
3 changes: 3 additions & 0 deletions src/app/services/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@
if (connectOption && connectOption.reusable) {
url.searchParams.append('reusable', '1');
}
if (connectOption && connectOption.remote_microphone !== undefined) {

Check warning on line 470 in src/app/services/http.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer using an optional chain expression instead, as it's more concise and easier to read.

See more on https://sonarcloud.io/project/issues?id=jumpserver_luna&issues=AZ_nbFNIHB_X69K25--L&open=AZ_nbFNIHB_X69K25--L&pullRequest=1570
url.searchParams.append('remote_microphone', connectOption.remote_microphone ? '1' : '0');
}
return window.open(url.href);
}

Expand Down