Skip to content

Commit 7051480

Browse files
committed
add warnings to header
1 parent 012a86c commit 7051480

File tree

4 files changed

+31
-1
lines changed

4 files changed

+31
-1
lines changed

src/app/core/model/meeting/meeting.model.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface Meeting {
2626
series: MeetingSeries;
2727
iteration: number;
2828
subtitles: string[];
29+
warnings: string[];
2930
meet_id: string;
3031
state: MeetingStates;
3132
unpublished: boolean;
@@ -43,6 +44,7 @@ export class MeetingImpl implements Meeting {
4344
series: MeetingSeries = {} as MeetingSeries;
4445
iteration: number = 1;
4546
subtitles: string[] = [];
47+
warnings: string[] = [];
4648
meet_id: string = "";
4749
state: MeetingStates = MeetingStates.HIDDEN;
4850
data: MeetingData = {} as MeetingData;
@@ -60,6 +62,7 @@ export class MeetingImpl implements Meeting {
6062
this.series = meeting.series;
6163
this.iteration = meeting.iteration;
6264
this.subtitles = meeting.subtitles;
65+
this.warnings = meeting.warnings;
6366
this.meet_id = meeting.meet_id;
6467
this.data = meeting.data;
6568
this.layout = meeting.layout;

src/app/shared/layout/header/header.component.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,13 @@
4141
}
4242
</sr-panel>
4343

44+
@if (meeting && meeting.warnings && meeting.warnings.length > 0) {
45+
<sr-panel class="header-warnings">
46+
@for (warning of meeting.warnings; track warning) {
47+
<div class="header-warning">
48+
<mat-icon>info</mat-icon> <span>{{warning}}</span>
49+
</div>
50+
}
51+
</sr-panel>
52+
}
53+

src/app/shared/layout/header/header.component.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@
4848
}
4949
}
5050

51+
.header-warnings {
52+
color: red;
53+
font-weight: bold;
54+
margin-top: 12px;
55+
56+
.header-warning {
57+
.mat-icon, span {
58+
vertical-align: middle;
59+
}
60+
61+
.mat-icon {
62+
margin-right: 4px;
63+
}
64+
}
65+
}
66+
5167
@media only screen and (max-width: 1050px) {
5268
.header .title-box {
5369
display: none;

src/app/shared/layout/header/header.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ import {SidebarMenuService} from "../../../core/service/sidebar-menu.service";
55
import {PanelComponent} from '../../elements/panel/panel.component';
66
import {IconPanelComponent} from '../../elements/icon-panel/icon-panel.component';
77
import {HeaderButtonsComponent} from './header-buttons/header-buttons.component';
8+
import {MatIcon} from "@angular/material/icon";
89

910
@Component({
1011
selector: 'sr-header',
1112
templateUrl: './header.component.html',
1213
styleUrls: ['./header.component.scss'],
13-
imports: [PanelComponent, IconPanelComponent, HeaderButtonsComponent]
14+
imports: [PanelComponent, IconPanelComponent, HeaderButtonsComponent, MatIcon]
1415
})
1516
export class HeaderComponent {
1617
private routeService = inject(RouteService);

0 commit comments

Comments
 (0)