This commit is contained in:
Richard Park 2020-01-20 17:26:42 +09:00
commit 49cc27c257
5 changed files with 89 additions and 16 deletions

View File

@ -91,12 +91,12 @@
<span <span
*ngIf="messageInfo.type === MessageType.Receive" *ngIf="messageInfo.type === MessageType.Receive"
class="people label bg-accent-color" class="people label bg-accent-color"
>발신자</span >{{ 'message.sender' | translate }}</span
> >
<span <span
*ngIf="messageInfo.type !== MessageType.Receive" *ngIf="messageInfo.type !== MessageType.Receive"
class="people label bg-accent-color bg-warn-color" class="people label bg-accent-color bg-warn-color"
>수신자</span >{{ 'message.receiver' | translate }}</span
> >
<span class="name">{{ getSendReceiverNames() }}</span> <span class="name">{{ getSendReceiverNames() }}</span>
</div> </div>

View File

@ -107,7 +107,7 @@
margin-right: 10px; margin-right: 10px;
color: #ffffff; color: #ffffff;
line-height: 20px; line-height: 20px;
width: 100px; width: 120px;
justify-content: center; justify-content: center;
} }
.name { .name {
@ -126,7 +126,7 @@
margin-right: 10px; margin-right: 10px;
color: #ffffff; color: #ffffff;
line-height: 20px; line-height: 20px;
width: 100px; width: 120px;
text-align: center; text-align: center;
} }
} }

View File

@ -166,6 +166,8 @@ export class LoginPageComponent implements OnInit, OnDestroy {
}); });
this.timeChecker = setInterval(() => this.getCheckTime(), 1000); this.timeChecker = setInterval(() => this.getCheckTime(), 1000);
} else {
this.loginBtnEnable = true;
} }
return; return;
} else { } else {
@ -267,6 +269,11 @@ export class LoginPageComponent implements OnInit, OnDestroy {
autoLogin: boolean; autoLogin: boolean;
notValid: () => void; notValid: () => void;
}) { }) {
this.loginBtnEnable = false;
setTimeout(() => {
this.loginBtnEnable = true;
}, 30 * 1000);
this.store.dispatch( this.store.dispatch(
AuthenticationStore.webLogin({ AuthenticationStore.webLogin({
loginInfo: { loginInfo: {

View File

@ -74,15 +74,39 @@
></div> ></div>
<input type="file" #fileInput style="display: none" multiple /> <input type="file" #fileInput style="display: none" multiple />
<mat-list> <mat-list>
<mat-list-item *ngFor="let oldAttachment of oldAttachmentList"> <mat-list-item
{{ oldAttachment.resContent }} *ngFor="let oldAttachment of oldAttachmentList"
class="attach-file"
>
<div class="file-name">
<span class="mdi mdi-attachment mdi-18px"> </span
>{{ oldAttachment.resContent }}
<button <button
mat-button mat-button
aria-label="이미지삭제" aria-label="기존파일삭제"
(click)="onClickDeleteOldAttachment(oldAttachment)" (click)="onClickDeleteOldAttachment(oldAttachment)"
> >
<span class="mdi mdi-delete"></span> <svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-trash-2"
>
<polyline points="3 6 5 6 21 6"></polyline>
<path
d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
></path>
<line x1="10" y1="11" x2="10" y2="17"></line>
<line x1="14" y1="11" x2="14" y2="17"></line>
</svg>
</button> </button>
</div>
</mat-list-item> </mat-list-item>
<mat-list-item <mat-list-item
*ngFor="let attachment of attachmentList" *ngFor="let attachment of attachmentList"
@ -91,8 +115,11 @@
<div class="file-name"> <div class="file-name">
<span class="mdi mdi-attachment mdi-18px"> </span <span class="mdi mdi-attachment mdi-18px"> </span
>{{ attachment.name }} >{{ attachment.name }}
<button mat-button aria-label="파일삭제"> <button
<!--<span class="mdi mdi-delete"></span>--> mat-button
aria-label="파일삭제"
(click)="onClickDelelteAttachment(attachment)"
>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
width="16" width="16"

View File

@ -153,6 +153,11 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
detailContent => detailContent.resSeq !== oldAttachment.resSeq detailContent => detailContent.resSeq !== oldAttachment.resSeq
); );
} }
onClickDelelteAttachment(attachment: File) {
this.attachmentList = this.attachmentList.filter(
attFile => attFile !== attachment
);
}
onClickImage() { onClickImage() {
this.fileInput.nativeElement.setAttribute('accept', 'image/*'); this.fileInput.nativeElement.setAttribute('accept', 'image/*');
@ -557,6 +562,40 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
selection.empty(); selection.empty();
} }
const inEditor = this.inEditor(selection.anchorNode);
if (inEditor) {
range.insertNode(node); range.insertNode(node);
} else {
this.editor.nativeElement.appendChild(node);
}
}
private inEditor(el) {
if (!!el.classList) {
let root = false;
(el.classList as DOMTokenList).forEach(className => {
if (className === 'ucap-message-write') {
root = true;
}
});
if (!!root) {
return false;
}
}
if (el.tagName === 'BODY') {
return false;
}
if (
!!el.className &&
el.className === 'ucap-message-write-editor' &&
el.getAttribute('contenteditable')
) {
return true;
} else {
return this.inEditor(el.parentNode);
}
} }
} }