번역 전체보기 기능 구현.
This commit is contained in:
parent
f2887eb01c
commit
2b5d80a3d2
|
@ -242,6 +242,7 @@
|
||||||
[translationSimpleview]="translationSimpleview"
|
[translationSimpleview]="translationSimpleview"
|
||||||
(moreEvent)="onMoreEvent($event)"
|
(moreEvent)="onMoreEvent($event)"
|
||||||
(massDetail)="onMassDetail($event)"
|
(massDetail)="onMassDetail($event)"
|
||||||
|
(massTranslationDetail)="onClickMassTranslationDetail($event)"
|
||||||
(save)="onSave($event)"
|
(save)="onSave($event)"
|
||||||
(fileViewer)="onFileViewer($event)"
|
(fileViewer)="onFileViewer($event)"
|
||||||
(contextMenu)="onContextMenuMessage($event)"
|
(contextMenu)="onContextMenuMessage($event)"
|
||||||
|
|
|
@ -104,6 +104,10 @@ import {
|
||||||
} from '../dialogs/group/select-group.dialog.component';
|
} from '../dialogs/group/select-group.dialog.component';
|
||||||
import { GroupDetailData } from '@ucap-webmessenger/protocol-sync';
|
import { GroupDetailData } from '@ucap-webmessenger/protocol-sync';
|
||||||
import { environment } from '../../../../environments/environment';
|
import { environment } from '../../../../environments/environment';
|
||||||
|
import {
|
||||||
|
MassDetailComponent,
|
||||||
|
MassDetailDialogData
|
||||||
|
} from '../dialogs/chat/mass-detail.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layout-messenger-messages',
|
selector: 'app-layout-messenger-messages',
|
||||||
|
@ -796,6 +800,23 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClickMassTranslationDetail(params: {
|
||||||
|
contents: string;
|
||||||
|
contentsType: string;
|
||||||
|
}) {
|
||||||
|
this.dialogService.open<MassDetailComponent, MassDetailDialogData>(
|
||||||
|
MassDetailComponent,
|
||||||
|
{
|
||||||
|
disableClose: false,
|
||||||
|
width: '550px',
|
||||||
|
data: {
|
||||||
|
title: 'Detail View',
|
||||||
|
contents: params.contents
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
async onFileViewer(fileInfo: FileEventJson) {
|
async onFileViewer(fileInfo: FileEventJson) {
|
||||||
const result = await this.dialogService.open<
|
const result = await this.dialogService.open<
|
||||||
FileViewerDialogComponent,
|
FileViewerDialogComponent,
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
<div class="btn-box">
|
<div class="btn-box">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<button mat-button>전체보기</button>
|
<button mat-button (click)="onClickMassDetail('O')">전체보기</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button mat-button>
|
<button mat-button (click)="onClickMassDetail('T')">
|
||||||
<span class="language">{{ message.sentMessageJson.destLocale }}</span
|
<span class="language">{{ message.sentMessageJson.destLocale }}</span
|
||||||
>번역보기
|
>번역보기
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, OnInit, Input } from '@angular/core';
|
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
TranslationEventJson,
|
TranslationEventJson,
|
||||||
Info,
|
Info,
|
||||||
|
@ -20,7 +20,27 @@ export class MassTranslationComponent implements OnInit {
|
||||||
@Input()
|
@Input()
|
||||||
isMe: boolean;
|
isMe: boolean;
|
||||||
|
|
||||||
|
@Output()
|
||||||
|
massTranslationDetail = new EventEmitter<{
|
||||||
|
contents: string;
|
||||||
|
contentsType: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
|
||||||
|
onClickMassDetail(contentsType: string) {
|
||||||
|
let contents = '';
|
||||||
|
if (contentsType === 'O') {
|
||||||
|
contents = this.message.sentMessageJson.original;
|
||||||
|
} else {
|
||||||
|
contents = this.message.sentMessageJson.translation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.massTranslationDetail.emit({
|
||||||
|
contents,
|
||||||
|
contentsType
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,10 +188,11 @@
|
||||||
></ucap-chat-message-box-translation>
|
></ucap-chat-message-box-translation>
|
||||||
<ucap-chat-message-box-mass-translation
|
<ucap-chat-message-box-mass-translation
|
||||||
*ngSwitchCase="EventType.MassTranslation"
|
*ngSwitchCase="EventType.MassTranslation"
|
||||||
|
class="information-msg"
|
||||||
[message]="message"
|
[message]="message"
|
||||||
[translationSimpleview]="translationSimpleview"
|
[translationSimpleview]="translationSimpleview"
|
||||||
[isMe]="message.senderSeq === loginRes.userSeq"
|
[isMe]="message.senderSeq === loginRes.userSeq"
|
||||||
class="information-msg"
|
(massTranslationDetail)="onClickMassTranslationDetail($event)"
|
||||||
>
|
>
|
||||||
</ucap-chat-message-box-mass-translation>
|
</ucap-chat-message-box-mass-translation>
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,11 @@ export class MessagesComponent implements OnInit {
|
||||||
@Output()
|
@Output()
|
||||||
massDetail = new EventEmitter<number>();
|
massDetail = new EventEmitter<number>();
|
||||||
@Output()
|
@Output()
|
||||||
|
massTranslationDetail = new EventEmitter<{
|
||||||
|
contents: string;
|
||||||
|
contentsType: string;
|
||||||
|
}>();
|
||||||
|
@Output()
|
||||||
fileViewer = new EventEmitter<FileEventJson>();
|
fileViewer = new EventEmitter<FileEventJson>();
|
||||||
@Output()
|
@Output()
|
||||||
save = new EventEmitter<{ fileInfo: FileInfo; type: string }>();
|
save = new EventEmitter<{ fileInfo: FileInfo; type: string }>();
|
||||||
|
@ -227,6 +232,13 @@ export class MessagesComponent implements OnInit {
|
||||||
this.massDetail.emit(value);
|
this.massDetail.emit(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClickMassTranslationDetail(params: {
|
||||||
|
contents: string;
|
||||||
|
contentsType: string;
|
||||||
|
}) {
|
||||||
|
this.massTranslationDetail.emit(params);
|
||||||
|
}
|
||||||
|
|
||||||
/** [Event] Image Viewer */
|
/** [Event] Image Viewer */
|
||||||
onFileViewer(fileInfo: FileEventJson) {
|
onFileViewer(fileInfo: FileEventJson) {
|
||||||
this.fileViewer.emit(fileInfo);
|
this.fileViewer.emit(fileInfo);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user