mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 18:44:14 +00:00
[CST-15073][CST-15074] Adaptation with standalone components
This commit is contained in:

committed by
Vincenzo Mecca

parent
214a77a65c
commit
83615a1c90
@@ -1,10 +1,25 @@
|
||||
import { AsyncPipe, NgFor, NgIf, } from '@angular/common';
|
||||
import { ChangeDetectionStrategy, Component, Input, OnInit, } from '@angular/core';
|
||||
import { select, Store, } from '@ngrx/store';
|
||||
import { Observable, } from 'rxjs';
|
||||
import {
|
||||
AsyncPipe,
|
||||
NgFor,
|
||||
NgIf,
|
||||
} from '@angular/common';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
Input,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
select,
|
||||
Store,
|
||||
} from '@ngrx/store';
|
||||
import uniqBy from 'lodash/uniqBy';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { AuthService } from '../../core/auth/auth.service';
|
||||
import { AuthMethod } from '../../core/auth/models/auth.method';
|
||||
import { AuthMethodType } from '../../core/auth/models/auth.method-type';
|
||||
import {
|
||||
getAuthenticationError,
|
||||
getAuthenticationMethods,
|
||||
@@ -12,13 +27,10 @@ import {
|
||||
isAuthenticationLoading,
|
||||
} from '../../core/auth/selectors';
|
||||
import { CoreState } from '../../core/core-state.model';
|
||||
import { AuthMethodType } from '../../core/auth/models/auth.method-type';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { hasValue } from '../empty.util';
|
||||
import { ThemedLoadingComponent } from '../loading/themed-loading.component';
|
||||
import { LogInContainerComponent } from './container/log-in-container.component';
|
||||
import { rendersAuthMethodType } from './methods/log-in.methods-decorator';
|
||||
import uniqBy from 'lodash/uniqBy';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-base-log-in',
|
||||
@@ -78,7 +90,7 @@ export class LogInComponent implements OnInit {
|
||||
.sort((method1: AuthMethod, method2: AuthMethod) => method1.position - method2.position),
|
||||
),
|
||||
// ignore the ip authentication method when it's returned by the backend
|
||||
map((authMethods: AuthMethod[]) => uniqBy(authMethods.filter(a => a.authMethodType !== AuthMethodType.Ip), 'authMethodType'))
|
||||
map((authMethods: AuthMethod[]) => uniqBy(authMethods.filter(a => a.authMethodType !== AuthMethodType.Ip), 'authMethodType')),
|
||||
);
|
||||
|
||||
// set loading
|
||||
|
Reference in New Issue
Block a user