This commit is contained in:
richard-loafle 2020-02-12 13:34:57 +09:00
commit 45046d57f3
8 changed files with 106 additions and 28 deletions

View File

@ -1,4 +1,4 @@
@charset 'utf-s';
@charset 'utf-8';
:host {
display: flex;
width: 100%;

View File

@ -143,6 +143,7 @@
},
"presence": {
"settingOfAwayTime": "Setting of away time",
"offline": "Offline",
"online": "Online",
"away": "Away",
"statusMessage1": "Busy",

View File

@ -143,6 +143,7 @@
},
"presence": {
"settingOfAwayTime": "부재 중 시간 설정",
"offline": "오프라인",
"online": "온라인",
"away": "부재중",
"statusMessage1": "다른용무중",

View File

@ -45,7 +45,7 @@
</li>
</ul>
<div class="btn-box">
<!-- <div class="btn-box">
<ul>
<li>
<button mat-button (click)="onClickDetailView()">
@ -58,5 +58,5 @@
</button>
</li>
</ul>
</div>
</div> -->
</div>

View File

@ -185,10 +185,17 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
img.setAttribute('style', 'max-height:250px; max-width:250px;');
img[ATTR_FILE] = file;
self.insertNode(img);
const empty = document.createElement('div');
empty.innerHTML = '&nbsp;<br/>';
self.insertNode(empty, true);
}
self.fileInput.nativeElement.value = '';
this.fileInput.nativeElement.onchange = undefined;
self.fileInput.nativeElement.onchange = undefined;
self.checkContentLength();
self.changeDetectorRef.detectChanges();
};
}
@ -564,23 +571,27 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
private insertNode(node: Node, removeSelected: boolean = false) {
const selection: Selection = document.getSelection();
const range: Range = selection.getRangeAt(0);
let inEditor = false;
if (removeSelected) {
// onPaste
selection.empty();
inEditor = true;
} else {
inEditor = this.inEditor(selection.anchorNode);
}
if (!!selection && !!selection.anchorNode) {
const range: Range = selection.getRangeAt(0);
if (inEditor) {
range.insertNode(node);
let inEditor = false;
if (removeSelected) {
// onPaste
selection.empty();
inEditor = true;
} else {
inEditor = this.inEditor(selection.anchorNode);
}
if (inEditor) {
range.insertNode(node);
} else {
this.editor.nativeElement.appendChild(node);
}
} else {
this.editor.nativeElement.appendChild(node);
}
selection.empty();
}
private inEditor(el) {

View File

@ -20,6 +20,7 @@ import {
import { NGXLogger } from 'ngx-logger';
import { StatusCode, PresenceType } from '@ucap-webmessenger/core';
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'ucap-profile-user-list-item',
@ -60,7 +61,10 @@ export class UserListItemComponent implements OnInit {
PresenceType = PresenceType;
constructor(private logger: NGXLogger) {}
constructor(
private logger: NGXLogger,
private translateService: TranslateService
) {}
ngOnInit() {
this.profileImageRoot =
@ -97,15 +101,32 @@ export class UserListItemComponent implements OnInit {
return rtnClass;
}
getPresenceMsg(): string {
if (
!!this.presence &&
!!this.presence.statusMessage &&
this.presence.statusMessage !== '.'
) {
return this.presence.statusMessage;
} else {
return '';
let presenceMsg = this.translateService.instant('presence.offline');
if (!!this.presence) {
switch (this.presence.pcStatus) {
case StatusCode.OnLine:
presenceMsg = this.translateService.instant('presence.online');
break;
case StatusCode.Away:
presenceMsg = this.translateService.instant('presence.away');
break;
case StatusCode.Busy:
if (
!!this.presence.statusMessage &&
this.presence.statusMessage !== '.'
) {
presenceMsg = this.presence.statusMessage;
} else {
presenceMsg = this.translateService.instant(
'presence.statusMessage1'
);
}
break;
}
}
return presenceMsg;
}
/** 리스트가 checkable 할 경우 checkbox 의 change 이벤트를 상위 컴포넌트로 전달한다. */

View File

@ -49,6 +49,22 @@
position: absolute;
max-width: none !important;
}
&::-webkit-scrollbar {
background-color: rgba(0, 0, 0, 0.7);
}
&::-webkit-scrollbar-corner {
background-color: rgba(0, 0, 0, 0.7);
}
&::-webkit-scrollbar:hover {
background-color: rgba(255, 255, 255, 0.12);
}
&::-webkit-scrollbar-thumb {
box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.37);
}
&::-webkit-scrollbar-thumb:active {
box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.54);
}
}
}
}

View File

@ -6,7 +6,9 @@ import {
TranslationEventJson,
MassTranslationEventJson,
PlanEventJson,
PlanContentType
PlanContentType,
VideoConferenceEventJson,
VideoConferenceContentsType
} from '@ucap-webmessenger/protocol-event';
import { FileType } from '@ucap-webmessenger/protocol-file';
@ -191,7 +193,24 @@ export class StringUtil {
break;
case EventType.VideoConference:
{
eventMessage = '화상회의';
const m = finalEventMessage as VideoConferenceEventJson;
switch (m.contents) {
case VideoConferenceContentsType.Now:
eventMessage = '화상회의가 개설되었습니다.';
break;
case VideoConferenceContentsType.New:
eventMessage = '화상회의가 등록되었습니다.';
break;
case VideoConferenceContentsType.Update:
eventMessage = '화상회의가 수정되었습니다.';
break;
case VideoConferenceContentsType.Delete:
eventMessage = '화상회의가 취소되었습니다.';
break;
default:
eventMessage = '화상회의';
break;
}
}
break;
case EventType.MassText:
@ -235,10 +254,19 @@ export class StringUtil {
{
const m = finalEventMessage as string;
eventMessage = `${m}님이 대화내용을 캡쳐하였습니다.`;
break;
}
break;
case EventType.AllimElephant: // [daesang] 알림
{
eventMessage = '코끼리 알림';
}
break;
case EventType.AllimTms: // [daesang] 알림
{
eventMessage = 'TMS 알림';
}
break;
default:
{
const m = finalEventMessage as string;