From ccb7b8df5264a35c5198c78b2354d7124b8f3cfb Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 17 Dec 2019 11:44:59 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EC=9B=B9=EB=A7=81=ED=81=AC=20=EB=B1=83?= =?UTF-8?q?=EC=A7=80=EA=B8=B0=EB=8A=A5=20=EC=84=A0=EC=B2=98=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/services/call.service.ts | 6 +- .../profile/profile.dialog.component.ts | 7 +- .../native/components/top-bar.component.html | 10 +- .../native/components/top-bar.component.ts | 121 ++++++++++++++++-- .../layouts/native/native.layout.module.ts | 3 +- .../components/main.page.component.ts | 7 +- .../src/lib/apis/api.ts | 30 +++++ .../src/lib/services/daesang-api.service.ts | 27 ++++ .../src/lib/ucap-daesang.module.ts | 7 +- .../src/public-api.ts | 3 + 10 files changed, 199 insertions(+), 22 deletions(-) create mode 100644 projects/ucap-webmessenger-daesang/src/lib/apis/api.ts create mode 100644 projects/ucap-webmessenger-daesang/src/lib/services/daesang-api.service.ts diff --git a/projects/ucap-webmessenger-api-prompt/src/lib/services/call.service.ts b/projects/ucap-webmessenger-api-prompt/src/lib/services/call.service.ts index eb36b9c2..d05af8c1 100644 --- a/projects/ucap-webmessenger-api-prompt/src/lib/services/call.service.ts +++ b/projects/ucap-webmessenger-api-prompt/src/lib/services/call.service.ts @@ -2,7 +2,7 @@ import { Injectable, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { map, catchError } from 'rxjs/operators'; import { _MODULE_CONFIG } from '../config/token'; import { ModuleConfig } from '../config/module-config'; @@ -14,6 +14,7 @@ import { encodeCall, decodeCall } from '../apis/call'; +import { NGXLogger } from 'ngx-logger'; @Injectable({ providedIn: 'root' @@ -23,7 +24,8 @@ export class CallService { constructor( @Inject(_MODULE_CONFIG) private moduleConfig: ModuleConfig, - private httpClient: HttpClient + private httpClient: HttpClient, + private logger: NGXLogger ) { this.urls = UrlConfig.getUrls( this.moduleConfig.hostConfig, 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 3bdeac04..f9e2c908 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 @@ -27,8 +27,8 @@ import { } from '@ucap-webmessenger/ui'; import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; -import { map, take, finalize } from 'rxjs/operators'; -import { Subscription } from 'rxjs'; +import { map, take, finalize, catchError } from 'rxjs/operators'; +import { Subscription, of } from 'rxjs'; import { SelectGroupDialogComponent, SelectGroupDialogData, @@ -203,7 +203,8 @@ export class ProfileDialogComponent implements OnInit, OnDestroy { } else { this.logger.error(res); } - }) + }), + catchError(error => of(this.logger.debug(error))) ) .subscribe(); } 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 e0d96f80..827618e0 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 @@ -235,7 +235,15 @@