타이머 대화방 사용유무, MASSTEXT 길이, 대화방 참여인원제한 > 환경설정으로 구성.
This commit is contained in:
parent
79336bffb4
commit
568c0be6a5
|
@ -50,6 +50,7 @@ import {
|
|||
KEY_LOGIN_RES_INFO
|
||||
} from '@app/types';
|
||||
import { MessageBoxComponent } from './left-sidenav/message.component';
|
||||
import { environment } from '../../../../environments/environment';
|
||||
|
||||
export enum MainMenu {
|
||||
Group = 'GROUP',
|
||||
|
@ -301,17 +302,20 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
|||
{
|
||||
this.fabButtonShow = true;
|
||||
this.fabButtons = [
|
||||
{
|
||||
icon: 'timer',
|
||||
tooltip: 'New Timer Chat',
|
||||
divisionType: 'CHAT_NEW_TIMER_ADD'
|
||||
},
|
||||
{
|
||||
icon: 'chat',
|
||||
tooltip: 'New Chat',
|
||||
divisionType: 'CAHT_NEW_ADD'
|
||||
}
|
||||
];
|
||||
|
||||
if (environment.productConfig.CommonSetting.useTimerRoom) {
|
||||
this.fabButtons.push({
|
||||
icon: 'timer',
|
||||
tooltip: 'New Timer Chat',
|
||||
divisionType: 'CHAT_NEW_TIMER_ADD'
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MainMenu.Organization:
|
||||
|
@ -417,8 +421,10 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
|||
break;
|
||||
case 'CHAT_NEW_TIMER_ADD':
|
||||
{
|
||||
if (environment.productConfig.CommonSetting.useTimerRoom) {
|
||||
this.onClickNewChat('TIMER');
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'MESSAGE_NEW':
|
||||
|
|
|
@ -97,6 +97,7 @@ import {
|
|||
SelectGroupDialogData
|
||||
} from '../dialogs/group/select-group.dialog.component';
|
||||
import { GroupDetailData } from '@ucap-webmessenger/protocol-sync';
|
||||
import { environment } from '../../../../environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-layout-messenger-messages',
|
||||
|
@ -567,7 +568,11 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
|
||||
if (!!this.selectedSticker) {
|
||||
// Send Sticker
|
||||
if (!!message && message.trim().length > CONST.MASSTEXT_LEN) {
|
||||
if (
|
||||
!!message &&
|
||||
message.trim().length >
|
||||
environment.productConfig.CommonSetting.masstextLength
|
||||
) {
|
||||
const result = await this.dialogService.open<
|
||||
AlertDialogComponent,
|
||||
AlertDialogData,
|
||||
|
@ -576,7 +581,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
width: '360px',
|
||||
data: {
|
||||
title: 'Alert',
|
||||
message: `스티커를 포함할 경우 ${CONST.MASSTEXT_LEN}자 이상 보낼 수 없습니다.`
|
||||
message: `스티커를 포함할 경우 ${environment.productConfig.CommonSetting.masstextLength}자 이상 보낼 수 없습니다.`
|
||||
}
|
||||
});
|
||||
return;
|
||||
|
@ -599,7 +604,10 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
);
|
||||
this.isShowStickerSelector = false;
|
||||
this.setStickerHistory(this.selectedSticker);
|
||||
} else if (message.trim().length > CONST.MASSTEXT_LEN) {
|
||||
} else if (
|
||||
message.trim().length >
|
||||
environment.productConfig.CommonSetting.masstextLength
|
||||
) {
|
||||
// MASS TEXT
|
||||
this.store.dispatch(
|
||||
EventStore.sendMass({
|
||||
|
|
|
@ -15,6 +15,7 @@ import {
|
|||
import { Store, select } from '@ngrx/store';
|
||||
import { Dictionary } from '@ngrx/entity';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { environment } from '../../../../environments/environment';
|
||||
|
||||
import {
|
||||
buddy2,
|
||||
|
@ -105,6 +106,12 @@ import {
|
|||
import * as ChatStore from '@app/store/messenger/chat';
|
||||
import * as RoomStore from '@app/store/messenger/room';
|
||||
import { CONST } from '@ucap-webmessenger/core';
|
||||
import {
|
||||
AlertDialogComponent,
|
||||
AlertDialogResult,
|
||||
DialogService,
|
||||
AlertDialogData
|
||||
} from '@ucap-webmessenger/ui';
|
||||
|
||||
@Injectable()
|
||||
export class Effects {
|
||||
|
@ -327,8 +334,9 @@ export class Effects {
|
|||
)
|
||||
)
|
||||
),
|
||||
tap(([action, loginRes, roomInfos, roomUsers, roomUserShorts]) => {
|
||||
const userSeqList = [...action.userSeqList, loginRes.userSeq];
|
||||
tap(
|
||||
async ([action, loginRes, roomInfos, roomUsers, roomUserShorts]) => {
|
||||
const userSeqList = [...action.userSeqList];
|
||||
let roomSeq = null;
|
||||
|
||||
for (const key in roomUsers) {
|
||||
|
@ -389,6 +397,9 @@ export class Effects {
|
|||
}
|
||||
}
|
||||
|
||||
// 내 정보를 추가하여 방생성.
|
||||
userSeqList.push(loginRes.userSeq);
|
||||
|
||||
this.logger.debug(
|
||||
'openRoom',
|
||||
'userSeqList',
|
||||
|
@ -401,6 +412,23 @@ export class Effects {
|
|||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
environment.productConfig.CommonSetting.maxChatRoomUser <
|
||||
userSeqList.length
|
||||
) {
|
||||
await this.dialogService.open<
|
||||
AlertDialogComponent,
|
||||
AlertDialogData,
|
||||
AlertDialogResult
|
||||
>(AlertDialogComponent, {
|
||||
data: {
|
||||
title: '',
|
||||
html: `${environment.productConfig.CommonSetting.maxChatRoomUser}명 이상 대화할 수 없습니다.`
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!!action.isTimeRoom && action.isTimeRoom) {
|
||||
// 타이머 방
|
||||
this.store.dispatch(
|
||||
|
@ -422,7 +450,8 @@ export class Effects {
|
|||
})
|
||||
);
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
),
|
||||
{ dispatch: false }
|
||||
);
|
||||
|
@ -1010,6 +1039,7 @@ export class Effects {
|
|||
private groupProtocolService: GroupProtocolService,
|
||||
private buddyProtocolService: BuddyProtocolService,
|
||||
private sessionStorageService: SessionStorageService,
|
||||
private dialogService: DialogService,
|
||||
private logger: NGXLogger
|
||||
) {}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,11 @@ export const environment: Environment = {
|
|||
}
|
||||
},
|
||||
CommonSetting: {
|
||||
editableProfileImage: false
|
||||
editableProfileImage: false,
|
||||
|
||||
useTimerRoom: false,
|
||||
maxChatRoomUser: 300,
|
||||
masstextLength: 800
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -52,7 +52,11 @@ export const environment: Environment = {
|
|||
}
|
||||
},
|
||||
CommonSetting: {
|
||||
editableProfileImage: false
|
||||
editableProfileImage: false,
|
||||
|
||||
useTimerRoom: false,
|
||||
maxChatRoomUser: 300,
|
||||
masstextLength: 800
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -52,7 +52,11 @@ export const environment: Environment = {
|
|||
}
|
||||
},
|
||||
CommonSetting: {
|
||||
editableProfileImage: true
|
||||
editableProfileImage: true,
|
||||
|
||||
useTimerRoom: true,
|
||||
maxChatRoomUser: 300,
|
||||
masstextLength: 800
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -52,7 +52,11 @@ export const environment: Environment = {
|
|||
}
|
||||
},
|
||||
CommonSetting: {
|
||||
editableProfileImage: true
|
||||
editableProfileImage: true,
|
||||
|
||||
useTimerRoom: true,
|
||||
maxChatRoomUser: 300,
|
||||
masstextLength: 800
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -65,6 +65,10 @@ export interface Environment {
|
|||
|
||||
CommonSetting: {
|
||||
editableProfileImage: boolean;
|
||||
|
||||
useTimerRoom: boolean;
|
||||
maxChatRoomUser: number;
|
||||
masstextLength: number;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
export enum CONST {
|
||||
/** 대용량 텍스트로 보내는 문자열의 길이 기준 */
|
||||
MASSTEXT_LEN = 800,
|
||||
/** 대화방의 이벤트를 조회하는 갯수 */
|
||||
EVENT_INFO_READ_COUNT = 50,
|
||||
/** Timer Room 최초 오픈시 timer interval */
|
||||
DEFAULT_TIMER_ROOM_INTERVAL = 24 * 60 * 60,
|
||||
/** 한번에 채팅을 할 수 있는 인원수 제한 */
|
||||
CHATROOM_USER = 300,
|
||||
|
||||
/** 여기까지 읽음을 표시할때 조회할 최소 이벤트 갯수 */
|
||||
READ_HERE_MIN_EVENT_INFO_READ_COUNT = 10,
|
||||
|
|
Loading…
Reference in New Issue
Block a user