Skip to content

Commit

Permalink
Extend current speaking structure level slide (#3531)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel authored Apr 10, 2024
1 parent 2c47ebe commit 275cdae
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,48 @@
[unstyled]="true"
[countdown]="{
running: !!data.data.current_start_time,
default_time: data.data.remaining_time === undefined ? 0 : null,
countdown_time: data.data.current_start_time
? data.data.current_start_time + data.data.remaining_time
? data.data.current_start_time + (data.data.remaining_time || 0)
: data.data.remaining_time
}"
></os-countdown-time>
</div>
<div id="inner-name">{{ data.data.name }}</div>

<div *ngIf="data.data.point_of_order" id="inner-type">
<mat-icon inline>warning</mat-icon>
{{ 'Point of order' | translate }}
</div>

<!-- Pro Speech -->
<div *ngIf="data.data.speech_state === SpeechState.PRO" id="inner-type">
<mat-icon inline>add_circle</mat-icon>
{{ 'Forspeech' | translate }}
</div>

<!-- Contra Speech -->
<div *ngIf="data.data.speech_state === SpeechState.CONTRA" id="inner-type">
<mat-icon inline>remove_circle</mat-icon>
{{ 'Counter speech' | translate }}
</div>

<!-- Marked -->
<div *ngIf="data.data.speech_state === SpeechState.CONTRIBUTION" id="inner-type">
<mat-icon inline>star</mat-icon>
{{ 'Contribution' | translate }}
</div>

<!-- Interposed question -->
<div *ngIf="data.data.speech_state === SpeechState.INTERPOSED_QUESTION" id="inner-type">
<mat-icon inline>help</mat-icon>
{{ 'Interposed question' | translate }}
</div>

<!-- Intervention -->
<div *ngIf="data.data.speech_state === SpeechState.INTERVENTION" id="inner-type">
<mat-icon inline>error</mat-icon>
{{ 'Intervention' | translate }}
</div>
</span>
</div>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#structure-level-current {
position: absolute;
right: 0;
bottom: calc(50% - 125px);
top: calc(max(402px, 50%) - 250px);
right: 0;
z-index: 10;
text-align: right;
Expand All @@ -13,9 +13,12 @@
font-size: 250px;
font-weight: 500;
}
#inner-type,
#inner-name {
font-size: 70px;
opacity: 0.9;
display: flex;
justify-content: end;
}

.structure-level-color {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
import { SpeechState } from 'src/app/domain/models/speakers/speech-state';

import { BaseSlideComponent } from '../../../base/base-slide-component';
import { CurrentSpeakingStructureLevelSlideData } from '../current-speaking-structure-level-slide-data';
Expand All @@ -8,4 +9,6 @@ import { CurrentSpeakingStructureLevelSlideData } from '../current-speaking-stru
templateUrl: `./current-speaking-structure-level-slide.component.html`,
styleUrls: [`./current-speaking-structure-level-slide.component.scss`]
})
export class CurrentSpeakingStructureLevelSlideComponent extends BaseSlideComponent<CurrentSpeakingStructureLevelSlideData> {}
export class CurrentSpeakingStructureLevelSlideComponent extends BaseSlideComponent<CurrentSpeakingStructureLevelSlideData> {
public SpeechState = SpeechState;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { SpeechState } from 'src/app/domain/models/speakers/speech-state';

export interface CurrentSpeakingStructureLevelSlideData {
id: number;
name: string;
color: string;
remaining_time: number;
remaining_time?: number;
current_start_time: number;
speech_state: SpeechState;
point_of_order?: boolean;
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { MatIconModule } from '@angular/material/icon';
import { OpenSlidesTranslationModule } from 'src/app/site/modules/translations';
import { PipesModule } from 'src/app/ui/pipes';

import { CountdownTimeModule } from '../../../countdown-time/countdown-time.module';
import { SlideToken } from '../../definitions';
import { CurrentSpeakingStructureLevelSlideComponent } from './components/current-speaking-structure-level-slide.component';
@NgModule({
imports: [CommonModule, CountdownTimeModule],
imports: [CommonModule, CountdownTimeModule, MatIconModule, PipesModule, OpenSlidesTranslationModule.forChild()],
declarations: [CurrentSpeakingStructureLevelSlideComponent],
providers: [{ provide: SlideToken.token, useValue: CurrentSpeakingStructureLevelSlideComponent }]
})
Expand Down

0 comments on commit 275cdae

Please sign in to comment.