|
|
|
@ -1,6 +1,6 @@ |
|
|
|
import { Component, Input, TemplateRef } from '@angular/core'; |
|
|
|
import { Component, Input, TemplateRef, OnInit, OnDestroy } from '@angular/core'; |
|
|
|
import { Account } from '../../models/account'; |
|
|
|
import { Select } from '@ngxs/store'; |
|
|
|
import { Select, Store } from '@ngxs/store'; |
|
|
|
import { ConfigState } from '@abp/ng.core'; |
|
|
|
import { Observable } from 'rxjs'; |
|
|
|
|
|
|
|
@ -10,13 +10,28 @@ import { Observable } from 'rxjs'; |
|
|
|
exportAs: 'abpAuthWrapper', |
|
|
|
}) |
|
|
|
export class AuthWrapperComponent |
|
|
|
implements Account.AuthWrapperComponentInputs, Account.AuthWrapperComponentOutputs { |
|
|
|
@Select(ConfigState.getSetting('Abp.Account.EnableLocalLogin')) |
|
|
|
enableLocalLogin$: Observable<'True' | 'False'>; |
|
|
|
|
|
|
|
implements |
|
|
|
Account.AuthWrapperComponentInputs, |
|
|
|
Account.AuthWrapperComponentOutputs, |
|
|
|
OnInit, |
|
|
|
OnDestroy { |
|
|
|
@Input() |
|
|
|
readonly mainContentRef: TemplateRef<any>; |
|
|
|
|
|
|
|
@Input() |
|
|
|
readonly cancelContentRef: TemplateRef<any>; |
|
|
|
|
|
|
|
enableLocalLogin = true; |
|
|
|
|
|
|
|
constructor(private store: Store) {} |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
this.store.select(ConfigState.getSetting('Abp.Account.EnableLocalLogin')).subscribe(value => { |
|
|
|
if (value) { |
|
|
|
this.enableLocalLogin = value.toLowerCase() !== 'false'; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
ngOnDestroy() {} |
|
|
|
} |
|
|
|
|