Adds config to see a max number of next speakers
- Also updates the 'list of speakers' on the `overlay-slide`.
This commit is contained in:
parent
ee0b82b93b
commit
79e879cb6e
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
.currentSpeaker {
|
.currentSpeaker {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
margin: 20px 0 16px;
|
||||||
|
|
||||||
.mat-icon,
|
.mat-icon,
|
||||||
span {
|
span {
|
||||||
@ -17,10 +18,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nextSpeakers {
|
.nextSpeakers {
|
||||||
margin-left: 13px !important;
|
margin: 0;
|
||||||
margin-top: 10px !important;
|
padding-left: 6px;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
|
list-style-position: inside;
|
||||||
line-height: 150%;
|
line-height: 150%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,15 @@
|
|||||||
<div id="overlay" *ngIf="data">
|
<div id="overlay" *ngIf="currentSpeaker || nextSpeakers.length > 0">
|
||||||
<h3 translate>List of speakers</h3>
|
<h3 translate>List of speakers</h3>
|
||||||
|
|
||||||
<!-- Last speakers -->
|
<div *ngIf="currentSpeaker" class="currentSpeaker one-line">
|
||||||
<div *ngIf="data.data.finished && data.data.finished.length">
|
|
||||||
<div *ngFor="let speaker of data.data.finished" class="lastSpeakers">
|
|
||||||
{{ speaker.user }}
|
|
||||||
<mat-icon *ngIf="speaker.marked">star</mat-icon>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Current speaker -->
|
|
||||||
<div *ngIf="data.data.current" class="currentSpeaker">
|
|
||||||
<mat-icon>mic</mat-icon>
|
<mat-icon>mic</mat-icon>
|
||||||
<span>{{ data.data.current.user }}</span>
|
<span>{{ currentSpeaker.user }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Next speakers -->
|
|
||||||
<div *ngIf="data.data.waiting && data.data.waiting.length">
|
|
||||||
<ol class="nextSpeakers">
|
<ol class="nextSpeakers">
|
||||||
<li *ngFor="let speaker of data.data.waiting">
|
<li *ngFor="let speaker of nextSpeakers" class="one-line">
|
||||||
{{ speaker.user }}
|
{{ speaker.user }}
|
||||||
<mat-icon *ngIf="speaker.marked">star</mat-icon>
|
<mat-icon *ngIf="speaker.marked">star</mat-icon>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
@ -6,12 +6,22 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-color: #d3d3d3;
|
background-color: #d3d3d3;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
height: 200px;
|
height: 210px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
border: 1px solid #999;
|
border: 1px solid #999;
|
||||||
padding: 0px 7px 10px 19px;
|
padding: 10px 10px 10px 25px;
|
||||||
box-shadow: 3px 3px 10px 1px rgba(0, 0, 0, 0.5);
|
box-shadow: 3px 3px 10px 1px rgba(0, 0, 0, 0.5);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.one-line {
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,49 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
|
|
||||||
import { BaseSlideComponent } from 'app/slides/base-slide-component';
|
import { BaseSlideComponent } from 'app/slides/base-slide-component';
|
||||||
import { CommonListOfSpeakersSlideData } from '../common/common-list-of-speakers-slide-data';
|
import { CommonListOfSpeakersSlideData } from '../common/common-list-of-speakers-slide-data';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface, that describes how the speaker-objects look like.
|
||||||
|
*/
|
||||||
|
interface SpeakerObject {
|
||||||
|
user: string;
|
||||||
|
marked: boolean;
|
||||||
|
end_time: number | null;
|
||||||
|
weight: number | null;
|
||||||
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'os-current-list-of-speakers-overlay-slide',
|
selector: 'os-current-list-of-speakers-overlay-slide',
|
||||||
templateUrl: './current-list-of-speakers-overlay-slide.component.html',
|
templateUrl: './current-list-of-speakers-overlay-slide.component.html',
|
||||||
styleUrls: ['./current-list-of-speakers-overlay-slide.component.scss']
|
styleUrls: ['./current-list-of-speakers-overlay-slide.component.scss']
|
||||||
})
|
})
|
||||||
export class CurrentListOfSpeakersOverlaySlideComponent extends BaseSlideComponent<CommonListOfSpeakersSlideData> {
|
export class CurrentListOfSpeakersOverlaySlideComponent extends BaseSlideComponent<CommonListOfSpeakersSlideData> {
|
||||||
|
/**
|
||||||
|
* Gets the data. Sets necessary information for the list of speakers in the overlay.
|
||||||
|
*
|
||||||
|
* @param data The passed data to this overlay.
|
||||||
|
*/
|
||||||
|
@Input()
|
||||||
|
public set data(data: any) {
|
||||||
|
if (data.data.current) {
|
||||||
|
this.currentSpeaker = data.data.current;
|
||||||
|
}
|
||||||
|
if (data.data.waiting) {
|
||||||
|
this.nextSpeakers = data.data.waiting;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The current speaker.
|
||||||
|
*/
|
||||||
|
public currentSpeaker: SpeakerObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List with the next speakers for this list.
|
||||||
|
*/
|
||||||
|
public nextSpeakers: SpeakerObject[] = [];
|
||||||
|
|
||||||
public constructor() {
|
public constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -116,13 +116,25 @@ def get_config_variables():
|
|||||||
validators=(MinValueValidator(0),),
|
validators=(MinValueValidator(0),),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
yield ConfigVariable(
|
||||||
|
name="agenda_show_next_speakers",
|
||||||
|
default_value=0,
|
||||||
|
input_type="integer",
|
||||||
|
label="Number of the next speakers to be shown on the projector",
|
||||||
|
help_text="Enter number of the next shown speakers. Choose 0 to disable this.",
|
||||||
|
weight=222,
|
||||||
|
group="Agenda",
|
||||||
|
subgroup="List of speakers",
|
||||||
|
validators=(MinValueValidator(0),),
|
||||||
|
)
|
||||||
|
|
||||||
yield ConfigVariable(
|
yield ConfigVariable(
|
||||||
name="agenda_countdown_warning_time",
|
name="agenda_countdown_warning_time",
|
||||||
default_value=0,
|
default_value=0,
|
||||||
input_type="integer",
|
input_type="integer",
|
||||||
label="Show orange countdown in the last x seconds of speaking time",
|
label="Show orange countdown in the last x seconds of speaking time",
|
||||||
help_text="Enter duration in seconds. Choose 0 to disable warning color.",
|
help_text="Enter duration in seconds. Choose 0 to disable warning color.",
|
||||||
weight=221,
|
weight=224,
|
||||||
group="Agenda",
|
group="Agenda",
|
||||||
subgroup="List of speakers",
|
subgroup="List of speakers",
|
||||||
validators=(MinValueValidator(0),),
|
validators=(MinValueValidator(0),),
|
||||||
@ -133,7 +145,7 @@ def get_config_variables():
|
|||||||
default_value=60,
|
default_value=60,
|
||||||
input_type="integer",
|
input_type="integer",
|
||||||
label="Predefined seconds of new countdowns",
|
label="Predefined seconds of new countdowns",
|
||||||
weight=222,
|
weight=226,
|
||||||
group="Agenda",
|
group="Agenda",
|
||||||
subgroup="List of speakers",
|
subgroup="List of speakers",
|
||||||
)
|
)
|
||||||
@ -144,7 +156,7 @@ def get_config_variables():
|
|||||||
input_type="boolean",
|
input_type="boolean",
|
||||||
label="Couple countdown with the list of speakers",
|
label="Couple countdown with the list of speakers",
|
||||||
help_text="[Begin speech] starts the countdown, [End speech] stops the countdown.",
|
help_text="[Begin speech] starts the countdown, [End speech] stops the countdown.",
|
||||||
weight=223,
|
weight=228,
|
||||||
group="Agenda",
|
group="Agenda",
|
||||||
subgroup="List of speakers",
|
subgroup="List of speakers",
|
||||||
)
|
)
|
||||||
@ -154,7 +166,7 @@ def get_config_variables():
|
|||||||
default_value=False,
|
default_value=False,
|
||||||
input_type="boolean",
|
input_type="boolean",
|
||||||
label="Hide the amount of speakers in subtitle of list of speakers slide",
|
label="Hide the amount of speakers in subtitle of list of speakers slide",
|
||||||
weight=224,
|
weight=230,
|
||||||
group="Agenda",
|
group="Agenda",
|
||||||
subgroup="List of speakers",
|
subgroup="List of speakers",
|
||||||
)
|
)
|
||||||
@ -164,7 +176,7 @@ def get_config_variables():
|
|||||||
default_value=False,
|
default_value=False,
|
||||||
input_type="boolean",
|
input_type="boolean",
|
||||||
label="Only present participants can be added to the list of speakers",
|
label="Only present participants can be added to the list of speakers",
|
||||||
weight=225,
|
weight=232,
|
||||||
group="Agenda",
|
group="Agenda",
|
||||||
subgroup="List of speakers",
|
subgroup="List of speakers",
|
||||||
)
|
)
|
||||||
|
@ -152,6 +152,8 @@ async def get_list_of_speakers_slide_data(
|
|||||||
speakers_finished = sorted(speakers_finished, key=lambda s: s["end_time"])
|
speakers_finished = sorted(speakers_finished, key=lambda s: s["end_time"])
|
||||||
|
|
||||||
number_of_last_speakers = await get_config(all_data, "agenda_show_last_speakers")
|
number_of_last_speakers = await get_config(all_data, "agenda_show_last_speakers")
|
||||||
|
number_of_next_speakers = await get_config(all_data, "agenda_show_next_speakers")
|
||||||
|
|
||||||
if number_of_last_speakers == 0:
|
if number_of_last_speakers == 0:
|
||||||
speakers_finished = []
|
speakers_finished = []
|
||||||
else:
|
else:
|
||||||
@ -159,6 +161,9 @@ async def get_list_of_speakers_slide_data(
|
|||||||
-number_of_last_speakers:
|
-number_of_last_speakers:
|
||||||
] # Take the last speakers
|
] # Take the last speakers
|
||||||
|
|
||||||
|
if number_of_next_speakers != 0:
|
||||||
|
speakers_waiting = speakers_waiting[:number_of_next_speakers]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"waiting": speakers_waiting,
|
"waiting": speakers_waiting,
|
||||||
"current": current_speaker,
|
"current": current_speaker,
|
||||||
|
Loading…
Reference in New Issue
Block a user