Skip to content

Commit

Permalink
perf: 去掉 debug,添加 bolder
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Jun 5, 2023
1 parent 1a1c896 commit 818f6e4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="advanced-option">
<mat-accordion>
<mat-expansion-panel [disabled]="!isShowAdvancedOption">
<mat-expansion-panel [class.panel-show]="isShowAdvancedOption" [disabled]="!isShowAdvancedOption">
<mat-expansion-panel-header style="height: 32px;">
<mat-panel-title>
{{ 'Advanced option' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
}

.mat-expansion-panel.mat-expanded {
.mat-expansion-panel.panel-show.mat-expanded {
border-bottom: none;

&::ng-deep .mat-expansion-panel-content {
Expand Down Expand Up @@ -56,10 +56,7 @@
.option-item {
flex: 0 0 49%;
box-sizing: border-box;
}

.option-item:first-child {
margin-left: 0;
padding: 0 5px;
}

.mat-checkbox-layout {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export class ElementAdvancedOptionComponent implements OnChanges {
@Output() onOptionsChange = new EventEmitter<ConnectOption[]>();
public advancedOptions: ConnectOption[] = [];
public isShowAdvancedOption = false;
private boolChoices = [
{label: 'Yes', value: true},
{label: 'No', value: false},
];

constructor() {
}
Expand All @@ -25,7 +29,6 @@ export class ElementAdvancedOptionComponent implements OnChanges {
label: 'Charset',
hidden: () => {
const protocolsCanCharset: Array<string> = ['ssh', 'telnet'];
console.log('CUrrent protocol', this.protocol);
return this.connectMethod.component !== 'koko' || !protocolsCanCharset.includes(this.protocol.name);
},
value: 'default',
Expand All @@ -39,28 +42,33 @@ export class ElementAdvancedOptionComponent implements OnChanges {
type: 'select',
field: 'disableautohash',
hidden: () => {
console.log('CUrrent protocol hash', this.protocol);
const protocolsCanAutoHash: Array<string> = ['mysql', 'mariadb'];
return this.connectMethod.component !== 'koko' || !protocolsCanAutoHash.includes(this.protocol.name);
},
label: 'Disable auto completion',
value: false,
options: [
{label: 'Yes', value: true},
{label: 'No', value: false},
]
options: this.boolChoices
},
{
type: 'select',
field: 'resolution',
hidden: () => {
const protocolsCanResolution: Array<string> = ['rdp'];
console.log('CUrrent protocol res', this.protocol);
return !protocolsCanResolution.includes(this.protocol.name);
},
options: resolutionsChoices.map(i => ({label: i, value: i})),
label: 'Resolution',
value: 'Auto'
},
{
type: 'select',
field: 'backspaceAsCtrlH',
hidden: () => {
return this.connectMethod.component !== 'koko';
},
options: this.boolChoices,
label: 'Backspace as Ctrl+H',
value: false
}
];
this.advancedOptions = this.advancedOptions.filter(i => !i.hidden());
Expand Down

0 comments on commit 818f6e4

Please sign in to comment.