Skip to content

Commit

Permalink
fix(webapp): session toolbar loading issues (#1106)
Browse files Browse the repository at this point in the history
* fix(webapp): session toolbar loading issues

Issue: DGW-230

* fix(webapp): fix syntax issue from resolving conflicts.

* fix(webapp) fix syntax issues.
  • Loading branch information
kristahouse authored Nov 14, 2024
1 parent 1195345 commit 1442a1d
Show file tree
Hide file tree
Showing 9 changed files with 1,839 additions and 2,134 deletions.
3,711 changes: 1,729 additions & 1,982 deletions webapp/package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,11 @@
[isFormExists]="true"></web-client-form>
</div>

<div #sessionToolbar
id="sessionToolbar"
*ngIf="!isFullScreenMode || (isFullScreenMode && showToolbarDiv)"
[ngClass]="isFullScreenMode?'session-toolbar-layer':''"
class="session-toolbar">

<div class="session-toolbar-left-group">

</div>

<div class="session-toolbar-middle-group">
<p-button
(onClick)="scaleTo(screenScale.Full)"
label="Full Screen"
icon="dvl-icon dvl-icon-fullscreen"
iconPos="left"></p-button>

<div class="separator"></div>

<p-button
(onClick)="scaleTo(screenScale.Fit)"
label="Fit to Screen"
icon="dvl-icon dvl-icon-minimize"
iconPos="left"></p-button>

<div class="separator"></div>
<p-button
(onClick)="scaleTo(screenScale.Real)"
label="Actual Size"
icon="dvl-icon dvl-icon-screen"
iconPos="left"></p-button>
</div>

<div class="session-toolbar-right-group">
<p-button (onClick)="startTerminationProcess()"
styleClass="other"
label="Close Session"
icon="dvl-icon dvl-icon-close"
iconPos="left"></p-button>
</div>
</div>
<session-toolbar
[sessionContainerParent]="sessionContainerElement"
[middleButtons]="middleToolbarButtons"
[rightButtons]="rightToolbarButtons">
</session-toolbar>

<div class="loading-info-container" *ngIf="loading">
<div class="loading-info">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,27 @@ export class WebClientArdComponent extends WebClientBaseComponent implements OnI
showToolbarDiv = true;
loading = true;

middleToolbarButtons = [
{
label: 'Fit to Screen',
icon: 'dvl-icon dvl-icon-minimize',
action: () => this.scaleTo(this.screenScale.Fit),
},
{
label: 'Actual Size',
icon: 'dvl-icon dvl-icon-screen',
action: () => this.scaleTo(this.screenScale.Real),
},
];

rightToolbarButtons = [
{
label: 'Close Session',
icon: 'dvl-icon dvl-icon-close',
action: () => this.startTerminationProcess(),
},
];

protected removeElement = new Subject();
private remoteClientEventListener: (event: Event) => void;
private remoteClient: UserInteraction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,12 @@
[isFormExists]="true"></web-client-form>
</div>

<div #sessionToolbar
id="sessionToolbar"
*ngIf="!isFullScreenMode || (isFullScreenMode && showToolbarDiv)"
[ngClass]="isFullScreenMode?'session-toolbar-layer':''"
class="session-toolbar">

<div class="session-toolbar-left-group">
<p-button
(onClick)="sendWindowsKey()"
label="Start"
icon="dvl-icon dvl-icon-windows"
iconPos="left"></p-button>

<div class="separator"></div>

<p-button
(onClick)="sendCtrlAltDel()"
label="Ctrl+Alt+Del"
icon="dvl-icon dvl-icon-admin"
iconPos="left"></p-button>
</div>

<div class="session-toolbar-middle-group">
<p-button
(onClick)="scaleTo(screenScale.Full)"
label="Full Screen"
icon="dvl-icon dvl-icon-fullscreen"
iconPos="left"></p-button>

<div class="separator"></div>

<p-button
(onClick)="scaleTo(screenScale.Fit)"
label="Fit to Screen"
icon="dvl-icon dvl-icon-minimize"
iconPos="left"></p-button>

<div class="separator"></div>
<p-button
(onClick)="scaleTo(screenScale.Real)"
label="Actual Size"
icon="dvl-icon dvl-icon-screen"
iconPos="left"></p-button>
</div>

<div class="session-toolbar-right-group">
<p-button (onClick)="startTerminationProcess()"
styleClass="other"
label="Close Session"
icon="dvl-icon dvl-icon-close"
iconPos="left"></p-button>
</div>
</div>
<session-toolbar
[sessionContainerParent]="sessionContainerElement"
[leftButtons]="leftToolbarButtons"
[middleButtons]="middleToolbarButtons"
[rightButtons]="rightToolbarButtons">
</session-toolbar>

<div class="loading-info-container" *ngIf="loading">
<div class="loading-info">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,40 @@ export class WebClientRdpComponent extends WebClientBaseComponent implements OnI
showToolbarDiv = true;
loading = true;

leftToolbarButtons = [
{
label: 'Start',
icon: 'dvl-icon dvl-icon-windows',
action: () => this.sendWindowsKey(),
},
{
label: 'Ctrl+Alt+Del',
icon: 'dvl-icon dvl-icon-admin',
action: () => this.sendCtrlAltDel(),
},
];

middleToolbarButtons = [
{
label: 'Fit to Screen',
icon: 'dvl-icon dvl-icon-minimize',
action: () => this.scaleTo(this.screenScale.Fit),
},
{
label: 'Actual Size',
icon: 'dvl-icon dvl-icon-screen',
action: () => this.scaleTo(this.screenScale.Real),
},
];

rightToolbarButtons = [
{
label: 'Close Session',
icon: 'dvl-icon dvl-icon-close',
action: () => this.startTerminationProcess(),
},
];

protected removeElement = new Subject();
private remoteClientEventListener: (event: Event) => void;
private remoteClient: UserInteraction;
Expand Down Expand Up @@ -331,7 +365,6 @@ export class WebClientRdpComponent extends WebClientBaseComponent implements OnI
private initSessionEventHandler(): void {
this.remoteClient.sessionListener.subscribe({
next: (event: SessionEvent): void => {
console.log('event', event);
switch (event.type) {
case SessionEventType.STARTED:
this.handleSessionStarted(event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,12 @@
[isFormExists]="true"></web-client-form>
</div>

<div #sessionToolbar
id="sessionToolbar"
*ngIf="!isFullScreenMode || (isFullScreenMode && showToolbarDiv)"
[ngClass]="isFullScreenMode?'session-toolbar-layer':''"
class="session-toolbar">

<div class="session-toolbar-left-group">
<p-button
(onClick)="sendWindowsKey()"
label="Start"
icon="dvl-icon dvl-icon-windows"
iconPos="left"></p-button>

<div class="separator"></div>

<p-button
(onClick)="sendCtrlAltDel()"
label="Ctrl+Alt+Del"
icon="dvl-icon dvl-icon-admin"
iconPos="left"></p-button>
</div>

<div class="session-toolbar-middle-group">
<p-button
(onClick)="scaleTo(screenScale.Full)"
label="Full Screen"
icon="dvl-icon dvl-icon-fullscreen"
iconPos="left"></p-button>

<div class="separator"></div>

<p-button
(onClick)="scaleTo(screenScale.Fit)"
label="Fit to Screen"
icon="dvl-icon dvl-icon-minimize"
iconPos="left"></p-button>

<div class="separator"></div>
<p-button
(onClick)="scaleTo(screenScale.Real)"
label="Actual Size"
icon="dvl-icon dvl-icon-screen"
iconPos="left"></p-button>
</div>

<div class="session-toolbar-right-group">
<p-button (onClick)="startTerminationProcess()"
styleClass="other"
label="Close Session"
icon="dvl-icon dvl-icon-close"
iconPos="left"></p-button>
</div>
</div>
<session-toolbar
[sessionContainerParent]="sessionContainerElement"
[leftButtons]="leftToolbarButtons"
[middleButtons]="middleToolbarButtons"
[rightButtons]="rightToolbarButtons">
</session-toolbar>

<div class="loading-info-container" *ngIf="loading">
<div class="loading-info">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,40 @@ export class WebClientVncComponent extends WebClientBaseComponent implements OnI
showToolbarDiv = true;
loading = true;

leftToolbarButtons = [
{
label: 'Start',
icon: 'dvl-icon dvl-icon-windows',
action: () => this.sendWindowsKey(),
},
{
label: 'Ctrl+Alt+Del',
icon: 'dvl-icon dvl-icon-admin',
action: () => this.sendCtrlAltDel(),
},
];

middleToolbarButtons = [
{
label: 'Fit to Screen',
icon: 'dvl-icon dvl-icon-minimize',
action: () => this.scaleTo(this.screenScale.Fit),
},
{
label: 'Actual Size',
icon: 'dvl-icon dvl-icon-screen',
action: () => this.scaleTo(this.screenScale.Real),
},
];

rightToolbarButtons = [
{
label: 'Close Session',
icon: 'dvl-icon dvl-icon-close',
action: () => this.startTerminationProcess(),
},
];

protected removeElement: Subject<unknown> = new Subject();
private remoteClient: UserInteraction;
private remoteClientEventListener: (event: Event) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[icon]="button.icon"
iconPos="left"></p-button>

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

</ng-container>
</div>
Expand All @@ -31,7 +31,7 @@
[icon]="button.icon"
iconPos="left"></p-button>

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

</ng-container>
</div>
Expand All @@ -43,7 +43,7 @@
[icon]="button.icon"
iconPos="left"></p-button>

<div class="separator" *ngIf="rightButtons.length > 1"></div>
<div class="separator" *ngIf="rightButtons.length > 1 && !last"></div>

</ng-container>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
flex: 1;
}

.session-toolbar-right-group {
.session-toolbar-right-group, .session-toolbar-left-group {
display: flex;
align-items: center;
}
Expand Down

0 comments on commit 1442a1d

Please sign in to comment.