Skip to content

Commit

Permalink
Merge pull request #2057 from DSD-DBS/auto-select-sessions
Browse files Browse the repository at this point in the history
feat: Auto-select sessions in active session overview
  • Loading branch information
MoritzWeber0 authored Dec 2, 2024
2 parents 76df33c + 5f9c44d commit b81c92c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ export class ActiveSessionsComponent implements OnInit {

ngOnInit(): void {
this.userSessionService.sessions$.subscribe((sessions) => {
const selectedSessionIDs = new Set(
this.sessions.value?.filter((s) => s.selected).map((s) => s.id) ?? [],
const unselectedSessionIDs = new Set(
this.sessions.value?.filter((s) => !s.selected).map((s) => s.id) ?? [],
);

this.sessions.next(
sessions?.map((s) => ({
...s,
selected: selectedSessionIDs.has(s.id),
selected: !unselectedSessionIDs.has(s.id),
})),
);
});
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,22 @@ <h1 class="text-2xl">Persistent Workspace Session</h1>
}
}

<div class="flex justify-center">
<button
class="mx-0 w-full items-center"
mat-flat-button
color="primary"
type="submit"
[disabled]="requestInProgress"
>
<span class="hidden items-center gap-1 sm:flex">
Request a session with a persistent workspace
<mat-icon iconPositionEnd>keyboard_arrow_right</mat-icon>
</span>
<span class="flex items-center gap-1 sm:hidden">
Request session
<mat-icon inline>keyboard_arrow_right</mat-icon>
</span>
</button>
</div>
<button
class="mx-0 w-full items-center"
mat-flat-button
color="primary"
type="submit"
[disabled]="requestInProgress"
>
<span class="hidden items-center gap-1 sm:flex">
Request a session with a persistent workspace
<mat-icon iconPositionEnd>keyboard_arrow_right</mat-icon>
</span>
<span class="flex items-center gap-1 sm:hidden">
Request session
<mat-icon inline>keyboard_arrow_right</mat-icon>
</span>
</button>
</form>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { CreateSessionHistoryComponent } from '../create-session-history/create-
@Component({
selector: 'app-create-persistent-session',
templateUrl: './create-persistent-session.component.html',
styleUrls: ['./create-persistent-session.component.css'],
imports: [
FormsModule,
ReactiveFormsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h2 class="text-xl font-medium">User workspaces</h2>
} @else {
@for (workspace of workspaces | async; track workspace.id) {
<div
class="mat-card collab-card flex flex-wrap items-center justify-between gap-2"
class="collab-card flex flex-wrap items-center justify-between gap-2"
>
<div>
<h2 class="mb-3 text-lg font-medium">
Expand Down

0 comments on commit b81c92c

Please sign in to comment.