Replace input email dialog with login dialog on add new account
This commit is contained in:
parent
96ffbe6670
commit
f0b9b01695
|
@ -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="card login-card">
|
||||||
<div class="container card-body">
|
<div class="container card-body">
|
||||||
<h3 class="card-title title">{{'GENERAL.TITLES.SIGN-IN' | translate}}</h3>
|
<h3 class="card-title title">{{'GENERAL.TITLES.SIGN-IN' | translate}}</h3>
|
||||||
|
|
|
@ -347,6 +347,7 @@ span.zenodoIcon {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -140px;
|
top: -140px;
|
||||||
|
margin-bottom: -140px;
|
||||||
left: 243px;
|
left: 243px;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 { ActivatedRoute, Params, Router } from '@angular/router';
|
||||||
import { AuthProvider } from '@app/core/common/enum/auth-provider';
|
import { AuthProvider } from '@app/core/common/enum/auth-provider';
|
||||||
import { ConfigurableProvider } from '@app/core/model/configurable-provider/configurableProvider';
|
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 {
|
export class LoginComponent extends BaseComponent implements OnInit, AfterViewInit {
|
||||||
|
|
||||||
|
@Input() mergeUsers: boolean;
|
||||||
|
|
||||||
public auth2: any;
|
public auth2: any;
|
||||||
private returnUrl: string;
|
private returnUrl: string;
|
||||||
//public cofigurableProviders: ConfigurableProvider[];
|
//public cofigurableProviders: ConfigurableProvider[];
|
||||||
|
|
|
@ -31,6 +31,9 @@ import { ZenodoLoginComponent } from './zenodo-login/zenodo-login.component';
|
||||||
ConfigurableLoginComponent,
|
ConfigurableLoginComponent,
|
||||||
ZenodoLoginComponent
|
ZenodoLoginComponent
|
||||||
],
|
],
|
||||||
|
exports: [
|
||||||
|
LoginComponent
|
||||||
|
],
|
||||||
providers: [LoginService, ConfigurableProvidersService]
|
providers: [LoginService, ConfigurableProvidersService]
|
||||||
})
|
})
|
||||||
export class LoginModule { }
|
export class LoginModule { }
|
||||||
|
|
|
@ -3,9 +3,8 @@
|
||||||
<h1 mat-dialog-title class="title">{{'USER-PROFILE.ACTIONS.ADD-NEW-ACCOUNT' | translate}}</h1>
|
<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>
|
<span class="ml-auto align-self-center" (click)="closeDialog()"><mat-icon class="close-icon">close</mat-icon></span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="row m-0">
|
<app-login [mergeUsers]="true"></app-login>
|
||||||
</div> -->
|
<!-- <div mat-dialog-content class="definition-content pt-2">
|
||||||
<div mat-dialog-content class="definition-content pt-2">
|
|
||||||
<mat-form-field class="full-width">
|
<mat-form-field class="full-width">
|
||||||
<input matInput placeholder="{{'USER-PROFILE.SETTINGS.YOUR-EMAIL' | translate}}">
|
<input matInput placeholder="{{'USER-PROFILE.SETTINGS.YOUR-EMAIL' | translate}}">
|
||||||
</mat-form-field>
|
</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="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>
|
<button mat-raised-button type="button" class="add-btn ml-4" (click)="add()">{{'USER-PROFILE.ACTIONS.ADD' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -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 { }
|
|
@ -255,7 +255,7 @@ export class UserProfileComponent extends BaseComponent implements OnInit, OnDes
|
||||||
const dialogRef = this.dialog.open(AddAccountDialogComponent, {
|
const dialogRef = this.dialog.open(AddAccountDialogComponent, {
|
||||||
restoreFocus: false,
|
restoreFocus: false,
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
width: '603px',
|
width: '653px',
|
||||||
data: {
|
data: {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,7 +3,10 @@ import { FormattingModule } from '@app/core/formatting.module';
|
||||||
import { AutoCompleteModule } from '@app/library/auto-complete/auto-complete.module';
|
import { AutoCompleteModule } from '@app/library/auto-complete/auto-complete.module';
|
||||||
import { CommonFormsModule } from '@common/forms/common-forms.module';
|
import { CommonFormsModule } from '@common/forms/common-forms.module';
|
||||||
import { CommonUiModule } from '@common/ui/common-ui.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 { AddAccountDialogComponent } from './add-account/add-account-dialog.component';
|
||||||
|
import { AddAccountDialogModule } from './add-account/add-account-dialog.module';
|
||||||
import { UserProfileComponent } from './user-profile.component';
|
import { UserProfileComponent } from './user-profile.component';
|
||||||
import { UserProfileRoutingModule } from './user-profile.routing';
|
import { UserProfileRoutingModule } from './user-profile.routing';
|
||||||
|
|
||||||
|
@ -13,11 +16,11 @@ import { UserProfileRoutingModule } from './user-profile.routing';
|
||||||
CommonFormsModule,
|
CommonFormsModule,
|
||||||
FormattingModule,
|
FormattingModule,
|
||||||
UserProfileRoutingModule,
|
UserProfileRoutingModule,
|
||||||
AutoCompleteModule
|
AutoCompleteModule,
|
||||||
|
AddAccountDialogModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
UserProfileComponent,
|
UserProfileComponent
|
||||||
AddAccountDialogComponent
|
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
AddAccountDialogComponent
|
AddAccountDialogComponent
|
||||||
|
|
Loading…
Reference in New Issue