This commit is contained in:
crusader 2018-05-29 21:29:25 +09:00
parent fbab76addc
commit e8ab9a3234
2 changed files with 5 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<div class="profile" [ngClass]="{'profile-expanded':active}" *ngIf="member">
<div class="profile" [ngClass]="{'profile-expanded':active}" *ngIf="domainMember$ | async as domainMember">
<a href="#" (click)="onClick($event)">
<img class="profile-image" src="assets/layout/images/avatar.png" />
<span class="profile-name">{{name}}</span>
<span class="profile-name">{{domainMember.member.name}}</span>
<i class="material-icons">keyboard_arrow_down</i>
</a>
</div>

View File

@ -9,6 +9,7 @@ import { AuthContainerSelector } from '@overflow/shared/auth/store';
import { AppComponent } from '../../../../app.component';
import { PagesComponent } from '../../../../pages/pages.component';
import { DomainMember } from '@overflow/commons-typescript/model/domain';
@Component({
selector: 'of-inline-profile',
@ -28,7 +29,7 @@ import { PagesComponent } from '../../../../pages/pages.component';
})
export class AppInlineProfileComponent implements OnInit {
active: boolean;
member$: Observable<Member>;
domainMember$: Observable<DomainMember>;
constructor(
public app: PagesComponent,
@ -37,7 +38,7 @@ export class AppInlineProfileComponent implements OnInit {
}
ngOnInit() {
this.member$ = this.store.select(AuthContainerSelector.selectDomainMember);
this.domainMember$ = this.store.select(AuthContainerSelector.selectDomainMember);
}
onClick(event) {