From 209e445618311ff64355737405ce836bc23a768c Mon Sep 17 00:00:00 2001 From: khk Date: Tue, 10 Mar 2020 10:12:01 +0900 Subject: [PATCH 01/57] =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84-=20=EC=BD=94?= =?UTF-8?q?=EB=81=BC=EB=A6=AC,=20=EC=83=81=EB=8B=A8=20=EC=9B=B9=EB=A7=81?= =?UTF-8?q?=ED=81=AC(SAP)=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../native/components/top-bar.component.html | 5 +++++ .../native/components/top-bar.component.scss | 11 +++++++--- .../src/lib/components/profile.component.html | 13 +++++++++++- .../src/lib/components/profile.component.scss | 21 +++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) 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 4b4210f6..fe737ad3 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 @@ -129,6 +129,11 @@ > 결제 + + - + Date: Tue, 10 Mar 2020 10:59:06 +0900 Subject: [PATCH 02/57] =?UTF-8?q?ERP=20Weblink=20=EC=B6=94=EA=B0=80.=20?= =?UTF-8?q?=EB=B0=8F=20=EC=BD=94=EB=81=BC=EB=A6=AC=20=EB=94=94=EC=9E=90?= =?UTF-8?q?=EC=9D=B8=20=EC=A0=81=EC=9A=A9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/apis/url-info.ts | 8 ++++++++ .../native/components/top-bar.component.html | 14 +++++++++----- .../native/components/top-bar.component.scss | 5 ++--- .../layouts/native/components/top-bar.component.ts | 9 ++++++++- .../src/lib/services/daesang-cipher.service.ts | 2 +- .../src/lib/types/web-link.type.ts | 4 +++- .../src/lib/components/profile.component.html | 6 +++--- .../src/lib/components/profile.component.scss | 2 +- 8 files changed, 35 insertions(+), 15 deletions(-) diff --git a/projects/ucap-webmessenger-api-external/src/lib/apis/url-info.ts b/projects/ucap-webmessenger-api-external/src/lib/apis/url-info.ts index a3abbff9..67153720 100644 --- a/projects/ucap-webmessenger-api-external/src/lib/apis/url-info.ts +++ b/projects/ucap-webmessenger-api-external/src/lib/apis/url-info.ts @@ -192,6 +192,14 @@ export const decodeUrlInfoDaesang: APIDecoder = ( url: arr.length > 1 ? arr[1] : arr[0] }); } + if (!!res.WebLinkERP) { + const arr = res.WebLinkERP.split(','); + webLink.push({ + key: WebLinkType.Erp, + title: arr.length > 1 ? arr[0] : '', + url: arr.length > 1 ? arr[1] : arr[0] + }); + } return { statusCode: res.StatusCode, 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 fe737ad3..e31bd72f 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 @@ -101,6 +101,15 @@ > NEWS + - - - + --> Date: Tue, 10 Mar 2020 11:14:43 +0900 Subject: [PATCH 03/57] Version update to V1.0.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 82222157..66bea379 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ucap-webmessenger", - "version": "1.0.4", + "version": "1.0.5", "author": { "name": "LG CNS", "email": "lgucap@lgcns.com" From cc73faaaa352d1a2b737ab992f9be969115a4303 Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 11 Mar 2020 17:00:08 +0900 Subject: [PATCH 04/57] =?UTF-8?q?RoomInfo=20=EC=A4=91=20user=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EB=B3=80=EA=B2=BD=EC=8B=9C=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EA=B0=B1=EC=8B=A0.=20>>=20=ED=98=84=EC=9E=AC=20=EC=97=B4?= =?UTF-8?q?=EB=A0=A4=20=EC=9E=88=EB=8A=94=20=EB=B0=A9=EC=97=90=20=EC=9D=B8?= =?UTF-8?q?=EC=9B=90=EC=9D=B4=20=EA=B8=80=EC=9D=84=20=EC=9D=BD=EC=97=88?= =?UTF-8?q?=EC=9D=84=20=EA=B2=BD=EC=9A=B0=20=ED=95=B4=EB=8B=B9=20=EC=8A=A4?= =?UTF-8?q?=ED=86=A0=EC=96=B4=EA=B0=80=20=EA=B0=B1=EC=8B=A0=EB=90=9C?= =?UTF-8?q?=EB=8B=A4.=20=EC=9D=B4=EB=95=8C=20=EA=B0=81=20=EC=9D=B4?= =?UTF-8?q?=EB=B2=A4=ED=8A=B8=EC=9D=98=20unread=20count=20=EA=B0=80=20?= =?UTF-8?q?=EA=B0=B1=EC=8B=A0=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/layouts/messenger/components/messages.component.ts | 1 + 1 file changed, 1 insertion(+) 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 c38c9b11..de308179 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 @@ -320,6 +320,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { .pipe(select(AppStore.MessengerSelector.RoomSelector.selectUserinfolist)) .subscribe(userInfoList => { this.userInfoListSubject.next(userInfoList); + this.changeDetectorRef.detectChanges(); }); this.eventListProcessing$ = this.store.pipe( From 2f3a76a7f76a94e978c8fb2c8ed660c42dc6bff9 Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 11 Mar 2020 17:00:43 +0900 Subject: [PATCH 05/57] =?UTF-8?q?readNotification=20=EC=97=90=EC=84=9C?= =?UTF-8?q?=EC=9D=98=20=EB=A1=9C=EC=A7=81=20=EA=B0=9C=EC=84=A0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/store/messenger/event/effects.ts | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts index aeadcdb2..0a2e3743 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts @@ -925,19 +925,30 @@ export class Effects { }) ); } - } - // not opened room :: unread count increased - if ( - action.SVC_TYPE === SVC_TYPE_EVENT && - action.SSVC_TYPE === SSVC_TYPE_EVENT_SEND_RES - ) { - /** - * 다른 디바이스에서 대화를 송신 할경우 RES 가 noti 로 유입될 수 있다. - * 이때 unread count 를 중가하지 않는다. - */ + if (action.info.type === EventType.File) { + // File 정보 수집. + this.store.dispatch( + fileInfo({ + req: { + roomSeq: action.roomSeq, + // { 파일타입 } cf) I : 이미지 V: 동영상 F: 파일 "" 빈값이면 모든 타입을 내려줌 + type: FileType.All + } + }) + ); + } } else { - if (!roomInfo || roomInfo.roomSeq !== action.roomSeq) { + // not opened room :: unread count increased + if ( + action.SVC_TYPE === SVC_TYPE_EVENT && + action.SSVC_TYPE === SSVC_TYPE_EVENT_SEND_RES + ) { + /** + * 다른 디바이스에서 대화를 송신 할경우 RES 가 noti 로 유입될 수 있다. + * 이때 unread count 를 중가하지 않는다. + */ + } else { if (!!trgtRoomInfos && !!trgtRoomInfos[action.roomSeq]) { const noReadCnt = trgtRoomInfos[action.roomSeq].noReadCnt; this.store.dispatch( @@ -950,19 +961,6 @@ export class Effects { } } - if (action.info.type === EventType.File) { - // File 정보 수집. - this.store.dispatch( - fileInfo({ - req: { - roomSeq: action.roomSeq, - // { 파일타입 } cf) I : 이미지 V: 동영상 F: 파일 "" 빈값이면 모든 타입을 내려줌 - type: FileType.All - } - }) - ); - } - // 대화 > 리스트 :: finalEventMessage refresh this.store.dispatch(ChatStore.newEventMessage(action)); }) From 856b553da23b9f7b4435babe17e56ca0b0dc3065 Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 11 Mar 2020 17:01:44 +0900 Subject: [PATCH 06/57] =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=EC=84=B8=ED=8C=85?= =?UTF-8?q?=20=ED=81=B4=EB=A6=AC=EC=96=B4=20&=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=95=84=EC=9B=83=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80.?= =?UTF-8?q?=20>=20=EC=83=81=EB=8B=A8=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=ED=81=B4=EB=A6=AD=20>=20=EB=B2=84=EC=A0=84=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=20>=20=ED=98=84=EC=9E=AC=EB=B2=84=EC=A0=84=20=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=A7=88=EC=9A=B0=EC=8A=A4=20middle=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20>=20=EB=B2=84=ED=8A=BC=20=EB=85=B8=EC=B6=9C?= =?UTF-8?q?=EB=90=98=EB=A9=B4=20=ED=81=B4=EB=A6=AD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../messenger-settings.dialog.component.html | 7 ---- .../messenger-settings.dialog.component.ts | 23 +---------- .../native/components/top-bar.component.html | 16 +++++++- .../native/components/top-bar.component.ts | 39 ++++++++++++++++++- 4 files changed, 52 insertions(+), 33 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/settings/messenger-settings.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/settings/messenger-settings.dialog.component.html index 35793d93..712babdf 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/settings/messenger-settings.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/settings/messenger-settings.dialog.component.html @@ -124,13 +124,6 @@ - + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts index b387358c..1ebe5c2f 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts @@ -34,7 +34,10 @@ import { KEY_LOGIN_INFO, KEY_VER_INFO, EnvironmentsInfo, - KEY_ENVIRONMENTS_INFO + KEY_ENVIRONMENTS_INFO, + KEY_LOGIN_RES_INFO, + KEY_LOGOUT_INFO, + KEY_AUTH_INFO } from '@app/types'; import { WebLink, @@ -62,7 +65,12 @@ import { ProfileDialogResult, ProfileDialogData } from '@app/layouts/messenger/dialogs/profile/profile.dialog.component'; -import { DialogService } from '@ucap-webmessenger/ui'; +import { + DialogService, + ConfirmDialogComponent, + ConfirmDialogData, + ConfirmDialogResult +} from '@ucap-webmessenger/ui'; import { DOCUMENT } from '@angular/common'; import { MatMenu, MatMenuTrigger } from '@angular/material/menu'; import { StatusCode, StatusType, WindowUtil } from '@ucap-webmessenger/core'; @@ -663,4 +671,31 @@ export class TopBarComponent implements OnInit, OnDestroy { this.integratedSearchWord = ''; } + + async onClickClearSettingAndLogout() { + const result = await this.dialogService.open< + ConfirmDialogComponent, + ConfirmDialogData, + ConfirmDialogResult + >(ConfirmDialogComponent, { + width: '400px', + data: { + title: 'Clear & Logout?', + html: 'Clear General Setting And Logout?' + } + }); + + if (!!result && !!result.choice && result.choice) { + this.localStorageService.remove(KEY_APP_USER_INFO); + this.sessionStorageService.remove(KEY_LOGIN_RES_INFO); + this.sessionStorageService.remove(KEY_VER_INFO); + this.sessionStorageService.remove(KEY_LOGIN_INFO); + this.sessionStorageService.remove(KEY_URL_INFO); + this.sessionStorageService.remove(KEY_AUTH_INFO); + this.sessionStorageService.remove(KEY_LOGOUT_INFO); + this.nativeService.clearAppStorage(); + this.dialogService.closeAll(); + this.store.dispatch(AuthenticationStore.loginRedirect()); + } + } } From 482ca40d480c3220add4049d93f9575771533aa8 Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 12 Mar 2020 16:16:04 +0900 Subject: [PATCH 07/57] add Error Handler --- .../ucap-webmessenger-electron/src/index.ts | 3 +++ .../src/app/app.module.ts | 3 ++- .../app/error-handler/global.errorhandler.ts | 27 +++++++++++++++++++ .../src/app/error-handler/index.ts | 6 +++++ .../lib/services/browser-native.service.ts | 3 +++ .../lib/services/electron-native.service.ts | 3 +++ .../src/lib/types/channel.type.ts | 3 ++- .../src/lib/services/native.service.ts | 1 + 8 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 projects/ucap-webmessenger-app/src/app/error-handler/global.errorhandler.ts create mode 100644 projects/ucap-webmessenger-app/src/app/error-handler/index.ts diff --git a/electron-projects/ucap-webmessenger-electron/src/index.ts b/electron-projects/ucap-webmessenger-electron/src/index.ts index 458c55e0..3d7423e6 100644 --- a/electron-projects/ucap-webmessenger-electron/src/index.ts +++ b/electron-projects/ucap-webmessenger-electron/src/index.ts @@ -821,6 +821,9 @@ ipcMain.on(ClipboardChannel.Read, (event: IpcMainEvent, ...args: any[]) => { ipcMain.on(AppChannel.Exit, (event: IpcMainEvent, ...args: any[]) => { appExit(); }); +ipcMain.on(AppChannel.Logging, (event: IpcMainEvent, ...args: any[]) => { + log.error('[G]', args[0]); +}); ipcMain.on(ExternalChannel.OpenUrl, (event: IpcMainEvent, ...args: any[]) => { const targetUrl = args[0]; diff --git a/projects/ucap-webmessenger-app/src/app/app.module.ts b/projects/ucap-webmessenger-app/src/app/app.module.ts index 9c356ee8..2e05dfad 100644 --- a/projects/ucap-webmessenger-app/src/app/app.module.ts +++ b/projects/ucap-webmessenger-app/src/app/app.module.ts @@ -50,6 +50,7 @@ import { AppMessengerLayoutModule } from './layouts/messenger/messenger.layout.m import { AppNativeLayoutModule } from './layouts/native/native.layout.module'; import { environment } from '../environments/environment'; +import { ERRORHANDLER } from './error-handler'; @NgModule({ imports: [ @@ -105,7 +106,7 @@ import { environment } from '../environments/environment'; level: NgxLoggerLevel.DEBUG }) ], - providers: [...GUARDS], + providers: [...GUARDS, ERRORHANDLER], declarations: [AppComponent], bootstrap: [AppComponent], entryComponents: [] diff --git a/projects/ucap-webmessenger-app/src/app/error-handler/global.errorhandler.ts b/projects/ucap-webmessenger-app/src/app/error-handler/global.errorhandler.ts new file mode 100644 index 00000000..c5da5dcc --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/error-handler/global.errorhandler.ts @@ -0,0 +1,27 @@ +import { ErrorHandler, Injectable, Injector, NgZone } from '@angular/core'; +import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native'; +import { error } from 'console'; + +@Injectable() +export class AppGlobalErrorhandler implements ErrorHandler { + constructor(private injector: Injector, private zone: NgZone) {} + + // tslint:disable-next-line: no-shadowed-variable + handleError(error: Error) { + let nativeLogging: any; + try { + const nativeService: NativeService = this.injector.get( + UCAP_NATIVE_SERVICE + ); + nativeService.appLogging(error.stack); + nativeLogging = 'SUCCESS'; + } catch (e) { + nativeLogging = e; + } + + console.groupCollapsed('App Global Error Logging'); + console.log('App log', error); + console.log('Native Logging', nativeLogging); + console.groupEnd(); + } +} diff --git a/projects/ucap-webmessenger-app/src/app/error-handler/index.ts b/projects/ucap-webmessenger-app/src/app/error-handler/index.ts new file mode 100644 index 00000000..4ff44985 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/error-handler/index.ts @@ -0,0 +1,6 @@ +import { AppGlobalErrorhandler } from './global.errorhandler'; +import { ErrorHandler } from '@angular/core'; + +export const ERRORHANDLER = [ + { provide: ErrorHandler, useClass: AppGlobalErrorhandler } +]; diff --git a/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts b/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts index bf95404f..6fad45a1 100644 --- a/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts +++ b/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts @@ -234,6 +234,9 @@ export class BrowserNativeService extends NativeService { } appExit(): void {} + appLogging(error: any): void { + console.error('[G]', error); + } zoomTo(factor: number): Promise { return new Promise((resolve, reject) => { diff --git a/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts b/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts index 061d2d09..abeea430 100644 --- a/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts +++ b/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts @@ -414,6 +414,9 @@ export class ElectronNativeService implements NativeService { appExit(): void { this.ipcRenderer.send(AppChannel.Exit); } + appLogging(error: any): void { + this.ipcRenderer.send(AppChannel.Logging, error); + } zoomTo(factor: number): Promise { return new Promise((resolve, reject) => { diff --git a/projects/ucap-webmessenger-native-electron/src/lib/types/channel.type.ts b/projects/ucap-webmessenger-native-electron/src/lib/types/channel.type.ts index f5bae067..8201fec0 100644 --- a/projects/ucap-webmessenger-native-electron/src/lib/types/channel.type.ts +++ b/projects/ucap-webmessenger-native-electron/src/lib/types/channel.type.ts @@ -61,7 +61,8 @@ export enum ClipboardChannel { } export enum AppChannel { - Exit = 'UCAP::app::exit' + Exit = 'UCAP::app::exit', + Logging = 'UCAP::app::logging' } export enum ExternalChannel { diff --git a/projects/ucap-webmessenger-native/src/lib/services/native.service.ts b/projects/ucap-webmessenger-native/src/lib/services/native.service.ts index 961ba426..f31a7d25 100644 --- a/projects/ucap-webmessenger-native/src/lib/services/native.service.ts +++ b/projects/ucap-webmessenger-native/src/lib/services/native.service.ts @@ -76,6 +76,7 @@ export abstract class NativeService { abstract getWindowState(): WindowState; abstract zoomTo(factor: number): Promise; abstract appExit(): void; + abstract appLogging(error: any): void; abstract idleStateChanged(): Observable; abstract idleStateStop(): void; From f492aaa8f9f54a9f5c90ba4912719f0c2f41bb8e Mon Sep 17 00:00:00 2001 From: leejinho Date: Fri, 13 Mar 2020 07:55:33 +0900 Subject: [PATCH 08/57] bugfix --- .../src/app/error-handler/global.errorhandler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/ucap-webmessenger-app/src/app/error-handler/global.errorhandler.ts b/projects/ucap-webmessenger-app/src/app/error-handler/global.errorhandler.ts index c5da5dcc..cb8e856d 100644 --- a/projects/ucap-webmessenger-app/src/app/error-handler/global.errorhandler.ts +++ b/projects/ucap-webmessenger-app/src/app/error-handler/global.errorhandler.ts @@ -2,7 +2,9 @@ import { ErrorHandler, Injectable, Injector, NgZone } from '@angular/core'; import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native'; import { error } from 'console'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class AppGlobalErrorhandler implements ErrorHandler { constructor(private injector: Injector, private zone: NgZone) {} From eb925299288baa93525ac4983c1b991a091d66ae Mon Sep 17 00:00:00 2001 From: leejinho Date: Mon, 16 Mar 2020 16:04:35 +0900 Subject: [PATCH 09/57] =?UTF-8?q?bugfix=20::=20=EB=8C=80=ED=99=94=EB=B0=A9?= =?UTF-8?q?=20=EC=9D=B8=EC=9B=90=EC=9D=B4=20=EB=84=98=EC=B9=A0=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EB=A7=89=EC=95=84=EC=A3=BC=EB=8A=94=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20300=EB=AA=85=20=EC=A0=9C=ED=95=9C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/messages.component.ts | 27 ++++++++++++++++- .../right-drawer/room-user-list.component.ts | 29 ++++++++++++++++++- .../src/app/store/messenger/room/effects.ts | 28 ++++++++++++++++++ 3 files changed, 82 insertions(+), 2 deletions(-) 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 de308179..935fb921 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 @@ -1588,7 +1588,32 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { break; case 'ADD_MEMBER': { - const curRoomUser = this.userInfoListSubject.value.filter( + const userInfoList = this.userInfoListSubject.value; + if ( + !!userInfoList && + userInfoList.length >= + environment.productConfig.CommonSetting.maxChatRoomUser + ) { + this.dialogService.open< + AlertDialogComponent, + AlertDialogData, + AlertDialogResult + >(AlertDialogComponent, { + data: { + title: this.translateService.instant('chat.errors.label'), + html: this.translateService.instant( + 'chat.errors.maxCountOfRoomMemberWith', + { + maxCount: + environment.productConfig.CommonSetting.maxChatRoomUser + } + ) + } + }); + return; + } + + const curRoomUser = userInfoList.filter( user => user.seq !== this.loginResSubject.value.userSeq && user.isJoinRoom ); diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.ts index a7511be1..647c15aa 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.ts @@ -21,7 +21,10 @@ import { DialogService, ConfirmDialogComponent, ConfirmDialogResult, - ConfirmDialogData + ConfirmDialogData, + AlertDialogComponent, + AlertDialogData, + AlertDialogResult } from '@ucap-webmessenger/ui'; import { SelectGroupDialogComponent, @@ -43,6 +46,7 @@ import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { MatDialog } from '@angular/material/dialog'; import { MatMenuTrigger } from '@angular/material/menu'; import { TranslateService } from '@ngx-translate/core'; +import { environment } from 'projects/ucap-webmessenger-app/src/environments/environment.dev'; @Component({ selector: 'app-layout-chat-right-drawer-room-user-list', @@ -139,6 +143,29 @@ export class RoomUserListComponent implements OnInit, OnDestroy { } async onClickAddMember() { + if ( + !!this.userInfoList && + this.userInfoList.length >= + environment.productConfig.CommonSetting.maxChatRoomUser + ) { + this.dialogService.open< + AlertDialogComponent, + AlertDialogData, + AlertDialogResult + >(AlertDialogComponent, { + data: { + title: this.translateService.instant('chat.errors.label'), + html: this.translateService.instant( + 'chat.errors.maxCountOfRoomMemberWith', + { + maxCount: environment.productConfig.CommonSetting.maxChatRoomUser + } + ) + } + }); + return; + } + const curRoomUser = this.userInfoList.filter( user => user.seq !== this.loginRes.userSeq && user.isJoinRoom ); diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/room/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/room/effects.ts index 9cf07234..5caa44ff 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/room/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/room/effects.ts @@ -5,6 +5,8 @@ import { Actions, createEffect, ofType } from '@ngrx/effects'; import { Store, select } from '@ngrx/store'; import { NGXLogger } from 'ngx-logger'; +import { environment } from '../../../../environments/environment'; + import { of } from 'rxjs'; import { tap, @@ -79,6 +81,8 @@ import { AlertDialogData, AlertDialogResult } from '@ucap-webmessenger/ui'; +import { ActivatedRouteSnapshot } from '@angular/router'; +import { TranslateService } from '@ngx-translate/core'; @Injectable() export class Effects { @@ -285,6 +289,29 @@ export class Effects { ) ), exhaustMap(([action, roomInfo]) => { + if ( + environment.productConfig.CommonSetting.maxChatRoomUser < + action.req.userSeqs.length + ) { + this.dialogService.open< + AlertDialogComponent, + AlertDialogData, + AlertDialogResult + >(AlertDialogComponent, { + data: { + title: this.translateService.instant('chat.errors.label'), + html: this.translateService.instant( + 'chat.errors.maxCountOfRoomMemberWith', + { + maxCount: + environment.productConfig.CommonSetting.maxChatRoomUser + } + ) + } + }); + return of(inviteFailure({ error: 'over size room users !!' })); + } + if (roomInfo.roomType === RoomType.Single) { // Re Open return this.roomProtocolService.open(action.req).pipe( @@ -454,6 +481,7 @@ export class Effects { private store: Store, private roomProtocolService: RoomProtocolService, private sessionStorageService: SessionStorageService, + private translateService: TranslateService, private dialogService: DialogService, private logger: NGXLogger ) {} From 517d8a4d37274535840d5877263a748e45c34aa1 Mon Sep 17 00:00:00 2001 From: leejinho Date: Mon, 16 Mar 2020 16:44:08 +0900 Subject: [PATCH 10/57] =?UTF-8?q?=EB=8C=80=ED=99=94=20=EC=B0=B8=EC=97=AC?= =?UTF-8?q?=EC=9E=90=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20virture=20scroll=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../right-drawer/room-user-list.component.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.html index 22b424b4..9f76c6b4 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.html @@ -1,8 +1,8 @@
- + - +
-
+
From 069b3e6e67fdcb87963a07b5dd3a8ba2a01ff4bf Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 17 Mar 2020 10:35:59 +0900 Subject: [PATCH 11/57] =?UTF-8?q?=EC=9C=A0=EC=A0=80=EC=84=A0=ED=83=9D?= =?UTF-8?q?=ED=8C=9D=EC=97=85=20>=20=EC=83=88=EB=A1=9C=EC=9A=B4=20?= =?UTF-8?q?=EB=8C=80=ED=99=94=20=EA=B0=9C=EC=84=A4=EC=8B=9C=20300=EB=AA=85?= =?UTF-8?q?=20=EC=A0=9C=ED=95=9C=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/create-chat.dialog.component.html | 48 +++++++++++++++++-- .../chat/create-chat.dialog.component.ts | 7 ++- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html index d16c2637..98d7fe83 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html @@ -262,8 +262,48 @@
- - {{ selectedUserList.length }} - {{ 'common.units.persons' | translate }} - + + + + {{ selectedUserList.length }} / + {{ environment.productConfig.CommonSetting.maxChatRoomUser - 1 }} + {{ 'common.units.persons' | translate }} + + + ({{ + 'chat.errors.maxCountOfRoomMemberWith' + | translate + : { + maxCount: + environment.productConfig.CommonSetting.maxChatRoomUser - 1 + } + }}) + + + + + {{ selectedUserList.length }} + {{ 'common.units.persons' | translate }} + + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.ts index 53891855..58ceec7b 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.ts @@ -134,6 +134,7 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy { currentTabIndex: number; UserSelectDialogType = UserSelectDialogType; + environment = environment; loginRes: LoginResponse; loginResSubscription: Subscription; @@ -740,8 +741,12 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy { if (this.selectedUserList.length === 0 && !this.selectedRoom) { return true; } - return false; + } else if (this.data.type === UserSelectDialogType.NewChat) { + return ( + this.selectedUserList.length >= + this.environment.productConfig.CommonSetting.maxChatRoomUser + ); } else { return false; } From 3174ff60aa4335e6c09bcedf2f374c569697e749 Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 17 Mar 2020 14:19:34 +0900 Subject: [PATCH 12/57] version up to 1.0.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 66bea379..4d51b140 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ucap-webmessenger", - "version": "1.0.5", + "version": "1.0.6", "author": { "name": "LG CNS", "email": "lgucap@lgcns.com" From 73f330aa701c82f803b8adea9f87d962df2601ac Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 17 Mar 2020 15:18:47 +0900 Subject: [PATCH 13/57] =?UTF-8?q?=ED=86=B5=ED=95=A9=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EC=A0=84=ED=99=94=EB=B2=88=ED=98=B8=20=ED=95=98=EC=9D=B4?= =?UTF-8?q?=ED=91=BC=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/components/integrated-search.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 024f503b..fdc6a1e5 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 @@ -125,7 +125,7 @@
- {{ element.lineNumber }} + {{ element.lineNumber | ucapStringFormatterPhone }}
@@ -140,7 +140,7 @@
- {{ element.hpNumber }} + {{ element.hpNumber | ucapStringFormatterPhone }}
From f1f1ae307e6d01440a9233113c23034f770e3725 Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 17 Mar 2020 15:19:43 +0900 Subject: [PATCH 14/57] =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20>=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=9B=90=EB=B3=B8=EB=B3=B4=EA=B8=B0=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialogs/file-viewer.dialog.component.html | 2 + .../dialogs/file-viewer.dialog.component.ts | 37 ++++++++++----- .../profile/profile.dialog.component.html | 1 + .../profile/profile.dialog.component.ts | 47 ++++++++++++++++++- .../src/lib/components/profile.component.html | 6 ++- .../src/lib/components/profile.component.ts | 6 +++ .../lib/components/file-viewer.component.html | 2 + .../lib/components/file-viewer.component.ts | 10 ++++ .../file-viewer/image-viewer.component.html | 47 +++++++++++++++---- .../file-viewer/image-viewer.component.ts | 6 +++ .../src/lib/models/image-only-data-info.ts | 6 +++ .../ucap-webmessenger-ui/src/public-api.ts | 2 + 12 files changed, 150 insertions(+), 22 deletions(-) create mode 100644 projects/ucap-webmessenger-ui/src/lib/models/image-only-data-info.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.html index 0092f806..c9536eb9 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.html @@ -1,6 +1,8 @@ diff --git a/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts index ae30e0b1..26666cbf 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts @@ -7,6 +7,7 @@ import { DeviceType } from '@ucap-webmessenger/core'; import { FileDownloadItem } from '@ucap-webmessenger/api'; import { CommonApiService } from '@ucap-webmessenger/api-common'; import { AppFileService } from '@app/services/file.service'; +import { ImageOnlyDataInfo } from '@ucap-webmessenger/ui'; export interface FileViewerDialogData { fileInfo: FileEventJson; @@ -14,6 +15,8 @@ export interface FileViewerDialogData { userSeq: number; deviceType: DeviceType; token: string; + imageOnly?: boolean; + imageOnlyData?: ImageOnlyDataInfo; } export interface FileViewerDialogResult {} @@ -32,6 +35,9 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy { fileDownloadUrl: string; + imageOnly = false; + imageOnlyData: ImageOnlyDataInfo; + constructor( public dialogRef: MatDialogRef< FileViewerDialogData, @@ -47,19 +53,28 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy { this.userSeq = data.userSeq; this.deviceType = data.deviceType; this.token = data.token; - - this.fileDownloadUrl = this.commonApiService.urlForFileTalkDownload( - { - userSeq: this.userSeq, - deviceType: this.deviceType, - token: this.token, - attachmentsSeq: this.fileInfo.attachmentSeq - }, - this.downloadUrl - ); } - ngOnInit() {} + ngOnInit() { + if (!!this.data.imageOnly) { + this.imageOnly = this.data.imageOnly; + this.imageOnlyData = this.data.imageOnlyData; + } + + if (!!this.imageOnly) { + this.fileDownloadUrl = this.imageOnlyData.imageUrl; + } else { + this.fileDownloadUrl = this.commonApiService.urlForFileTalkDownload( + { + userSeq: this.userSeq, + deviceType: this.deviceType, + token: this.token, + attachmentsSeq: this.fileInfo.attachmentSeq + }, + this.downloadUrl + ); + } + } ngOnDestroy(): void {} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.html index 0f1299ff..300913c0 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.html @@ -9,6 +9,7 @@ [openProfileOptions]="data.openProfileOptions" [useBuddyToggleButton]="useBuddyToggleButton" [authInfo]="authInfo" + (profileImageView)="onClickProfileImageView()" (openChat)="onClickChat($event)" (sendMessage)="onClickSendMessage($event)" (sendCall)="onClickSendClickToCall($event)" diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts index 5807d352..de78661c 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts @@ -24,7 +24,8 @@ import { SnackBarService, AlertDialogComponent, AlertDialogResult, - AlertDialogData + AlertDialogData, + ImageOnlyDataInfo } from '@ucap-webmessenger/ui'; import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; @@ -56,6 +57,13 @@ import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native'; import { environment } from '../../../../../environments/environment'; import { TranslateService } from '@ngx-translate/core'; import { UserInfoUpdateType } from '@ucap-webmessenger/protocol-info'; +import { + FileViewerDialogComponent, + FileViewerDialogData, + FileViewerDialogResult +} from '@app/layouts/common/dialogs/file-viewer.dialog.component'; +import { FileEventJson } from '@ucap-webmessenger/protocol-event'; +import { FileType } from '@ucap-webmessenger/protocol-file'; export interface ProfileDialogData { userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; @@ -451,6 +459,43 @@ export class ProfileDialogComponent implements OnInit, OnDestroy { ); } + onClickProfileImageView() { + if (!this.loginRes || !this.loginRes.userInfo.profileImageFile) { + return; + } + + const imageOnlyData: ImageOnlyDataInfo = { + imageUrl: this.userInfo.profileImageFile, + imageRootUrl: this.sessionVerinfo.profileRoot, + defaultImage: 'assets/images/img_nophoto_50.png', + fileName: this.userInfo.name + }; + + this.dialogService.open< + FileViewerDialogComponent, + FileViewerDialogData, + FileViewerDialogResult + >(FileViewerDialogComponent, { + position: { + top: '50px' + }, + maxWidth: '100vw', + maxHeight: '100vh', + height: 'calc(100% - 50px)', + width: '100%', + panelClass: 'app-dialog-full', + data: { + imageOnly: true, + imageOnlyData, + fileInfo: {}, + downloadUrl: this.sessionVerinfo.downloadUrl, + deviceType: this.environmentsInfo.deviceType, + token: this.loginRes.tokenString, + userSeq: this.loginRes.userSeq + } + }); + } + onUpdateIntro(intro: string) { this.store.dispatch( AuthenticationStore.infoUser({ diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html index 54adc88a..7561fbce 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html @@ -1,7 +1,11 @@
-
+
(); @Output() openChat = new EventEmitter(); @Output() @@ -86,6 +88,10 @@ export class ProfileComponent implements OnInit { ngOnInit() {} + onClickProfileImageView() { + this.profileImageView.emit(); + } + onClickOpenChat() { this.openChat.emit(this.userInfo); } diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html index caced57b..48e45703 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html @@ -13,6 +13,8 @@ *ngSwitchCase="FileViewerType.Image" [fileInfo]="fileInfo" [fileDownloadUrl]="fileDownloadUrl" + [imageOnly]="imageOnly" + [imageOnlyData]="imageOnlyData" (download)="onDownload($event)" (closed)="onClosedViewer()" > diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts index adfc1065..2bcab9b6 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts @@ -4,6 +4,7 @@ import { FileEventJson } from '@ucap-webmessenger/protocol-event'; import { FileViewerType } from '../types/file-viewer.type'; import { FileType } from '@ucap-webmessenger/protocol-file'; import { FileDownloadItem } from '@ucap-webmessenger/api'; +import { ImageOnlyDataInfo } from '../models/image-only-data-info'; @Component({ selector: 'ucap-file-viewer', @@ -18,6 +19,11 @@ export class FileViewerComponent implements OnInit { @Input() fileDownloadUrl: string; + @Input() + imageOnly = false; + @Input() + imageOnlyData?: ImageOnlyDataInfo; + @Output() download = new EventEmitter(); @@ -31,6 +37,10 @@ export class FileViewerComponent implements OnInit { ngOnInit() {} detectFileViewerType(fileInfo: FileEventJson): FileViewerType { + if (!!this.imageOnly) { + return FileViewerType.Image; + } + switch (fileInfo.fileType) { case FileType.Image: return FileViewerType.Image; diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html index 2bc39a23..e9124ace 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html @@ -17,10 +17,21 @@ - {{ fileInfo.fileName }} + + + + {{ imageOnlyData.fileName }} + + + {{ fileInfo.fileName }} + +
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 4324e3ef..cec8ff40 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 @@ -13,6 +13,7 @@ import { import { ucapAnimations } from '../../animations'; import { FileEventJson } from '@ucap-webmessenger/protocol-event'; import { FileDownloadItem } from '@ucap-webmessenger/api'; +import { ImageOnlyDataInfo } from '../../models/image-only-data-info'; @Component({ selector: 'ucap-image-viewer', @@ -28,6 +29,11 @@ export class ImageViewerComponent implements OnInit { @Input() fileDownloadUrl: string; + @Input() + imageOnly = false; + @Input() + imageOnlyData?: ImageOnlyDataInfo; + @Output() closed = new EventEmitter(); diff --git a/projects/ucap-webmessenger-ui/src/lib/models/image-only-data-info.ts b/projects/ucap-webmessenger-ui/src/lib/models/image-only-data-info.ts new file mode 100644 index 00000000..58e405fa --- /dev/null +++ b/projects/ucap-webmessenger-ui/src/lib/models/image-only-data-info.ts @@ -0,0 +1,6 @@ +export interface ImageOnlyDataInfo { + imageUrl: string; + imageRootUrl: string; + defaultImage: string; + fileName: string; +} diff --git a/projects/ucap-webmessenger-ui/src/public-api.ts b/projects/ucap-webmessenger-ui/src/public-api.ts index 15561e61..76304e98 100644 --- a/projects/ucap-webmessenger-ui/src/public-api.ts +++ b/projects/ucap-webmessenger-ui/src/public-api.ts @@ -30,6 +30,8 @@ export * from './lib/directives/click-outside.directive'; export * from './lib/directives/file-upload-for.directive'; export * from './lib/directives/image.directive'; +export * from './lib/models/image-only-data-info'; + export * from './lib/services/bottom-sheet.service'; export * from './lib/services/clipboard.service'; export * from './lib/services/dialog.service'; From 40ebe202f0a3dc2900e3764b5526cd7bec442cd8 Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 17 Mar 2020 15:22:51 +0900 Subject: [PATCH 15/57] =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20>=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=9B=90=EB=B3=B8=EB=B3=B4=EA=B8=B0=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80.=20>>=20=EC=9E=84=EC=8B=9C=EB=A1=9C=20?= =?UTF-8?q?=EB=A7=89=EC=95=84=EB=91=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/components/profile.component.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html index 7561fbce..49c6b73b 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html @@ -1,11 +1,12 @@
-
+ Date: Tue, 17 Mar 2020 16:29:42 +0900 Subject: [PATCH 16/57] =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20>=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=84=A0=ED=83=9D=EC=8B=9C=20=EC=9B=90=EB=B3=B8=EB=B3=B4?= =?UTF-8?q?=EA=B8=B0=20>=20default=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialogs/profile/profile.dialog.component.ts | 2 +- .../src/assets/images/no_image.png | Bin 0 -> 4535 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 projects/ucap-webmessenger-app/src/assets/images/no_image.png diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts index de78661c..b043a0d8 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts @@ -467,7 +467,7 @@ export class ProfileDialogComponent implements OnInit, OnDestroy { const imageOnlyData: ImageOnlyDataInfo = { imageUrl: this.userInfo.profileImageFile, imageRootUrl: this.sessionVerinfo.profileRoot, - defaultImage: 'assets/images/img_nophoto_50.png', + defaultImage: 'assets/images/no_image.png', fileName: this.userInfo.name }; diff --git a/projects/ucap-webmessenger-app/src/assets/images/no_image.png b/projects/ucap-webmessenger-app/src/assets/images/no_image.png new file mode 100644 index 0000000000000000000000000000000000000000..57ff3837a1c5cd20e03ce8eddd07b6a113a8cafb GIT binary patch literal 4535 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 V`UYZYqI>`V002ovPDHLkV1m+Gq)h+- literal 0 HcmV?d00001 From 4900ba729ca2164161aabae88aa50dab66620d94 Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 17 Mar 2020 16:30:15 +0900 Subject: [PATCH 17/57] bugfix :: clear setting & logout >> setting null exception. --- .../app/services/authentication.service.ts | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts b/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts index 644221b3..4f67b21a 100644 --- a/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts +++ b/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts @@ -118,21 +118,23 @@ export class AppAuthenticationService { environment.customConfig.appKey ); - appUserInfo = { - ...appUserInfo, - settings: { - ...appUserInfo.settings, - general: { - ...appUserInfo.settings.general, - autoLogin: false + if (!!appUserInfo) { + appUserInfo = { + ...appUserInfo, + settings: { + ...appUserInfo.settings, + general: { + ...appUserInfo.settings.general, + autoLogin: false + } } - } - }; + }; - this.localStorageService.encSet( - KEY_APP_USER_INFO, - appUserInfo, - environment.customConfig.appKey - ); + this.localStorageService.encSet( + KEY_APP_USER_INFO, + appUserInfo, + environment.customConfig.appKey + ); + } } } From b5fade50dea5f8db90db16483c3c570609c3ace1 Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 17 Mar 2020 16:31:06 +0900 Subject: [PATCH 18/57] =?UTF-8?q?bugfix=20::=20appStorage=20=EC=97=90=20co?= =?UTF-8?q?nfig.dat=20=ED=8C=8C=EC=9D=BC=EC=97=90=20=EB=8C=80=ED=95=9C=20r?= =?UTF-8?q?ename=20=EC=98=A4=EB=A5=98=20=EC=B6=94=EC=A0=95=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ucap-webmessenger-electron/src/app/AppWindow.ts | 4 ++-- electron-projects/ucap-webmessenger-electron/src/index.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts index 4e8ec321..4c418ffa 100644 --- a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts +++ b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts @@ -14,8 +14,8 @@ import { ElectronWebContentsChannel } from '@ucap-webmessenger/electron-core'; -import { appStorage } from '../lib/storage'; import { now } from '../util/now'; +import { Storage } from '../lib/storage'; export class AppWindow { private window: BrowserWindow | null = null; @@ -33,7 +33,7 @@ export class AppWindow { private defaultWidth = 1160; private defaultHeight = 800; - public constructor(private appIconPath: string) { + public constructor(private appIconPath: string, appStorage: Storage) { const savedWindowState = windowStateKeeper({ defaultWidth: this.defaultWidth, defaultHeight: this.defaultHeight diff --git a/electron-projects/ucap-webmessenger-electron/src/index.ts b/electron-projects/ucap-webmessenger-electron/src/index.ts index 3d7423e6..31aef290 100644 --- a/electron-projects/ucap-webmessenger-electron/src/index.ts +++ b/electron-projects/ucap-webmessenger-electron/src/index.ts @@ -174,7 +174,7 @@ if (isDuplicateInstance) { } function createWindow() { - const window = new AppWindow(appIconPath); + const window = new AppWindow(appIconPath, appStorage); if (__DEV__) { // const { @@ -213,6 +213,7 @@ function createWindow() { window.onDidLoad(() => { if (!appStorage.startupHideWindow) { + // not used? window.show(); } else { window.hide(); From 9578f09e3623289d00d3dd7cd77c32e4b891be5a Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 18 Mar 2020 08:26:30 +0900 Subject: [PATCH 19/57] =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=EC=98=81=EC=97=AD=EC=97=90=20=EC=82=AC=EB=B2=88=20?= =?UTF-8?q?=ED=95=AD=EB=AA=A9=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/ucap-webmessenger-app/src/assets/i18n/en.json | 1 + projects/ucap-webmessenger-app/src/assets/i18n/ko.json | 1 + .../src/lib/components/profile.component.html | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/en.json b/projects/ucap-webmessenger-app/src/assets/i18n/en.json index 51588eb3..ee94089f 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/en.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/en.json @@ -57,6 +57,7 @@ "removeBuddy": "Remove a buddy", "remoteSupport": "Remote support", "fieldCompany": "Company", + "fieldEmployeeNumber": "Employee Number", "fieldResponsibilities": "Responsibilities", "fieldWorkplace": "Workplace", "fieldJob": "Job", diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json index cc1a3cb2..9cd3da91 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json @@ -57,6 +57,7 @@ "removeBuddy": "동료삭제", "remoteSupport": "원격 지원", "fieldCompany": "회사", + "fieldEmployeeNumber": "사번", "fieldResponsibilities": "담당업무", "fieldWorkplace": "근무지", "fieldJob": "직무", diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html index 49c6b73b..e38c71c0 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html @@ -196,6 +196,12 @@
{{ 'profile.fieldCompany' | translate }}
{{ userInfo.companyName | ucapStringEmptycheck }}
+
  • +
    + {{ 'profile.fieldEmployeeNumber' | translate }} +
    +
    {{ userInfo.employeeNum | slice: 2 }}
    +
  • {{ 'search.fieldDeptartment' | translate }}
    {{ userInfo | ucapTranslate: 'deptName' }}
    From 93bcfa9cb710cd327b61333e26ddafdbb37697f4 Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 18 Mar 2020 09:45:17 +0900 Subject: [PATCH 20/57] =?UTF-8?q?bugfix=20::=20=EC=9E=90=EB=8F=99=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ucap-webmessenger-app/src/app/guards/auto-login.guard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ucap-webmessenger-app/src/app/guards/auto-login.guard.ts b/projects/ucap-webmessenger-app/src/app/guards/auto-login.guard.ts index 038b77c8..c02afb9d 100644 --- a/projects/ucap-webmessenger-app/src/app/guards/auto-login.guard.ts +++ b/projects/ucap-webmessenger-app/src/app/guards/auto-login.guard.ts @@ -49,7 +49,7 @@ export class AppAutoLoginGuard implements CanActivate { if ( !!appUserInfo && - appUserInfo.settings.general.autoLogin && + !!appUserInfo.settings.general.autoLogin && !(!!personLogout && !!personLogout.personLogout) ) { this.store.dispatch( From 2ceec93b366710aca684cccc6a6ab321e089757f Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 18 Mar 2020 10:28:08 +0900 Subject: [PATCH 21/57] =?UTF-8?q?bugfix=20:=20=EC=9E=90=EB=8F=99=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=EC=8B=9C=20=EC=98=A4=EB=A5=98=EB=B0=9C?= =?UTF-8?q?=EC=83=9D=ED=95=98=EB=A9=B4=20=EB=A1=9C=EB=94=A9=EC=A4=91?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=ED=91=9C=EC=8B=9C=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/account/authentication/effects.ts | 80 +++++++++++-------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts b/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts index 3d00ab0b..66b171f7 100644 --- a/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts @@ -87,41 +87,51 @@ import { @Injectable() export class Effects { - webLogin$ = createEffect(() => - this.actions$.pipe( - ofType(webLogin), - map(action => action), - exhaustMap( - (params: { - loginInfo: LoginInfo; - rememberMe: boolean; - autoLogin: boolean; - }) => - this.piService - .login2({ - loginId: params.loginInfo.loginId, - loginPw: params.loginInfo.loginPw, - companyCode: params.loginInfo.companyCode - }) - .pipe( - map((res: Login2Response) => { - if ('success' !== res.status.toLowerCase()) { - this.store.dispatch(increaseLoginFailCount({})); - return webLoginFailure({ error: 'Failed' }); - } else { - this.store.dispatch(initialLoginFailCount({})); - return webLoginSuccess({ - loginInfo: params.loginInfo, - rememberMe: params.rememberMe, - autoLogin: params.autoLogin, - login2Response: res - }); - } - }), - catchError(error => of(webLoginFailure({ error }))) - ) - ) - ) + webLogin$ = createEffect( + () => + this.actions$.pipe( + ofType(webLogin), + map(action => action), + exhaustMap( + (params: { + loginInfo: LoginInfo; + rememberMe: boolean; + autoLogin: boolean; + }) => + this.piService + .login2({ + loginId: params.loginInfo.loginId, + loginPw: params.loginInfo.loginPw, + companyCode: params.loginInfo.companyCode + }) + .pipe( + map((res: Login2Response) => { + if ('success' !== res.status.toLowerCase()) { + if (!!params.autoLogin) { + // auto login Failure. + this.localStorageService.remove(KEY_APP_USER_INFO); + this.router.navigateByUrl('/account/login'); + } else { + this.store.dispatch(increaseLoginFailCount({})); + this.store.dispatch(webLoginFailure({ error: 'Failed' })); + } + } else { + this.store.dispatch(initialLoginFailCount({})); + this.store.dispatch( + webLoginSuccess({ + loginInfo: params.loginInfo, + rememberMe: params.rememberMe, + autoLogin: params.autoLogin, + login2Response: res + }) + ); + } + }), + catchError(error => of(webLoginFailure({ error }))) + ) + ) + ), + { dispatch: false } ); webLoginSuccess$ = createEffect( From a5226113587a4e49cbf2d7e971b14d35a1bb3fcc Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 18 Mar 2020 11:56:54 +0900 Subject: [PATCH 22/57] bugfix :: electron-storage rename permision error. --- .../ucap-webmessenger-electron/src/app/AppWindow.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts index 4c418ffa..774b4c2f 100644 --- a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts +++ b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts @@ -122,11 +122,14 @@ export class AppWindow { // can be tidied up once https://github.com/electron/electron/issues/12971 // has been confirmed as resolved this.window.once(ElectronBrowserWindowChannel.ReadyToShow, () => { - if (appStorage.startupHideWindow) { - this.window.close(); - } else { - this.window.show(); - } + this.window.close(); + setTimeout(() => { + if (appStorage.startupHideWindow) { + this.window.close(); + } else { + this.window.show(); + } + }, 500); this.window.on(ElectronBrowserWindowChannel.Unmaximize, () => { setTimeout(() => { const bounds = this.window.getBounds(); From 38eb6f793939e214bb620b0a904d1978bcc4b85b Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 18 Mar 2020 12:11:48 +0900 Subject: [PATCH 23/57] version up to 1.0.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4d51b140..123d6b0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ucap-webmessenger", - "version": "1.0.6", + "version": "1.0.7", "author": { "name": "LG CNS", "email": "lgucap@lgcns.com" From 705e74a27bc52b32c264e8e2f8de9982b09df61b Mon Sep 17 00:00:00 2001 From: richard-loafle <44828666+richard-loafle@users.noreply.github.com> Date: Wed, 18 Mar 2020 17:15:22 +0900 Subject: [PATCH 24/57] focus & blur callback are added --- .../src/lib/types/channel.type.ts | 3 ++- .../ucap-webmessenger-electron/src/app/AppWindow.ts | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/electron-projects/ucap-webmessenger-electron-core/src/lib/types/channel.type.ts b/electron-projects/ucap-webmessenger-electron-core/src/lib/types/channel.type.ts index d9f55c52..0d7645e1 100644 --- a/electron-projects/ucap-webmessenger-electron-core/src/lib/types/channel.type.ts +++ b/electron-projects/ucap-webmessenger-electron-core/src/lib/types/channel.type.ts @@ -27,7 +27,8 @@ export enum ElectronBrowserWindowChannel { Close = 'close', Closed = 'closed', ReadyToShow = 'ready-to-show', - Focus = 'focus' + Focus = 'focus', + Blur = 'blur' } export enum ElectronWebContentsChannel { diff --git a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts index 774b4c2f..8f5d5584 100644 --- a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts +++ b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts @@ -84,6 +84,14 @@ export class AppWindow { event.returnValue = true; }); + this.window.on(ElectronBrowserWindowChannel.Focus, () => { + console.log('window got focus'); + }); + + this.window.on(ElectronBrowserWindowChannel.Blur, () => { + console.log('window blur'); + }); + // on macOS, when the user closes the window we really just hide it. This // lets us activate quickly and keep all our interesting logic in the // renderer. From 5fe7b9cb22c36ce9ba382b548d5ea3b5e56ef59d Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 19 Mar 2020 10:35:29 +0900 Subject: [PATCH 25/57] =?UTF-8?q?=EC=B9=AD=EC=B0=AC=EC=BD=94=EB=81=BC?= =?UTF-8?q?=EB=A6=AC=20=EB=B3=B4=EB=82=B4=EA=B8=B0=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../profile/profile.dialog.component.html | 2 + .../profile/profile.dialog.component.ts | 64 ++++++++++++++++++- .../src/lib/components/profile.component.html | 20 ++++-- .../src/lib/components/profile.component.ts | 8 +++ 4 files changed, 85 insertions(+), 9 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.html index 300913c0..0ca72588 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.html @@ -9,7 +9,9 @@ [openProfileOptions]="data.openProfileOptions" [useBuddyToggleButton]="useBuddyToggleButton" [authInfo]="authInfo" + [enableElephantButton]="getEnableElephantButton()" (profileImageView)="onClickProfileImageView()" + (sendElephant)="onClickSendElephant()" (openChat)="onClickChat($event)" (sendMessage)="onClickSendMessage($event)" (sendCall)="onClickSendClickToCall($event)" diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts index b043a0d8..333ef40e 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts @@ -1,7 +1,15 @@ import { Component, OnInit, Inject, OnDestroy } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { KEY_LOGIN_RES_INFO, KEY_VER_INFO, KEY_AUTH_INFO } from '@app/types'; -import { SessionStorageService } from '@ucap-webmessenger/web-storage'; +import { + KEY_LOGIN_RES_INFO, + KEY_VER_INFO, + KEY_AUTH_INFO, + KEY_URL_INFO +} from '@app/types'; +import { + SessionStorageService, + LocalStorageService +} from '@ucap-webmessenger/web-storage'; import { Store, select } from '@ngrx/store'; import * as AppStore from '@app/store'; @@ -52,7 +60,7 @@ import { ConferenceService } from '@ucap-webmessenger/api-prompt'; import { NGXLogger } from 'ngx-logger'; -import { SmsUtils } from '@ucap-webmessenger/daesang'; +import { SmsUtils, WebLinkType } from '@ucap-webmessenger/daesang'; import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native'; import { environment } from '../../../../../environments/environment'; import { TranslateService } from '@ngx-translate/core'; @@ -64,6 +72,8 @@ import { } from '@app/layouts/common/dialogs/file-viewer.dialog.component'; import { FileEventJson } from '@ucap-webmessenger/protocol-event'; import { FileType } from '@ucap-webmessenger/protocol-file'; +import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external'; +import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type'; export interface ProfileDialogData { userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; @@ -101,6 +111,7 @@ export class ProfileDialogComponent implements OnInit, OnDestroy { @Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService, @Inject(MAT_DIALOG_DATA) public data: ProfileDialogData, private dialogService: DialogService, + private localStorageService: LocalStorageService, private sessionStorageService: SessionStorageService, private commonApiService: CommonApiService, private conferenceService: ConferenceService, @@ -496,6 +507,53 @@ export class ProfileDialogComponent implements OnInit, OnDestroy { }); } + getEnableElephantButton() { + if (!this.loginRes) { + return false; + } + + const myEmployeeNum = this.loginRes.userInfo.employeeNum; + const profEmployeeNum = this.userInfo.employeeNum; + const trgtEmployeeCode = '10'; // only 10 + if ( + !this.isMe && + !!myEmployeeNum && + !!profEmployeeNum && + myEmployeeNum.slice(0, 2) === trgtEmployeeCode && + profEmployeeNum.slice(0, 2) === trgtEmployeeCode + ) { + return true; + } + return false; + } + + onClickSendElephant() { + const urlInfo: DaesangUrlInfoResponse = this.sessionStorageService.get< + DaesangUrlInfoResponse + >(KEY_URL_INFO); + + if (!!urlInfo && !!urlInfo.webLink) { + const links = urlInfo.webLink.filter( + link => link.key === WebLinkType.Elephant + ); + if (!!links && links.length > 0) { + const appUserInfo = this.localStorageService.encGet( + KEY_APP_USER_INFO, + environment.customConfig.appKey + ); + + let elephantUrl = links[0].url + .replace(/(\(%USER_PASS%\))/g, appUserInfo.loginPw) // exchange USER_PASS params + .replace('kind%3D3', 'kind%3D2'); // change value of 'kind' + elephantUrl += '%26empno%3D' + this.userInfo.employeeNum + ','; // add parameter of 'empno' + + console.log(elephantUrl); + + this.nativeService.openDefaultBrowser(elephantUrl); + } + } + } + onUpdateIntro(intro: string) { this.store.dispatch( AuthenticationStore.infoUser({ diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html index e38c71c0..9f834ceb 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html @@ -29,18 +29,26 @@ > - + (); @@ -72,6 +74,8 @@ export class ProfileComponent implements OnInit { @Output() updateIntro = new EventEmitter(); @Output() + sendElephant = new EventEmitter(); + @Output() close = new EventEmitter(); @ViewChild('profileImageFileInput', { static: false }) @@ -92,6 +96,10 @@ export class ProfileComponent implements OnInit { this.profileImageView.emit(); } + onClickSendElephant() { + this.sendElephant.emit(); + } + onClickOpenChat() { this.openChat.emit(this.userInfo); } From d8e48f7765fa1d0a119e3ab9e93807d36aa79a94 Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 19 Mar 2020 10:51:07 +0900 Subject: [PATCH 26/57] =?UTF-8?q?=EB=8C=80=ED=99=94=EB=B0=A9=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EC=98=86=EC=97=90=20=EC=A7=81=EA=B8=89=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C.(=EB=8B=A4=EA=B5=AD=EC=96=B4=20=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EC=95=88=EB=90=98=EC=9E=88=EC=9D=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/components/message-box.component.html | 4 +--- .../src/lib/components/message-box.component.ts | 3 +++ .../src/lib/components/messages.component.html | 1 + .../src/lib/components/messages.component.ts | 13 +++++++++++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box.component.html index c25bea9a..2b69b241 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box.component.html @@ -98,9 +98,7 @@
    -
    - {{ senderName }} -
    +
    {{ senderName }} {{ senderGrade }}
    user.seq === seq + ); + if (!!userInfo && userInfo.length > 0) { + return userInfo[0].grade; + } + return ''; + } getUserProfile(seq: number): string { if (!this.userInfos) { return ''; From 5c5ad1a38dbf4a868e71b09b4d5cec88adc90ecb Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 19 Mar 2020 12:49:31 +0900 Subject: [PATCH 27/57] =?UTF-8?q?=EC=B9=AD=EC=B0=AC=20=EC=BD=94=EB=81=BC?= =?UTF-8?q?=EB=A6=AC=20=EA=B8=B0=EB=8A=A5=20=EB=A7=89=EC=9D=8C.=20>=20?= =?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=20=EB=B3=80=EA=B2=BD=20=ED=95=84?= =?UTF-8?q?=EC=9A=94.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/components/profile.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html index 9f834ceb..dd16f9f9 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html @@ -29,7 +29,7 @@ > - + --> Date: Thu, 19 Mar 2020 12:50:47 +0900 Subject: [PATCH 28/57] =?UTF-8?q?electron-store=20=EB=A1=9C=20=EC=9D=B8?= =?UTF-8?q?=ED=95=9C=20=EC=9D=B4=EC=8A=88=20=EB=B3=B4=EC=99=84=EC=B2=98?= =?UTF-8?q?=EB=A6=AC.=202=EC=B0=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/AppWindow.ts | 2 +- .../ucap-webmessenger-electron/src/index.ts | 39 ++++++++++++------- package.json | 2 +- .../app/services/authentication.service.ts | 6 +++ 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts index 8f5d5584..640ca1d6 100644 --- a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts +++ b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts @@ -132,7 +132,7 @@ export class AppWindow { this.window.once(ElectronBrowserWindowChannel.ReadyToShow, () => { this.window.close(); setTimeout(() => { - if (appStorage.startupHideWindow) { + if (!!appStorage && appStorage.startupHideWindow) { this.window.close(); } else { this.window.show(); diff --git a/electron-projects/ucap-webmessenger-electron/src/index.ts b/electron-projects/ucap-webmessenger-electron/src/index.ts index 31aef290..8f9e8f38 100644 --- a/electron-projects/ucap-webmessenger-electron/src/index.ts +++ b/electron-projects/ucap-webmessenger-electron/src/index.ts @@ -61,7 +61,7 @@ import { import log from 'electron-log'; import { RendererUpdater } from './lib/renderer-updater'; -import { appStorage } from './lib/storage'; +import { Storage } from './lib/storage'; require('v8-compile-cache'); @@ -108,6 +108,8 @@ let updateWindowService: ElectronUpdateWindowService | null; tmp.setGracefulCleanup(); +let appStorage: Storage; + function handleUncaughtException(error: Error) { preventQuit = true; @@ -174,6 +176,11 @@ if (isDuplicateInstance) { } function createWindow() { + try { + appStorage = new Storage(); + } catch (e) { + log.error('[appStorage = new Storage()]]', e); + } const window = new AppWindow(appIconPath, appStorage); if (__DEV__) { @@ -212,7 +219,7 @@ function createWindow() { }); window.onDidLoad(() => { - if (!appStorage.startupHideWindow) { + if (!!appStorage && !appStorage.startupHideWindow) { // not used? window.show(); } else { @@ -441,7 +448,9 @@ ipcMain.on( ipcMain.on( MessengerChannel.ClearAppStorage, (event: IpcMainEvent, ...args: any[]) => { - appStorage.reset(); + if (!!!!appStorage) { + appStorage.reset(); + } } ); @@ -479,13 +488,15 @@ ipcMain.on( (event: IpcMainEvent, ...args: any[]) => { const isStartupHideWindow = args[0] as boolean; - appStorage.startupHideWindow = isStartupHideWindow; - log.info( - 'StartupHideWindow is changed from ', - !appStorage.startupHideWindow, - ' to ', - appStorage.startupHideWindow - ); + if (!!!!appStorage) { + appStorage.startupHideWindow = isStartupHideWindow; + log.info( + 'StartupHideWindow is changed from ', + !appStorage.startupHideWindow, + ' to ', + appStorage.startupHideWindow + ); + } event.returnValue = true; } ); @@ -495,7 +506,7 @@ ipcMain.on( (event: IpcMainEvent, ...args: any[]) => { const downloadPath = args[0] as string; - if (!!downloadPath && downloadPath.length > 0) { + if (!!appStorage && !!downloadPath && downloadPath.length > 0) { appStorage.downloadPath = downloadPath; log.info('downloadPath is changed to ', appStorage.downloadPath); @@ -566,9 +577,9 @@ ipcMain.on( let basePath = path.join( app.getPath('documents'), - appStorage.constDefaultDownloadFolder + !!appStorage ? appStorage.constDefaultDownloadFolder : '' ); - if (!!appStorage.downloadPath) { + if (!!appStorage && !!appStorage.downloadPath) { basePath = appStorage.downloadPath; } try { @@ -608,7 +619,7 @@ ipcMain.on( const make: boolean = args[1]; if (!folderItem) { let basePath = app.getPath('downloads'); - if (!!appStorage.downloadPath) { + if (!!appStorage && !!appStorage.downloadPath) { try { basePath = appStorage.downloadPath; } catch (err) { diff --git a/package.json b/package.json index 123d6b0f..216c5c88 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@angular/core": "^8.2.14", "auto-launch": "^5.0.5", "electron-log": "^3.0.9", - "electron-store": "^5.1.0", + "electron-store": "^5.1.1", "electron-updater": "^4.2.0", "electron-window-state": "^5.0.3", "file-type": "^14.1.2", diff --git a/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts b/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts index 4f67b21a..7c78bdf3 100644 --- a/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts +++ b/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts @@ -79,6 +79,12 @@ export class AppAuthenticationService { } } }; + + // if (!!environment.productConfig.defaultSettings.general.autoLaunch) { + // this.nativeService.changeAutoLaunch( + // environment.productConfig.defaultSettings.general.autoLaunch + // ); + // } } appUserInfo = { From dce9e5c7d4fa2b1094dda5703652fd9cf66410d4 Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 19 Mar 2020 12:51:05 +0900 Subject: [PATCH 29/57] version up to 1.0.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 216c5c88..198dd567 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ucap-webmessenger", - "version": "1.0.7", + "version": "1.0.8", "author": { "name": "LG CNS", "email": "lgucap@lgcns.com" From 7ba02f3c12872181a73493c5c0022a087df6beda Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 19 Mar 2020 16:00:28 +0900 Subject: [PATCH 30/57] =?UTF-8?q?electron-store=20=EB=A1=9C=20=EC=9D=B8?= =?UTF-8?q?=ED=95=9C=20=EC=9D=B4=EC=8A=88=20=EB=B3=B4=EC=99=84=EC=B2=98?= =?UTF-8?q?=EB=A6=AC.=203=EC=B0=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/build/win/bin/config.dat | Bin 0 -> 145 bytes electron-builder.json | 4 ++++ .../ucap-webmessenger-electron/src/lib/storage.ts | 1 + 3 files changed, 5 insertions(+) create mode 100644 config/build/win/bin/config.dat diff --git a/config/build/win/bin/config.dat b/config/build/win/bin/config.dat new file mode 100644 index 0000000000000000000000000000000000000000..6d936083703819254dcb814b18cf0a838b62fffe GIT binary patch literal 145 zcmV;C0B-+q`*U+W-wx6Zm_F;+p4%fj?7|)}Bz6c;qX+>A?fHDhH%L0R3cnjDawmb# zcE;>$BSONlT9Rn}PRtJi6&p;P%Y!W4ydSs2C0VuMO+E^rZN$PsO5RgP#?77rH|PS+ zTbCpB3N5jg30Y6@F3T_idyBUgnx^`UxzZFv0P-)S?tiN3?{eX0w;&&wL))TBC__Zl literal 0 HcmV?d00001 diff --git a/electron-builder.json b/electron-builder.json index 8dfc5ac5..68fdc38e 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -59,6 +59,10 @@ { "from": "./config/build/win/bin/AeroAdmin.exe", "to": "./bin/AeroAdmin.exe" + }, + { + "from": "./config/build/win/bin/config.dat", + "to": "./bin/config.dat" } ] }, diff --git a/electron-projects/ucap-webmessenger-electron/src/lib/storage.ts b/electron-projects/ucap-webmessenger-electron/src/lib/storage.ts index 0ece865b..7eb1c928 100644 --- a/electron-projects/ucap-webmessenger-electron/src/lib/storage.ts +++ b/electron-projects/ucap-webmessenger-electron/src/lib/storage.ts @@ -11,6 +11,7 @@ export class Storage { constructor() { this.store = new ElectronStore({ + cwd: path.join(__dirname, '..', '..', '..', '/bin/'), schema: { options: { type: 'object', From df63108a53253cf8c33d32c2fe9f4058a77b5213 Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 19 Mar 2020 16:00:44 +0900 Subject: [PATCH 31/57] version up to 1.0.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 198dd567..28c8d511 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ucap-webmessenger", - "version": "1.0.8", + "version": "1.0.9", "author": { "name": "LG CNS", "email": "lgucap@lgcns.com" From 88d368024702b72a410eba28a7f82fa8fe81ee10 Mon Sep 17 00:00:00 2001 From: leejinho Date: Fri, 20 Mar 2020 13:57:50 +0900 Subject: [PATCH 32/57] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=EC=8B=9C=20?= =?UTF-8?q?=EB=84=A4=ED=8A=B8=EC=9B=8C=ED=81=AC=20=EC=A0=88=EC=B2=B4?= =?UTF-8?q?=EB=90=9C=20=EC=83=81=ED=99=A9=20=EC=B2=98=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/login.page.component.html | 2 +- .../components/login.page.component.ts | 132 +++++++++++++++--- .../store/account/authentication/effects.ts | 66 ++++++++- .../src/assets/i18n/en.json | 4 +- .../src/assets/i18n/ko.json | 4 +- 5 files changed, 177 insertions(+), 31 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html index ceb4974d..77a1529d 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html +++ b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html @@ -53,7 +53,7 @@
    --> ; + companyList: Company[]; + companyListSubscription: Subscription; loginFailureCount: Subscription; @@ -85,6 +91,7 @@ export class LoginPageComponent implements OnInit, OnDestroy { private protocolService: ProtocolService, private localStorageService: LocalStorageService, private sessionStorageService: SessionStorageService, + private externalApiService: ExternalApiService, private appAuthenticationService: AppAuthenticationService ) { this.useRememberMe = @@ -113,15 +120,36 @@ export class LoginPageComponent implements OnInit, OnDestroy { this.defatulLoginBtnText = this.translateService.instant('accounts.login'); this.defatulWaitingTime = 5 * 60; // sec - this.store.dispatch( - CompanyStore.companyList({ + this.externalApiService + .companyList({ companyGroupCode: environment.companyConfig.companyGroupCode - }) - ); + } as CompanyListRequest) + .pipe( + take(1), + map(res => { + if (res.statusCode === StatusCode.Success) { + this.store.dispatch(CompanyStore.companyListSuccess(res)); + } else { + this.store.dispatch( + CompanyStore.companyListFailure({ error: 'Failed' }) + ); + } + }), + catchError(error => { + console.log('network disconnected', error); + return of(); + }) + ) + .subscribe(); - this.companyList$ = this.store.pipe( - select(AppStore.SettingSelector.CompanySelector.companyList) - ); + this.companyListSubscription = this.store + .pipe( + select(AppStore.SettingSelector.CompanySelector.companyList), + map(companyList => { + this.companyList = companyList; + }) + ) + .subscribe(); this.loginFailureCount = this.store .pipe( @@ -234,6 +262,9 @@ export class LoginPageComponent implements OnInit, OnDestroy { } ngOnDestroy(): void { + if (!!this.companyListSubscription) { + this.companyListSubscription.unsubscribe(); + } if (!!this.loginFailureCount) { this.loginFailureCount.unsubscribe(); } @@ -273,18 +304,73 @@ export class LoginPageComponent implements OnInit, OnDestroy { this.loginBtnEnable = true; }, 30 * 1000); - this.store.dispatch( - AuthenticationStore.webLogin({ - loginInfo: { - companyCode: value.companyCode, - companyGroupType: 'C', - loginId: value.loginId, - loginPw: value.loginPw - }, - rememberMe: value.rememberMe, - autoLogin: value.autoLogin - }) - ); + if (!this.companyList) { + this.externalApiService + .companyList({ + companyGroupCode: environment.companyConfig.companyGroupCode + } as CompanyListRequest) + .pipe( + take(1), + map(res => { + if (res.statusCode === StatusCode.Success) { + this.store.dispatch(CompanyStore.companyListSuccess(res)); + // Recursion function > onLogin + this.onLogin(value); + } else { + this.dialogService.open< + AlertDialogComponent, + AlertDialogData, + AlertDialogResult + >(AlertDialogComponent, { + width: '360px', + data: { + title: this.translateService.instant( + 'accounts.errors.loginFailed' + ), + html: this.translateService.instant( + 'accounts.errors.networkFailedAndRetry' + ) + } + }); + this.loginBtnEnable = true; + } + }), + catchError(error => { + this.dialogService.open< + AlertDialogComponent, + AlertDialogData, + AlertDialogResult + >(AlertDialogComponent, { + width: '360px', + data: { + title: this.translateService.instant( + 'accounts.errors.loginFailed' + ), + html: this.translateService.instant( + 'accounts.errors.networkFailedAndRetry' + ) + } + }); + this.loginBtnEnable = true; + + return of(); + }) + ) + .subscribe(); + } else { + this.store.dispatch( + AuthenticationStore.webLogin({ + loginInfo: { + companyCode: value.companyCode, + companyGroupType: 'C', + loginId: value.loginId, + loginPw: value.loginPw + }, + rememberMe: value.rememberMe, + autoLogin: value.autoLogin + }) + ); + } } onClickNoti() { diff --git a/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts b/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts index 66b171f7..571a1f66 100644 --- a/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts @@ -76,7 +76,11 @@ import { ServiceProtocolService, UserPasswordSetResponse } from '@ucap-webmessenger/protocol-service'; -import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external'; +import { + DaesangUrlInfoResponse, + ExternalApiService, + CompanyListRequest +} from '@ucap-webmessenger/api-external'; import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type'; import { DaesangCipherService, WebLinkType } from '@ucap-webmessenger/daesang'; import { TranslateService } from '@ngx-translate/core'; @@ -84,9 +88,13 @@ import { InfoProtocolService, UserResponse } from '@ucap-webmessenger/protocol-info'; +import { StatusCode } from '@ucap-webmessenger/api'; @Injectable() export class Effects { + retryCount = 0; + retryInterval = 3000; // ms + maxRetryCount = (10 * 60 * 1000) / this.retryInterval; // 200 count due to 10 min. webLogin$ = createEffect( () => this.actions$.pipe( @@ -97,8 +105,10 @@ export class Effects { loginInfo: LoginInfo; rememberMe: boolean; autoLogin: boolean; - }) => - this.piService + }) => { + const selfParam = params; + + return this.piService .login2({ loginId: params.loginInfo.loginId, loginPw: params.loginInfo.loginPw, @@ -109,6 +119,7 @@ export class Effects { if ('success' !== res.status.toLowerCase()) { if (!!params.autoLogin) { // auto login Failure. + this.store.dispatch(increaseLoginFailCount({})); this.localStorageService.remove(KEY_APP_USER_INFO); this.router.navigateByUrl('/account/login'); } else { @@ -127,8 +138,52 @@ export class Effects { ); } }), - catchError(error => of(webLoginFailure({ error }))) - ) + catchError(async error => { + if (!!selfParam.autoLogin) { + if (this.maxRetryCount > this.retryCount) { + this.store.dispatch(logoutInitialize()); + setTimeout(() => { + // this.store.dispatch(webLogin(selfParam)); + this.router.navigateByUrl('/account/login'); + }, this.retryInterval); + + this.retryCount++; + console.log('retry', this.retryCount, this.maxRetryCount); + return of(webLoginFailure({ error })); + } else { + console.log( + 'retry End', + this.retryCount, + this.maxRetryCount + ); + } + } + + const result = await this.dialogService.open< + AlertDialogComponent, + AlertDialogData, + AlertDialogResult + >(AlertDialogComponent, { + width: '360px', + data: { + title: this.translateService.instant( + 'accounts.errors.loginFailed' + ), + html: this.translateService.instant( + 'accounts.errors.networkFailedAndExit' + ) + } + }); + + if (!!result) { + this.nativeService.appExit(); + } + + console.log('not retry'); + return of(webLoginFailure({ error })); + }) + ); + } ) ), { dispatch: false } @@ -510,6 +565,7 @@ export class Effects { private sessionStorageService: SessionStorageService, private piService: PiService, private appAuthenticationService: AppAuthenticationService, + private externalApiService: ExternalApiService, private protocolService: ProtocolService, private authenticationProtocolService: AuthenticationProtocolService, private infoProtocolService: InfoProtocolService, diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/en.json b/projects/ucap-webmessenger-app/src/assets/i18n/en.json index ee94089f..02839e06 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/en.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/en.json @@ -45,7 +45,9 @@ "failToChangePassword": "Failed to change password.", "loginFailed": "Failed to login", "loginFailedIdPw": "Username or password do not match.", - "loginFailOverTry": "Password error count exceeded.
    Check your password
    Please try again later." + "loginFailOverTry": "Password error count exceeded.
    Check your password
    Please try again later.", + "networkFailedAndExit": "Please exit the program due to a network problem.
    Please check the network and try again.", + "networkFailedAndRetry": "Cannot run due to network problem.
    Please check the network and try again." } }, "profile": { diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json index 9cd3da91..230d59ec 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json @@ -45,7 +45,9 @@ "failToChangePassword": "비밀번호 변경에 실패하였습니다.", "loginFailed": "로그인에 실패하였습니다.", "loginFailedIdPw": "아이디 또는 패스워드가
    일치하지 않습니다.", - "loginFailOverTry": "비밀번호 오류 횟수 초과입니다.
    비밀번호를 확인하신 후
    잠시 후 다시 시작해 주세요." + "loginFailOverTry": "비밀번호 오류 횟수 초과입니다.
    비밀번호를 확인하신 후
    잠시 후 다시 시작해 주세요.", + "networkFailedAndExit": "네트워크 문제로 프로그램을 종료합니다.
    네트워크 확인후 다시 시도해 주세요.", + "networkFailedAndRetry": "네트워크 문제로 실행할 수 없습니다.
    네트워크 확인후 다시 시도해 주세요." } }, "profile": { From d5bbdb650f50dcfdf9974356c3c0e254686c676b Mon Sep 17 00:00:00 2001 From: leejinho Date: Fri, 20 Mar 2020 16:07:50 +0900 Subject: [PATCH 33/57] =?UTF-8?q?=EC=B9=AD=EC=B0=AC=EC=BD=94=EB=81=BC?= =?UTF-8?q?=EB=A6=AC=20=EC=9C=84=EC=B9=98=20=EC=9D=B4=EB=8F=99=20>>=20?= =?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=88=98=EC=A0=95=20=ED=95=84?= =?UTF-8?q?=EC=9A=94.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/components/profile.component.html | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html index dd16f9f9..e0b58a99 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.html @@ -409,6 +409,31 @@ }}
    + +
  • -
  • - {{ message.sentMessageJson.content }} -
  • +
  • + > Date: Wed, 25 Mar 2020 15:07:22 +0900 Subject: [PATCH 55/57] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=ED=8C=9D=EC=97=85=EC=97=90=20chip=20=EC=97=90=20?= =?UTF-8?q?=EB=8B=A4=EA=B5=AD=EC=96=B4=20=EC=A7=80=EC=9B=90.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../messenger/dialogs/chat/create-chat.dialog.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html index 98d7fe83..ba2f1d85 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html @@ -255,7 +255,7 @@ [selected]="getChipsRemoveYn(userInfo)" (removed)="onClickDeleteUser(userInfo)" > - {{ userInfo.name }} + {{ userInfo | ucapTranslate: 'name' }} clear From 96d9d574c19a185ca69e59d253049176dee94ab8 Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 25 Mar 2020 15:08:42 +0900 Subject: [PATCH 56/57] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=B7=B0=EC=96=B4?= =?UTF-8?q?=EC=97=90=20=EB=8B=A4=EB=A5=B8=EC=9D=B4=EB=A6=84=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialogs/file-viewer.dialog.component.html | 1 + .../dialogs/file-viewer.dialog.component.ts | 48 ++++++++++++++++++- .../lib/components/file-viewer.component.html | 3 ++ .../lib/components/file-viewer.component.ts | 5 ++ .../file-viewer/binary-viewer.component.html | 35 +++++++++++++- .../file-viewer/binary-viewer.component.scss | 5 ++ .../file-viewer/binary-viewer.component.ts | 7 +++ .../file-viewer/image-viewer.component.html | 26 ++++++++++ .../file-viewer/image-viewer.component.ts | 7 +++ .../file-viewer/sound-viewer.component.html | 25 ++++++++++ .../file-viewer/sound-viewer.component.ts | 7 +++ .../file-viewer/video-viewer.component.html | 25 ++++++++++ .../file-viewer/video-viewer.component.ts | 7 +++ 13 files changed, 199 insertions(+), 2 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.html index c9536eb9..759de027 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.html @@ -4,5 +4,6 @@ [imageOnly]="imageOnly" [imageOnlyData]="imageOnlyData" (download)="onDownload($event)" + (saveAs)="onSaveAs($event)" (closed)="onClosedViewer()" > diff --git a/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts index 26666cbf..431352bb 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts @@ -7,7 +7,9 @@ import { DeviceType } from '@ucap-webmessenger/core'; import { FileDownloadItem } from '@ucap-webmessenger/api'; import { CommonApiService } from '@ucap-webmessenger/api-common'; import { AppFileService } from '@app/services/file.service'; -import { ImageOnlyDataInfo } from '@ucap-webmessenger/ui'; +import { ImageOnlyDataInfo, SnackBarService } from '@ucap-webmessenger/ui'; +import { UCAP_NATIVE_SERVICE, NativeService } from '@ucap-webmessenger/native'; +import { TranslateService } from '@ngx-translate/core'; export interface FileViewerDialogData { fileInfo: FileEventJson; @@ -46,6 +48,9 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy { @Inject(MAT_DIALOG_DATA) public data: FileViewerDialogData, private commonApiService: CommonApiService, private appFileService: AppFileService, + private translateService: TranslateService, + private snackBarService: SnackBarService, + @Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService, private logger: NGXLogger ) { this.fileInfo = data.fileInfo; @@ -91,6 +96,47 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy { fileDownloadUrl: this.downloadUrl }); } + onSaveAs(fileDownloadItem: FileDownloadItem): void { + this.nativeService + .selectSaveFilePath(this.fileInfo.fileName) + .then(result => { + if (!result) { + return; + } + + if (result.canceled) { + // this.snackBarService.open( + // this.translateService.instant('common.file.results.canceled'), + // this.translateService.instant('common.file.errors.label'), + // { + // duration: 1000 + // } + // ); + } else { + this.saveFile(fileDownloadItem, result.filePath); + } + }) + .catch(reason => { + this.snackBarService.open( + this.translateService.instant('common.file.errors.failToSpecifyPath'), + this.translateService.instant('common.file.errors.label') + ); + }); + } + + saveFile(fileDownloadItem: FileDownloadItem, savePath?: string) { + this.appFileService.fileTalkDownlod({ + req: { + userSeq: this.userSeq, + deviceType: this.deviceType, + token: this.token, + attachmentsSeq: this.fileInfo.attachmentSeq, + fileDownloadItem + }, + fileName: this.fileInfo.fileName, + savePath + }); + } onClosedViewer(): void { this.dialogRef.close(); diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html index 48e45703..a9f80822 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.html @@ -16,6 +16,7 @@ [imageOnly]="imageOnly" [imageOnlyData]="imageOnlyData" (download)="onDownload($event)" + (saveAs)="onSaveAs($event)" (closed)="onClosedViewer()" >
    diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts index 2bcab9b6..f58d1dac 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer.component.ts @@ -26,6 +26,8 @@ export class FileViewerComponent implements OnInit { @Output() download = new EventEmitter(); + @Output() + saveAs = new EventEmitter(); @Output() closed = new EventEmitter(); @@ -58,6 +60,9 @@ export class FileViewerComponent implements OnInit { onDownload(fileDownloadItem: FileDownloadItem): void { this.download.emit(fileDownloadItem); } + onSaveAs(fileDownloadItem: FileDownloadItem): void { + this.saveAs.emit(fileDownloadItem); + } onClosedViewer(): void { this.closed.emit(); diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.html b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.html index 1f7d40a4..cda93e72 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.html @@ -44,6 +44,31 @@ /> +
    -
    +
    +
    diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.scss b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.scss index 3385ef7e..a5762dba 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.scss +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.scss @@ -60,5 +60,10 @@ margin: 30px; color: #ffffff; } + .btn-group { + button { + margin: 0 5px; + } + } } } diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.ts index ab2b655a..9d449a99 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.ts +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/binary-viewer.component.ts @@ -18,6 +18,8 @@ export class BinaryViewerComponent implements OnInit { @Output() download = new EventEmitter(); + @Output() + saveAs = new EventEmitter(); @Output() closed = new EventEmitter(); @@ -33,6 +35,11 @@ export class BinaryViewerComponent implements OnInit { this.download.emit(this.fileDownloadItem); } + onClickSaveAs(): void { + this.fileDownloadItem = new FileDownloadItem(); + this.saveAs.emit(this.fileDownloadItem); + } + onClickClose(): void { this.closed.emit(); } diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html index e9124ace..edc4f2ae 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/image-viewer.component.html @@ -136,6 +136,32 @@ /> + + +