IOS 캡쳐 노티 이벤트(X) 처리
This commit is contained in:
parent
5cb1281908
commit
6b8313b14d
|
@ -167,7 +167,9 @@ export const reducer = createReducer(
|
|||
} else {
|
||||
const roomInfo = {
|
||||
...state.room.entities[action.roomSeq],
|
||||
finalEventType: action.info.type,
|
||||
finalEventDate: action.info.sendDate,
|
||||
finalEventSeq: action.info.seq,
|
||||
finalEventMessage
|
||||
};
|
||||
|
||||
|
|
|
@ -235,6 +235,7 @@
|
|||
"ejectedFromRoomWith": "{{requester}} has eject {{ejected}}.",
|
||||
"renamedRoomWith": "{{requester}} has changed their chat room name to '{{roomName}}'.",
|
||||
"setTimerWith": "{{requester}} set a timer ({{timer}})",
|
||||
"iosCapture": "{{requester}} captured a conversation",
|
||||
"showMassTranslationOfOriginal": "Show original",
|
||||
"showMassTranslationOfTranslated": "Show translated",
|
||||
"showMassDetail": "Show detail",
|
||||
|
|
|
@ -235,6 +235,7 @@
|
|||
"ejectedFromRoomWith": "{{requester}}님이 {{ejected}}님을 퇴장 시키셨습니다.",
|
||||
"renamedRoomWith": "{{requester}}님이 대화방명을 '{{roomName}}'으로 변경하셨습니다.",
|
||||
"setTimerWith": "{{requester}}님이 타이머를 설정하였습니다. ({{timer}})",
|
||||
"iosCapture": "{{requester}}님이 대화내용을 캡쳐하였습니다.",
|
||||
"showMassTranslationOfOriginal": "원본 보기",
|
||||
"showMassTranslationOfTranslated": "번역 보기",
|
||||
"showMassDetail": "전체 보기",
|
||||
|
|
|
@ -47,6 +47,10 @@ import {
|
|||
decodeNotificationForTimerRoomEventJson
|
||||
} from './notification-for-timer-room.event-json';
|
||||
import { decodeAllimEventJson, AllimEventJson } from './allim.event-json';
|
||||
import {
|
||||
NotificationForIOSCaptureEventJson,
|
||||
decodeNotificationForIOSCaptureEventJson
|
||||
} from './notification-for-ios-capture.event-json';
|
||||
|
||||
export type EventJson =
|
||||
| string
|
||||
|
@ -62,6 +66,7 @@ export type EventJson =
|
|||
| PlanEventJson
|
||||
| VideoConferenceEventJson
|
||||
| RenameRoomEventJson
|
||||
| NotificationForIOSCaptureEventJson
|
||||
| NotificationForTimerRoomEventJson
|
||||
| TranslationEventJson
|
||||
| MassTranslationEventJson
|
||||
|
@ -103,7 +108,7 @@ export const decodeEventJson = (
|
|||
case EventType.GuideForRoomTimerChanged:
|
||||
return decodeGuideForRoomTimerChangedEventJson(message);
|
||||
case EventType.NotificationForiOSCapture:
|
||||
return message;
|
||||
return decodeNotificationForIOSCaptureEventJson(message);
|
||||
case EventType.NotificationForTimerRoom:
|
||||
return decodeNotificationForTimerRoomEventJson(message);
|
||||
case EventType.Before2MonthsAgo:
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
import { EventJsonDecoder } from './event-json';
|
||||
|
||||
export type NotificationForIOSCaptureEventJson = string;
|
||||
|
||||
export const decodeNotificationForIOSCaptureEventJson: EventJsonDecoder<NotificationForIOSCaptureEventJson> = (
|
||||
message: string
|
||||
) => {
|
||||
return message as NotificationForIOSCaptureEventJson;
|
||||
};
|
|
@ -2,8 +2,8 @@ import { EventJsonDecoder } from './event-json';
|
|||
|
||||
export type NotificationForTimerRoomEventJson = string;
|
||||
|
||||
export const decodeNotificationForTimerRoomEventJson: EventJsonDecoder<
|
||||
NotificationForTimerRoomEventJson
|
||||
> = (message: string) => {
|
||||
export const decodeNotificationForTimerRoomEventJson: EventJsonDecoder<NotificationForTimerRoomEventJson> = (
|
||||
message: string
|
||||
) => {
|
||||
return message as NotificationForTimerRoomEventJson;
|
||||
};
|
||||
|
|
|
@ -22,6 +22,7 @@ export * from './lib/protocols/event-json/join.event-json';
|
|||
export * from './lib/protocols/event-json/link.event-json';
|
||||
export * from './lib/protocols/event-json/mass-text.event-json';
|
||||
export * from './lib/protocols/event-json/mass-translation.event-json';
|
||||
export * from './lib/protocols/event-json/notification-for-ios-capture.event-json';
|
||||
export * from './lib/protocols/event-json/notification-for-timer-room.event-json';
|
||||
export * from './lib/protocols/event-json/plan.event-json';
|
||||
export * from './lib/protocols/event-json/recalled-message.event-json';
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
class="information-msg"
|
||||
>
|
||||
</ucap-chat-message-box-information>
|
||||
<ucap-chat-message-box-information
|
||||
*ngSwitchCase="EventType.NotificationForiOSCapture"
|
||||
[message]="message"
|
||||
[senderName]="senderName"
|
||||
class="information-msg"
|
||||
>
|
||||
</ucap-chat-message-box-information>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
<ng-template #contents>
|
||||
|
|
|
@ -133,6 +133,7 @@ export class MessageBoxComponent implements OnInit, AfterViewInit {
|
|||
info.type === EventType.Exit ||
|
||||
info.type === EventType.ForcedExit ||
|
||||
info.type === EventType.RenameRoom ||
|
||||
info.type === EventType.NotificationForiOSCapture ||
|
||||
info.type === EventType.NotificationForTimerRoom ||
|
||||
info.type === EventType.GuideForRoomTimerChanged
|
||||
) {
|
||||
|
|
|
@ -49,5 +49,14 @@
|
|||
}
|
||||
}}
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="EventType.NotificationForiOSCapture">
|
||||
{{
|
||||
'chat.event.iosCapture'
|
||||
| translate
|
||||
: {
|
||||
requester: message.sentMessage
|
||||
}
|
||||
}}
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import {
|
||||
Info,
|
||||
EventType,
|
||||
EventJson,
|
||||
JoinEventJson,
|
||||
RenameRoomEventJson,
|
||||
NotificationForTimerRoomEventJson,
|
||||
GuideForRoomTimerChangedEventJson
|
||||
} from '@ucap-webmessenger/protocol-event';
|
||||
import { Info, EventType, EventJson } from '@ucap-webmessenger/protocol-event';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
|
|
|
@ -17,8 +17,12 @@ import { NGXLogger } from 'ngx-logger';
|
|||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||
import { TranslatePipe } from 'projects/ucap-webmessenger-ui/src/lib/pipes/translate.pipe';
|
||||
import { TranslateService as uiTranslateService } from '@ucap-webmessenger/ui';
|
||||
import {
|
||||
TranslateService as uiTranslateService,
|
||||
StringUtil
|
||||
} from '@ucap-webmessenger/ui';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { EventType } from '@ucap-webmessenger/protocol-event';
|
||||
|
||||
@Component({
|
||||
selector: 'ucap-room-list-item',
|
||||
|
@ -62,6 +66,15 @@ export class ListItemComponent implements OnInit {
|
|||
ngOnInit() {
|
||||
if (this.roomInfo.isTimeRoom) {
|
||||
this.finalEventMessage = '비밀 대화방입니다.';
|
||||
} else if (
|
||||
this.roomInfo.finalEventType === EventType.NotificationForiOSCapture
|
||||
) {
|
||||
this.finalEventMessage = this.translateService.instant(
|
||||
'chat.event.iosCapture',
|
||||
{
|
||||
requester: this.roomInfo.finalEventMessage
|
||||
}
|
||||
);
|
||||
} else {
|
||||
this.finalEventMessage = this.roomInfo.finalEventMessage;
|
||||
}
|
||||
|
|
|
@ -174,7 +174,9 @@ export class StringUtil {
|
|||
}
|
||||
break;
|
||||
case EventType.Sticker:
|
||||
eventMessage = '스티커';
|
||||
{
|
||||
eventMessage = '스티커';
|
||||
}
|
||||
break;
|
||||
case EventType.File:
|
||||
{
|
||||
|
@ -188,7 +190,9 @@ export class StringUtil {
|
|||
}
|
||||
break;
|
||||
case EventType.VideoConference:
|
||||
eventMessage = '화상회의';
|
||||
{
|
||||
eventMessage = '화상회의';
|
||||
}
|
||||
break;
|
||||
case EventType.MassText:
|
||||
{
|
||||
|
@ -209,20 +213,29 @@ export class StringUtil {
|
|||
}
|
||||
break;
|
||||
case EventType.Plan:
|
||||
const m = finalEventMessage as PlanEventJson;
|
||||
switch (m.contents) {
|
||||
case PlanContentType.New:
|
||||
eventMessage = '새로운 일정이 등록되었습니다.';
|
||||
break;
|
||||
case PlanContentType.Update:
|
||||
eventMessage = '일정이 수정되었습니다.';
|
||||
break;
|
||||
case PlanContentType.Delete:
|
||||
eventMessage = '일정이 취소되었습니다.';
|
||||
break;
|
||||
default:
|
||||
eventMessage = '일정이 업데이트 되었습니다.';
|
||||
break;
|
||||
{
|
||||
const m = finalEventMessage as PlanEventJson;
|
||||
switch (m.contents) {
|
||||
case PlanContentType.New:
|
||||
eventMessage = '새로운 일정이 등록되었습니다.';
|
||||
break;
|
||||
case PlanContentType.Update:
|
||||
eventMessage = '일정이 수정되었습니다.';
|
||||
break;
|
||||
case PlanContentType.Delete:
|
||||
eventMessage = '일정이 취소되었습니다.';
|
||||
break;
|
||||
default:
|
||||
eventMessage = '일정이 업데이트 되었습니다.';
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EventType.NotificationForiOSCapture:
|
||||
{
|
||||
const m = finalEventMessage as string;
|
||||
eventMessage = `${m}님이 대화내용을 캡쳐하였습니다.`;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user