diff --git a/package.json b/package.json index e11311a4..5262793f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ucap-webmessenger", - "version": "0.0.9", + "version": "0.0.10", "author": { "name": "LG CNS", "email": "lgucap@lgcns.com" diff --git a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.html b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.html index 00d49b63..59d313b6 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.html @@ -4,13 +4,12 @@
DS Talk
+ + +
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 904d7583..a3048266 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 @@ -61,7 +61,5 @@ display: flex; justify-content: center; justify-items: center; - .mat-icon { - font-size: 18px; - } + font-size: 1.8em; } 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 dc8fdda2..d0265ade 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 @@ -15,7 +15,6 @@ $tablet-s-width: 768px; .message-row { width: 100%; height: 100%; - margin-bottom: 20px; .date-splitter { display: block; width: 100%; @@ -26,6 +25,7 @@ $tablet-s-width: 768px; display: flex; flex-direction: row; margin-left: 0; + padding-bottom: 20px; .profile-img { flex: 0 0 auto; &.thumbnail-mask { diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html index c718c1c0..6a5fe2c7 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html @@ -4,7 +4,8 @@ perfectScrollbar fxFlexFill #psChatContent - [bufferAmount]="10" + [bufferAmount]="5" + [compareItems]="" (psScrollUp)="onScrollup($event)" (psYReachStart)="onYReachStart($event)" (psYReachEnd)="onYReachEnd($event)" diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts index 9e391fbe..6f41fe00 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts @@ -412,12 +412,12 @@ export class MessagesComponent implements OnInit, OnDestroy { } preSwapScroll(useHide: boolean, useSwap: boolean) { - if (useSwap && !this.swapped) { - this.chatMessagesBuffer.nativeElement.innerHTML = this.chatMessagesContainer.nativeElement.innerHTML; - this.chatMessagesBuffer.nativeElement.scrollTop = this.chatMessagesContainer.nativeElement.scrollTop; - this.chatMessagesBuffer.nativeElement.classList.remove('disappear'); - this.swapped = true; - } + // if (useSwap && !this.swapped) { + // this.chatMessagesBuffer.nativeElement.innerHTML = this.chatMessagesContainer.nativeElement.innerHTML; + // this.chatMessagesBuffer.nativeElement.scrollTop = this.chatMessagesContainer.nativeElement.scrollTop; + // this.chatMessagesBuffer.nativeElement.classList.remove('disappear'); + // this.swapped = true; + // } if (useHide && !this.hidden) { this.chatMessagesContainer.nativeElement.classList.add('hide'); @@ -426,12 +426,12 @@ export class MessagesComponent implements OnInit, OnDestroy { } postSwapScroll(useHide: boolean, useSwap: boolean) { - if (useSwap && this.swapped) { - this.chatMessagesBuffer.nativeElement.innerHTML = ''; - this.chatMessagesBuffer.nativeElement.scrollTop = 0; - this.chatMessagesBuffer.nativeElement.classList.add('disappear'); - this.swapped = false; - } + // if (useSwap && this.swapped) { + // this.chatMessagesBuffer.nativeElement.innerHTML = ''; + // this.chatMessagesBuffer.nativeElement.scrollTop = 0; + // this.chatMessagesBuffer.nativeElement.classList.add('disappear'); + // this.swapped = false; + // } if (useHide && this.hidden) { this.chatMessagesContainer.nativeElement.classList.remove('hide'); @@ -536,7 +536,7 @@ export class MessagesComponent implements OnInit, OnDestroy { if (this.scrollUpInitalized && this.eventRemained) { this.storeScrollPosition(); - this.preSwapScroll(true, true); + this.preSwapScroll(false, false); this.moreEvent.emit(this.eventList[0].seq); @@ -607,4 +607,10 @@ export class MessagesComponent implements OnInit, OnDestroy { trackByEvent(index: number, info: Info): number { return info.seq; } + + compareItemsFunc = ( + item1: Info, + item2: Info + // tslint:disable-next-line: semicolon + ): boolean => item1.seq === item2.seq; } diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.html index 2994f6fe..c663dced 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.html @@ -1,7 +1,9 @@ diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.scss b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.scss index 95bf77b0..64080f7f 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.scss +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.scss @@ -39,11 +39,15 @@ height: calc(100% - 60px); .ucap-image-viewer-image-wrapper { + position: relative; + width: 100%; height: 100%; - padding: 20px; background-color: rgba(0, 0, 0, 0.7); + overflow: auto; + img { - height: inherit; + position: absolute; + max-width: none !important; } } } 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 7a0a24d8..2ab1e41c 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 @@ -1,4 +1,12 @@ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { + Component, + OnInit, + Input, + Output, + EventEmitter, + ElementRef, + ViewChild +} from '@angular/core'; import { ucapAnimations } from '../../animations'; import { FileEventJson } from '@ucap-webmessenger/protocol-event'; import { FileDownloadItem } from '@ucap-webmessenger/api'; @@ -24,9 +32,17 @@ export class ImageViewerComponent implements OnInit { fileDownloadItem: FileDownloadItem; + naturalWidth = 0; + naturalHeight = 0; + + zoomRatio = 100; + constructor() {} - ngOnInit() {} + ngOnInit() { + this.naturalWidth = this.fileInfo.imageWidth; + this.naturalHeight = this.fileInfo.imageHeight; + } onClickDownload(): void { this.fileDownloadItem = new FileDownloadItem(); @@ -36,4 +52,26 @@ export class ImageViewerComponent implements OnInit { onClickClose(): void { this.closed.emit(); } + + onLoadFileDownloadUrl(img: HTMLImageElement) { + console.log('onLoadFileDownloadUrl', img.naturalWidth, img.naturalHeight); + this.naturalWidth = img.naturalWidth; + this.naturalHeight = img.naturalHeight; + } + + onClickZoomOut() { + if (60 >= this.zoomRatio) { + return; + } + this.zoomRatio -= 10; + } + onClickZoomIn() { + if (180 <= this.zoomRatio) { + return; + } + this.zoomRatio += 10; + } + onClickZoomReset() { + this.zoomRatio = 100; + } } diff --git a/projects/ucap-webmessenger-ui/src/lib/components/integrated-search-form.component.html b/projects/ucap-webmessenger-ui/src/lib/components/integrated-search-form.component.html index b53df281..f9b53d09 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/integrated-search-form.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/integrated-search-form.component.html @@ -1,5 +1,9 @@
- + + + + + - search
diff --git a/projects/ucap-webmessenger-ui/src/lib/components/integrated-search-form.component.scss b/projects/ucap-webmessenger-ui/src/lib/components/integrated-search-form.component.scss index c6e56cc9..533c3e03 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/integrated-search-form.component.scss +++ b/projects/ucap-webmessenger-ui/src/lib/components/integrated-search-form.component.scss @@ -1,3 +1,13 @@ .search-container { -webkit-app-region: no-drag; + display: flex; + flex-flow: row; + align-items: center; + width: 250px; + max-width: 250px; + color: #ffffff; + font-size: 0.9em; + .icon-img { + flex: 0 0 auto; + } } diff --git a/projects/ucap-webmessenger-ui/src/lib/components/integrated-search.component.html b/projects/ucap-webmessenger-ui/src/lib/components/integrated-search.component.html index 76ac5a28..69dc6911 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/integrated-search.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/integrated-search.component.html @@ -1,5 +1,6 @@ +
-
+
-
- {{ getPresence(element, PresenceType.PC) }} / - {{ getPresence(element, PresenceType.MOBILE) }} / - {{ getWorkstatus(element) }} / +
+ @@ -57,6 +56,22 @@
{{ element.name }}
+
+ {{ getPresence(element, PresenceType.PC) }} / + {{ getPresence(element, PresenceType.MOBILE) }} / + {{ getWorkstatus(element) }} +
+ +
+ + + + {{ 'search.fieldGrade' | translate }} + + +
+ {{ element.grade }} +
@@ -91,22 +106,7 @@
- - - {{ 'search.fieldGrade' | translate }} - - -
- {{ element.grade }} -
- -
+ = 2 { + display: -webkit-box; + -webkit-line-clamp: $row; + -webkit-box-orient: vertical; + word-wrap: break-word; + } +} + .search-scrollbar { height: 550px; } -// .search-container { -// -webkit-app-region: no-drag; -// } -// @mixin ellipsis($row) { -// overflow: hidden; -// text-overflow: ellipsis; -// @if $row == 1 { -// display: block; -// white-space: nowrap; -// word-wrap: normal; -// } @else if $row >= 2 { -// display: -webkit-box; -// -webkit-line-clamp: $row; -// -webkit-box-orient: vertical; -// word-wrap: break-word; -// line-height: 1.2em; -// } -// } +::ng-deep .search-area { + .search-container { + width: 100%; + max-width: 100%; + .icon-img { + color: #777777; + transform: translateY(-4px); + } + .mat-form-field { + color: #333333; + width: 100%; + margin-left: -20px; + .mat-form-field-infix { + padding-left: 26px; + } + &.mat-form-field-appearance-legacy.mat-form-field-can-float.mat-form-field-should-float + .mat-form-field-label, + .mat-form-field-appearance-legacy.mat-form-field-can-float + .mat-input-server:focus + + .mat-form-field-label-wrapper + .mat-form-field-label { + font-size: 0.7em; + transform: translateY(-1.28125em) scale(1); + } + } + } +} -// .rightDrawer-notice { -// width: 100%; -// height: calc(100% - 60px); +.table-box { + font-size: 13px; + width: 100%; + overflow: hidden; + td.mat-cell { + padding: 6px; + div { + @include ellipsis(1); + &.name { + font-size: 1em; + font-weight: 600; + } + &.status { + font-size: 0.84em; + } + } + } +} -// .table-box { -// height: calc(100% - 111.5px); -// overflow: auto; -// } -// } - -// .mat-table { -// width: 100%; -// position: relative; -// th.infos { -// padding: 10px; -// text-align: center; -// } -// tr.mat-row { -// height: 70px; -// .notice-info { -// padding: 16px; -// display: grid; -// height: 70px; -// .title { -// font-weight: 600; -// margin-bottom: 2px; -// width: 100%; -// @include ellipsis(2); -// display: flex; -// align-items: center; -// .important { -// color: red; -// margin-right: 6px; -// } -// } -// } -// .date { -// .date { -// font-size: 0.8em; -// text-align: right; -// } -// } -// } -// } - -// .mat-paginator-container { -// display: flex; -// flex-flow: column; -// } - -// .mat-row:hover { -// background: rgba(0, 0, 0, 0.04); -// cursor: pointer; -// } - -// .footer-fix { -// position: absolute; -// bottom: 0; -// flex-direction: column; -// box-sizing: border-box; -// display: flex; -// border-top: 1px solid #dddddd; -// .mat-paginator { -// .mat-paginator-container { -// justify-content: center; -// } -// } -// .btn-box { -// height: 50px; -// padding-bottom: 10px; -// width: 100%; -// background-color: #ffffff; -// button { -// margin: 5px; -// } -// } -// } - -// .mat-form-field-appearance-legacy { -// .mat-form-field-infix { -// padding: 6px; -// } -// } +.thumbnail { + &-mask { + width: 40px; + height: 40px; + border-radius: 50%; + overflow: hidden; + margin-right: 12px; + position: relative; + img { + width: 40px; + height: auto; + background-color: #efefef; + } + } +}