Skip to content

Commit

Permalink
Improve speaking times in autopilot (#3201)
Browse files Browse the repository at this point in the history
* Fix overlaying speaking times

* Hide right col on mobile devices

* Countdown font mono

* Countdown time color

* Rename speaker export menu item
  • Loading branch information
bastianjoel authored Jan 26, 2024
1 parent 47b8b0f commit b5c31cd
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
justify-content: start;
padding: 8px 25px 0 25px;
.structure-level {
width: 33%;
min-width: 33%;
margin-bottom: 16px;
display: flex;
flex-direction: row;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
</span>
</div>
</div>
<span *ngIf="unstyled" id="countdown">
<span
*ngIf="unstyled"
id="countdown"
[ngClass]="{
'negative-time': seconds <= 0 && (countdown.default_time !== 0 || seconds < 0),
'warning-time': seconds <= warningTime && seconds > 0,
}"
>
{{ time }}
</span>
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
@import 'src/assets/styles/media-queries.scss';
@import 'src/assets/styles/fonts.scss';

#countdown {
white-space: nowrap;
font-family: $font-monospace;

&.warning-time {
$color: #ed940e;
color: $color;
}

&.negative-time {
$color: #c00;
color: $color;
}
}

.countdown-time-wrapper {
$margin: 50px;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ <h1 class="line-and-icon">
</ng-template>
</os-list-of-speakers-content>

<div *ngIf="structureLevelCountdownEnabled && listOfSpeakers && (showRightCol | async) === false">
<ng-container [ngTemplateOutlet]="speakingTimes"></ng-container>
</div>

<!-- Poll-Collection -->
<os-poll-collection *ngIf="showPollCollection" [currentProjection]="projectedViewModel"></os-poll-collection>

Expand All @@ -93,13 +97,17 @@ <h1 class="line-and-icon">
</mat-card>
</div>

<div *ngIf="structureLevelCountdownEnabled && listOfSpeakers" class="col-right">
<mat-card class="os-card spacer-bottom-60">
<mat-card-content>
<os-speaking-times
[currentSpeakingTimes]="listOfSpeakers.structure_level_list_of_speakers_ids"
></os-speaking-times>
</mat-card-content>
</mat-card>
<div *ngIf="structureLevelCountdownEnabled && listOfSpeakers && showRightCol | async" class="col-right">
<ng-container [ngTemplateOutlet]="speakingTimes"></ng-container>
</div>
</div>

<ng-template #speakingTimes>
<mat-card class="os-card spacer-bottom-60">
<mat-card-content>
<os-speaking-times
[currentSpeakingTimes]="listOfSpeakers.structure_level_list_of_speakers_ids"
></os-speaking-times>
</mat-card-content>
</mat-card>
</ng-template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { BreakpointObserver, BreakpointState } from '@angular/cdk/layout';
import { Component, OnInit } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { BehaviorSubject } from 'rxjs';
import { HasProjectorTitle } from 'src/app/domain/interfaces';
import { DetailNavigable, isDetailNavigable } from 'src/app/domain/interfaces/detail-navigable';
import { Mediafile } from 'src/app/domain/models/mediafiles/mediafile';
Expand Down Expand Up @@ -95,14 +97,17 @@ export class AutopilotComponent extends BaseMeetingComponent implements OnInit {

public structureLevelCountdownEnabled = false;

public showRightCol: BehaviorSubject<boolean> = new BehaviorSubject(false);

private _currentProjection: ViewProjection | null = null;

public constructor(
protected override translate: TranslateService,
private operator: OperatorService,
projectorRepo: ProjectorControllerService,
closService: CurrentListOfSpeakersService,
private listOfSpeakersRepo: ListOfSpeakersControllerService
private listOfSpeakersRepo: ListOfSpeakersControllerService,
breakpoint: BreakpointObserver
) {
super();

Expand All @@ -120,7 +125,10 @@ export class AutopilotComponent extends BaseMeetingComponent implements OnInit {
}),
this.meetingSettingsService
.get(`list_of_speakers_default_structure_level_time`)
.subscribe(time => (this.structureLevelCountdownEnabled = time > 0))
.subscribe(time => (this.structureLevelCountdownEnabled = time > 0)),
breakpoint.observe([`(min-width: 1050px)`]).subscribe((state: BreakpointState) => {
this.showRightCol.next(state.matches);
})
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class SpeakerCsvExportService {
label: this.translate.instant(speakerHeadersAndVerboseNames[key])
} as CsvColumnDefinitionProperty<ViewSpeaker>;
}) as CsvColumnsDefinition<ViewSpeaker>,
this.translate.instant(`lists_of_speakers`) + `.csv`
this.translate.instant(`contributions`) + `.csv`
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ <h2>{{ 'Participants' | translate }}</h2>

<button mat-menu-item *osPerms="permission.userCanManage" routerLink="speaker-list">
<mat-icon>record_voice_over</mat-icon>
<span translate>List of speakers</span>
<span translate>Contributions</span>
</button>

<button mat-menu-item (click)="pdfExportUserList()">
Expand Down

0 comments on commit b5c31cd

Please sign in to comment.