Merge branch 'master' of https://git.loafle.net/ucap-web/next-ucap-messenger
This commit is contained in:
commit
703ccfaddb
|
@ -445,8 +445,6 @@ ipcMain.on(
|
||||||
const downloadPath = args[0] as string;
|
const downloadPath = args[0] as string;
|
||||||
|
|
||||||
if (!!downloadPath && downloadPath.length > 0) {
|
if (!!downloadPath && downloadPath.length > 0) {
|
||||||
console.log('in electron', downloadPath);
|
|
||||||
|
|
||||||
appStorage.downloadPath = downloadPath;
|
appStorage.downloadPath = downloadPath;
|
||||||
log.info('downloadPath is changed to ', appStorage.downloadPath);
|
log.info('downloadPath is changed to ', appStorage.downloadPath);
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ import {
|
||||||
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 { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||||
|
import { KEY_LOGOUT_INFO, LogoutInfo } from '@app/types';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
|
@ -42,14 +43,14 @@ export class AppAutoLoginGuard implements CanActivate {
|
||||||
environment.customConfig.appKey
|
environment.customConfig.appKey
|
||||||
);
|
);
|
||||||
|
|
||||||
const personLogout: boolean = this.sessionStorageService.get(
|
const personLogout: LogoutInfo = this.sessionStorageService.get(
|
||||||
'PERSON_LOGOUT'
|
KEY_LOGOUT_INFO
|
||||||
);
|
);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!!appUserInfo &&
|
!!appUserInfo &&
|
||||||
appUserInfo.settings.general.autoLogin &&
|
appUserInfo.settings.general.autoLogin &&
|
||||||
!personLogout
|
!personLogout.personLogout
|
||||||
) {
|
) {
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
AuthenticationStore.webLogin({
|
AuthenticationStore.webLogin({
|
||||||
|
|
|
@ -857,7 +857,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
this.nativeService
|
this.nativeService
|
||||||
.selectSaveFilePath(value.fileInfo.fileName)
|
.selectSaveFilePath(value.fileInfo.fileName)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
console.log(result);
|
|
||||||
if (!!result && result.length > 0) {
|
if (!!result && result.length > 0) {
|
||||||
this.saveFile(value, result);
|
this.saveFile(value, result);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -211,7 +211,7 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
|
||||||
this.commonApiService
|
this.commonApiService
|
||||||
.fileTalkDownload({
|
.fileTalkDownload({
|
||||||
userSeq: this.loginRes.userSeq,
|
userSeq: this.loginRes.userSeq,
|
||||||
deviceType: DeviceType.PC,
|
deviceType: this.environmentsInfo.deviceType,
|
||||||
token: this.loginRes.tokenString,
|
token: this.loginRes.tokenString,
|
||||||
attachmentsSeq: fileInfo.info.seq,
|
attachmentsSeq: fileInfo.info.seq,
|
||||||
fileDownloadItem: fileInfo.fileDownloadItem
|
fileDownloadItem: fileInfo.fileDownloadItem
|
||||||
|
|
|
@ -33,7 +33,11 @@ import {
|
||||||
CreateChatDialogResult,
|
CreateChatDialogResult,
|
||||||
CreateChatDialogData
|
CreateChatDialogData
|
||||||
} from '../../dialogs/chat/create-chat.dialog.component';
|
} from '../../dialogs/chat/create-chat.dialog.component';
|
||||||
import { UserSelectDialogType } from '@app/types';
|
import {
|
||||||
|
UserSelectDialogType,
|
||||||
|
EnvironmentsInfo,
|
||||||
|
KEY_ENVIRONMENTS_INFO
|
||||||
|
} from '@app/types';
|
||||||
import { RoomInfo } from '@ucap-webmessenger/protocol-room';
|
import { RoomInfo } from '@ucap-webmessenger/protocol-room';
|
||||||
|
|
||||||
export interface FileInfoTotal {
|
export interface FileInfoTotal {
|
||||||
|
@ -60,6 +64,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
||||||
selectedFileList: FileInfoTotal[] = [];
|
selectedFileList: FileInfoTotal[] = [];
|
||||||
|
|
||||||
loginRes: LoginResponse;
|
loginRes: LoginResponse;
|
||||||
|
environmentsInfo: EnvironmentsInfo;
|
||||||
|
|
||||||
currentTabIndex = 0;
|
currentTabIndex = 0;
|
||||||
|
|
||||||
|
@ -78,6 +83,9 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
||||||
this.loginRes = this.sessionStorageService.get<LoginResponse>(
|
this.loginRes = this.sessionStorageService.get<LoginResponse>(
|
||||||
KEY_LOGIN_RES_INFO
|
KEY_LOGIN_RES_INFO
|
||||||
);
|
);
|
||||||
|
this.environmentsInfo = this.sessionStorageService.get<EnvironmentsInfo>(
|
||||||
|
KEY_ENVIRONMENTS_INFO
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -247,7 +255,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
||||||
this.commonApiService
|
this.commonApiService
|
||||||
.fileTalkDownload({
|
.fileTalkDownload({
|
||||||
userSeq: this.loginRes.userSeq,
|
userSeq: this.loginRes.userSeq,
|
||||||
deviceType: DeviceType.PC,
|
deviceType: this.environmentsInfo.deviceType,
|
||||||
token: this.loginRes.tokenString,
|
token: this.loginRes.tokenString,
|
||||||
attachmentsSeq: fileInfo.info.seq,
|
attachmentsSeq: fileInfo.info.seq,
|
||||||
fileDownloadItem: fileInfo.fileDownloadItem
|
fileDownloadItem: fileInfo.fileDownloadItem
|
||||||
|
|
|
@ -161,7 +161,7 @@ export class MessageDetailDialogComponent implements OnInit {
|
||||||
this.messageApiService
|
this.messageApiService
|
||||||
.retrieveResourceFile({
|
.retrieveResourceFile({
|
||||||
userSeq: this.data.loginRes.userSeq,
|
userSeq: this.data.loginRes.userSeq,
|
||||||
deviceType: DeviceType.PC,
|
deviceType: this.data.environmentsInfo.deviceType,
|
||||||
tokenKey: this.data.loginRes.tokenString,
|
tokenKey: this.data.loginRes.tokenString,
|
||||||
type: this.messageInfo.type,
|
type: this.messageInfo.type,
|
||||||
msgId: this.messageInfo.msgId,
|
msgId: this.messageInfo.msgId,
|
||||||
|
@ -187,7 +187,7 @@ export class MessageDetailDialogComponent implements OnInit {
|
||||||
this.messageApiService
|
this.messageApiService
|
||||||
.retrieveResourceFile({
|
.retrieveResourceFile({
|
||||||
userSeq: this.data.loginRes.userSeq,
|
userSeq: this.data.loginRes.userSeq,
|
||||||
deviceType: DeviceType.PC,
|
deviceType: this.data.environmentsInfo.deviceType,
|
||||||
tokenKey: this.data.loginRes.tokenString,
|
tokenKey: this.data.loginRes.tokenString,
|
||||||
type: this.messageInfo.type,
|
type: this.messageInfo.type,
|
||||||
msgId: this.messageInfo.msgId,
|
msgId: this.messageInfo.msgId,
|
||||||
|
@ -215,7 +215,7 @@ export class MessageDetailDialogComponent implements OnInit {
|
||||||
// this.messageApiService
|
// this.messageApiService
|
||||||
// .retrieveResourceFile({
|
// .retrieveResourceFile({
|
||||||
// userSeq: this.data.loginRes.userSeq,
|
// userSeq: this.data.loginRes.userSeq,
|
||||||
// deviceType: DeviceType.PC,
|
// deviceType: this.data.environmentsInfo.deviceType,
|
||||||
// tokenKey: this.data.loginRes.tokenString,
|
// tokenKey: this.data.loginRes.tokenString,
|
||||||
// type: this.messageInfo.type,
|
// type: this.messageInfo.type,
|
||||||
// msgId: this.messageInfo.msgId,
|
// msgId: this.messageInfo.msgId,
|
||||||
|
@ -310,7 +310,7 @@ export class MessageDetailDialogComponent implements OnInit {
|
||||||
this.messageApiService
|
this.messageApiService
|
||||||
.retrieveResourceFile({
|
.retrieveResourceFile({
|
||||||
userSeq: this.data.loginRes.userSeq,
|
userSeq: this.data.loginRes.userSeq,
|
||||||
deviceType: DeviceType.PC,
|
deviceType: this.data.environmentsInfo.deviceType,
|
||||||
tokenKey: this.data.loginRes.tokenString,
|
tokenKey: this.data.loginRes.tokenString,
|
||||||
type: this.messageInfo.type,
|
type: this.messageInfo.type,
|
||||||
msgId: this.messageInfo.msgId,
|
msgId: this.messageInfo.msgId,
|
||||||
|
@ -541,7 +541,7 @@ export class MessageDetailDialogComponent implements OnInit {
|
||||||
this.messageApiService
|
this.messageApiService
|
||||||
.cancelMessage({
|
.cancelMessage({
|
||||||
userSeq: this.data.loginRes.userSeq,
|
userSeq: this.data.loginRes.userSeq,
|
||||||
deviceType: DeviceType.PC,
|
deviceType: this.data.environmentsInfo.deviceType,
|
||||||
tokenKey: this.data.loginRes.tokenString,
|
tokenKey: this.data.loginRes.tokenString,
|
||||||
type: this.messageInfo.type,
|
type: this.messageInfo.type,
|
||||||
msgId: this.messageInfo.msgId,
|
msgId: this.messageInfo.msgId,
|
||||||
|
|
|
@ -104,8 +104,6 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
this.editableProfileImage =
|
this.editableProfileImage =
|
||||||
environment.productConfig.CommonSetting.editableProfileImage;
|
environment.productConfig.CommonSetting.editableProfileImage;
|
||||||
|
|
||||||
console.log(data.openProfileOptions);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
|
@ -327,9 +327,20 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="setting"><button mat-menu-item>상태 메시지 설정</button></div>
|
<div class="setting"><button mat-menu-item>상태 메시지 설정</button></div>
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
<button mat-menu-item (click)="onClickZoomOut($event)">축소</button>
|
<button
|
||||||
<span>100%</span>
|
mat-menu-item
|
||||||
<button mat-menu-item (click)="onClickZoomIn($event)">확대</button>
|
class="zoom minus-square"
|
||||||
|
(click)="onClickZoomOut($event)"
|
||||||
|
>
|
||||||
|
축소</button
|
||||||
|
><span class="set-size">100%</span
|
||||||
|
><button
|
||||||
|
mat-menu-item
|
||||||
|
class="zoom plus-square"
|
||||||
|
(click)="onClickZoomIn($event)"
|
||||||
|
>
|
||||||
|
확대
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
<button mat-menu-item (click)="onClickSettings()">설정</button>
|
<button mat-menu-item (click)="onClickSettings()">설정</button>
|
||||||
|
|
|
@ -218,6 +218,31 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row;
|
flex-flow: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
height: 48px;
|
||||||
|
.zoom {
|
||||||
|
height: 16px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
&.plus-square {
|
||||||
|
margin-left: 10px;
|
||||||
|
padding-left: 26px;
|
||||||
|
background-position: left 50%;
|
||||||
|
line-height: normal;
|
||||||
|
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1' stroke-linecap='round' stroke-linejoin='round' %3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='12' y1='8' x2='12' y2='16'%3E%3C/line%3E%3Cline x1='8' y1='12' x2='16' y2='12'%3E%3C/line%3E%3C/svg%3E");
|
||||||
|
}
|
||||||
|
&.minus-square {
|
||||||
|
margin-right: 10px;
|
||||||
|
padding-right: 26px;
|
||||||
|
background-position: right 50%;
|
||||||
|
line-height: normal;
|
||||||
|
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1' stroke-linecap='round' stroke-linejoin='round' %3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='8' y1='12' x2='16' y2='12'%3E%3C/line%3E%3C/svg%3E");
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.set-size {
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { Store, select } from '@ngrx/store';
|
import { Store, select } from '@ngrx/store';
|
||||||
|
|
||||||
import { Company } from '@ucap-webmessenger/api-external';
|
import { Company } from '@ucap-webmessenger/api-external';
|
||||||
|
import { ServerErrorCode } from '@ucap-webmessenger/protocol';
|
||||||
|
|
||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||||
|
@ -24,8 +25,12 @@ import {
|
||||||
} from '@app/layouts/messenger/dialogs/account/notice.dialog.component';
|
} from '@app/layouts/messenger/dialogs/account/notice.dialog.component';
|
||||||
|
|
||||||
import { environment } from '../../../../environments/environment';
|
import { environment } from '../../../../environments/environment';
|
||||||
import { LocalStorageService } from '@ucap-webmessenger/web-storage';
|
import {
|
||||||
|
LocalStorageService,
|
||||||
|
SessionStorageService
|
||||||
|
} from '@ucap-webmessenger/web-storage';
|
||||||
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 { LogoutInfo, KEY_LOGOUT_INFO } from '@app/types';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-page-account-login',
|
selector: 'app-page-account-login',
|
||||||
|
@ -79,7 +84,8 @@ export class LoginPageComponent implements OnInit, OnDestroy {
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private localStorageService: LocalStorageService
|
private localStorageService: LocalStorageService,
|
||||||
|
private sessionStorageService: SessionStorageService
|
||||||
) {
|
) {
|
||||||
this.useRememberMe =
|
this.useRememberMe =
|
||||||
environment.productConfig.authentication.rememberMe.use;
|
environment.productConfig.authentication.rememberMe.use;
|
||||||
|
@ -163,7 +169,33 @@ export class LoginPageComponent implements OnInit, OnDestroy {
|
||||||
this.customInitilize();
|
this.customInitilize();
|
||||||
}
|
}
|
||||||
|
|
||||||
customInitilize() {
|
async customInitilize() {
|
||||||
|
const personLogout: LogoutInfo = this.sessionStorageService.get(
|
||||||
|
KEY_LOGOUT_INFO
|
||||||
|
);
|
||||||
|
|
||||||
|
if (
|
||||||
|
!!personLogout &&
|
||||||
|
!!personLogout.reasonCode &&
|
||||||
|
personLogout.reasonCode === ServerErrorCode.ERRCD_DUPLICATE
|
||||||
|
) {
|
||||||
|
const result = await this.dialogService.open<
|
||||||
|
AlertDialogComponent,
|
||||||
|
AlertDialogData,
|
||||||
|
AlertDialogResult
|
||||||
|
>(AlertDialogComponent, {
|
||||||
|
width: '360px',
|
||||||
|
data: {
|
||||||
|
title: '',
|
||||||
|
html: `다른 디바이스에서 로그인하였습니다.<br/> * Ip : ${personLogout.ip}<br/> * Mac : ${personLogout.mac}`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.sessionStorageService.set<LogoutInfo>(KEY_LOGOUT_INFO, {
|
||||||
|
personLogout: true
|
||||||
|
} as LogoutInfo);
|
||||||
|
}
|
||||||
|
|
||||||
// Daesang..
|
// Daesang..
|
||||||
this.fixedCompany = environment.companyConfig.fixedCompanyCode;
|
this.fixedCompany = environment.companyConfig.fixedCompanyCode;
|
||||||
this.fixedNotiBtnText = '이용 주의사항';
|
this.fixedNotiBtnText = '이용 주의사항';
|
||||||
|
|
|
@ -307,7 +307,7 @@ export class MainPageComponent implements OnInit, OnDestroy {
|
||||||
.pipe(
|
.pipe(
|
||||||
take(1),
|
take(1),
|
||||||
map(res => {
|
map(res => {
|
||||||
console.log(res);
|
this.logger.debug(res);
|
||||||
}),
|
}),
|
||||||
catchError(error => of(this.logger.debug(error)))
|
catchError(error => of(this.logger.debug(error)))
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,7 +10,9 @@ import {
|
||||||
KEY_LOGIN_INFO,
|
KEY_LOGIN_INFO,
|
||||||
KEY_LOGIN_RES_INFO,
|
KEY_LOGIN_RES_INFO,
|
||||||
KEY_VER_INFO,
|
KEY_VER_INFO,
|
||||||
KEY_URL_INFO
|
KEY_URL_INFO,
|
||||||
|
KEY_LOGOUT_INFO,
|
||||||
|
LogoutInfo
|
||||||
} from '../types';
|
} from '../types';
|
||||||
import { PasswordUtil } from '@ucap-webmessenger/pi';
|
import { PasswordUtil } from '@ucap-webmessenger/pi';
|
||||||
|
|
||||||
|
@ -96,7 +98,7 @@ export class AppAuthenticationService {
|
||||||
environment.customConfig.appKey
|
environment.customConfig.appKey
|
||||||
);
|
);
|
||||||
|
|
||||||
this.sessionStorageService.remove('PERSON_LOGOUT');
|
this.sessionStorageService.remove(KEY_LOGOUT_INFO);
|
||||||
}
|
}
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
|
@ -104,7 +106,5 @@ export class AppAuthenticationService {
|
||||||
this.sessionStorageService.remove(KEY_VER_INFO);
|
this.sessionStorageService.remove(KEY_VER_INFO);
|
||||||
this.sessionStorageService.remove(KEY_LOGIN_INFO);
|
this.sessionStorageService.remove(KEY_LOGIN_INFO);
|
||||||
this.sessionStorageService.remove(KEY_URL_INFO);
|
this.sessionStorageService.remove(KEY_URL_INFO);
|
||||||
|
|
||||||
this.sessionStorageService.set<boolean>('PERSON_LOGOUT', true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@ import {
|
||||||
SSVC_TYPE_LOGOUT_REMOTE_NOTI,
|
SSVC_TYPE_LOGOUT_REMOTE_NOTI,
|
||||||
AuthenticationProtocolService,
|
AuthenticationProtocolService,
|
||||||
LogoutResponse,
|
LogoutResponse,
|
||||||
LogoutRemoteNotification
|
LogoutRemoteNotification,
|
||||||
|
LogoutNotification
|
||||||
} from '@ucap-webmessenger/protocol-authentication';
|
} from '@ucap-webmessenger/protocol-authentication';
|
||||||
|
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
|
@ -97,13 +98,17 @@ import {
|
||||||
SSVC_TYPE_UMG_NOTI,
|
SSVC_TYPE_UMG_NOTI,
|
||||||
UmgNotiNotification
|
UmgNotiNotification
|
||||||
} from '@ucap-webmessenger/protocol-umg';
|
} from '@ucap-webmessenger/protocol-umg';
|
||||||
import { LocalStorageService } from '@ucap-webmessenger/web-storage';
|
import {
|
||||||
|
LocalStorageService,
|
||||||
|
SessionStorageService
|
||||||
|
} from '@ucap-webmessenger/web-storage';
|
||||||
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 { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
import { NotificationMethod } from '@ucap-webmessenger/core';
|
import { NotificationMethod } from '@ucap-webmessenger/core';
|
||||||
import { Dictionary } from '@ngrx/entity';
|
import { Dictionary } from '@ngrx/entity';
|
||||||
import { MessageType } from '@ucap-webmessenger/api-message';
|
import { MessageType } from '@ucap-webmessenger/api-message';
|
||||||
|
import { LogoutInfo, KEY_LOGOUT_INFO } from '@app/types';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppNotificationService {
|
export class AppNotificationService {
|
||||||
|
@ -117,6 +122,7 @@ export class AppNotificationService {
|
||||||
private statusProtocolService: StatusProtocolService,
|
private statusProtocolService: StatusProtocolService,
|
||||||
private umgProtocolService: UmgProtocolService,
|
private umgProtocolService: UmgProtocolService,
|
||||||
private localStorageService: LocalStorageService,
|
private localStorageService: LocalStorageService,
|
||||||
|
private sessionStorageService: SessionStorageService,
|
||||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private logger: NGXLogger
|
private logger: NGXLogger
|
||||||
|
@ -129,11 +135,18 @@ export class AppNotificationService {
|
||||||
switch (notiOrRes.SSVC_TYPE) {
|
switch (notiOrRes.SSVC_TYPE) {
|
||||||
case SSVC_TYPE_LOGOUT_RES:
|
case SSVC_TYPE_LOGOUT_RES:
|
||||||
{
|
{
|
||||||
const res = notiOrRes as LogoutResponse;
|
const res = notiOrRes as LogoutNotification;
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
'Notification::authenticationProtocolService::LogoutResponse',
|
'Notification::authenticationProtocolService::LogoutResponse',
|
||||||
res
|
res
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.sessionStorageService.set<LogoutInfo>(KEY_LOGOUT_INFO, {
|
||||||
|
personLogout: true,
|
||||||
|
reasonCode: res.reasonCode,
|
||||||
|
ip: res.ip,
|
||||||
|
mac: res.mac
|
||||||
|
} as LogoutInfo);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SSVC_TYPE_LOGOUT_REMOTE_NOTI:
|
case SSVC_TYPE_LOGOUT_REMOTE_NOTI:
|
||||||
|
|
|
@ -48,7 +48,9 @@ import {
|
||||||
KEY_LOGIN_INFO,
|
KEY_LOGIN_INFO,
|
||||||
EnvironmentsInfo,
|
EnvironmentsInfo,
|
||||||
KEY_ENVIRONMENTS_INFO,
|
KEY_ENVIRONMENTS_INFO,
|
||||||
KEY_URL_INFO
|
KEY_URL_INFO,
|
||||||
|
LogoutInfo,
|
||||||
|
KEY_LOGOUT_INFO
|
||||||
} from '@app/types';
|
} from '@app/types';
|
||||||
import { AppAuthenticationService } from '@app/services/authentication.service';
|
import { AppAuthenticationService } from '@app/services/authentication.service';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
|
@ -174,6 +176,10 @@ export class Effects {
|
||||||
switchMap(action => {
|
switchMap(action => {
|
||||||
return this.authenticationProtocolService.logout({}).pipe(
|
return this.authenticationProtocolService.logout({}).pipe(
|
||||||
map(res => {
|
map(res => {
|
||||||
|
this.sessionStorageService.set<LogoutInfo>(KEY_LOGOUT_INFO, {
|
||||||
|
personLogout: true
|
||||||
|
} as LogoutInfo);
|
||||||
|
|
||||||
this.store.dispatch(loginRedirect());
|
this.store.dispatch(loginRedirect());
|
||||||
}),
|
}),
|
||||||
catchError(error => of(error))
|
catchError(error => of(error))
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
export * from './environment.type';
|
export * from './environment.type';
|
||||||
export * from './login-info.type';
|
export * from './login-info.type';
|
||||||
|
export * from './logout-info.type';
|
||||||
export * from './userselect.dialog.type';
|
export * from './userselect.dialog.type';
|
||||||
export * from './right-drawer.type';
|
export * from './right-drawer.type';
|
||||||
export * from './sticker-info.type';
|
export * from './sticker-info.type';
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
export const KEY_LOGOUT_INFO = 'ucap::LOGOUT_INFO';
|
||||||
|
|
||||||
|
export interface LogoutInfo {
|
||||||
|
personLogout: boolean;
|
||||||
|
reasonCode?: number;
|
||||||
|
ip?: string;
|
||||||
|
mac?: string;
|
||||||
|
}
|
|
@ -74,7 +74,7 @@ export class BrowserNativeService extends NativeService {
|
||||||
|
|
||||||
getNetworkInfo(): Promise<any> {
|
getNetworkInfo(): Promise<any> {
|
||||||
return new Promise<any>((resolve, reject) => {
|
return new Promise<any>((resolve, reject) => {
|
||||||
resolve(null);
|
resolve([{ ip: 'Browser', mac: 'browser' }]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@ import {
|
||||||
ProtocolDecoder,
|
ProtocolDecoder,
|
||||||
ProtocolMessage,
|
ProtocolMessage,
|
||||||
PacketBody,
|
PacketBody,
|
||||||
decodeProtocolMessage
|
decodeProtocolMessage,
|
||||||
|
ProtocolNotification
|
||||||
} from '@ucap-webmessenger/protocol';
|
} from '@ucap-webmessenger/protocol';
|
||||||
|
|
||||||
// tslint:disable-next-line: no-empty-interface
|
// tslint:disable-next-line: no-empty-interface
|
||||||
|
@ -15,6 +16,12 @@ export interface LogoutResponse extends ProtocolResponse {
|
||||||
reasonCode?: number;
|
reasonCode?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogoutNotification extends ProtocolNotification {
|
||||||
|
reasonCode?: number;
|
||||||
|
ip?: string;
|
||||||
|
mac?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export const encodeLogout: ProtocolEncoder<LogoutRequest> = (
|
export const encodeLogout: ProtocolEncoder<LogoutRequest> = (
|
||||||
req: LogoutRequest
|
req: LogoutRequest
|
||||||
) => {
|
) => {
|
||||||
|
@ -27,6 +34,16 @@ export const decodeLogout: ProtocolDecoder<LogoutResponse> = (
|
||||||
message: ProtocolMessage
|
message: ProtocolMessage
|
||||||
) => {
|
) => {
|
||||||
return decodeProtocolMessage(message, {
|
return decodeProtocolMessage(message, {
|
||||||
reasonCode: message.bodyList[0]
|
reasonCode: Number(message.bodyList[0])
|
||||||
} as LogoutResponse);
|
} as LogoutResponse);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const decodeLogoutNotification: ProtocolDecoder<LogoutNotification> = (
|
||||||
|
message: ProtocolMessage
|
||||||
|
) => {
|
||||||
|
return decodeProtocolMessage(message, {
|
||||||
|
reasonCode: Number(message.bodyList[0]),
|
||||||
|
ip: !!message.bodyList[1] ? message.bodyList[1] : '',
|
||||||
|
mac: !!message.bodyList[2] ? message.bodyList[2] : ''
|
||||||
|
} as LogoutNotification);
|
||||||
|
};
|
||||||
|
|
|
@ -23,7 +23,8 @@ import {
|
||||||
LogoutRequest,
|
LogoutRequest,
|
||||||
LogoutResponse,
|
LogoutResponse,
|
||||||
encodeLogout,
|
encodeLogout,
|
||||||
decodeLogout
|
decodeLogout,
|
||||||
|
decodeLogoutNotification
|
||||||
} from '../protocols/logout';
|
} from '../protocols/logout';
|
||||||
import {
|
import {
|
||||||
encodeLogoutRemote,
|
encodeLogoutRemote,
|
||||||
|
@ -56,7 +57,9 @@ export class AuthenticationProtocolService {
|
||||||
switch (message.subServiceType) {
|
switch (message.subServiceType) {
|
||||||
case SSVC_TYPE_LOGOUT_RES:
|
case SSVC_TYPE_LOGOUT_RES:
|
||||||
{
|
{
|
||||||
this.logoutNotificationSubject.next(decodeLogout(message));
|
this.logoutNotificationSubject.next(
|
||||||
|
decodeLogoutNotification(message)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SSVC_TYPE_LOGOUT_REMOTE_NOTI:
|
case SSVC_TYPE_LOGOUT_REMOTE_NOTI:
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
|
|
||||||
<span
|
<span
|
||||||
*ngIf="getWorkstatus(userInfo).length > 0"
|
*ngIf="getWorkstatus(userInfo).length > 0"
|
||||||
class="work-status text-accent-darkest"
|
class="work-status"
|
||||||
|
[ngClass]="getWorkstatusStyle(userInfo)"
|
||||||
>
|
>
|
||||||
{{ getWorkstatus(userInfo) }}
|
{{ getWorkstatus(userInfo) }}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -61,12 +61,28 @@
|
||||||
.work-status {
|
.work-status {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
background-color: #ffffff;
|
border: 1px solid #ffffff;
|
||||||
padding: 4px 14px;
|
padding: 4px 14px;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
color: #ffffff;
|
||||||
|
&.morning-off {
|
||||||
|
background-color: #11845d;
|
||||||
|
}
|
||||||
|
&.afternoon-off {
|
||||||
|
background-color: #875acb;
|
||||||
|
}
|
||||||
|
&.day-off {
|
||||||
|
background-color: #2b98eb;
|
||||||
|
}
|
||||||
|
&.long-time {
|
||||||
|
background-color: #c72f20;
|
||||||
|
}
|
||||||
|
&.leave-of-absence {
|
||||||
|
background-color: #e7853e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +234,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
//line-height: 40px;
|
||||||
.mat-button-wrapper {
|
.mat-button-wrapper {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
fill: #ffffff;
|
fill: #ffffff;
|
||||||
|
|
|
@ -159,6 +159,31 @@ export class ProfileComponent implements OnInit {
|
||||||
|
|
||||||
return workstatus;
|
return workstatus;
|
||||||
}
|
}
|
||||||
|
getWorkstatusStyle(userInfo: UserInfoSS): string {
|
||||||
|
// morning-off: 오전 afternoon-off: 오후 day-off: 휴가 long-time: 장기 leave-of-absence: 휴직
|
||||||
|
let style = '';
|
||||||
|
if (!!userInfo && !!userInfo.workstatus) {
|
||||||
|
switch (userInfo.workstatus) {
|
||||||
|
case WorkStatusType.VacationAM:
|
||||||
|
style = 'morning-off';
|
||||||
|
break;
|
||||||
|
case WorkStatusType.VacationPM:
|
||||||
|
style = 'afternoon-off';
|
||||||
|
break;
|
||||||
|
case WorkStatusType.VacationAll:
|
||||||
|
style = 'day-off';
|
||||||
|
break;
|
||||||
|
case WorkStatusType.LeaveOfAbsence:
|
||||||
|
style = 'leave-of-absence';
|
||||||
|
break;
|
||||||
|
case WorkStatusType.LongtermRefresh:
|
||||||
|
style = 'long-time';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return style;
|
||||||
|
}
|
||||||
|
|
||||||
getDisabledBtn(type: string): boolean {
|
getDisabledBtn(type: string): boolean {
|
||||||
if (!this.myMadn || this.myMadn.trim().length === 0) {
|
if (!this.myMadn || this.myMadn.trim().length === 0) {
|
||||||
|
|
|
@ -61,7 +61,6 @@ export class SoundViewerComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeTimeSlider(e: MatSliderChange): void {
|
onChangeTimeSlider(e: MatSliderChange): void {
|
||||||
console.log('onChangeTimeSlider', e.value);
|
|
||||||
this.audioPlayer.nativeElement.currentTime = e.value;
|
this.audioPlayer.nativeElement.currentTime = e.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,6 @@ export class VideoViewerComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeTimeSlider(e: MatSliderChange): void {
|
onChangeTimeSlider(e: MatSliderChange): void {
|
||||||
console.log('onChangeTimeSlider', e.value);
|
|
||||||
this.audioPlayer.nativeElement.currentTime = e.value;
|
this.audioPlayer.nativeElement.currentTime = e.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,6 @@ export class VirtualScrollTreeFlatDataSource<T, F> extends DataSource<F> {
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect() {
|
disconnect() {
|
||||||
console.log('VirtualScrollTreeFlatDataSource disconnect');
|
|
||||||
if (!!this.connectSubject) {
|
if (!!this.connectSubject) {
|
||||||
this.connectSubject.next();
|
this.connectSubject.next();
|
||||||
this.connectSubject.unsubscribe();
|
this.connectSubject.unsubscribe();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user