로그인 페이지 추가
This commit is contained in:
parent
faadc61d9f
commit
be11bf969d
|
@ -6,6 +6,7 @@ import { NoticeComposeComponent } from './notice-compose.component';
|
||||||
import { WithdrawComposeComponent } from './withdraw-compose.component';
|
import { WithdrawComposeComponent } from './withdraw-compose.component';
|
||||||
import { WithdrawHistoryComposeComponent } from './withdraw-history-compose.component';
|
import { WithdrawHistoryComposeComponent } from './withdraw-history-compose.component';
|
||||||
import { SignUpComposeComponent } from './sign-up-compose.component';
|
import { SignUpComposeComponent } from './sign-up-compose.component';
|
||||||
|
import { SignInComposeComponent } from './sign-in-compose.component';
|
||||||
export const COMPOSE = [
|
export const COMPOSE = [
|
||||||
DepositComposeComponent,
|
DepositComposeComponent,
|
||||||
WithdrawComposeComponent,
|
WithdrawComposeComponent,
|
||||||
|
@ -15,4 +16,5 @@ export const COMPOSE = [
|
||||||
WithdrawHistoryComposeComponent,
|
WithdrawHistoryComposeComponent,
|
||||||
NoticeComposeComponent,
|
NoticeComposeComponent,
|
||||||
SignUpComposeComponent,
|
SignUpComposeComponent,
|
||||||
|
SignInComposeComponent,
|
||||||
];
|
];
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
<div class="flex flex-col max-w-240 md:min-w-160 max-h-screen -m-6">
|
||||||
|
<!-- Header -->
|
||||||
|
<div
|
||||||
|
class="flex flex-0 items-center justify-between h-16 pr-3 sm:pr-5 pl-6 sm:pl-8 bg-primary text-on-primary"
|
||||||
|
>
|
||||||
|
<div class="text-lg font-medium">로그인</div>
|
||||||
|
<button mat-icon-button (click)="saveAndClose()" [tabIndex]="-1">
|
||||||
|
<mat-icon
|
||||||
|
class="text-current"
|
||||||
|
[svgIcon]="'heroicons_outline:x'"
|
||||||
|
></mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Compose form -->
|
||||||
|
<form
|
||||||
|
class="flex flex-col flex-auto p-6 sm:p-8 overflow-y-auto"
|
||||||
|
[formGroup]="composeForm"
|
||||||
|
>
|
||||||
|
<!-- 아이디 -->
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-label>아이디</mat-label>
|
||||||
|
<input matInput [formControlName]="'username'" />
|
||||||
|
<div class="copy-fields-toggles" matSuffix></div>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!-- 비밀번호 -->
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-label>비밀번호</mat-label>
|
||||||
|
<input matInput [formControlName]="'password'" />
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!-- Actions -->
|
||||||
|
<div
|
||||||
|
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
|
||||||
|
style="align-items: center"
|
||||||
|
>
|
||||||
|
<div class="flex items-center mt-4 sm:mt-0">
|
||||||
|
<!-- Discard -->
|
||||||
|
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
|
||||||
|
취소
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Send -->
|
||||||
|
<button
|
||||||
|
class="order-first sm:order-last"
|
||||||
|
mat-flat-button
|
||||||
|
[color]="'primary'"
|
||||||
|
(click)="send()"
|
||||||
|
>
|
||||||
|
로그인
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
|
@ -0,0 +1,91 @@
|
||||||
|
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
|
import { MatDialogRef } from '@angular/material/dialog';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'sign-in-compose',
|
||||||
|
templateUrl: './sign-in-compose.component.html',
|
||||||
|
encapsulation: ViewEncapsulation.None,
|
||||||
|
})
|
||||||
|
export class SignInComposeComponent implements OnInit {
|
||||||
|
composeForm!: FormGroup;
|
||||||
|
copyFields: { cc: boolean; bcc: boolean } = {
|
||||||
|
cc: false,
|
||||||
|
bcc: false,
|
||||||
|
};
|
||||||
|
quillModules: any = {
|
||||||
|
toolbar: [
|
||||||
|
['bold', 'italic', 'underline'],
|
||||||
|
[{ align: [] }, { list: 'ordered' }, { list: 'bullet' }],
|
||||||
|
['clean'],
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
constructor(
|
||||||
|
public matDialogRef: MatDialogRef<SignInComposeComponent>,
|
||||||
|
private _formBuilder: FormBuilder
|
||||||
|
) {}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
// @ Lifecycle hooks
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On init
|
||||||
|
*/
|
||||||
|
ngOnInit(): void {
|
||||||
|
// Create the form
|
||||||
|
this.composeForm = this._formBuilder.group({
|
||||||
|
username: ['', [Validators.required, Validators.email]],
|
||||||
|
password: ['', [Validators.email]],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
// @ Public methods
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the copy field with the given field name
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
*/
|
||||||
|
showCopyField(name: string): void {
|
||||||
|
// Return if the name is not one of the available names
|
||||||
|
if (name !== 'cc' && name !== 'bcc') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show the field
|
||||||
|
this.copyFields[name] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save and close
|
||||||
|
*/
|
||||||
|
saveAndClose(): void {
|
||||||
|
// Save the message as a draft
|
||||||
|
this.saveAsDraft();
|
||||||
|
|
||||||
|
// Close the dialog
|
||||||
|
this.matDialogRef.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Discard the message
|
||||||
|
*/
|
||||||
|
discard(): void {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save the message as a draft
|
||||||
|
*/
|
||||||
|
saveAsDraft(): void {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send the message
|
||||||
|
*/
|
||||||
|
send(): void {}
|
||||||
|
}
|
|
@ -79,23 +79,12 @@
|
||||||
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
|
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
|
||||||
<!-- Search -->
|
<!-- Search -->
|
||||||
|
|
||||||
<!-- Add product button -->
|
<button
|
||||||
|
|
||||||
<input
|
|
||||||
class="ml-4"
|
class="ml-4"
|
||||||
type="text"
|
mat-flat-button
|
||||||
placeholder="아이디"
|
[color]="'primary'"
|
||||||
name="IU_ID"
|
(click)="__onClickCompose(composeMenuType.signin)"
|
||||||
id="IU_ID"
|
>
|
||||||
/>
|
|
||||||
<input
|
|
||||||
class="ml-4"
|
|
||||||
type="text"
|
|
||||||
placeholder="패스워드"
|
|
||||||
name="IU_ID"
|
|
||||||
id="IU_ID"
|
|
||||||
/>
|
|
||||||
<button class="ml-4" mat-flat-button [color]="'primary'">
|
|
||||||
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
|
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
|
||||||
<span class="ml-2 mr-1">로그인</span>
|
<span class="ml-2 mr-1">로그인</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -5,11 +5,13 @@ import { CustomerComposeComponent } from './compose/customer-compose.component';
|
||||||
import { DepositComposeComponent } from './compose/deposit-compose.component';
|
import { DepositComposeComponent } from './compose/deposit-compose.component';
|
||||||
import { DepositHistoryComposeComponent } from './compose/deposit-history-compose.component';
|
import { DepositHistoryComposeComponent } from './compose/deposit-history-compose.component';
|
||||||
import { NoticeComposeComponent } from './compose/notice-compose.component';
|
import { NoticeComposeComponent } from './compose/notice-compose.component';
|
||||||
|
import { SignInComposeComponent } from './compose/sign-in-compose.component';
|
||||||
import { SignUpComposeComponent } from './compose/sign-up-compose.component';
|
import { SignUpComposeComponent } from './compose/sign-up-compose.component';
|
||||||
import { WithdrawComposeComponent } from './compose/withdraw-compose.component';
|
import { WithdrawComposeComponent } from './compose/withdraw-compose.component';
|
||||||
import { WithdrawHistoryComposeComponent } from './compose/withdraw-history-compose.component';
|
import { WithdrawHistoryComposeComponent } from './compose/withdraw-history-compose.component';
|
||||||
|
|
||||||
export enum ComposeMenuType {
|
export enum ComposeMenuType {
|
||||||
|
signin = 'signin',
|
||||||
signup = 'Signup',
|
signup = 'Signup',
|
||||||
deposit = 'Deposit',
|
deposit = 'Deposit',
|
||||||
withdraw = 'Withdraw',
|
withdraw = 'Withdraw',
|
||||||
|
@ -207,6 +209,9 @@ export class MainComponent {
|
||||||
let selectType: any;
|
let selectType: any;
|
||||||
|
|
||||||
switch (composeMenuType) {
|
switch (composeMenuType) {
|
||||||
|
case ComposeMenuType.signin:
|
||||||
|
selectType = SignInComposeComponent;
|
||||||
|
break;
|
||||||
case ComposeMenuType.signup:
|
case ComposeMenuType.signup:
|
||||||
selectType = SignUpComposeComponent;
|
selectType = SignUpComposeComponent;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user