diff --git a/src/app/room-list/room-list.component.html b/src/app/room-list/room-list.component.html index ead998d6459b561864f2031b5330b842c791bcfe..869db2914fe77f900b27bbe3ab66a64009ec082d 100644 --- a/src/app/room-list/room-list.component.html +++ b/src/app/room-list/room-list.component.html @@ -1,7 +1,12 @@ <mat-accordion> + <div fxLayout="row" fxLayoutAlign="center"> + <mat-progress-spinner *ngIf="isLoading" mode="indeterminate"></mat-progress-spinner> + </div> <mat-expansion-panel *ngFor="let room of rooms"> <mat-expansion-panel-header> - <button mat-button color="primary" routerLink="/{{ baseUrl }}/room/{{ room.id }}"><mat-icon>send</mat-icon></button> + <button mat-button color="primary" routerLink="/{{ baseUrl }}/room/{{ room.id }}"> + <mat-icon>send</mat-icon> + </button> <mat-panel-title> {{ room.shortId }} </mat-panel-title> diff --git a/src/app/room-list/room-list.component.ts b/src/app/room-list/room-list.component.ts index f89e1e2d77cb5f0c52515b57441ed0a25b490a48..83c3ada7cfa81a0f733dbdd003b5700c4d0bf27a 100644 --- a/src/app/room-list/room-list.component.ts +++ b/src/app/room-list/room-list.component.ts @@ -13,6 +13,7 @@ export class RoomListComponent implements OnInit { rooms: Room[]; closedRooms: Room[]; baseUrl: string; + isLoading = true; constructor( private roomService: RoomService, @@ -35,6 +36,7 @@ export class RoomListComponent implements OnInit { this.roomService.getRooms().subscribe(rooms => { this.rooms = rooms; this.closedRooms = this.rooms.filter(room => room.closed); + this.isLoading = false; }); } }