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 { :host {
display: flex; display: flex;
width: 100%; width: 100%;

View File

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

View File

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

View File

@ -45,7 +45,7 @@
</li> </li>
</ul> </ul>
<div class="btn-box"> <!-- <div class="btn-box">
<ul> <ul>
<li> <li>
<button mat-button (click)="onClickDetailView()"> <button mat-button (click)="onClickDetailView()">
@ -58,5 +58,5 @@
</button> </button>
</li> </li>
</ul> </ul>
</div> </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.setAttribute('style', 'max-height:250px; max-width:250px;');
img[ATTR_FILE] = file; img[ATTR_FILE] = file;
self.insertNode(img); self.insertNode(img);
const empty = document.createElement('div');
empty.innerHTML = '&nbsp;<br/>';
self.insertNode(empty, true);
} }
self.fileInput.nativeElement.value = ''; 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) { private insertNode(node: Node, removeSelected: boolean = false) {
const selection: Selection = document.getSelection(); const selection: Selection = document.getSelection();
const range: Range = selection.getRangeAt(0);
let inEditor = false; if (!!selection && !!selection.anchorNode) {
if (removeSelected) { const range: Range = selection.getRangeAt(0);
// onPaste
selection.empty();
inEditor = true;
} else {
inEditor = this.inEditor(selection.anchorNode);
}
if (inEditor) { let inEditor = false;
range.insertNode(node); 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 { } else {
this.editor.nativeElement.appendChild(node); this.editor.nativeElement.appendChild(node);
} }
selection.empty();
} }
private inEditor(el) { private inEditor(el) {

View File

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

View File

@ -49,6 +49,22 @@
position: absolute; position: absolute;
max-width: none !important; 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, TranslationEventJson,
MassTranslationEventJson, MassTranslationEventJson,
PlanEventJson, PlanEventJson,
PlanContentType PlanContentType,
VideoConferenceEventJson,
VideoConferenceContentsType
} from '@ucap-webmessenger/protocol-event'; } from '@ucap-webmessenger/protocol-event';
import { FileType } from '@ucap-webmessenger/protocol-file'; import { FileType } from '@ucap-webmessenger/protocol-file';
@ -191,7 +193,24 @@ export class StringUtil {
break; break;
case EventType.VideoConference: 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; break;
case EventType.MassText: case EventType.MassText:
@ -235,10 +254,19 @@ export class StringUtil {
{ {
const m = finalEventMessage as string; const m = finalEventMessage as string;
eventMessage = `${m}님이 대화내용을 캡쳐하였습니다.`; eventMessage = `${m}님이 대화내용을 캡쳐하였습니다.`;
break;
} }
break; break;
case EventType.AllimElephant: // [daesang] 알림
{
eventMessage = '코끼리 알림';
}
break;
case EventType.AllimTms: // [daesang] 알림
{
eventMessage = 'TMS 알림';
}
break;
default: default:
{ {
const m = finalEventMessage as string; const m = finalEventMessage as string;