-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add tiling window manager with slider
- Loading branch information
1 parent
896627d
commit a0e895a
Showing
10 changed files
with
342 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { Pipe, PipeTransform } from '@angular/core'; | ||
|
||
@Pipe({ | ||
name: 'defaultValue', | ||
}) | ||
export class DefaultValuePipe implements PipeTransform { | ||
transform(value: string | undefined, defaultValue: string): string { | ||
return value ?? defaultValue; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
frontend/src/app/sessions/session/tiling-window-manager/tiling-window-manager.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
.height { | ||
height: calc(100vh - 2vh - 65px - 110px); | ||
} | ||
|
||
.iframe-overlay { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
|
||
cursor: col-resize; | ||
} |
75 changes: 75 additions & 0 deletions
75
frontend/src/app/sessions/session/tiling-window-manager/tiling-window-manager.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<!-- | ||
~ SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors | ||
~ SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
|
||
<div class="flex gap-0.5"> | ||
<ng-container *ngFor="let session of sessions"> | ||
<div | ||
class="flex flex-col" | ||
[ngClass]="{ | ||
height: (fullscreenService.isFullscreen$ | async) === false, | ||
'h-screen': fullscreenService.isFullscreen$ | async | ||
}" | ||
[style.width]="session.width + 'px'" | ||
> | ||
<div | ||
class="flex items-center justify-between gap-2 rounded-t bg-slate-100 p-1" | ||
> | ||
<span> | ||
{{ session.version?.tool?.name }} {{ session.version?.name }}, | ||
{{ session.type }} | ||
<span *ngIf="session.type === 'readonly'" | ||
>(project {{ session.project!.name }})</span | ||
> | ||
{{ session.id }} | ||
</span> | ||
|
||
<div class="flex items-center"> | ||
<mat-icon | ||
*ngIf="session.index !== 0" | ||
class="cursor-pointer text-lg text-gray-600 hover:text-gray-800" | ||
(click)="onLeftClick(session)" | ||
> | ||
arrow_back | ||
</mat-icon> | ||
|
||
<mat-icon | ||
*ngIf="session.index !== sessions.length - 1" | ||
class="cursor-pointer text-lg text-gray-600 hover:text-gray-800" | ||
(click)="onRightClick(session)" | ||
> | ||
arrow_forward | ||
</mat-icon> | ||
</div> | ||
</div> | ||
|
||
<div class="relative grow"> | ||
<div | ||
class="iframe-overlay" | ||
*ngIf="isValidResizeState(this.resizeState)" | ||
></div> | ||
<iframe | ||
[title]=" | ||
(session.version?.tool?.name | defaultValue: 'unknown tool name') + | ||
'-' + | ||
(session.version?.name | defaultValue: 'unknown version name') + | ||
'-' + | ||
session.type | ||
" | ||
[id]="'session-' + session.id" | ||
[src]="session.safeResourceURL" | ||
class="h-full w-full" | ||
allow="clipboard-read; clipboard-write" | ||
> | ||
</iframe> | ||
</div> | ||
</div> | ||
|
||
<div | ||
*ngIf="session.index < sessions.length - 1" | ||
class="my-2 w-2 cursor-col-resize bg-gray-300" | ||
(mousedown)="onMouseDown($event, session.index)" | ||
></div> | ||
</ng-container> | ||
</div> |
Oops, something went wrong.