diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts index df5ee4a7..82848c10 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts @@ -149,6 +149,13 @@ export class MessageBoxComponent // Badge Refresh in case Receive Message.. if (info.msgInfo.type === MessageType.Receive) { this.doRefreshUnReadCount.emit(); + + // Clear Receive Message New Badge.. + this.store.dispatch( + MessageStore.clearNewFlagReceiveMessage({ + msgId: info.msgInfo.msgId + }) + ); } // detail view.. diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts index 72f4e1e9..982c6e34 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts @@ -1303,6 +1303,33 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { } break; case EventType.Translation: + { + let trgtStr = ''; + if (clicktype === 'translation') { + // translation + trgtStr = (message.sentMessageJson as TranslationEventJson) + .translation; + } else { + // original + trgtStr = (message.sentMessageJson as TranslationEventJson) + .original; + } + + if (this.clipboardService.copyFromContent(trgtStr)) { + this.snackBarService.open( + this.translateService.instant( + 'common.clipboard.results.copied' + ), + '', + { + duration: 3000, + verticalPosition: 'top', + horizontalPosition: 'center' + } + ); + } + } + break; case EventType.MassTranslation: { const sentMessageJson: MassTranslationEventJson = message.sentMessageJson as MassTranslationEventJson; diff --git a/projects/ucap-webmessenger-app/src/app/services/notification.service.ts b/projects/ucap-webmessenger-app/src/app/services/notification.service.ts index 65c861bb..982719d7 100644 --- a/projects/ucap-webmessenger-app/src/app/services/notification.service.ts +++ b/projects/ucap-webmessenger-app/src/app/services/notification.service.ts @@ -660,6 +660,10 @@ export class AppNotificationService { // Remove one Receive Message if (!!noti && !!noti.keyId) { + // clear badge in left navi + this.store.dispatch(MessageStore.retrieveUnreadCount({})); + + // delete message in receive message list this.store.dispatch( deleteMessageSuccess({ messageType: MessageType.Receive, diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/message/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/message/actions.ts index ea0f45c2..1c392131 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/message/actions.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/message/actions.ts @@ -122,3 +122,8 @@ export const clearSearchMessage = createAction( '[Messenger::Message] Clear Search Message', props() ); + +export const clearNewFlagReceiveMessage = createAction( + '[Messenger::Message] Clear NewFlag Message', + props<{ msgId: number }>() +); diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/message/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/message/reducers.ts index 05d061dd..53c67bf1 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/message/reducers.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/message/reducers.ts @@ -18,9 +18,10 @@ import { detailMessageSuccess, detailMessageClear, detailMessage, - clearSearchMessage + clearSearchMessage, + clearNewFlagReceiveMessage } from './actions'; -import { MessageType } from '@ucap-webmessenger/api-message'; +import { MessageType, MessageList } from '@ucap-webmessenger/api-message'; export const reducer = createReducer( initialState, @@ -149,6 +150,22 @@ export const reducer = createReducer( }; }), + on(clearNewFlagReceiveMessage, (state, action) => { + const msgId = action.msgId; + const msgList: MessageList = { + ...state.receiveList.entities[msgId], + readYn: true + }; + + return { + ...state, + receiveList: adapterReceiveList.updateOne( + { id: msgId, changes: msgList }, + { ...state.receiveList } + ) + }; + }), + on(cancelReservationMessageSuccess, (state, action) => { return { ...state, diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/en.json b/projects/ucap-webmessenger-app/src/assets/i18n/en.json index 5af8ce35..43706be4 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/en.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/en.json @@ -198,6 +198,7 @@ "isRoomTypeSecret": "This room is secret type", "notificationIsOn": "Notification is on", "notificationIsOff": "Notification is off", + "typeMessage": "Type your message.", "event": { "inviteToRoomWith": "{{owner}} invited {{inviter}}.", "exitFromRoomWith": "{{exitor}} has left.", @@ -276,6 +277,8 @@ "detailOfViewers": "Detail of viewers", "selectRecipient": "Select recipient", "andOthers": "and {{count}}others", + "addReceiver": "Add Reciever", + "countOfReceiver": "{{count}} total recipients", "results": { "successForSending": "Your message has been sent.", "successForReservation": "You have scheduled a message transfer.", diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json index ada7438e..2e91f02a 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json @@ -198,6 +198,7 @@ "isRoomTypeSecret": "비밀 대화방입니다.", "notificationIsOn": "알림 켜짐", "notificationIsOff": "알림 꺼짐", + "typeMessage": "대화를 입력하세요.", "event": { "inviteToRoomWith": "{{owner}}이 {{inviter}}을 초대했습니다.", "exitFromRoomWith": "{{exitor}}님이 퇴장하셨습니다.", @@ -266,7 +267,7 @@ "sendingTime": "보낸 시간", "reservationTime": "발송 예정 시간", "countOfReadUser": "읽은 사람", - "countOfUnreadUser": "읽은 않은 사람", + "countOfUnreadUser": "읽지 않은 사람", "badgeDescriptionForUnread": "확인하지 않은 쪽지가 있습니다.", "cancelReservation": "예약 발송 취소", "cancelSending": "발송 취소", @@ -276,6 +277,8 @@ "detailOfViewers": "읽음 확인", "selectRecipient": "수신자 선택", "andOthers": "외 {{count}}명", + "addReceiver": "수신자 추가", + "countOfReceiver": "총 수신자 {{count}}명", "results": { "successForSending": "쪽지를 전송하였습니다.", "successForReservation": "쪽지 전송을 예약 하였습니다.", diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/form.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/form.component.html index 4be941ee..b08053ed 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/form.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/form.component.html @@ -50,7 +50,7 @@