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