commit before upgrade
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
<ng-container *ngIf="!isLogged;else elseIfBlock">
|
||||
<ng-container *ngIf="!isLogged;else elseIfNeedsInvitationBlock">
|
||||
<p>Login for seeing the chat.</p>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #elseIfBlock>
|
||||
<ng-template #elseIfNeedsInvitationBlock>
|
||||
<ng-container *ngIf="needsInvitation | async;else elseIfNeedsToJoinBlock">
|
||||
<p>This chat is private, you need to join the travel to see it.</p>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #elseIfNeedsToJoinBlock>
|
||||
<ng-container *ngIf="!isInRoom;else elseBlock">
|
||||
<button mat-raised-button class="btn btn-default" (click)="join()">Join chat</button>
|
||||
</ng-container>
|
||||
|
||||
@@ -72,8 +72,11 @@ export class ChatComponent implements OnInit, AfterViewInit {
|
||||
return this.chatService.isInRoom(this.roomId);
|
||||
}
|
||||
|
||||
get isInvitedToRoom(): boolean {
|
||||
return this.chatService.isInvitedToRoom(this.roomId);
|
||||
get needsInvitation(): Promise<boolean> {
|
||||
if (this.chatService.isInRoom(this.roomId)) { return new Promise(() => false); }
|
||||
|
||||
|
||||
return this.chatService.roomNeedsInvitation(this.roomId);
|
||||
}
|
||||
|
||||
get members(): RoomMember[] {
|
||||
|
||||
Reference in New Issue
Block a user