From b58e52325d018998e43309114a889b4c3750d1a5 Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 4 Feb 2020 13:37:56 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=ED=8C=9D=EC=97=85=20=EB=8B=AB=EB=8A=94=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=ED=86=B5=ED=95=A9=EC=97=90=20=EC=9D=98?= =?UTF-8?q?=ED=95=9C=20=EB=B6=88=ED=95=84=EC=9A=94=20=EC=86=8C=EC=8A=A4=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialogs/file-viewer.dialog.component.ts | 25 ++--------------- .../chat/create-chat.dialog.component.ts | 4 --- .../notice/notice-detail.dialog.component.ts | 28 ++----------------- .../profile/profile.dialog.component.ts | 4 --- .../integrated-search.dialog.component.ts | 3 -- 5 files changed, 5 insertions(+), 59 deletions(-) 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 16e7b11c..489bd5fc 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 @@ -15,9 +15,6 @@ import { FileDownloadItem } from '@ucap-webmessenger/api'; import { CommonApiService } from '@ucap-webmessenger/api-common'; import { TranslateService } from '@ngx-translate/core'; import { FileProtocolService } from '@ucap-webmessenger/protocol-file'; -import { select, Store } from '@ngrx/store'; -import { Subscription } from 'rxjs'; -import * as AppStore from '@app/store'; export interface FileViewerDialogData { fileInfo: FileEventJson; @@ -35,8 +32,6 @@ export interface FileViewerDialogResult {} styleUrls: ['./file-viewer.dialog.component.scss'] }) export class FileViewerDialogComponent implements OnInit, OnDestroy { - loginResSubscription: Subscription; - fileInfo: FileEventJson; downloadUrl: string; userSeq: number; @@ -56,7 +51,6 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy { private snackBarService: SnackBarService, private commonApiService: CommonApiService, private fileProtocolService: FileProtocolService, - private store: Store, private logger: NGXLogger ) { this.fileInfo = data.fileInfo; @@ -76,24 +70,9 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy { ); } - ngOnInit() { - this.loginResSubscription = this.store - .pipe( - select(AppStore.AccountSelector.AuthenticationSelector.loginRes), - tap(loginRes => { - if (!loginRes) { - this.onClosedViewer(); - } - }) - ) - .subscribe(); - } + ngOnInit() {} - ngOnDestroy(): void { - if (!!this.loginResSubscription) { - this.loginResSubscription.unsubscribe(); - } - } + ngOnDestroy(): void {} onDownload(fileDownloadItem: FileDownloadItem): void { this.commonApiService 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 72c4aa1e..05a3d4c9 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 @@ -174,10 +174,6 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy { .pipe( select(AppStore.AccountSelector.AuthenticationSelector.loginRes), tap(loginRes => { - if (!loginRes) { - this.onClickCancel(); - } - this.loginRes = loginRes; }) ) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/notice/notice-detail.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/notice/notice-detail.dialog.component.ts index 23f8e6a0..cf6f8fd1 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/notice/notice-detail.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/notice/notice-detail.dialog.component.ts @@ -1,10 +1,6 @@ import { Component, OnInit, Inject, OnDestroy } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; import { NoticeList } from '@ucap-webmessenger/api-message'; -import { Subscription } from 'rxjs'; -import { select, Store } from '@ngrx/store'; -import { tap } from 'rxjs/operators'; -import * as AppStore from '@app/store'; export interface NoticeDetailDialogData { notice: NoticeList; @@ -18,35 +14,17 @@ export interface NoticeDetailDialogResult {} styleUrls: ['./notice-detail.dialog.component.scss'] }) export class NoticeDetailDialogComponent implements OnInit, OnDestroy { - loginResSubscription: Subscription; - constructor( public dialogRef: MatDialogRef< NoticeDetailDialogData, NoticeDetailDialogResult >, - @Inject(MAT_DIALOG_DATA) public data: NoticeDetailDialogData, - private store: Store + @Inject(MAT_DIALOG_DATA) public data: NoticeDetailDialogData ) {} - ngOnInit() { - this.loginResSubscription = this.store - .pipe( - select(AppStore.AccountSelector.AuthenticationSelector.loginRes), - tap(loginRes => { - if (!loginRes) { - this.onClickConfirm(); - } - }) - ) - .subscribe(); - } + ngOnInit() {} - ngOnDestroy(): void { - if (!!this.loginResSubscription) { - this.loginResSubscription.unsubscribe(); - } - } + ngOnDestroy(): void {} onClickConfirm(): void { this.dialogRef.close(); 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 ba5171b9..b2ba121b 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 @@ -119,10 +119,6 @@ export class ProfileDialogComponent implements OnInit, OnDestroy { .pipe( select(AppStore.AccountSelector.AuthenticationSelector.loginRes), tap(loginRes => { - if (!loginRes) { - this.onClose(); - } - this.loginRes = loginRes; if (!!loginRes && loginRes.userSeq === this.data.userInfo.seq) { this.isMe = true; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts index cbb4f68a..d3473bfe 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts @@ -86,9 +86,6 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy { .pipe( select(AppStore.AccountSelector.AuthenticationSelector.loginRes), tap(loginRes => { - if (!loginRes) { - this.onCancel(); - } this.loginRes = loginRes; }) ) From 1da9fe0940f84ab45045d5c150c3caada77ef8a6 Mon Sep 17 00:00:00 2001 From: khk Date: Tue, 4 Feb 2020 16:24:39 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=EC=88=98=EC=A0=95=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/messages.component.scss | 1 + .../right-drawer/notice.component.html | 2 +- .../right-drawer/notice.component.scss | 3 + .../notice-detail.dialog.component.html | 2 +- .../notice-detail.dialog.component.scss | 23 ++--- .../src/assets/scss/global/_default.scss | 12 ++- .../lib/components/message-box.component.scss | 3 +- .../src/lib/components/search.component.html | 90 +++++++++++++------ .../schedule-send.dialog.component.html | 4 +- .../schedule-send.dialog.component.scss | 7 +- .../src/assets/scss/partials/_forms.scss | 15 +++- .../assets/scss/partials/_search-frame.scss | 8 ++ .../snackbars/alert.snackbar.component.scss | 3 + 13 files changed, 129 insertions(+), 44 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss index 1ee9592c..555bb867 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss @@ -176,6 +176,7 @@ ::ng-deep .chat-snackbar-class { .mat-simple-snackbar { + justify-content: center; span { @include ellipsis(1); } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/notice.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/notice.component.html index 94f5e39a..b6c1ddf5 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/notice.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/notice.component.html @@ -43,7 +43,7 @@ -