This commit is contained in:
leejinho 2020-03-27 09:00:16 +09:00
commit 79db8986d8
12 changed files with 126 additions and 23 deletions

View File

@ -88,6 +88,10 @@ export class AppWindow {
// windows Focus or Blur state detacted. // windows Focus or Blur state detacted.
this.window.on(ElectronBrowserWindowChannel.Focus, () => { this.window.on(ElectronBrowserWindowChannel.Focus, () => {
if (__WIN32__) {
this.window.flashFrame(false);
}
this.window.webContents.send( this.window.webContents.send(
WindowStateChannel.FocuseChanged, WindowStateChannel.FocuseChanged,
ElectronBrowserWindowChannel.Focus ElectronBrowserWindowChannel.Focus
@ -122,9 +126,6 @@ export class AppWindow {
this.window.hide(); this.window.hide();
// } // }
}); });
this.window.on(ElectronBrowserWindowChannel.Focus, e => {
this.window.flashFrame(false);
});
} }
if (__WIN32__) { if (__WIN32__) {

View File

@ -7,7 +7,8 @@ import {
shell, shell,
dialog, dialog,
BrowserWindow, BrowserWindow,
clipboard clipboard,
crashReporter
} from 'electron'; } from 'electron';
import path from 'path'; import path from 'path';
import fse from 'fs-extra'; import fse from 'fs-extra';
@ -133,6 +134,12 @@ function getUptimeInSeconds() {
return (now() - launchTime) / 1000; return (now() - launchTime) / 1000;
} }
crashReporter.start({
productName: app.name,
companyName: app.getVersion(),
submitURL: 'https//localhost'
});
process.on('uncaughtException', (error: Error) => { process.on('uncaughtException', (error: Error) => {
// error = withSourceMappedStack(error); // error = withSourceMappedStack(error);
// reportError(error, getExtraErrorContext()); // reportError(error, getExtraErrorContext());
@ -212,6 +219,7 @@ function createWindow() {
} }
window.onClose(() => { window.onClose(() => {
process.crash();
appWindow = null; appWindow = null;
if (!__DARWIN__ && !preventQuit) { if (!__DARWIN__ && !preventQuit) {
app.quit(); app.quit();
@ -671,9 +679,18 @@ ipcMain.on(
properties: ['openDirectory'] properties: ['openDirectory']
}) })
.then(value => { .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 => { .catch(reason => {
log.error('[IpcMain / SelectDirectory]', reason);
event.returnValue = undefined; event.returnValue = undefined;
}); });
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "ucap-webmessenger", "name": "ucap-webmessenger",
"version": "1.0.13", "version": "1.0.14",
"author": { "author": {
"name": "LG CNS", "name": "LG CNS",
"email": "lgucap@lgcns.com" "email": "lgucap@lgcns.com"

View File

@ -1,5 +1,5 @@
<div *ngIf="isMain"> <div>
<div class="current-head"> <div class="current-head" *ngIf="isMain">
<h3>{{ 'organization.chart' | translate }}</h3> <h3>{{ 'organization.chart' | translate }}</h3>
</div> </div>
<ucap-organization-tenant-search <ucap-organization-tenant-search

View File

@ -91,6 +91,36 @@
</ng-template> </ng-template>
<ng-template #roomNameNotExist> <ng-template #roomNameNotExist>
{{ getRoomNameByRoomUser(_roomUserInfos) }} {{ getRoomNameByRoomUser(_roomUserInfos) }}
<span
*ngIf="roomInfoSubject.value.roomType === RoomType.Single"
class="more-info"
>
<span>
{{ getSingleRoomUserInfosGrade(_roomUserInfos) }}
</span>
<span
*ngIf="
_roomUserInfos.length > 0 &&
!!_roomUserInfos[0].lineNumber &&
_roomUserInfos[0].lineNumber.trim().length > 0
"
(click)="onClickSendClickToCall('LINE')"
class="callable"
>
/ {{ getSingleRoomUserInfosLineNumber(_roomUserInfos) }}
</span>
<span
*ngIf="
_roomUserInfos.length > 0 &&
!!_roomUserInfos[0].hpNumber &&
_roomUserInfos[0].hpNumber.trim().length > 0
"
(click)="onClickSendClickToCall('MOBILE')"
class="callable"
>
/ {{ getSingleRoomUserInfosHpNumber(_roomUserInfos) }}
</span>
</span>
</ng-template> </ng-template>
</ng-container> </ng-container>
</ng-container> </ng-container>

View File

@ -77,6 +77,14 @@
font-size: 0.94rem; font-size: 0.94rem;
line-height: normal; line-height: normal;
@include ellipsis(1); @include ellipsis(1);
.more-info {
font-size: 0.9rem;
color: #656565;
.callable {
cursor: pointer;
}
}
} }
.room-type { .room-type {
font-size: 0.9rem; font-size: 0.9rem;

View File

@ -27,7 +27,8 @@ import {
AlertSnackbarComponent, AlertSnackbarComponent,
AlertSnackbarData, AlertSnackbarData,
TranslateService as UiTranslateService, TranslateService as UiTranslateService,
TranslatePipe as UiTranslatePipe TranslatePipe as UiTranslatePipe,
StringFormatterPhonePipe
} from '@ucap-webmessenger/ui'; } from '@ucap-webmessenger/ui';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { NGXLogger } from 'ngx-logger'; import { NGXLogger } from 'ngx-logger';
@ -143,6 +144,7 @@ import {
EventDownloadRequest EventDownloadRequest
} from '@ucap-webmessenger/api-message'; } from '@ucap-webmessenger/api-message';
import moment from 'moment'; import moment from 'moment';
import { start } from 'repl';
@Component({ @Component({
selector: 'app-layout-messenger-messages', selector: 'app-layout-messenger-messages',
@ -156,6 +158,8 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
openProfile = new EventEmitter<number>(); openProfile = new EventEmitter<number>();
@Output() @Output()
closeRightDrawer = new EventEmitter(); closeRightDrawer = new EventEmitter();
@Output()
sendCall = new EventEmitter<string>();
@ViewChild('chatSearch', { static: false }) @ViewChild('chatSearch', { static: false })
private chatSearch: SearchComponent; private chatSearch: SearchComponent;
@ -532,6 +536,46 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
return roomName; 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() { getEnableSend() {
if (!this.roomInfoSubject.value) { if (!this.roomInfoSubject.value) {

View File

@ -91,8 +91,8 @@
} }
&-tab { &-tab {
width: 100%; width: 100%;
height: 100%; height: calc(100% - 50px);
border-bottom: 1px solid #dddddd; // border-bottom: 1px solid #dddddd;
position: relative; position: relative;
&-tree { &-tree {
display: inline-flex; display: inline-flex;

View File

@ -31,6 +31,7 @@
(openProfile)="onClickOpenProfile($event)" (openProfile)="onClickOpenProfile($event)"
(gotoDeptTree)="onClickGotoDeptTree($event)" (gotoDeptTree)="onClickGotoDeptTree($event)"
(closeRightDrawer)="onCloseRightDrawer()" (closeRightDrawer)="onCloseRightDrawer()"
(sendCall)="sendClickToCall($event)"
(createConference)="conferenceCreate($event)" (createConference)="conferenceCreate($event)"
> >
</app-layout-messenger-main-contents> </app-layout-messenger-main-contents>

View File

@ -286,16 +286,15 @@ export class AppNotificationService {
doNoti = false; doNoti = false;
} }
// // 포커스 아웃일때 무조건 노티. // 포커스 아웃일때 무조건 노티.
// // Case 1 : 단순 포커스 아웃. // Case 1 : 단순 포커스 아웃.
// // Case 2 : hidden 시 포커스 인 상태이지만 위에서 필터링 됨. // Case 2 : hidden 시 포커스 인 상태이지만 위에서 필터링 됨.
// console.log(windowState); if (
// if ( windowState.windowFocusState !==
// windowState.windowFocusState !== ElectronBrowserWindowChannel.Focus
// ElectronBrowserWindowChannel.Focus ) {
// ) { doNoti = true;
// doNoti = true; }
// }
// 방별 알림이 꺼져 있으면 노티 안함. > 우선순위 최상위. // 방별 알림이 꺼져 있으면 노티 안함. > 우선순위 최상위.
if ( if (

View File

@ -53,7 +53,8 @@ export class DaesangCipherService {
encryptForSapErp(pvUserKey: string, employeeNum: string): string { encryptForSapErp(pvUserKey: string, employeeNum: string): string {
// const txt = '20200221090321_asdfghjk'; // 1QgLAiLqJ6Uo6bE4Qk1o3Yd6mfqxXSnmqXX%2FXLL7DoA%3D // const txt = '20200221090321_asdfghjk'; // 1QgLAiLqJ6Uo6bE4Qk1o3Yd6mfqxXSnmqXX%2FXLL7DoA%3D
// const txt = '20200221101444_asdfghjk'; // Lz1TIdGTQQMui%2BBHMdj8fatYYhXbwJEL%2BJ91C7jUWEs%3D // const txt = '20200221101444_asdfghjk'; // Lz1TIdGTQQMui%2BBHMdj8fatYYhXbwJEL%2BJ91C7jUWEs%3D
const str = moment().format('YYYYMMDDHHmmss') + '_' + employeeNum; const str =
moment().format('YYYYMMDDHHmmss') + '_' + employeeNum.toUpperCase();
const secretKeyToByteArray: Buffer = Buffer.from(pvUserKey, 'utf8').slice( const secretKeyToByteArray: Buffer = Buffer.from(pvUserKey, 'utf8').slice(
0, 0,
16 16

View File

@ -62,7 +62,9 @@ export class ChatComponent implements OnInit {
this.emit({ ...this.setting, downloadPath: path }); this.emit({ ...this.setting, downloadPath: path });
} }
}) })
.catch(reason => {}); .catch(reason => {
this.nativeService.appLogging(reason);
});
} }
private emit(setting: ChatSetting) { private emit(setting: ChatSetting) {