Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Auto-select sessions in active session overview #2057

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -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
Loading