diff --git a/main/src/index.ts b/main/src/index.ts index a6023ee1..4cbd0ebe 100644 --- a/main/src/index.ts +++ b/main/src/index.ts @@ -194,3 +194,7 @@ ipcMain.on(Channel.saveFile, (event: IpcMainEvent, ...args: any[]) => { event.returnValue = false; } }); + +ipcMain.on(Channel.showNotify, (event: IpcMainEvent, ...args: any[]) => { + console.log('Channel.showNotify', args); +}); diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html index 0358f4a2..3784e5ce 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html @@ -11,7 +11,7 @@ group - + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.scss index 015d4278..fc656cfe 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.scss @@ -49,3 +49,7 @@ } } } +.left-group-side{ + position: relative; + height:100%; +} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html index dd59b29c..d1843a20 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html @@ -1,83 +1,66 @@ - - - + - -
- - - -
- + -
- - - - - - - +
+ + + + + + + + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.scss index b0492594..6ac50a90 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.scss @@ -1,3 +1,69 @@ +.current-head{ + display: flex; + justify-content: center; + padding: 0 10px; + height: 60px; + h3{ + display: inline-flex; + padding-left: 10px; + align-items: center; + } + .btn-box{ + height: 100%; + margin-left: auto; + display: inline-flex; + align-items: center; + } +} + +.list-search { + display: flex; + flex-direction: row; + height: 60px; + align-items: center; + padding: 0; + font-size: 14px; + border-bottom: 1px solid #dddddd; + .searchbox{ + width:100%; + height:100%; + } +} +::ng-deep .searchbox{ + .mat-form-field{ + display:block; + .mat-form-field-wrapper{ + padding: 0; + padding-bottom:0 !important; + height: 100%; + .mat-form-field-flex{ + height: 59px; + padding:0 20px; + align-items: center; + .mat-form-field-infix{ + width:100%; + font-size:14px; + border:none; + } + .mat-form-field-suffix{ + .mat-icon{ + line-height:24px; + } + } + } + } + } + .mat-form-field-appearance-legacy{ + .mat-form-field-wrapper{ + padding: 0; + } + .mat-form-field-underline{ + bottom:0; + background-color: unset !important; + } + } +} + .app-layout-chat-left-sidenav-chat-header { width: 100%; height: 50px; @@ -10,60 +76,4 @@ .app-layout-chat-left-sidenav-chat-list-viewport { width: 100%; height: 100%; -} - -.room-name { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - - -.list-search { - display: flex; - flex-direction: row; - height: 60px; - align-items: center; - padding: 0; - font-size: 14px; - border-bottom: 1px solid #dddddd; - .searchbox{ - width:100%; - .mat-form-field{ - display:block; - .mat-form-field-wrapper{ - padding-bottom:0 !important; - height: 60px; - - } - } - } -} -::ng-deep .searchbox .mat-form-field-flex{ - height: 60px; - padding:0 10px; -} -::ng-deep .searchbox .mat-form-field-appearance-legacy .mat-form-field-wrapper{ - padding: 0; -} -::ng-deep .searchbox .mat-form-field-appearance-legacy .mat-form-field-underline{ - bottom:0; - background-color: #cccccc !important; -} -/*.searchbox { - width: 100%; - display: flex; - input { - display: inline-flex; - width: 100%; - font-size: 14px; - padding-left: 0; - } - .btn-search { - color: #777777; - font-size: 12px; - display: inline-flex; - margin-left: auto; - flex: none; - } - }*/ \ No newline at end of file +} \ No newline at end of file diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.html index b7a2f1bb..fff2e121 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.html @@ -1,4 +1,4 @@ -
+

그룹

@@ -52,7 +52,7 @@
-
+
-
+
-
검색결과({{ searchUserInfos.length }}명)
+
검색결과({{ searchUserInfos.length }}명)
-
+
(CreateChatDialogComponent, { width: '600px', - height: '700px', data: { type: UserSelectDialogType.NewGroup, title: 'New Group' diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html index 9b8572d9..44ab06ee 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html @@ -10,8 +10,7 @@ >
-
-
+
{{ getSelectedDepartmentName() }}
@@ -25,7 +24,6 @@
-
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.scss index 0f24738c..dd444aaa 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.scss @@ -16,16 +16,17 @@ } - .oraganization-tab { - height: 100%; - flex-direction: inherit; - display: flex; - .oraganization-tab-tree { - height:40%; - overflow-y: auto; - } +.oraganization-tab { + height: 100%; + flex-direction: inherit; + display: flex; + .oraganization-tab-tree { + height:40%; + overflow-y: auto; } +} +//팝업에 있는 조직도 .mat-card-content{ .mat-tab-body-content{ .oraganization-box{ @@ -37,34 +38,24 @@ } } -.btn-box{ - height:100px; - position: absolute; - bottom:0; - border-top:1px solid #ddd; - align-items: center; - width:100%; - background-color:#ffffff; -} - .select-list{ height:60%; border-top:1px solid #dddddd; .select-dept{ - padding:0 10px; + padding:0 20px; height:40px; line-height:40px; - .dept-name{ - border-top:1px solid #dddddd; - height:40px; - width:100%; - display:inline-flex; - align-items: center; - padding:0 10px; + display:flex; + background-color: #f9f9f9; + dt{ + + } + dd{ + margin-left:auto; } } .search-list{ - height: calc(100% - 140px); + height: calc(100% - 40px); overflow: auto; .list-item{ height:70px; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html index 714903ee..87061a8e 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html @@ -8,19 +8,33 @@ +
-
- {{ getRoomName() }} -
-
- timer {{ getConvertTimer(roomInfo.timeRoomInterval) }} +
+

+ {{ getRoomName() }} +

+ +
+ {{ getConvertTimer(roomInfo.timeRoomInterval) }} 비밀 대화방입니다. +
+
+
-
+
-
검색결과({{ searchUserInfos.length }}명)
+
검색결과 ({{ searchUserInfos.length }}명)
, private logger: NGXLogger ) {} @@ -143,6 +150,22 @@ export class AppNotificationService { noti }) ); + + // notification.. + if (notiOrRes.SSVC_TYPE === SSVC_TYPE_EVENT_SEND_NOTI) { + const notiReq: NotiRequest = { + roomSeq: noti.roomSeq, + title: '메세지가 도착했습니다.', + contents: StringUtil.convertFinalEventMessage( + noti.eventType, + noti.message + ), + image: '', + useSound: true, + interval: 0 + }; + this.nativeService.showNotify(notiReq); + } } break; case SSVC_TYPE_EVENT_READ_RES: diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/event/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/actions.ts index d34019f3..4ffe65af 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/event/actions.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/event/actions.ts @@ -29,6 +29,19 @@ export const infoSuccess = createAction( }>() ); +export const infoMoreSuccess = createAction( + '[Messenger::Event] Info More Success', + props<{ + infoList: Info[]; + res: InfoResponse; + }>() +); + +export const infoIntervalClear = createAction( + '[Messenger::Event] Info Interval Clear', + props() +); + export const infoFailure = createAction( '[Messenger::Event] Info Failure', props<{ error: any }>() @@ -174,6 +187,6 @@ export const delNotification = createAction( export const delInfoList = createAction( '[Messenger::Event] Delete InfoList', props<{ - eventSeq: number; + eventSeqs: number[]; }>() ); diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts index a98800ea..db1efa13 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts @@ -67,7 +67,9 @@ import { forwardFailure, forwardAfterRoomOpen, sendMass, - sendMassFailure + sendMassFailure, + infoMoreSuccess, + infoIntervalClear } from './actions'; import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { @@ -81,6 +83,7 @@ import { openSuccess, openFailure } from '../room'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type'; import { StatusCode } from '@ucap-webmessenger/api'; +import { CONST } from '@ucap-webmessenger/core'; @Injectable() export class Effects { @@ -91,7 +94,7 @@ export class Effects { return info({ roomSeq: action.roomSeq, baseSeq: 0, - requestCount: 50 + requestCount: CONST.EVENT_INFO_READ_COUNT }); }) ) @@ -115,12 +118,21 @@ export class Effects { break; case SSVC_TYPE_EVENT_INFO_RES: { - this.store.dispatch( - infoSuccess({ - infoList, - res: res as InfoResponse - }) - ); + if (req.baseSeq === 0) { + this.store.dispatch( + infoSuccess({ + infoList, + res: res as InfoResponse + }) + ); + } else { + this.store.dispatch( + infoMoreSuccess({ + infoList, + res: res as InfoResponse + }) + ); + } if (req.baseSeq === 0) { // 최초 이벤트 목록 조회시 SSVC_TYPE_EVENT_READ_REQ 수행. @@ -147,6 +159,45 @@ export class Effects { { dispatch: false } ); + infoIntervalClear$ = createEffect( + () => { + return this.actions$.pipe( + ofType(infoIntervalClear), + withLatestFrom( + this.store.pipe( + select((state: any) => state.messenger.room.roomInfo as RoomInfo) + ), + this.store.pipe( + select( + (state: any) => + state.messenger.event.infoList.entities as Dictionary + ) + ) + ), + map(([action, roomInfo, eventList]) => { + if (roomInfo.isTimeRoom && roomInfo.timeRoomInterval > 0) { + const delEventSeq: number[] = []; + // tslint:disable-next-line: forin + for (const key in eventList) { + const event: Info = eventList[key]; + if ( + new Date().getTime() - new Date(event.sendDate).getTime() >= + roomInfo.timeRoomInterval * 1000 + ) { + delEventSeq.push(event.seq); + } + } + + if (delEventSeq.length > 0) { + this.store.dispatch(delInfoList({ eventSeqs: delEventSeq })); + } + } + }) + ); + }, + { dispatch: false } + ); + read$ = createEffect(() => this.actions$.pipe( ofType(read), @@ -522,7 +573,7 @@ export class Effects { tap(([noti, roomInfo]) => { // 현재 방이 오픈되어 있으면 방내용 갱신 if (!!roomInfo && roomInfo.roomSeq === noti.roomSeq) { - this.store.dispatch(delInfoList({ eventSeq: noti.eventSeq })); + this.store.dispatch(delInfoList({ eventSeqs: [noti.eventSeq] })); } // 대화 > 리스트의 항목 갱신 diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/event/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/reducers.ts index 39378335..a357c4b4 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/event/reducers.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/event/reducers.ts @@ -6,10 +6,12 @@ import { info, infoFailure, recallInfoList, - delInfoList + delInfoList, + infoMoreSuccess } from './actions'; import * as AuthenticationStore from '@app/store/account/authentication'; import { Info, EventType } from '@ucap-webmessenger/protocol-event'; +import { CONST } from '@ucap-webmessenger/core'; export const reducer = createReducer( initialState, @@ -27,7 +29,27 @@ export const reducer = createReducer( ...state.infoList }), infoStatus: action.res, - infoListProcessing: false + infoListProcessing: false, + remainInfo: + !!action.infoList && + action.infoList.length === CONST.EVENT_INFO_READ_COUNT + ? true + : false + }; + }), + on(infoMoreSuccess, (state, action) => { + return { + ...state, + infoList: adapterInfoList.upsertMany(action.infoList, { + ...state.infoList + }), + infoStatus: action.res, + infoListProcessing: false, + remainInfo: + !!action.infoList && + action.infoList.length === CONST.EVENT_INFO_READ_COUNT + ? true + : false }; }), @@ -75,11 +97,11 @@ export const reducer = createReducer( }), on(delInfoList, (state, action) => { - const eventSeq = action.eventSeq; - return { ...state, - infoList: adapterInfoList.removeOne(eventSeq, { ...state.infoList }) + infoList: adapterInfoList.removeMany(action.eventSeqs, { + ...state.infoList + }) }; }), diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/event/state.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/state.ts index fe1cc060..e799ee2c 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/event/state.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/event/state.ts @@ -8,6 +8,7 @@ export interface State { infoListProcessing: boolean; infoList: InfoListState; infoStatus: InfoResponse | null; + remainInfo: boolean; } export const adapterInfoList = createEntityAdapter({ @@ -22,7 +23,8 @@ const infoListInitialState: InfoListState = adapterInfoList.getInitialState({}); export const initialState: State = { infoListProcessing: false, infoList: infoListInitialState, - infoStatus: null + infoStatus: null, + remainInfo: false }; const { @@ -43,6 +45,10 @@ export function selectors(selector: Selector) { selector, (state: State) => state.infoListProcessing ), + remainInfo: createSelector( + selector, + (state: State) => state.remainInfo + ), infoList: createSelector( selector, (state: State) => state.infoList diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts index cc5add6d..a9938e06 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts @@ -101,6 +101,7 @@ import { import * as ChatStore from '@app/store/messenger/chat'; import * as RoomStore from '@app/store/messenger/room'; +import { CONST } from '@ucap-webmessenger/core'; @Injectable() export class Effects { @@ -405,7 +406,7 @@ export class Effects { divCd: 'DivCodeT', roomName: '', isTimerRoom: true, - timerRoomInterval: 24 * 60 * 60, // 24h default + timerRoomInterval: CONST.DEFAULT_TIMER_ROOM_INTERVAL, // 24h default userSeqs: userSeqList } }) diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts index 0b78043e..8420f361 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts @@ -1,4 +1,3 @@ -import { JsonObject } from 'type-fest'; import { createReducer, on } from '@ngrx/store'; import { initialState, @@ -29,9 +28,7 @@ import { import * as RoomStore from '@app/store/messenger/room'; import { RoomInfo } from '@ucap-webmessenger/protocol-room'; -import { EventType } from '@ucap-webmessenger/protocol-event'; -import { FileType } from '@ucap-webmessenger/protocol-file'; -import { JsonAnalization } from '@ucap-webmessenger/api'; +import { StringUtil } from '@ucap-webmessenger/core'; export const reducer = createReducer( initialState, @@ -103,63 +100,36 @@ export const reducer = createReducer( }), on(updateRoomForNewEventMessage, (state, action) => { - let finalEventMessage: string = action.info.sentMessage; - switch (action.info.type) { - case EventType.Join: - case EventType.Exit: - case EventType.RenameRoom: - case EventType.NotificationForTimerRoom: - case EventType.GuideForRoomTimerChanged: { - /** - * 해당 타입은 메시지를 갱신하지 않는다. - * @description Edit with ui-chat > messages.component.ts - */ - return { - ...state - }; - } - case EventType.Sticker: - finalEventMessage = '스티커'; - break; - case EventType.File: - { - const contentJson = JSON.parse(finalEventMessage); - if (contentJson.FileType === FileType.Image) { - finalEventMessage = '이미지'; - } else { - finalEventMessage = '첨부파일'; - } - } - break; - case EventType.VideoConference: - finalEventMessage = '화상회의'; - break; - case EventType.MassText: - { - try { - const json: JsonObject | Error = JsonAnalization.receiveAnalization( - finalEventMessage - ); - finalEventMessage = json.Content.toString(); - } catch (e) { - finalEventMessage = '대용량 텍스트'; - } - } - break; - } - const roomInfo = { - ...state.room.entities[action.roomSeq], - finalEventDate: action.info.sendDate, - finalEventMessage - }; + const finalEventMessage: + | string + | null = StringUtil.convertFinalEventMessage( + action.info.type, + action.info.sentMessage + ); - return { - ...state, - room: adapterRoom.updateOne( - { id: action.roomSeq, changes: roomInfo }, - { ...state.room } - ) - }; + if (!finalEventMessage) { + /** + * 해당 타입은 메시지를 갱신하지 않는다. + * @description Edit with ui-chat > messages.component.ts + */ + return { + ...state + }; + } else { + const roomInfo = { + ...state.room.entities[action.roomSeq], + finalEventDate: action.info.sendDate, + finalEventMessage + }; + + return { + ...state, + room: adapterRoom.updateOne( + { id: action.roomSeq, changes: roomInfo }, + { ...state.room } + ) + }; + } }), on(RoomStore.updateSuccess, (state, action) => { diff --git a/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss b/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss index 9103d893..612060a2 100644 --- a/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss +++ b/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss @@ -97,6 +97,10 @@ $lg-red: ( background: mat-color($accent, 600); color: mat-color($primary, default-contrast); } + .bg-accent-light { + background: mat-color($accent, 300); + color: mat-color($primary, default-contrast); + } .bg-accent-color { background: mat-color($accent); color: mat-color($accent, default-contrast); @@ -107,6 +111,9 @@ $lg-red: ( .text-accent-color { color: mat-color($accent); } + .text-warn-color{ + color:mat-color($warn); + } .border-primary-color { border: 1px solid mat-color($primary); } diff --git a/projects/ucap-webmessenger-core/src/lib/types/const.type.ts b/projects/ucap-webmessenger-core/src/lib/types/const.type.ts new file mode 100644 index 00000000..0e94076c --- /dev/null +++ b/projects/ucap-webmessenger-core/src/lib/types/const.type.ts @@ -0,0 +1,10 @@ +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 +} diff --git a/projects/ucap-webmessenger-core/src/lib/types/maximum-range.type.ts b/projects/ucap-webmessenger-core/src/lib/types/maximum-range.type.ts deleted file mode 100644 index ad1c7d03..00000000 --- a/projects/ucap-webmessenger-core/src/lib/types/maximum-range.type.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum Maximum_Range { - MassText = 800, - ChatRoom = 300 -} diff --git a/projects/ucap-webmessenger-core/src/lib/utils/string.util.ts b/projects/ucap-webmessenger-core/src/lib/utils/string.util.ts new file mode 100644 index 00000000..997492d4 --- /dev/null +++ b/projects/ucap-webmessenger-core/src/lib/utils/string.util.ts @@ -0,0 +1,56 @@ +import { EventType } from '@ucap-webmessenger/protocol-event'; +import { FileType } from '@ucap-webmessenger/protocol-file'; +import { JsonObject } from 'type-fest'; +import { JsonAnalization } from '@ucap-webmessenger/api'; + +export class StringUtil { + public static convertFinalEventMessage( + eventType: EventType, + finalEventMessage: string + ): string | null { + switch (eventType) { + case EventType.Join: + case EventType.Exit: + case EventType.RenameRoom: + case EventType.NotificationForTimerRoom: + case EventType.GuideForRoomTimerChanged: { + /** + * 해당 타입은 메시지를 갱신하지 않는다. + * @description Edit with ui-chat > messages.component.ts + */ + return null; + } + case EventType.Sticker: + finalEventMessage = '스티커'; + break; + case EventType.File: + { + const contentJson = JSON.parse(finalEventMessage); + if (contentJson.FileType === FileType.Image) { + finalEventMessage = '이미지'; + } else { + finalEventMessage = '첨부파일'; + } + } + break; + case EventType.VideoConference: + finalEventMessage = '화상회의'; + break; + case EventType.MassText: + { + try { + const json: JsonObject | Error = JsonAnalization.receiveAnalization( + finalEventMessage + ); + finalEventMessage = json.Content.toString(); + } catch (e) { + finalEventMessage = '대용량 텍스트'; + } + } + break; + + default: + return finalEventMessage; + } + } +} diff --git a/projects/ucap-webmessenger-core/src/public-api.ts b/projects/ucap-webmessenger-core/src/public-api.ts index c6e340fe..e23278e6 100644 --- a/projects/ucap-webmessenger-core/src/public-api.ts +++ b/projects/ucap-webmessenger-core/src/public-api.ts @@ -7,12 +7,12 @@ export * from './lib/types/call-alarm.type'; export * from './lib/types/call-forward.type'; export * from './lib/types/call-mode.type'; export * from './lib/types/caller-type.type'; +export * from './lib/types/const.type'; export * from './lib/types/default-screen.type'; export * from './lib/types/device-devision.type'; export * from './lib/types/device-type.type'; export * from './lib/types/file-transfer-permissions.type'; export * from './lib/types/locale-code.type'; -export * from './lib/types/maximum-range.type'; export * from './lib/types/notification-method.type'; export * from './lib/types/organization-chart-permissions.type'; export * from './lib/types/push-type.type'; @@ -20,4 +20,4 @@ export * from './lib/types/status-code.type'; export * from './lib/types/status-type.type'; export * from './lib/types/video-conference-type.type'; -export * from './lib/types/video-conference-type.type'; +export * from './lib/utils/string.util'; diff --git a/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts b/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts index 5a5f6297..9c73c342 100644 --- a/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts +++ b/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts @@ -1,17 +1,15 @@ import { Observable } from 'rxjs'; -import { NativeService, WindowState } from '@ucap-webmessenger/native'; +import { + NativeService, + WindowState, + NotiRequest +} from '@ucap-webmessenger/native'; import { HttpClient } from '@angular/common/http'; import { map } from 'rxjs/operators'; export class BrowserNativeService implements NativeService { - showNotify( - roomSeq: number, - title: string, - contents: string, - image: string, - useSound: boolean - ): void {} + showNotify(noti: NotiRequest): void {} checkForUpdates(): Observable { return new Observable(subscriber => { diff --git a/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts b/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts index d0002df4..28b1e5a8 100644 --- a/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts +++ b/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts @@ -2,7 +2,11 @@ import { ipcRenderer, remote, IpcRendererEvent } from 'electron'; import { Observable, Subject } from 'rxjs'; -import { NativeService, WindowState } from '@ucap-webmessenger/native'; +import { + NativeService, + WindowState, + NotiRequest +} from '@ucap-webmessenger/native'; import { Channel } from '../types/channel.type'; import { share } from 'rxjs/operators'; @@ -10,20 +14,15 @@ export class ElectronNativeService implements NativeService { private windowStateChangedSubject: Subject | null = null; private windowStateChanged$: Observable | null = null; - showNotify( - roomSeq: number, - title: string, - contents: string, - image: string, - useSound: boolean - ): void { + showNotify(noti: NotiRequest): void { ipcRenderer.send( Channel.showNotify, - roomSeq, - title, - contents, - image, - useSound + noti.roomSeq, + noti.title, + noti.contents, + noti.image, + noti.useSound, + noti.interval ); } diff --git a/projects/ucap-webmessenger-native/src/lib/services/native.service.ts b/projects/ucap-webmessenger-native/src/lib/services/native.service.ts index ff0ef123..1944c2f8 100644 --- a/projects/ucap-webmessenger-native/src/lib/services/native.service.ts +++ b/projects/ucap-webmessenger-native/src/lib/services/native.service.ts @@ -3,13 +3,7 @@ import { Observable } from 'rxjs'; import { WindowState } from '../types/window-state.type'; export interface NativeService { - showNotify( - roomSeq: number, - title: string, - contents: string, - image: string, - useSound: boolean - ): void; + showNotify(noti: NotiRequest): void; checkForUpdates(): Observable; @@ -23,3 +17,12 @@ export interface NativeService { windowMinimize(): void; windowMaximize(): void; } + +export interface NotiRequest { + roomSeq: string; + title: string; + contents: string; + image: string; + useSound: boolean; + interval?: number; +} diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/protocols/info.ts b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/info.ts index 9c3c9d9a..397c693b 100644 --- a/projects/ucap-webmessenger-protocol-event/src/lib/protocols/info.ts +++ b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/info.ts @@ -35,8 +35,6 @@ export interface InfoResponse extends ProtocolResponse { baseSeq: number; // 유효한파일기준이벤트SEQ(n) validFileBaseSeq: number; - // 이벤트정보 개수(n) - count: number; } export const encodeInfo: ProtocolEncoder = (req: InfoRequest) => { @@ -82,7 +80,6 @@ export const decodeInfo: ProtocolDecoder = ( return decodeProtocolMessage(message, { roomSeq: message.bodyList[0], baseSeq: message.bodyList[1], - validFileBaseSeq: message.bodyList[2], - count: message.bodyList[3] + validFileBaseSeq: message.bodyList[2] } as InfoResponse); }; diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.html index 5e32753b..9391c7ce 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.html @@ -17,7 +17,7 @@
-
    +
    • 기간이 만료된 파일입니다.
      diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.scss b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.scss index a3979d30..a1758367 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.scss +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/attach-file.component.scss @@ -102,5 +102,14 @@ height: 100%; } } + &.expired{ + li{ + width:100%; + white-space: nowrap; + color:#999999; + align-items: center; + line-height:40px; + } + } } } diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html index 4def8769..71104e9f 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html @@ -1,4 +1,7 @@
      +
      (); @Output() massDetail = new EventEmitter(); @Output() imageViewer = new EventEmitter(); @Output() save = new EventEmitter<{ fileInfo: FileInfo; type: string }>(); - @Output() contextMenu = new EventEmitter<{ event: MouseEvent; @@ -50,6 +54,7 @@ export class MessagesComponent implements OnInit { }>(); EventType = EventType; + CONST = CONST; profileImageRoot: string; constructor(private logger: NGXLogger, private datePipe: DatePipe) {} @@ -138,6 +143,13 @@ export class MessagesComponent implements OnInit { return false; } + onClickMore(event: any) { + event.preventDefault(); + event.stopPropagation(); + + this.moreEvent.emit(this.messages[0].seq); + } + /** [Event] MassTalk Detail View */ onMassDetail(value: number) { this.massDetail.emit(value); diff --git a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html index f954f928..da6da3b0 100644 --- a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html +++ b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html @@ -46,10 +46,10 @@ class="groupExpansionPanel" > - {{ groupBuddy.group.name }} - ({{ groupBuddy.buddyList.length }}명) + +
      {{ groupBuddy.group.name }}
      + ({{ groupBuddy.buddyList.length }}명) +
      -
      +
-