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

View File

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

View File

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

View File

@ -74,15 +74,39 @@
></div>
<input type="file" #fileInput style="display: none" multiple />
<mat-list>
<mat-list-item *ngFor="let oldAttachment of oldAttachmentList">
{{ oldAttachment.resContent }}
<button
mat-button
aria-label="이미지삭제"
(click)="onClickDeleteOldAttachment(oldAttachment)"
>
<span class="mdi mdi-delete"></span>
</button>
<mat-list-item
*ngFor="let oldAttachment of oldAttachmentList"
class="attach-file"
>
<div class="file-name">
<span class="mdi mdi-attachment mdi-18px"> </span
>{{ oldAttachment.resContent }}
<button
mat-button
aria-label="기존파일삭제"
(click)="onClickDeleteOldAttachment(oldAttachment)"
>
<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>
</div>
</mat-list-item>
<mat-list-item
*ngFor="let attachment of attachmentList"
@ -91,8 +115,11 @@
<div class="file-name">
<span class="mdi mdi-attachment mdi-18px"> </span
>{{ attachment.name }}
<button mat-button aria-label="파일삭제">
<!--<span class="mdi mdi-delete"></span>-->
<button
mat-button
aria-label="파일삭제"
(click)="onClickDelelteAttachment(attachment)"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"

View File

@ -153,6 +153,11 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
detailContent => detailContent.resSeq !== oldAttachment.resSeq
);
}
onClickDelelteAttachment(attachment: File) {
this.attachmentList = this.attachmentList.filter(
attFile => attFile !== attachment
);
}
onClickImage() {
this.fileInput.nativeElement.setAttribute('accept', 'image/*');
@ -557,6 +562,40 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
selection.empty();
}
range.insertNode(node);
const inEditor = this.inEditor(selection.anchorNode);
if (inEditor) {
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);
}
}
}