Skip to content

Commit

Permalink
perf: remove client option when disable razor (#1126)
Browse files Browse the repository at this point in the history
Co-authored-by: wangruidong <940853815@qq.com>
  • Loading branch information
fit2bot and w940853815 authored Jul 17, 2024
1 parent e70d3cd commit 1fc586d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, Input, OnChanges, OnInit} from '@angular/core';
import {ConnectMethod, ConnectOption, Protocol, Setting} from '@app/model';
import {ConnectMethod, ConnectOption, Protocol, Setting, GlobalSetting} from '@app/model';
import {resolutionsChoices} from '@app/globals';
import {SettingService} from '@app/services';

Expand All @@ -15,6 +15,7 @@ export class ElementAdvancedOptionComponent implements OnChanges, OnInit {
public advancedOptions: ConnectOption[] = [];
public isShowAdvancedOption = false;
public setting: Setting;
public globalSetting: GlobalSetting;
private allOptions: ConnectOption[] = [];
private boolChoices = [
{label: 'Yes', value: true},
Expand All @@ -23,6 +24,7 @@ export class ElementAdvancedOptionComponent implements OnChanges, OnInit {

constructor(public _settingSvc: SettingService) {
this.setting = _settingSvc.setting;
this.globalSetting = _settingSvc.globalSetting;
this.allOptions = [
{
type: 'select',
Expand Down Expand Up @@ -85,8 +87,8 @@ export class ElementAdvancedOptionComponent implements OnChanges, OnInit {
type: 'select',
field: 'appletConnectMethod',
options: [
{label: 'Web', value: 'web'},
{label: 'Client', value: 'client'}
{ label: 'Web', value: 'web' },
...(this.globalSetting.TERMINAL_RAZOR_ENABLED ? [{ label: 'Client', value: 'client' }] : [])
],
label: 'Applet connect method',
value: this.setting.graphics.applet_connection_method,
Expand Down

0 comments on commit 1fc586d

Please sign in to comment.