Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -10,6 +10,7 @@
<session-toolbar
[sessionContainerParent]="sessionContainerElement"
[middleButtons]="middleToolbarButtons"
[middleToggleButtons]="middleToolbarToggleButtons"
[rightButtons]="rightToolbarButtons">
</session-toolbar>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,14 @@ export class WebClientArdComponent extends WebClientBaseComponent implements OnI
icon: 'dvl-icon dvl-icon-screen',
action: () => this.scaleTo(this.screenScale.Real),
},
];

middleToolbarToggleButtons = [
{
label: 'Toggle Cursor Kind',
icon: 'dvl-icon dvl-icon-toggle',
icon: 'dvl-icon dvl-icon-cursor',
action: () => this.toggleCursorKind(),
isActive: () => !this.cursorOverrideActive,
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FormGroup } from '@angular/forms';

import { BaseComponent } from '@shared/bases/base.component';
import { WebFormService } from '@shared/services/web-form.service';
import { ArdQualityMode } from '@shared/enums/ard-quality-mode.enum';

@Component({
selector: 'web-client-enable-display-configuration-control',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
[sessionContainerParent]="sessionContainerElement"
[leftButtons]="leftToolbarButtons"
[middleButtons]="middleToolbarButtons"
[middleToggleButtons]="middleToolbarToggleButtons"
[rightButtons]="rightToolbarButtons"
[checkboxes]="checkboxes">
</session-toolbar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class WebClientRdpComponent extends WebClientBaseComponent implements OnI
rdpError: { kind: string; backtrace: string };
isFullScreenMode = false;
showToolbarDiv = true;
useUnicodeKeyboard = false;
cursorOverrideActive = false;

leftToolbarButtons = [
Expand All @@ -90,10 +91,14 @@ export class WebClientRdpComponent extends WebClientBaseComponent implements OnI
icon: 'dvl-icon dvl-icon-screen',
action: () => this.scaleTo(this.screenScale.Real),
},
];

middleToolbarToggleButtons = [
{
label: 'Toggle Cursor Kind',
icon: 'dvl-icon dvl-icon-cursor',
action: () => this.toggleCursorKind(),
isActive: () => !this.cursorOverrideActive,
},
];

Expand All @@ -108,8 +113,11 @@ export class WebClientRdpComponent extends WebClientBaseComponent implements OnI
checkboxes = [
{
label: 'Unicode Keyboard Mode',
checked: false,
action: (checked: boolean) => this.setKeyboardUnicodeMode(checked),
action: () => {
this.useUnicodeKeyboard = !this.useUnicodeKeyboard;
this.setKeyboardUnicodeMode(this.useUnicodeKeyboard);
},
isChecked: () => this.useUnicodeKeyboard,
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
[sessionContainerParent]="sessionContainerElement"
[leftButtons]="leftToolbarButtons"
[middleButtons]="middleToolbarButtons"
[middleToggleButtons]="middleToolbarToggleButtons"
[rightButtons]="rightToolbarButtons">
</session-toolbar>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,14 @@ export class WebClientVncComponent extends WebClientBaseComponent implements OnI
icon: 'dvl-icon dvl-icon-screen',
action: () => this.scaleTo(this.screenScale.Real),
},
];

middleToolbarToggleButtons = [
{
label: 'Toggle Cursor Kind',
icon: 'dvl-icon dvl-icon-toggle',
icon: 'dvl-icon dvl-icon-cursor',
action: () => this.toggleCursorKind(),
isActive: () => !this.cursorOverrideActive,
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,25 @@
<div class="separator" *ngIf="!last"></div>

</ng-container>

<div class="separator" *ngIf="middleToggleButtons.length > 0"></div>

<ng-container *ngFor="let button of middleToggleButtons; let i = index; let last = last">
<p-button (click)="button.action()"
[label]="button.label"
[icon]="button.icon"
iconPos="left"
[styleClass]="button.isActive() ? '' : 'p-button-inactive'">
</p-button>

<div class="separator" *ngIf="!last"></div>

</ng-container>
</div>

<div class="session-toolbar-middle-group" *ngIf="checkboxes.length > 0">
<ng-container *ngFor="let checkbox of checkboxes; let i = index; let last = last">
<p-checkbox [(ngModel)]="checkbox.checked" (onChange)="checkbox.action(checkbox.checked)"
<p-checkbox (onChange)="checkbox.action()"
[label]="checkbox.label" [binary]="true"></p-checkbox>

<div class="separator" *ngIf="checkboxes.length > 1 && !last"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@
flex-direction: column;
height: 100%;
}

::ng-deep .p-button-inactive .p-button-icon {
color: gray !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ export class SessionToolbarComponent {
action: () => void;
}[] = [];

@Input() middleToggleButtons: {
label: string;
icon: string;
action: () => void;
isActive: () => boolean;
}[] = [];

@Input() rightButtons: {
label: string;
icon: string;
Expand All @@ -29,8 +36,8 @@ export class SessionToolbarComponent {

@Input() checkboxes: {
label: string;
checked: boolean;
action: (checked: boolean) => void;
action: () => void;
isChecked: () => boolean;
}[] = [];

isFullScreenMode = false;
Expand Down
Loading