Merge branch 'master' of https://git.loafle.net/ucap-web/next-ucap-messenger
This commit is contained in:
commit
c4e9ebb217
|
@ -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<any>,
|
||||
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
|
||||
|
|
|
@ -176,6 +176,7 @@
|
|||
|
||||
::ng-deep .chat-snackbar-class {
|
||||
.mat-simple-snackbar {
|
||||
justify-content: center;
|
||||
span {
|
||||
@include ellipsis(1);
|
||||
}
|
||||
|
|
|
@ -974,32 +974,36 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
onExistNewMessage(info: Info<EventJson>) {
|
||||
let message = '';
|
||||
|
||||
const senderUser = this.userInfoListSubject.value.filter(
|
||||
user => user.seq === info.senderSeq
|
||||
);
|
||||
if (!!senderUser && senderUser.length > 0) {
|
||||
message += `${senderUser[0].name} : `;
|
||||
}
|
||||
message += StringUtil.convertFinalEventMessage(
|
||||
const contents = StringUtil.convertFinalEventMessage(
|
||||
info.type,
|
||||
info.sentMessageJson || info.sentMessage
|
||||
);
|
||||
|
||||
this.snackBarPreviewEvent = this.snackBarService.open(
|
||||
message,
|
||||
this.translateService.instant('common.messages.confirm'),
|
||||
{
|
||||
// duration: 3000,
|
||||
verticalPosition: 'bottom',
|
||||
horizontalPosition: 'center',
|
||||
panelClass: ['chat-snackbar-class']
|
||||
if (!!contents) {
|
||||
const senderUser = this.userInfoListSubject.value.filter(
|
||||
user => user.seq === info.senderSeq
|
||||
);
|
||||
if (!!senderUser && senderUser.length > 0) {
|
||||
message += `${senderUser[0].name} : `;
|
||||
}
|
||||
);
|
||||
this.snackBarPreviewEvent.onAction().subscribe(() => {
|
||||
this.chatMessages.initEventMore();
|
||||
this.chatMessages.scrollToBottom();
|
||||
this.snackBarPreviewEvent.dismiss();
|
||||
});
|
||||
message += contents;
|
||||
|
||||
this.snackBarPreviewEvent = this.snackBarService.open(
|
||||
message,
|
||||
this.translateService.instant('common.messages.confirm'),
|
||||
{
|
||||
// duration: 3000,
|
||||
verticalPosition: 'bottom',
|
||||
horizontalPosition: 'center',
|
||||
panelClass: ['chat-snackbar-class']
|
||||
}
|
||||
);
|
||||
this.snackBarPreviewEvent.onAction().subscribe(() => {
|
||||
this.chatMessages.initEventMore();
|
||||
this.chatMessages.scrollToBottom();
|
||||
this.snackBarPreviewEvent.dismiss();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
saveFile(
|
||||
|
@ -1292,12 +1296,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
(message as Info<string>).sentMessage
|
||||
)
|
||||
) {
|
||||
this.snackBarService.open(
|
||||
this.translateService.instant(
|
||||
'common.clipboard.results.copied'
|
||||
),
|
||||
'확인'
|
||||
);
|
||||
this.snackBarService.open(
|
||||
this.translateService.instant(
|
||||
'common.clipboard.results.copied'
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</table>
|
||||
</perfect-scrollbar>
|
||||
</div>
|
||||
<div fxFlex="1 1 111.5px" class="footer-fix">
|
||||
<div class="footer-fix">
|
||||
<mat-paginator
|
||||
[length]="totalCount"
|
||||
[pageSize]="10"
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
height: calc(100% - 111.5px);
|
||||
overflow: auto;
|
||||
}
|
||||
.footer-fix {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-table {
|
||||
|
|
|
@ -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;
|
||||
})
|
||||
)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</perfect-scrollbar>
|
||||
</mat-card-content>
|
||||
<mat-card-actions class="button-farm flex-row">
|
||||
<button mat-stroked-button (click)="onClickConfirm()" class="mat-primary">
|
||||
<button mat-flat-button (click)="onClickConfirm()" class="mat-primary">
|
||||
{{ 'common.messages.confirm' | translate }}
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
|
|
|
@ -13,18 +13,21 @@
|
|||
}
|
||||
}
|
||||
|
||||
::ng-deep .mat-card-header-text {
|
||||
margin: 0;
|
||||
.title {
|
||||
width: 480px;
|
||||
@include ellipsis(1);
|
||||
.mat-card-header {
|
||||
.mat-card-header-text {
|
||||
.title {
|
||||
@include ellipsis(1);
|
||||
}
|
||||
.btn-dialog-close {
|
||||
font-size: 20px;
|
||||
display: flex;
|
||||
margin-left: auto;
|
||||
align-self: flex-start;
|
||||
color: #444444;
|
||||
}
|
||||
}
|
||||
.btn-dialog-close {
|
||||
font-size: 20px;
|
||||
display: flex;
|
||||
.icon-button {
|
||||
margin-left: auto;
|
||||
align-self: flex-start;
|
||||
color: #444444;
|
||||
}
|
||||
}
|
||||
.confirm-card {
|
||||
|
|
|
@ -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<any>
|
||||
@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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
})
|
||||
)
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
padding: 0 10px;
|
||||
align-content: flex-start;
|
||||
text-align: left;
|
||||
align-items: self-start;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,8 @@ import {
|
|||
SSVC_TYPE_EVENT_CANCEL_NOTI,
|
||||
SSVC_TYPE_EVENT_DEL_RES,
|
||||
SSVC_TYPE_EVENT_SEND_RES,
|
||||
SSVC_TYPE_EVENT_READ_RES
|
||||
SSVC_TYPE_EVENT_READ_RES,
|
||||
EventType
|
||||
} from '@ucap-webmessenger/protocol-event';
|
||||
import {
|
||||
InfoProtocolService,
|
||||
|
@ -248,30 +249,35 @@ export class AppNotificationService {
|
|||
);
|
||||
audio.play();
|
||||
} else {
|
||||
const notiReq: NotificationRequest = {
|
||||
type: NotificationType.Event,
|
||||
seq: noti.roomSeq,
|
||||
title: this.translateService.instant(
|
||||
'notification.titleChatEventArrived'
|
||||
),
|
||||
contents: StringUtil.convertFinalEventMessage(
|
||||
noti.eventType,
|
||||
noti.info.sentMessageJson
|
||||
),
|
||||
image: '',
|
||||
useSound: [
|
||||
NotificationMethod.Sound,
|
||||
NotificationMethod.SoundAndAlert
|
||||
].some(
|
||||
n => n === appUserInfo.settings.notification.method
|
||||
)
|
||||
? true
|
||||
: false,
|
||||
displayTime:
|
||||
appUserInfo.settings.notification
|
||||
.alertExposureTime * 1000
|
||||
};
|
||||
this.nativeService.notify(notiReq);
|
||||
const contents = StringUtil.convertFinalEventMessage(
|
||||
noti.eventType,
|
||||
noti.info.sentMessageJson
|
||||
);
|
||||
|
||||
if (!!contents) {
|
||||
const notiReq: NotificationRequest = {
|
||||
type: NotificationType.Event,
|
||||
seq: noti.roomSeq,
|
||||
title: this.translateService.instant(
|
||||
'notification.titleChatEventArrived'
|
||||
),
|
||||
contents,
|
||||
image: '',
|
||||
useSound: [
|
||||
NotificationMethod.Sound,
|
||||
NotificationMethod.SoundAndAlert
|
||||
].some(
|
||||
n =>
|
||||
n === appUserInfo.settings.notification.method
|
||||
)
|
||||
? true
|
||||
: false,
|
||||
displayTime:
|
||||
appUserInfo.settings.notification
|
||||
.alertExposureTime * 1000
|
||||
};
|
||||
this.nativeService.notify(notiReq);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -474,6 +480,20 @@ export class AppNotificationService {
|
|||
);
|
||||
}
|
||||
break;
|
||||
case SSVC_TYPE_ROOM_INVITE_NOTI:
|
||||
{
|
||||
const noti = notiOrRes as InviteNotification;
|
||||
this.logger.debug(
|
||||
'Notification::roomProtocolService::InviteNotification',
|
||||
noti
|
||||
);
|
||||
this.store.dispatch(
|
||||
RoomStore.inviteNotification({
|
||||
noti
|
||||
})
|
||||
);
|
||||
}
|
||||
break;
|
||||
case SSVC_TYPE_ROOM_UPD_RES:
|
||||
{
|
||||
const noti = notiOrRes as RoomUpdateNotification;
|
||||
|
@ -496,20 +516,6 @@ export class AppNotificationService {
|
|||
);
|
||||
}
|
||||
break;
|
||||
case SSVC_TYPE_ROOM_INVITE_NOTI:
|
||||
{
|
||||
const noti = notiOrRes as InviteNotification;
|
||||
this.logger.debug(
|
||||
'Notification::roomProtocolService::InviteNotification',
|
||||
noti
|
||||
);
|
||||
this.store.dispatch(
|
||||
RoomStore.inviteNotification({
|
||||
noti
|
||||
})
|
||||
);
|
||||
}
|
||||
break;
|
||||
case SSVC_TYPE_ROOM_EXIT_RES:
|
||||
case SSVC_TYPE_ROOM_EXIT_NOTI:
|
||||
{
|
||||
|
@ -528,7 +534,8 @@ export class AppNotificationService {
|
|||
} else {
|
||||
this.store.dispatch(
|
||||
RoomStore.exitNotificationOthers({
|
||||
noti
|
||||
roomSeq: noti.roomSeq,
|
||||
trgtUser: [noti.SENDER_SEQ]
|
||||
})
|
||||
);
|
||||
|
||||
|
@ -560,15 +567,31 @@ export class AppNotificationService {
|
|||
break;
|
||||
case SSVC_TYPE_ROOM_EXIT_FORCING_NOTI:
|
||||
{
|
||||
// 내가 강퇴 됨.
|
||||
const noti = notiOrRes as ExitForcingNotification;
|
||||
this.logger.debug(
|
||||
'Notification::roomProtocolService::ExitForcingNotification NOTI',
|
||||
noti
|
||||
);
|
||||
|
||||
if (noti.userSeqs.indexOf(loginResInfo.userSeq) >= 0) {
|
||||
this.store.dispatch(
|
||||
RoomStore.exitForcingNotification({
|
||||
noti
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
this.store.dispatch(
|
||||
RoomStore.exitForcingNotification({
|
||||
noti
|
||||
RoomStore.exitNotificationOthers({
|
||||
roomSeq: noti.roomSeq,
|
||||
trgtUser: noti.userSeqs
|
||||
})
|
||||
);
|
||||
|
||||
this.store.dispatch(
|
||||
SyncStore.clearRoomUsers({
|
||||
roomSeq: noti.roomSeq,
|
||||
userSeqs: noti.userSeqs
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
@ -56,9 +56,12 @@ export const exitNotification = createAction(
|
|||
'[Messenger::Room] Exit Notification',
|
||||
props<{ noti: ExitNotification }>()
|
||||
);
|
||||
/**
|
||||
* 현재 열려 있는 방의 방참여인원의 isJoinRoom flag 를 false 로 변경.
|
||||
*/
|
||||
export const exitNotificationOthers = createAction(
|
||||
'[Messenger::Room] Exit Notification By Others',
|
||||
props<{ noti: ExitNotification }>()
|
||||
props<{ roomSeq: string; trgtUser: number[] }>()
|
||||
);
|
||||
|
||||
export const exitForcing = createAction(
|
||||
|
|
|
@ -310,8 +310,25 @@ export class Effects {
|
|||
() => {
|
||||
return this.actions$.pipe(
|
||||
ofType(inviteNotification),
|
||||
map(action => action.noti),
|
||||
tap(noti => {})
|
||||
withLatestFrom(
|
||||
this.store.pipe(
|
||||
select((state: any) => state.messenger.room.roomInfo as RoomInfo)
|
||||
)
|
||||
),
|
||||
tap(([action, roomInfo]) => {
|
||||
if (!!roomInfo && roomInfo.roomSeq === action.noti.roomSeq) {
|
||||
const loginInfo = this.sessionStorageService.get<LoginInfo>(
|
||||
KEY_LOGIN_INFO
|
||||
);
|
||||
this.store.dispatch(
|
||||
info({
|
||||
roomSeq: action.noti.roomSeq,
|
||||
isDetail: true,
|
||||
localeCode: loginInfo.localeCode
|
||||
})
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
},
|
||||
{ dispatch: false }
|
||||
|
@ -354,13 +371,11 @@ export class Effects {
|
|||
tap(([action, roomInfo]) => {
|
||||
if (
|
||||
!!roomInfo &&
|
||||
roomInfo.roomSeq === action.noti.roomSeq &&
|
||||
!!action.noti &&
|
||||
!!action.noti.SENDER_SEQ
|
||||
roomInfo.roomSeq === action.roomSeq &&
|
||||
!!action.trgtUser &&
|
||||
action.trgtUser.length > 0
|
||||
) {
|
||||
this.store.dispatch(
|
||||
clearRoomUser({ userSeqs: [action.noti.SENDER_SEQ] })
|
||||
);
|
||||
this.store.dispatch(clearRoomUser({ userSeqs: action.trgtUser }));
|
||||
}
|
||||
})
|
||||
);
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
|
||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||
import * as ChatStore from '@app/store/messenger/chat';
|
||||
import { UserInfo } from '@ucap-webmessenger/protocol-room';
|
||||
import { UserInfo, UserInfoShort } from '@ucap-webmessenger/protocol-room';
|
||||
|
||||
export const reducer = createReducer(
|
||||
initialState,
|
||||
|
@ -28,14 +28,45 @@ export const reducer = createReducer(
|
|||
}),
|
||||
|
||||
on(clearRoomUser, (state, action) => {
|
||||
const tmpUserInfoList: UserInfo[] = [];
|
||||
const tmpUserInfoShortList: UserInfoShort[] = [];
|
||||
action.userSeqs.forEach(userSeq => {
|
||||
const userInfo: UserInfo = {
|
||||
...state.userInfoList.entities[userSeq]
|
||||
};
|
||||
|
||||
if (!!userInfo && !!userInfo.seq) {
|
||||
tmpUserInfoList.push({
|
||||
...userInfo,
|
||||
isJoinRoom: false
|
||||
});
|
||||
}
|
||||
|
||||
const userInfoShort: UserInfoShort = {
|
||||
...state.userInfoShortList.entities[userSeq]
|
||||
};
|
||||
if (!!userInfoShort && !!userInfoShort.seq) {
|
||||
tmpUserInfoShortList.push({
|
||||
...userInfoShort,
|
||||
isJoinRoom: false
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
...state,
|
||||
userInfoList: adapterUserInfo.removeMany(action.userSeqs, {
|
||||
...state.userInfoList
|
||||
}),
|
||||
userInfoShortList: adapterUserInfoShort.removeMany(action.userSeqs, {
|
||||
...state.userInfoShortList
|
||||
})
|
||||
userInfoList:
|
||||
tmpUserInfoList.length > 0
|
||||
? adapterUserInfo.upsertMany(tmpUserInfoList, {
|
||||
...state.userInfoList
|
||||
})
|
||||
: state.userInfoList,
|
||||
userInfoShortList:
|
||||
tmpUserInfoShortList.length > 0
|
||||
? adapterUserInfoShort.upsertMany(tmpUserInfoShortList, {
|
||||
...state.userInfoShortList
|
||||
})
|
||||
: state.userInfoShortList
|
||||
};
|
||||
}),
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ export const delGroupFailure = createAction(
|
|||
props<{ error: any }>()
|
||||
);
|
||||
|
||||
/** 방 인원 클리어 */
|
||||
/** Sync 되어 있는 방의 방인원의 isJoinRoom flag 를 false 로 변경. */
|
||||
export const clearRoomUsers = createAction(
|
||||
'[Messenger::Sync] Clear room users.',
|
||||
props<{ roomSeq: string; userSeqs: number[] }>()
|
||||
|
|
|
@ -342,6 +342,10 @@ export class Effects {
|
|||
let roomSeq = null;
|
||||
|
||||
for (const key in roomUsers) {
|
||||
if (key === undefined) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (roomUsers.hasOwnProperty(key)) {
|
||||
const element = roomUsers[key];
|
||||
if (userSeqList.length === element.userInfos.length) {
|
||||
|
@ -371,6 +375,10 @@ export class Effects {
|
|||
}
|
||||
|
||||
for (const key in roomUserShorts) {
|
||||
if (key === undefined) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (roomUserShorts.hasOwnProperty(key)) {
|
||||
const element = roomUserShorts[key];
|
||||
if (userSeqList.length === element.userInfos.length) {
|
||||
|
|
|
@ -103,35 +103,45 @@ export const reducer = createReducer(
|
|||
}),
|
||||
|
||||
on(clearRoomUsers, (state, action) => {
|
||||
let roomUserList: RoomUserDetailData = {
|
||||
const roomUserList: RoomUserDetailData = {
|
||||
...state.roomUser.entities[action.roomSeq]
|
||||
};
|
||||
let trgtRoomUserList: RoomUserDetailData;
|
||||
if (
|
||||
!!roomUserList &&
|
||||
!!roomUserList.userInfos &&
|
||||
roomUserList.userInfos.length > 0
|
||||
) {
|
||||
const userInfos = roomUserList.userInfos.filter(
|
||||
userInfo => action.userSeqs.indexOf(userInfo.seq) < 0
|
||||
);
|
||||
roomUserList = {
|
||||
const userInfos = roomUserList.userInfos.map(userInfo => {
|
||||
if (action.userSeqs.indexOf(userInfo.seq) >= 0) {
|
||||
return { ...userInfo, isJoinRoom: false };
|
||||
} else {
|
||||
return userInfo;
|
||||
}
|
||||
});
|
||||
trgtRoomUserList = {
|
||||
...roomUserList,
|
||||
userInfos
|
||||
};
|
||||
}
|
||||
|
||||
let roomUserShortList: RoomUserData = {
|
||||
const roomUserShortList: RoomUserData = {
|
||||
...state.roomUserShort.entities[action.roomSeq]
|
||||
};
|
||||
let trgtRoomUserShortList: RoomUserData;
|
||||
if (
|
||||
!!roomUserShortList &&
|
||||
!!roomUserShortList.userInfos &&
|
||||
roomUserShortList.userInfos.length > 0
|
||||
) {
|
||||
const userInfos = roomUserShortList.userInfos.filter(
|
||||
userInfo => action.userSeqs.indexOf(userInfo.seq) < 0
|
||||
);
|
||||
roomUserShortList = {
|
||||
const userInfos = roomUserShortList.userInfos.map(userInfo => {
|
||||
if (action.userSeqs.indexOf(userInfo.seq) >= 0) {
|
||||
return { ...userInfo, isJoinRoom: false };
|
||||
} else {
|
||||
return userInfo;
|
||||
}
|
||||
});
|
||||
trgtRoomUserShortList = {
|
||||
...roomUserShortList,
|
||||
userInfos
|
||||
};
|
||||
|
@ -139,12 +149,16 @@ export const reducer = createReducer(
|
|||
|
||||
return {
|
||||
...state,
|
||||
roomUser: adapterRoomUser.upsertOne(roomUserList, {
|
||||
...state.roomUser
|
||||
}),
|
||||
roomUserShort: adapterRoomUserShort.upsertOne(roomUserShortList, {
|
||||
...state.roomUserShort
|
||||
})
|
||||
roomUser: !!trgtRoomUserList
|
||||
? adapterRoomUser.upsertOne(trgtRoomUserList, {
|
||||
...state.roomUser
|
||||
})
|
||||
: state.roomUser,
|
||||
roomUserShort: !!trgtRoomUserShortList
|
||||
? adapterRoomUserShort.upsertOne(trgtRoomUserShortList, {
|
||||
...state.roomUserShort
|
||||
})
|
||||
: state.roomUserShort
|
||||
};
|
||||
}),
|
||||
|
||||
|
|
|
@ -275,6 +275,14 @@ $daesang-grey: (
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cdk-global-overlay-wrapper {
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
.mat-simple-snackbar {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.policy {
|
||||
color: mat-color($accent, B100);
|
||||
}
|
||||
|
@ -440,7 +448,7 @@ $daesang-grey: (
|
|||
}
|
||||
}
|
||||
}
|
||||
.mat-calendar-body-selected{
|
||||
background-color: mat-color($accent);
|
||||
.mat-calendar-body-selected {
|
||||
background-color: mat-color($accent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,10 @@ $tablet-s-width: 768px;
|
|||
.profile-img {
|
||||
flex: 0 0 auto;
|
||||
&.thumbnail-mask {
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 1px solid rgb(0, 0, 0, 0.1);
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
img {
|
||||
width: 40px;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<div fxFlex fxLayout="row" class="chatroom-search">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="input input-lineless search-form">
|
||||
<!--<div fxFlex fxLayout="row" class="chatroom-search">
|
||||
<div
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="start center"
|
||||
class="input input-lineless search-form"
|
||||
>
|
||||
<form [formGroup]="fgSearch">
|
||||
<span class="icon-img">
|
||||
<i class="mid mdi-magnify"></i>
|
||||
|
@ -39,33 +43,69 @@
|
|||
<i class="mid mdi-arrow-up"></i>
|
||||
</button>
|
||||
<button class="icon-button btn-search" (click)="onClickPrevSearch()">
|
||||
<i class="mid mdi-arrow-up"></i>
|
||||
<i class="mid mdi-arrow-up mdi-chevron-up"></i>
|
||||
</button>
|
||||
<button class="icon-button btn-search" (click)="onClickNextSearch()">
|
||||
<i class="mid mdi-arrow-down"></i>
|
||||
<i class="mid mdi-arrow-down mdi-chevron-down"></i>
|
||||
</button>
|
||||
|
||||
<!--<mat-button-toggle-group>
|
||||
<mat-button-toggle></mat-button-toggle>
|
||||
<mat-button-toggle >
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="feather feather-arrow-up"
|
||||
<button
|
||||
class="icon-button btn-close-searchbox bg-accent-dark"
|
||||
(click)="inputSearch.value = ''; onClickSearchCancel()"
|
||||
>
|
||||
<i class="mid mdi-window-close"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>-->
|
||||
<div fxFlex fxLayout="row" class="chatroom-search">
|
||||
<div
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="start center"
|
||||
class="input input-lineless search-form"
|
||||
>
|
||||
<form [formGroup]="fgSearch">
|
||||
<span class="icon-img">
|
||||
<i class="mid mdi-magnify"></i>
|
||||
</span>
|
||||
<mat-form-field floatLabel="never">
|
||||
<input
|
||||
matInput
|
||||
#inputSearch
|
||||
type="text"
|
||||
placeholder="{{ 'chat.searchEventByText' | translate }}"
|
||||
value=""
|
||||
formControlName="searchInput"
|
||||
(keydown.enter)="onKeyDownEnter($event, inputSearch.value)"
|
||||
/>
|
||||
<button
|
||||
mat-button
|
||||
matSuffix
|
||||
mat-icon-button
|
||||
aria-label="Clear"
|
||||
*ngIf="inputSearch.value"
|
||||
(click)="inputSearch.value = ''"
|
||||
>
|
||||
<line x1="12" y1="19" x2="12" y2="5"></line>
|
||||
<polyline points="5 12 12 5 19 12"></polyline>
|
||||
</svg>
|
||||
</mat-button-toggle>
|
||||
<mat-button-toggle ></mat-button-toggle>
|
||||
</mat-button-toggle-group>-->
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</mat-form-field>
|
||||
<span class="text-amount">{{ curIndex }} / {{ totalCount }}</span>
|
||||
</form>
|
||||
</div>
|
||||
<span class="stroke-bar"></span>
|
||||
<div class="btns">
|
||||
<button
|
||||
*ngIf="false"
|
||||
mat-stroked-button
|
||||
(click)="onClickSearchAndPrev()"
|
||||
class="btn-toggle"
|
||||
>
|
||||
<i class="mid mdi-arrow-up"></i>
|
||||
</button>
|
||||
<button class="icon-button btn-search" (click)="onClickPrevSearch()">
|
||||
<i class="mid mdi-chevron-up"></i>
|
||||
</button>
|
||||
<button class="icon-button btn-search" (click)="onClickNextSearch()">
|
||||
<i class="mid mdi-chevron-down"></i>
|
||||
</button>
|
||||
<button
|
||||
class="icon-button btn-close-searchbox bg-accent-dark"
|
||||
(click)="inputSearch.value = ''; onClickSearchCancel()"
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
</div>
|
||||
<div fxFlex="40%" style="margin-left: 30px;">
|
||||
<div fxLayout="column">
|
||||
<div fxFlex="40px" style="margin-top: 30px;" class="Reservation-dete">
|
||||
<span flFlexFill style="font-size: 20px;" class="text-accent-dark">
|
||||
<div fxFlex="40px" class="Reservation-dete">
|
||||
<span flFlexFill class="text-accent-dark">
|
||||
{{ selectedDate.format('MMM DD YYYY, HH:mm') }}
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
.actions {
|
||||
margin-left: auto;
|
||||
button {
|
||||
margin-left: 8px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,3 +34,8 @@
|
|||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.Reservation-dete {
|
||||
margin-top: 30px;
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@ textarea {
|
|||
width: auto;
|
||||
input {
|
||||
margin: 0;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
.mat-form-field-label-wrapper {
|
||||
top: 0;
|
||||
|
@ -113,10 +114,22 @@ textarea {
|
|||
+ .mat-form-field-label-wrapper
|
||||
.mat-form-field-label {
|
||||
font-size: 0.7em;
|
||||
transform: translateY(-1.1em) scale(1);
|
||||
transform: translateY(-1.4em) scale(1);
|
||||
}
|
||||
.mat-form-field-underline {
|
||||
background-color: none;
|
||||
transform: scaleY(1);
|
||||
}
|
||||
.mat-form-field-wrapper {
|
||||
.mat-form-field-infix {
|
||||
.mat-input-element {
|
||||
line-height: 1.4em;
|
||||
}
|
||||
}
|
||||
.mat-form-field-label-wrapper {
|
||||
.mat-form-field-label {
|
||||
line-height: 1.4em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ $search-font-size: 14px;
|
|||
width: 100%;
|
||||
font-size: 1em;
|
||||
padding-left: 0;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
.btn-search {
|
||||
color: #777777;
|
||||
|
@ -60,6 +61,11 @@ $search-font-size: 14px;
|
|||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
.mat-form-field-label-wrapper {
|
||||
.mat-form-field-label {
|
||||
line-height: 1.4em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,6 +94,7 @@ $search-font-size: 14px;
|
|||
display: inline-flex;
|
||||
width: 46%;
|
||||
padding-left: 20px;
|
||||
line-height: 1.4em;
|
||||
|
||||
& + .searchbox {
|
||||
width: 54%;
|
||||
|
@ -96,6 +103,7 @@ $search-font-size: 14px;
|
|||
display: inline-flex;
|
||||
width: 100%;
|
||||
font-size: 1em;
|
||||
line-height: 1.4em;
|
||||
padding-left: 0;
|
||||
}
|
||||
.btn-search {
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.mat-simple-snackbar {
|
||||
justify-content: center;
|
||||
}
|
Loading…
Reference in New Issue
Block a user