diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-nav.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-nav.component.html index 64533d1d..c9804d4e 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-nav.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-nav.component.html @@ -2,6 +2,7 @@ diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html index 3ce5b2dc..11e8ab7d 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html @@ -182,7 +182,11 @@ (fileDragLeave)="onFileDragLeave()" > - diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts index 6a21f310..c984696c 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts @@ -691,7 +691,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { req: { roomSeq: this.roomInfoSubject.value.roomSeq, eventType: EventType.Character, - sentMessage: StringUtil.escapeHtml(message) + sentMessage: message } }) ); @@ -726,7 +726,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { const stickerJson: StickerEventJson = { name: '스티커', file: this.selectedSticker.index, - chat: !!message ? StringUtil.escapeHtml(message.trim()) : '' + chat: !!message ? message.trim() : '' }; this.store.dispatch( EventStore.send({ @@ -751,7 +751,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { roomSeq: this.roomInfoSubject.value.roomSeq, eventType: EventType.MassText, // sentMessage: message.replace(/\n/gi, '\r\n') - sentMessage: StringUtil.escapeHtml(message) + sentMessage: message } }) ); @@ -759,7 +759,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { /** Send Translation message */ sendMessageOfTranslate(message: string) { const destLocale = this.destLocale; - const original = StringUtil.escapeHtml(message); + const original = message; const roomSeq = this.roomInfoSubject.value.roomSeq; if (!!this.isTranslationProcess) { @@ -2007,4 +2007,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { } }); } + + onClickScrollToBottom() { + this.chatMessages.initEventMore(); + this.chatMessages.scrollToBottom(); + } } diff --git a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html index 556c2ebc..c6cd92c3 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html +++ b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html @@ -15,6 +15,12 @@ >
+ diff --git a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.scss b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.scss index a3048266..5c836fac 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.scss +++ b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.scss @@ -16,10 +16,26 @@ flex: 1 1 auto; min-width: 320px; height: 100%; + .chat-messages { width: 100%; height: 100%; font-size: 1em; + + .messenger-statusbar-container { + width: 100%; + height: 25px; + background-color: silver; + text-align: center; + + .messenger-statusbar-message { + width: calc(100% - 20px); + height: 100%; + } + + .messenger-statusbar-actions { + } + } } .rightDrawer { width: 320px; diff --git a/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss b/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss index a6202655..c6e3ffd7 100644 --- a/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss +++ b/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss @@ -391,6 +391,14 @@ $daesang-grey: ( background-color: transparent; } + app-page-messenger-main mat-drawer-content { + overflow: hidden !important; + } + + .mat-tab-labels .cdk-focused { + background-color: transparent !important; + } + .messages .container { background: mat-color($accent, 50); } @@ -455,12 +463,12 @@ $daesang-grey: ( background-color: mat-color($accent, 500); } } - .chatroom-search{ - .search-form{ + .chatroom-search { + .search-form { border: 2px solid mat-color($accent, B100); } - .btns{ - background-color: mat-color($accent, B100); + .btns { + background-color: mat-color($accent, B100); } } } diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box.component.scss b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box.component.scss index 6d18bba3..0302135b 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box.component.scss +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box.component.scss @@ -165,11 +165,16 @@ $tablet-s-width: 768px; } } } -.bubble-main { +::ng-deep .bubble-main { word-wrap: break-word; white-space: pre-wrap; word-break: break-word; + a { + color: #0367a6; + text-decoration: underline; + } } + ::ng-deep .view-previous { display: flex; flex-flow: column; diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass-translation.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass-translation.component.html index d25ddda8..cc9cea67 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass-translation.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass-translation.component.html @@ -2,7 +2,7 @@
{{ message.sentMessageJson.destLocale }} - + +
    diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass.component.html index da08adee..5422db79 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass.component.html @@ -1,5 +1,8 @@
    - + {{ message.sendDate | ucapDate: 'YYYY.MM.DD a hh:mm' }} diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/sticker.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/sticker.component.html index 2ba11f34..4add2d59 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/sticker.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/sticker.component.html @@ -6,6 +6,9 @@ onerror="this.src='assets/sticker/sticker_default.png'" /> -
  • +
diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/text.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/text.component.html index 3c2db106..84da2c7e 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/text.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/text.component.html @@ -1,3 +1,3 @@
- +
diff --git a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html index c890fc26..d4d95963 100644 --- a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html +++ b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html @@ -69,7 +69,10 @@
-
+
diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html index b79d0e73..103c7341 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html @@ -171,14 +171,7 @@ *ngIf="fileDownloadUrl" [src]="fileDownloadUrl" [style.width]="'auto'" - [style.height]=" - naturalHeight > imageContainer.clientHeight - ? ((imageContainer.clientHeight - 20) / naturalHeight) * - (zoomRatio / 100) * - naturalHeight + - 'px' - : naturalHeight + 'px' - " + [style.height]="getImageHeight(imageContainer.clientHeight)" (load)="onLoadFileDownloadUrl(downloadImage)" />
diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.ts index be3ab5ce..d07e25cc 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.ts +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.ts @@ -82,4 +82,14 @@ export class ImageViewerComponent implements OnInit { this.changeDetectorRef.detectChanges(); } + + getImageHeight(containerHeight: number): string { + const realContainerHeight = containerHeight - 20; + const oriHeight = + this.naturalHeight > realContainerHeight + ? realContainerHeight + : this.naturalHeight; + + return oriHeight * (this.zoomRatio / 100) + 'px'; + } } diff --git a/projects/ucap-webmessenger-ui/src/lib/pipes/safe-html.pipe.ts b/projects/ucap-webmessenger-ui/src/lib/pipes/safe-html.pipe.ts index 40237093..4e3d55cc 100644 --- a/projects/ucap-webmessenger-ui/src/lib/pipes/safe-html.pipe.ts +++ b/projects/ucap-webmessenger-ui/src/lib/pipes/safe-html.pipe.ts @@ -1,11 +1,15 @@ import { Pipe, PipeTransform } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; +import { StringUtil } from '../utils/string.util'; @Pipe({ name: 'ucapSafeHtml' }) export class SafeHtmlPipe implements PipeTransform { constructor(private domSanitizer: DomSanitizer) {} public transform(value: string) { - return this.domSanitizer.bypassSecurityTrustHtml(value); + // return this.domSanitizer.bypassSecurityTrustHtml( + // StringUtil.escapeHtml(value) + // ); + return StringUtil.escapeHtml(value); } } diff --git a/projects/ucap-webmessenger-ui/src/lib/services/status-bar.service.ts b/projects/ucap-webmessenger-ui/src/lib/services/status-bar.service.ts new file mode 100644 index 00000000..7a80eec7 --- /dev/null +++ b/projects/ucap-webmessenger-ui/src/lib/services/status-bar.service.ts @@ -0,0 +1,10 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class StatusBarService { + public constructor() {} + + open() {} +}