Skip to content

Commit

Permalink
Merge pull request #2020 from DSD-DBS/remove-floating-window-manager
Browse files Browse the repository at this point in the history
feat: Remove floating window manager
  • Loading branch information
MoritzWeber0 authored Nov 19, 2024
2 parents ba58de0 + f4b615c commit 80bf20f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 57 deletions.
2 changes: 0 additions & 2 deletions frontend/src/app/sessions/session/session-viewer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { FullscreenService } from 'src/app/sessions/service/fullscreen.service';
import { SessionService } from 'src/app/sessions/service/session.service';
import { UserSessionService } from 'src/app/sessions/service/user-session.service';
import { FloatingWindowManagerComponent } from './floating-window-manager/floating-window-manager.component';
import { SessionViewerService } from './session-viewer.service';
import { TilingWindowManagerComponent } from './tiling-window-manager/tiling-window-manager.component';
Expand All @@ -40,7 +39,6 @@ export class SessionViewerComponent implements OnInit, OnDestroy {
selectedWindowType?: string = undefined;

constructor(
public userSessionService: UserSessionService,
public sessionService: SessionService,
public sessionViewerService: SessionViewerService,
public fullscreenService: FullscreenService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,45 @@

<h1 class="text-2xl">Active Sessions</h1>

@if ((sessions | async) === undefined) {
<ngx-skeleton-loader
appearance="circle"
[theme]="{
'border-radius': '5px',
height: '240px',
width: '432px',
border: '1px solid white',
margin: 0,
'max-width': '100%',
<div class="flex flex-col gap-2">
<a
class="w-full"
mat-flat-button
color="primary"
type="submit"
routerLink="/session-viewer"
[queryParams]="{
'session-id': (selectedSessionIDs$ | async),
'window-manager': 'tiling',
}"
></ngx-skeleton-loader>
} @else if ((sessions | async)?.length === 0) {
<div class="mat-card collab-card w-full">
<h2 class="mb-3 text-xl font-medium">No active sessions</h2>
<div class="text-sm">
There are no active sessions for your user in our system. <br />
[disabled]="!(selectedSessionIDs$ | async)?.length"
>
<div>
Open selected sessions
<span class="hidden sm:inline">in internal session viewer</span>
</div>
</div>
} @else if ((sessions | async)?.length !== 0) {
<div class="flex flex-col gap-2">
<div class="w-full rounded border bg-white p-2">
<h2><b>Internal Session Viewer</b></h2>
<mat-radio-group [(ngModel)]="selectedWindowManager">
<mat-radio-button value="tiling"
>Tiling window manager</mat-radio-button
>
<mat-radio-button value="floating">
Floating window manager
</mat-radio-button>
</mat-radio-group>
<mat-icon iconPositionEnd>keyboard_arrow_right</mat-icon>
</a>

<a
class="w-full"
matInput
mat-stroked-button
color="primary"
type="submit"
routerLink="/session-viewer"
[queryParams]="{
'window-manager': selectedWindowManager,
'session-id': (selectedSessionIDs$ | async),
}"
[disabled]="!(selectedSessionIDs$ | async)?.length"
>
<div>
Open selected sessions
<span class="hidden sm:inline">in internal session viewer</span>
</div>
<mat-icon iconPositionEnd>keyboard_arrow_right</mat-icon>
</a>
@if ((sessions | async) === undefined) {
<ngx-skeleton-loader
appearance="circle"
[theme]="{
'border-radius': '5px',
height: '150px',
width: '100%',
border: '1px solid white',
margin: 0,
}"
></ngx-skeleton-loader>
} @else if ((sessions | async)?.length === 0) {
<div class="rounded-md border px-3 py-2">
<h2 class="text-xl font-medium">No active sessions</h2>
<div class="text-sm">
There are no active sessions for your user in our system. <br />
</div>
</div>

} @else if ((sessions | async)?.length !== 0) {
@for (session of sessions | async; track session.id) {
<div class="collab-card">
<div class="flex h-12 items-center justify-between">
Expand Down Expand Up @@ -214,5 +200,5 @@ <h2>Read-Only session</h2>
</div>
</div>
}
</div>
}
}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatDialog } from '@angular/material/dialog';
import { MatIcon } from '@angular/material/icon';
import { MatProgressBar } from '@angular/material/progress-bar';
import { MatRadioModule } from '@angular/material/radio';
import { MatTooltip } from '@angular/material/tooltip';
import { RouterLink } from '@angular/router';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
Expand Down Expand Up @@ -49,7 +48,6 @@ import { FileBrowserDialogComponent } from './file-browser-dialog/file-browser-d
MatIconButton,
MatTooltip,
MatCheckboxModule,
MatRadioModule,
FormsModule,
],
})
Expand All @@ -66,8 +64,6 @@ export class ActiveSessionsComponent implements OnInit {
private dialog: MatDialog,
) {}

selectedWindowManager = 'tiling';

sessions = new BehaviorSubject<SessionWithSelection[] | undefined>(undefined);

ngOnInit(): void {
Expand Down

0 comments on commit 80bf20f

Please sign in to comment.