Skip to content

Commit

Permalink
perf: 连接 RDP 协议会话时,高级选项支持 session bpp:i 参数配置;默认 32;
Browse files Browse the repository at this point in the history
  • Loading branch information
feng626 committed Dec 13, 2023
1 parent a649b7e commit 26bf306
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
9 changes: 9 additions & 0 deletions src/app/elements/setting/setting.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ <h1 mat-dialog-title>
</mat-select>
</mat-form-field>

<mat-form-field>
<mat-select [(value)]="setting.graphics.rdp_color_quality"
placeholder="{{'RDP color quality'| translate}}">
<mat-option *ngFor="let s of colorQualityOptions" [value]="s.value">
{{s.label}}
</mat-option>
</mat-select>
</mat-form-field>

<mat-form-field>
<label class="field-label" style="padding-bottom: 7px;">
{{'Keyboard layout'| translate }}
Expand Down
2 changes: 2 additions & 0 deletions src/app/elements/setting/setting.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export class ElementSettingComponent implements OnInit {
keyboardLayoutOptions: any[];
resolutionsOptions: any[];
rdpSmartSizeOptions: any[];
colorQualityOptions: any[];
setting: Setting;
globalSetting: GlobalSetting;
type = 'general';
Expand Down Expand Up @@ -54,6 +55,7 @@ export class ElementSettingComponent implements OnInit {
const graphics = res.actions.GET.graphics.children;
this.resolutionsOptions = graphics.rdp_resolution.choices;
this.rdpSmartSizeOptions = graphics.rdp_smart_size.choices;
this.colorQualityOptions = graphics.rdp_color_quality.choices;
this.keyboardLayoutOptions = graphics.keyboard_layout.choices;
}

Expand Down
3 changes: 2 additions & 1 deletion src/app/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ export class Setting {
keyboard_layout: 'en-us-qwerty',
rdp_client_option: [],
applet_connection_method: 'web',
rdp_smart_size: '0'
rdp_smart_size: '0',
rdp_color_quality: '32'
};
command_line = {
character_terminal_font_size: 14,
Expand Down
3 changes: 2 additions & 1 deletion src/app/services/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export class HttpService {

cleanRDPParams(params) {
const cleanedParams = {};
const {rdp_resolution, rdp_client_option, rdp_smart_size} = params.graphics;
const {rdp_resolution, rdp_client_option, rdp_smart_size, rdp_color_quality} = params.graphics;

if (rdp_resolution && rdp_resolution.indexOf('x') > -1) {
const [width, height] = rdp_resolution.split('x');
Expand All @@ -231,6 +231,7 @@ export class HttpService {
}

cleanedParams['rdp_smart_size'] = rdp_smart_size;
cleanedParams['rdp_color_quality'] = rdp_color_quality;
return cleanedParams;
}

Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
"Refresh": "リフレッシュ",
"Checkbox": "複数選択",
"Batch connect": "バッチ接続",
"RDP resolution": "RDP解像度",
"RDP resolution": "RDP 解像度",
"RDP smart size": "RDP スマート・サイズ",
"RDP color quality": "RDP 色品質",
"Send text to all ssh terminals": "すべてのssh端末にテキストを送信します",
"Switch to quick command": "クイックコマンドに切り替え",
"Switch to input command": "入力コマンドに切り替え",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
"Refresh": "刷新",
"Checkbox": "多选",
"Batch connect": "批量连接",
"RDP resolution": "RDP分辨率",
"RDP resolution": "RDP 分辨率",
"RDP smart size": "RDP 智能大小",
"RDP color quality": "RDP 颜色质量",
"Send text to all ssh terminals": "发送文本到所有ssh终端",
"Switch to quick command": "切换到快捷命令",
"Switch to input command": "切换到输入命令",
Expand Down

0 comments on commit 26bf306

Please sign in to comment.