Replace input email dialog with login dialog on add new account

This commit is contained in:
apapachristou 2020-10-26 13:24:39 +02:00
parent 96ffbe6670
commit f0b9b01695
8 changed files with 37 additions and 10 deletions

View File

@ -1,4 +1,4 @@
<div class="login-screen login-bg d-flex flex-column align-items-center justify-content-center">
<div class="login-bg d-flex flex-column align-items-center justify-content-center" [ngClass]="{'login-screen': !mergeUsers}">
<div class="card login-card">
<div class="container card-body">
<h3 class="card-title title">{{'GENERAL.TITLES.SIGN-IN' | translate}}</h3>

View File

@ -347,6 +347,7 @@ span.zenodoIcon {
height: 200px;
position: relative;
top: -140px;
margin-bottom: -140px;
left: 243px;
border-top: none;
}

View File

@ -1,4 +1,4 @@
import { AfterViewInit, Component, OnInit } from '@angular/core';
import { AfterViewInit, Component, Input, OnInit } from '@angular/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { AuthProvider } from '@app/core/common/enum/auth-provider';
import { ConfigurableProvider } from '@app/core/model/configurable-provider/configurableProvider';
@ -23,6 +23,8 @@ declare const FB: any;
})
export class LoginComponent extends BaseComponent implements OnInit, AfterViewInit {
@Input() mergeUsers: boolean;
public auth2: any;
private returnUrl: string;
//public cofigurableProviders: ConfigurableProvider[];

View File

@ -31,6 +31,9 @@ import { ZenodoLoginComponent } from './zenodo-login/zenodo-login.component';
ConfigurableLoginComponent,
ZenodoLoginComponent
],
exports: [
LoginComponent
],
providers: [LoginService, ConfigurableProvidersService]
})
export class LoginModule { }

View File

@ -3,9 +3,8 @@
<h1 mat-dialog-title class="title">{{'USER-PROFILE.ACTIONS.ADD-NEW-ACCOUNT' | translate}}</h1>
<span class="ml-auto align-self-center" (click)="closeDialog()"><mat-icon class="close-icon">close</mat-icon></span>
</div>
<!-- <div class="row m-0">
</div> -->
<div mat-dialog-content class="definition-content pt-2">
<app-login [mergeUsers]="true"></app-login>
<!-- <div mat-dialog-content class="definition-content pt-2">
<mat-form-field class="full-width">
<input matInput placeholder="{{'USER-PROFILE.SETTINGS.YOUR-EMAIL' | translate}}">
</mat-form-field>
@ -15,5 +14,5 @@
<button mat-raised-button type="button" class="cancel-btn ml-auto" (click)="cancel()">{{'USER-PROFILE.ACTIONS.CANCEL' | translate}}</button>
<button mat-raised-button type="button" class="add-btn ml-4" (click)="add()">{{'USER-PROFILE.ACTIONS.ADD' | translate}}</button>
</div>
</div>
</div> -->
</div>

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { FormattingModule } from '@app/core/formatting.module';
import { LoginModule } from '@app/ui/auth/login/login.module';
import { CommonFormsModule } from '@common/forms/common-forms.module';
import { CommonUiModule } from '@common/ui/common-ui.module';
import { AddAccountDialogComponent } from './add-account-dialog.component';
@NgModule({
imports: [
CommonUiModule,
CommonFormsModule,
FormattingModule,
LoginModule
],
declarations: [
AddAccountDialogComponent
]
})
export class AddAccountDialogModule { }

View File

@ -255,7 +255,7 @@ export class UserProfileComponent extends BaseComponent implements OnInit, OnDes
const dialogRef = this.dialog.open(AddAccountDialogComponent, {
restoreFocus: false,
autoFocus: false,
width: '603px',
width: '653px',
data: {
}
});

View File

@ -3,7 +3,10 @@ import { FormattingModule } from '@app/core/formatting.module';
import { AutoCompleteModule } from '@app/library/auto-complete/auto-complete.module';
import { CommonFormsModule } from '@common/forms/common-forms.module';
import { CommonUiModule } from '@common/ui/common-ui.module';
import { LoginComponent } from '../auth/login/login.component';
import { LoginModule } from '../auth/login/login.module';
import { AddAccountDialogComponent } from './add-account/add-account-dialog.component';
import { AddAccountDialogModule } from './add-account/add-account-dialog.module';
import { UserProfileComponent } from './user-profile.component';
import { UserProfileRoutingModule } from './user-profile.routing';
@ -13,11 +16,11 @@ import { UserProfileRoutingModule } from './user-profile.routing';
CommonFormsModule,
FormattingModule,
UserProfileRoutingModule,
AutoCompleteModule
AutoCompleteModule,
AddAccountDialogModule
],
declarations: [
UserProfileComponent,
AddAccountDialogComponent
UserProfileComponent
],
entryComponents: [
AddAccountDialogComponent