# 이슈처리 266
This commit is contained in:
parent
e62c3aa9ea
commit
7fb306ce22
|
@ -1,4 +1,4 @@
|
||||||
import { Component, OnInit, Inject, Renderer2 } from '@angular/core';
|
import { Component, OnInit, Inject, Renderer2, OnDestroy } from '@angular/core';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
import { KEY_LOGIN_RES_INFO, KEY_VER_INFO } from '@app/types';
|
import { KEY_LOGIN_RES_INFO, KEY_VER_INFO } from '@app/types';
|
||||||
import {
|
import {
|
||||||
|
@ -11,13 +11,12 @@ import { Store } from '@ngrx/store';
|
||||||
import clone from 'clone';
|
import clone from 'clone';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DialogService,
|
|
||||||
TranslateService as UCapTranslateService,
|
TranslateService as UCapTranslateService,
|
||||||
DateService as UCapDateService
|
DateService as UCapDateService
|
||||||
} from '@ucap-webmessenger/ui';
|
} from '@ucap-webmessenger/ui';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { map, take } from 'rxjs/operators';
|
import { take } from 'rxjs/operators';
|
||||||
import { DOCUMENT } from '@angular/common';
|
import { DOCUMENT } from '@angular/common';
|
||||||
import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type';
|
import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type';
|
||||||
import {
|
import {
|
||||||
|
@ -45,7 +44,7 @@ export interface MessengerSettingsDialogResult {}
|
||||||
templateUrl: './messenger-settings.dialog.component.html',
|
templateUrl: './messenger-settings.dialog.component.html',
|
||||||
styleUrls: ['./messenger-settings.dialog.component.scss']
|
styleUrls: ['./messenger-settings.dialog.component.scss']
|
||||||
})
|
})
|
||||||
export class MessengerSettingsDialogComponent implements OnInit {
|
export class MessengerSettingsDialogComponent implements OnInit, OnDestroy {
|
||||||
loginRes: LoginResponse;
|
loginRes: LoginResponse;
|
||||||
sessionVerinfo: VersionInfo2Response;
|
sessionVerinfo: VersionInfo2Response;
|
||||||
environmentsInfo: EnvironmentsInfo;
|
environmentsInfo: EnvironmentsInfo;
|
||||||
|
@ -53,6 +52,8 @@ export class MessengerSettingsDialogComponent implements OnInit {
|
||||||
modifiedSettings: Settings;
|
modifiedSettings: Settings;
|
||||||
|
|
||||||
appUserInfo: AppUserInfo;
|
appUserInfo: AppUserInfo;
|
||||||
|
// backdrop closing yn
|
||||||
|
isBackDrop = true;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialogRef: MatDialogRef<
|
public dialogRef: MatDialogRef<
|
||||||
|
@ -60,7 +61,6 @@ export class MessengerSettingsDialogComponent implements OnInit {
|
||||||
MessengerSettingsDialogResult
|
MessengerSettingsDialogResult
|
||||||
>,
|
>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: MessengerSettingsDialogData,
|
@Inject(MAT_DIALOG_DATA) public data: MessengerSettingsDialogData,
|
||||||
private dialogService: DialogService,
|
|
||||||
private sessionStorageService: SessionStorageService,
|
private sessionStorageService: SessionStorageService,
|
||||||
private localStorageService: LocalStorageService,
|
private localStorageService: LocalStorageService,
|
||||||
private ucapTranslateService: UCapTranslateService,
|
private ucapTranslateService: UCapTranslateService,
|
||||||
|
@ -92,6 +92,12 @@ export class MessengerSettingsDialogComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
if (!!this.isBackDrop) {
|
||||||
|
this.applySettings(this.modifiedSettings, this.appUserInfo.settings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onChangedGeneralSetting(setting: GeneralSetting) {
|
onChangedGeneralSetting(setting: GeneralSetting) {
|
||||||
this.modifiedSettings = this.applySettings(this.modifiedSettings, {
|
this.modifiedSettings = this.applySettings(this.modifiedSettings, {
|
||||||
...this.appUserInfo.settings,
|
...this.appUserInfo.settings,
|
||||||
|
@ -114,6 +120,7 @@ export class MessengerSettingsDialogComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickChoice(choice: boolean): void {
|
onClickChoice(choice: boolean): void {
|
||||||
|
this.isBackDrop = false;
|
||||||
if (choice) {
|
if (choice) {
|
||||||
if (
|
if (
|
||||||
!ObjectUtil.equals(this.appUserInfo.settings, this.modifiedSettings)
|
!ObjectUtil.equals(this.appUserInfo.settings, this.modifiedSettings)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user