From 62f926eae4926a6489c3c152c44421f165515119 Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 14 Jan 2020 18:26:09 +0900 Subject: [PATCH 1/3] =?UTF-8?q?#=20=EC=9D=B4=EC=8A=88=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../left-sidenav/message.component.ts | 7 +++++ .../components/messages.component.ts | 27 +++++++++++++++++++ .../src/app/services/notification.service.ts | 4 +++ .../app/store/messenger/message/actions.ts | 5 ++++ .../app/store/messenger/message/reducers.ts | 21 +++++++++++++-- .../src/assets/i18n/ko.json | 2 +- 6 files changed, 63 insertions(+), 3 deletions(-) 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/ko.json b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json index ada7438e..0d88386b 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json @@ -266,7 +266,7 @@ "sendingTime": "보낸 시간", "reservationTime": "발송 예정 시간", "countOfReadUser": "읽은 사람", - "countOfUnreadUser": "읽은 않은 사람", + "countOfUnreadUser": "읽지 않은 사람", "badgeDescriptionForUnread": "확인하지 않은 쪽지가 있습니다.", "cancelReservation": "예약 발송 취소", "cancelSending": "발송 취소", From 351c3a121f0bd04c3dd46a9c0dbf5d481765c678 Mon Sep 17 00:00:00 2001 From: khk Date: Tue, 14 Jan 2020 19:08:50 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=EC=AA=BD=EC=A7=80=EC=93=B0=EA=B8=B0-=20?= =?UTF-8?q?=EB=B3=B4=EC=99=84=EC=98=88=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/components/write.component.html | 173 ++++++++++++------ .../src/lib/components/write.component.scss | 106 +++++++++-- 2 files changed, 208 insertions(+), 71 deletions(-) diff --git a/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.html b/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.html index d818d859..280480c3 100644 --- a/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.html +++ b/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.html @@ -1,41 +1,29 @@
- - - +
+ + 총 수신자 OO명 +
+ + + {{ receiver.name }} + + + - -
- - - - {{ oldAttachment.resContent }} - - - - {{ attachment.name }} - - -
- - - + + + + + +
+ +
+ + + + {{ oldAttachment.resContent }} + + + + {{ attachment.name }} + + +
+
+ + +
+
+ {{ contentLength }}/1000 +
+
+
+
-
- - -
-
-
+
+ + - +
diff --git a/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.scss b/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.scss index 91d3ac2e..65ba68b9 100644 --- a/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.scss +++ b/projects/ucap-webmessenger-ui-message/src/lib/components/write.component.scss @@ -7,20 +7,8 @@ height: 100px; } - .message-title { - width: 100%; - } - .message-write-body { - overflow: auto; - height: 270px; - .ucap-message-write-editor { - display: inline-block; - width: 100%; - height: 100%; - min-height: 250px; - } [contenteditable] { } @@ -45,14 +33,98 @@ mat-card-actions { display: flex; width: 100%; - - .editor-tools { - padding-left: 0px; - } .editor-actions-spacer { flex: 1 1 auto; } - .editor-actions { + } +} + +.message-content { + display: flex; + flex-flow: row; + position: relative; + width: 100%; + .message-receiver-list { + position: relative; + width: 30%; + height: 100%; + margin-right: 10px; + } + .message-write-body { + display: flex; + flex: 1 1 auto; + flex-flow: column; + margin: 0; + .ucap-message-write-editor { + display: inline-block; + width: 100%; + height: 100%; + padding: 10px; + height: 280px; + overflow: auto; + } + .message-option { + display: flex; + flex-flow: row; + flex: 1 1 auto; + height: 40px; + .editor-tools { + } + .length { + margin-left: auto; + align-self: center; + } } } } +.mat-card-actions { + margin: 0 0 20px; + border-top: 1px solid #dddddd; + .editor-actions { + display: flex; + flex-flow: row; + justify-content: space-between; + margin-left: auto; + button { + margin-left: 4px; + } + } +} + +::ng-deep .ucap-message-write { + padding: 0; + .add-row { + display: flex; + align-items: center; + padding-bottom: 10px; + margin-bottom: 10px; + border-bottom: 1px solid #dddddd; + .mat-mini-fab { + .mat-button-wrapper { + padding: 0; + .mat-icon { + width: 40px; + height: 40px; + line-height: 40px; + } + .mat-fab__label { + color: #212121; + margin-left: 10px; + } + } + } + .receiver-sum { + margin-left: auto; + } + } + .mat-chip-list { + .mat-chip-list-wrapper { + max-height: 100px; + overflow: auto; + } + } + .message-title { + width: 100%; + margin-top: 10px; + } +} From 4d303df05ad2116c1407c8432eaec5c05f307c37 Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 15 Jan 2020 09:52:20 +0900 Subject: [PATCH 3/3] =?UTF-8?q?#=20=EC=9D=B4=EC=8A=88=EC=B2=98=EB=A6=AC.?= =?UTF-8?q?=20136=20=EC=AA=BD=EC=A7=80=20=EB=82=A0=EC=A7=9C=20=ED=91=9C?= =?UTF-8?q?=EA=B8=B0=20=EC=98=A4=EB=A5=98=20151=20=EC=AA=BD=EC=A7=80=20?= =?UTF-8?q?=EC=98=88=EC=95=BD=20=EB=B3=B4=EB=82=B4=EA=B8=B0=20=EC=9B=94/?= =?UTF-8?q?=EC=9D=BC=20=ED=91=9C=EA=B8=B0=20=EC=98=A4=EB=A5=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 대화입력폼 다국어 처리. --- .../ucap-webmessenger-app/src/assets/i18n/en.json | 3 +++ .../ucap-webmessenger-app/src/assets/i18n/ko.json | 3 +++ .../src/lib/components/form.component.html | 2 +- .../src/lib/components/list-item.component.html | 2 +- .../src/lib/components/write.component.html | 13 +++++++++++-- .../src/lib/components/general.component.ts | 1 + .../src/lib/components/pick-date.component.ts | 8 +++++++- 7 files changed, 27 insertions(+), 5 deletions(-) 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 0d88386b..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}}님이 퇴장하셨습니다.", @@ -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 @@