diff --git a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts
index d0196aa4..134bf0fa 100644
--- a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts
+++ b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts
@@ -88,6 +88,10 @@ export class AppWindow {
// windows Focus or Blur state detacted.
this.window.on(ElectronBrowserWindowChannel.Focus, () => {
+ if (__WIN32__) {
+ this.window.flashFrame(false);
+ }
+
this.window.webContents.send(
WindowStateChannel.FocuseChanged,
ElectronBrowserWindowChannel.Focus
@@ -122,9 +126,6 @@ export class AppWindow {
this.window.hide();
// }
});
- this.window.on(ElectronBrowserWindowChannel.Focus, e => {
- this.window.flashFrame(false);
- });
}
if (__WIN32__) {
diff --git a/electron-projects/ucap-webmessenger-electron/src/index.ts b/electron-projects/ucap-webmessenger-electron/src/index.ts
index 2784fe61..ad714b2f 100644
--- a/electron-projects/ucap-webmessenger-electron/src/index.ts
+++ b/electron-projects/ucap-webmessenger-electron/src/index.ts
@@ -7,7 +7,8 @@ import {
shell,
dialog,
BrowserWindow,
- clipboard
+ clipboard,
+ crashReporter
} from 'electron';
import path from 'path';
import fse from 'fs-extra';
@@ -133,6 +134,12 @@ function getUptimeInSeconds() {
return (now() - launchTime) / 1000;
}
+crashReporter.start({
+ productName: app.name,
+ companyName: app.getVersion(),
+ submitURL: 'https//localhost'
+});
+
process.on('uncaughtException', (error: Error) => {
// error = withSourceMappedStack(error);
// reportError(error, getExtraErrorContext());
@@ -212,6 +219,7 @@ function createWindow() {
}
window.onClose(() => {
+ process.crash();
appWindow = null;
if (!__DARWIN__ && !preventQuit) {
app.quit();
@@ -671,9 +679,18 @@ ipcMain.on(
properties: ['openDirectory']
})
.then(value => {
- event.returnValue = value.filePaths[0];
+ if (!!value) {
+ event.returnValue = value.filePaths[0];
+ } else {
+ log.error(
+ '[IpcMain / SelectDirectory]',
+ 'Value is null or undefined'
+ );
+ event.returnValue = undefined;
+ }
})
.catch(reason => {
+ log.error('[IpcMain / SelectDirectory]', reason);
event.returnValue = undefined;
});
}
diff --git a/package.json b/package.json
index c4dcd1f2..2e3a1eda 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ucap-webmessenger",
- "version": "1.0.13",
+ "version": "1.0.14",
"author": {
"name": "LG CNS",
"email": "lgucap@lgcns.com"
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 2774fbf6..20681eae 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
@@ -91,6 +91,36 @@
{{ getRoomNameByRoomUser(_roomUserInfos) }}
+
+
+ {{ getSingleRoomUserInfosGrade(_roomUserInfos) }}
+
+ 0 &&
+ !!_roomUserInfos[0].lineNumber &&
+ _roomUserInfos[0].lineNumber.trim().length > 0
+ "
+ (click)="onClickSendClickToCall('LINE')"
+ class="callable"
+ >
+ / {{ getSingleRoomUserInfosLineNumber(_roomUserInfos) }}
+
+ 0 &&
+ !!_roomUserInfos[0].hpNumber &&
+ _roomUserInfos[0].hpNumber.trim().length > 0
+ "
+ (click)="onClickSendClickToCall('MOBILE')"
+ class="callable"
+ >
+ / {{ getSingleRoomUserInfosHpNumber(_roomUserInfos) }}
+
+
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss
index 72bde422..61e48675 100644
--- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss
+++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss
@@ -77,6 +77,14 @@
font-size: 0.94rem;
line-height: normal;
@include ellipsis(1);
+
+ .more-info {
+ font-size: 0.9rem;
+ color: #656565;
+ .callable {
+ cursor: pointer;
+ }
+ }
}
.room-type {
font-size: 0.9rem;
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 935fb921..edd74ac7 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
@@ -27,7 +27,8 @@ import {
AlertSnackbarComponent,
AlertSnackbarData,
TranslateService as UiTranslateService,
- TranslatePipe as UiTranslatePipe
+ TranslatePipe as UiTranslatePipe,
+ StringFormatterPhonePipe
} from '@ucap-webmessenger/ui';
import { Store, select } from '@ngrx/store';
import { NGXLogger } from 'ngx-logger';
@@ -143,6 +144,7 @@ import {
EventDownloadRequest
} from '@ucap-webmessenger/api-message';
import moment from 'moment';
+import { start } from 'repl';
@Component({
selector: 'app-layout-messenger-messages',
@@ -158,6 +160,8 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
}>();
@Output()
closeRightDrawer = new EventEmitter();
+ @Output()
+ sendCall = new EventEmitter();
@ViewChild('chatSearch', { static: false })
private chatSearch: SearchComponent;
@@ -534,6 +538,46 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
return roomName;
}
+ getSingleRoomUserInfosGrade(roomUserInfos: any[]) {
+ if (roomUserInfos.length > 0) {
+ return new UiTranslatePipe(
+ this.uiTranslateService,
+ this.changeDetectorRef
+ ).transform(roomUserInfos, 'grade', ',');
+ }
+ return '';
+ }
+ getSingleRoomUserInfosLineNumber(roomUserInfos: any[]) {
+ if (
+ roomUserInfos.length > 0 &&
+ !!roomUserInfos[0].lineNumber &&
+ roomUserInfos[0].lineNumber.trim().length > 0
+ ) {
+ return `${new StringFormatterPhonePipe().transform(
+ roomUserInfos[0].lineNumber
+ )}`;
+ }
+ }
+ getSingleRoomUserInfosHpNumber(roomUserInfos: any[]) {
+ if (
+ roomUserInfos.length > 0 &&
+ !!roomUserInfos[0].hpNumber &&
+ roomUserInfos[0].hpNumber.trim().length > 0
+ ) {
+ return `${new StringFormatterPhonePipe().transform(
+ roomUserInfos[0].hpNumber
+ )}`;
+ }
+ }
+
+ onClickSendClickToCall(type: string) {
+ if(type === 'LINE') {
+ this.sendCall.emit(this._roomUserInfos[0].lineNumber);
+ } else if(type === 'MOBILE') {
+ this.sendCall.emit(this._roomUserInfos[0].hpNumber);
+ }
+ }
+
/** 대화전송 가능한 방인지 판단 */
getEnableSend() {
if (!this.roomInfoSubject.value) {
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 7a85bfed..3c72fa64 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
@@ -32,6 +32,7 @@
*ngIf="!!(this.selectedChat$ | async)"
(openProfile)="onClickOpenProfile($event)"
(closeRightDrawer)="onCloseRightDrawer()"
+ (sendCall)="sendClickToCall($event)"
>