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 { ListSelector } from '../../store';
|
||||||
import { Target } from '@overflow/commons-typescript/model/target';
|
import { Target } from '@overflow/commons-typescript/model/target';
|
||||||
import { Infra, InfraHost, InfraService } from '@overflow/commons-typescript/model/infra';
|
import { Infra, InfraHost, InfraService } from '@overflow/commons-typescript/model/infra';
|
||||||
import { Domain } from '@overflow/commons-typescript/model/domain';
|
import { Domain, DomainMember } from '@overflow/commons-typescript/model/domain';
|
||||||
import { AuthSelector } from '@overflow/member/store';
|
import { AuthContainerSelector } from '@overflow/shared/auth/store';
|
||||||
|
|
||||||
// import { sensorListSelector } from '@overflow/sensor/store';
|
// import { sensorListSelector } from '@overflow/sensor/store';
|
||||||
|
|
||||||
|
@ -68,8 +68,8 @@ export class MapComponent implements OnInit, AfterContentInit {
|
||||||
|
|
||||||
ngAfterContentInit() {
|
ngAfterContentInit() {
|
||||||
|
|
||||||
this.listStore.select(AuthSelector.select('domain')).subscribe(
|
this.listStore.select(AuthContainerSelector.selectDomainMember).subscribe(
|
||||||
(domain: Domain) => {
|
(domainMember: DomainMember) => {
|
||||||
|
|
||||||
// const pageParams: PageParams = {
|
// const pageParams: PageParams = {
|
||||||
// pageNo: '0',
|
// 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 { BrowserModule } from '@angular/platform-browser';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
|
||||||
import { MemberModule } from '@overflow/member/member.module';
|
import { AuthModule } from '@overflow/shared/auth/auth.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -28,7 +28,7 @@ import { MemberModule } from '@overflow/member/member.module';
|
||||||
AppRPCModule,
|
AppRPCModule,
|
||||||
AppRESTModule,
|
AppRESTModule,
|
||||||
AppLoggerModule,
|
AppLoggerModule,
|
||||||
MemberModule,
|
AuthModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
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)">
|
<a href="#" (click)="onClick($event)">
|
||||||
<img class="profile-image" src="assets/layout/images/avatar.png" />
|
<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>
|
<i class="material-icons">keyboard_arrow_down</i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,61 +1,50 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import {trigger, state, transition, style, animate } from '@angular/animations';
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
||||||
import {AppComponent} from '../../../../app.component';
|
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 { 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({
|
@Component({
|
||||||
selector: 'of-inline-profile',
|
selector: 'of-inline-profile',
|
||||||
templateUrl: './app.profile.component.html',
|
templateUrl: './app.profile.component.html',
|
||||||
animations: [
|
animations: [
|
||||||
trigger('menu', [
|
trigger('menu', [
|
||||||
state('hidden', style({
|
state('hidden', style({
|
||||||
height: '0px'
|
height: '0px'
|
||||||
})),
|
})),
|
||||||
state('visible', style({
|
state('visible', style({
|
||||||
height: '*'
|
height: '*'
|
||||||
})),
|
})),
|
||||||
transition('visible => hidden', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),
|
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)'))
|
transition('hidden => visible', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AppInlineProfileComponent implements OnInit {
|
export class AppInlineProfileComponent implements OnInit {
|
||||||
|
active: boolean;
|
||||||
active: boolean;
|
member$: Observable<Member>;
|
||||||
|
|
||||||
member: Member;
|
|
||||||
|
|
||||||
// this.store.select(AuthSelector.select('member');
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public app: PagesComponent,
|
public app: PagesComponent,
|
||||||
private activatedRoute: ActivatedRoute,
|
private store: Store<any>,
|
||||||
private router: Router,
|
|
||||||
private store: Store<AuthStore.State>,
|
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.store.select(AuthSelector.select('member')).subscribe(
|
this.member$ = this.store.select(AuthContainerSelector.selectDomainMember);
|
||||||
(member: Member) => {
|
|
||||||
this.member = member;
|
|
||||||
},
|
|
||||||
(error) => {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onClick(event) {
|
onClick(event) {
|
||||||
this.active = !this.active;
|
this.active = !this.active;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.app.layoutMenuScrollerViewChild.moveBar();
|
this.app.layoutMenuScrollerViewChild.moveBar();
|
||||||
}, 450);
|
}, 450);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user