ing
This commit is contained in:
parent
638cfbf96c
commit
2e616429b4
|
@ -11,8 +11,8 @@ import * as ListStore from '../../store/list';
|
|||
import { ListSelector } from '../../store';
|
||||
import { Target } from '@overflow/commons-typescript/model/target';
|
||||
import { Infra, InfraHost, InfraService } from '@overflow/commons-typescript/model/infra';
|
||||
import { Domain } from '@overflow/commons-typescript/model/domain';
|
||||
import { AuthSelector } from '@overflow/member/store';
|
||||
import { Domain, DomainMember } from '@overflow/commons-typescript/model/domain';
|
||||
import { AuthContainerSelector } from '@overflow/shared/auth/store';
|
||||
|
||||
// import { sensorListSelector } from '@overflow/sensor/store';
|
||||
|
||||
|
@ -68,8 +68,8 @@ export class MapComponent implements OnInit, AfterContentInit {
|
|||
|
||||
ngAfterContentInit() {
|
||||
|
||||
this.listStore.select(AuthSelector.select('domain')).subscribe(
|
||||
(domain: Domain) => {
|
||||
this.listStore.select(AuthContainerSelector.selectDomainMember).subscribe(
|
||||
(domainMember: DomainMember) => {
|
||||
|
||||
// const pageParams: PageParams = {
|
||||
// pageNo: '0',
|
||||
|
|
3636
package-lock.json
generated
3636
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -15,7 +15,7 @@ import { AuthGuard } from './commons/guard/auth.guard';
|
|||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
|
||||
import { MemberModule } from '@overflow/member/member.module';
|
||||
import { AuthModule } from '@overflow/shared/auth/auth.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -28,7 +28,7 @@ import { MemberModule } from '@overflow/member/member.module';
|
|||
AppRPCModule,
|
||||
AppRESTModule,
|
||||
AppLoggerModule,
|
||||
MemberModule,
|
||||
AuthModule,
|
||||
],
|
||||
declarations: [
|
||||
AppComponent,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="profile" [ngClass]="{'profile-expanded':active}">
|
||||
<div class="profile" [ngClass]="{'profile-expanded':active}" *ngIf="member">
|
||||
<a href="#" (click)="onClick($event)">
|
||||
<img class="profile-image" src="assets/layout/images/avatar.png" />
|
||||
<span class="profile-name">{{member.name}}</span>
|
||||
<span class="profile-name">{{name}}</span>
|
||||
<i class="material-icons">keyboard_arrow_down</i>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -1,61 +1,50 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import {trigger, state, transition, style, animate } from '@angular/animations';
|
||||
import {AppComponent} from '../../../../app.component';
|
||||
import { trigger, state, transition, style, animate } from '@angular/animations';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { select, Store } from '@ngrx/store';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { Member } from '@overflow/commons-typescript/model/member';
|
||||
import { AuthContainerSelector } from '@overflow/shared/auth/store';
|
||||
|
||||
import { AppComponent } from '../../../../app.component';
|
||||
import { PagesComponent } from '../../../../pages/pages.component';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import * as AuthStore from '@overflow/member/store/auth';
|
||||
import {select, Store} from '@ngrx/store';
|
||||
import {AuthSelector} from '@overflow/member/store';
|
||||
import {Member} from '@overflow/commons-typescript/model/member';
|
||||
|
||||
@Component({
|
||||
selector: 'of-inline-profile',
|
||||
templateUrl: './app.profile.component.html',
|
||||
animations: [
|
||||
trigger('menu', [
|
||||
state('hidden', style({
|
||||
height: '0px'
|
||||
})),
|
||||
state('visible', style({
|
||||
height: '*'
|
||||
})),
|
||||
transition('visible => hidden', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),
|
||||
transition('hidden => visible', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
||||
])
|
||||
]
|
||||
selector: 'of-inline-profile',
|
||||
templateUrl: './app.profile.component.html',
|
||||
animations: [
|
||||
trigger('menu', [
|
||||
state('hidden', style({
|
||||
height: '0px'
|
||||
})),
|
||||
state('visible', style({
|
||||
height: '*'
|
||||
})),
|
||||
transition('visible => hidden', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),
|
||||
transition('hidden => visible', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
||||
])
|
||||
]
|
||||
})
|
||||
export class AppInlineProfileComponent implements OnInit {
|
||||
|
||||
active: boolean;
|
||||
|
||||
member: Member;
|
||||
|
||||
// this.store.select(AuthSelector.select('member');
|
||||
active: boolean;
|
||||
member$: Observable<Member>;
|
||||
|
||||
constructor(
|
||||
public app: PagesComponent,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private store: Store<AuthStore.State>,
|
||||
private store: Store<any>,
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.store.select(AuthSelector.select('member')).subscribe(
|
||||
(member: Member) => {
|
||||
this.member = member;
|
||||
},
|
||||
(error) => {
|
||||
console.log(error);
|
||||
}
|
||||
);
|
||||
this.member$ = this.store.select(AuthContainerSelector.selectDomainMember);
|
||||
}
|
||||
|
||||
onClick(event) {
|
||||
this.active = !this.active;
|
||||
setTimeout(() => {
|
||||
this.app.layoutMenuScrollerViewChild.moveBar();
|
||||
}, 450);
|
||||
event.preventDefault();
|
||||
}
|
||||
this.active = !this.active;
|
||||
setTimeout(() => {
|
||||
this.app.layoutMenuScrollerViewChild.moveBar();
|
||||
}, 450);
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user