Merge branch 'master' of https://git.loafle.net/ucap-web/next-ucap-messenger
This commit is contained in:
commit
3fe3da62b6
|
@ -148,13 +148,6 @@
|
||||||
</mat-tab> -->
|
</mat-tab> -->
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
|
|
||||||
<ucap-profile-my-profile-widget
|
|
||||||
[profileImageRoot]="sessionVerinfo.profileRoot"
|
|
||||||
[profileImageFile]="getMyProfileImageWidget()"
|
|
||||||
(click)="onClickOpenProfile(loginRes.userInfo)"
|
|
||||||
class="myprofile"
|
|
||||||
></ucap-profile-my-profile-widget>
|
|
||||||
|
|
||||||
<div class="left-side-tabs-body">
|
<div class="left-side-tabs-body">
|
||||||
<div
|
<div
|
||||||
#tabs
|
#tabs
|
||||||
|
|
|
@ -445,12 +445,4 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
getMessageUnreadCount(): void {
|
getMessageUnreadCount(): void {
|
||||||
this.store.dispatch(MessageStore.retrieveUnreadCount({}));
|
this.store.dispatch(MessageStore.retrieveUnreadCount({}));
|
||||||
}
|
}
|
||||||
|
|
||||||
getMyProfileImageWidget(): string {
|
|
||||||
if (!!this.loginRes) {
|
|
||||||
return this.loginRes.userInfo.profileImageFile;
|
|
||||||
} else {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,10 +101,16 @@
|
||||||
(click)="onClickReceiveAlarm()"
|
(click)="onClickReceiveAlarm()"
|
||||||
aria-label="Toggle Receive Alarm"
|
aria-label="Toggle Receive Alarm"
|
||||||
>
|
>
|
||||||
<mat-icon class="amber-fg" *ngIf="roomInfo.receiveAlarm"
|
<mat-icon
|
||||||
|
class="amber-fg"
|
||||||
|
*ngIf="roomInfo.receiveAlarm"
|
||||||
|
matTooltip="알림 켜짐"
|
||||||
>notifications_active</mat-icon
|
>notifications_active</mat-icon
|
||||||
>
|
>
|
||||||
<mat-icon class="secondary-text" *ngIf="!roomInfo.receiveAlarm"
|
<mat-icon
|
||||||
|
class="secondary-text"
|
||||||
|
*ngIf="!roomInfo.receiveAlarm"
|
||||||
|
matTooltip="알림 꺼짐"
|
||||||
>notifications_off</mat-icon
|
>notifications_off</mat-icon
|
||||||
>
|
>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -36,7 +36,8 @@ import {
|
||||||
FileEventJson,
|
FileEventJson,
|
||||||
StickerEventJson,
|
StickerEventJson,
|
||||||
MassTextEventJson,
|
MassTextEventJson,
|
||||||
TranslationEventJson
|
TranslationEventJson,
|
||||||
|
MassTranslationEventJson
|
||||||
} from '@ucap-webmessenger/protocol-event';
|
} from '@ucap-webmessenger/protocol-event';
|
||||||
|
|
||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
|
@ -75,7 +76,8 @@ import {
|
||||||
FileTalkSaveRequest,
|
FileTalkSaveRequest,
|
||||||
FileTalkSaveResponse,
|
FileTalkSaveResponse,
|
||||||
TranslationReqRequest,
|
TranslationReqRequest,
|
||||||
TranslationSaveRequest
|
TranslationSaveRequest,
|
||||||
|
TranslationSaveResponse
|
||||||
} from '@ucap-webmessenger/api-common';
|
} from '@ucap-webmessenger/api-common';
|
||||||
import {
|
import {
|
||||||
CreateChatDialogComponent,
|
CreateChatDialogComponent,
|
||||||
|
@ -174,7 +176,10 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
translationSimpleview = false;
|
translationSimpleview = false;
|
||||||
translationPreview = false;
|
translationPreview = false;
|
||||||
destLocale = 'en'; // default English :: en
|
destLocale = 'en'; // default English :: en
|
||||||
translationPreviewInfo: TranslationEventJson | null;
|
translationPreviewInfo: {
|
||||||
|
previewInfo: TranslationSaveResponse | null;
|
||||||
|
translationType: EventType.Translation | EventType.MassTranslation;
|
||||||
|
};
|
||||||
|
|
||||||
/** About ReadHere */
|
/** About ReadHere */
|
||||||
firstcheckReadHere = true;
|
firstcheckReadHere = true;
|
||||||
|
@ -620,8 +625,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
|
|
||||||
if (!!this.isShowTranslation && this.destLocale.trim().length > 0) {
|
if (!!this.isShowTranslation && this.destLocale.trim().length > 0) {
|
||||||
/** CASE : Translation */
|
/** CASE : Translation */
|
||||||
console.log('번역들어간다.');
|
|
||||||
|
|
||||||
const destLocale = this.destLocale;
|
const destLocale = this.destLocale;
|
||||||
const original = message;
|
const original = message;
|
||||||
const roomSeq = this.roomInfo.roomSeq;
|
const roomSeq = this.roomInfo.roomSeq;
|
||||||
|
@ -638,13 +641,21 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
.pipe(
|
.pipe(
|
||||||
take(1),
|
take(1),
|
||||||
map(res => {
|
map(res => {
|
||||||
console.log(res);
|
|
||||||
if (res.statusCode === StatusCode.Success) {
|
if (res.statusCode === StatusCode.Success) {
|
||||||
|
let sentMessage = '';
|
||||||
|
let eventType = EventType.Translation;
|
||||||
|
let previewObject:
|
||||||
|
| TranslationEventJson
|
||||||
|
| MassTranslationEventJson;
|
||||||
|
|
||||||
if (res.translationSeq > 0) {
|
if (res.translationSeq > 0) {
|
||||||
// Mass Text Translation
|
// Mass Text Translation
|
||||||
|
previewObject = res;
|
||||||
|
sentMessage = res.returnJson;
|
||||||
|
eventType = EventType.MassTranslation;
|
||||||
} else {
|
} else {
|
||||||
// Normal Text Translation
|
// Normal Text Translation
|
||||||
const json: TranslationEventJson = {
|
previewObject = {
|
||||||
locale: destLocale,
|
locale: destLocale,
|
||||||
original,
|
original,
|
||||||
translation: res.translation,
|
translation: res.translation,
|
||||||
|
@ -654,32 +665,38 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
: ''
|
: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!!this.translationPreview) {
|
sentMessage = JSON.stringify(previewObject);
|
||||||
// preview
|
eventType = EventType.Translation;
|
||||||
this.translationPreviewInfo = json;
|
}
|
||||||
} else {
|
|
||||||
// direct send
|
|
||||||
this.store.dispatch(
|
|
||||||
EventStore.send({
|
|
||||||
senderSeq: this.loginRes.userSeq,
|
|
||||||
req: {
|
|
||||||
roomSeq,
|
|
||||||
eventType: EventType.Translation,
|
|
||||||
sentMessage: JSON.stringify(json)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!!this.translationPreviewInfo) {
|
if (!!this.translationPreview) {
|
||||||
this.translationPreviewInfo = null;
|
// preview
|
||||||
}
|
this.translationPreviewInfo = {
|
||||||
}
|
previewInfo: res,
|
||||||
|
translationType: eventType
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// direct send
|
||||||
|
this.store.dispatch(
|
||||||
|
EventStore.send({
|
||||||
|
senderSeq: this.loginRes.userSeq,
|
||||||
|
req: {
|
||||||
|
roomSeq,
|
||||||
|
eventType,
|
||||||
|
sentMessage
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
if (!!this.selectedSticker) {
|
if (!!this.translationPreviewInfo) {
|
||||||
this.isShowStickerSelector = false;
|
this.translationPreviewInfo = null;
|
||||||
this.setStickerHistory(this.selectedSticker);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!!this.selectedSticker) {
|
||||||
|
this.isShowStickerSelector = false;
|
||||||
|
this.setStickerHistory(this.selectedSticker);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.logger.error(res);
|
this.logger.error(res);
|
||||||
}
|
}
|
||||||
|
@ -1470,14 +1487,32 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
onCancelTranslation() {
|
onCancelTranslation() {
|
||||||
this.translationPreviewInfo = null;
|
this.translationPreviewInfo = null;
|
||||||
}
|
}
|
||||||
onSendTranslationMessage(translationInfo: TranslationEventJson) {
|
onSendTranslationMessage(params: {
|
||||||
|
previewInfo: TranslationSaveResponse | null;
|
||||||
|
translationType: EventType.Translation | EventType.MassTranslation;
|
||||||
|
}) {
|
||||||
|
let sentMessage = '';
|
||||||
|
if (params.translationType === EventType.MassTranslation) {
|
||||||
|
// Mass Text Translation
|
||||||
|
sentMessage = params.previewInfo.returnJson;
|
||||||
|
} else {
|
||||||
|
// Normal Text Translation
|
||||||
|
sentMessage = JSON.stringify({
|
||||||
|
locale: params.previewInfo.destLocale,
|
||||||
|
original: params.previewInfo.original,
|
||||||
|
translation: params.previewInfo.translation,
|
||||||
|
stickername: '',
|
||||||
|
stickerfile: !!this.selectedSticker ? this.selectedSticker.index : ''
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
EventStore.send({
|
EventStore.send({
|
||||||
senderSeq: this.loginRes.userSeq,
|
senderSeq: this.loginRes.userSeq,
|
||||||
req: {
|
req: {
|
||||||
roomSeq: this.roomInfo.roomSeq,
|
roomSeq: this.roomInfo.roomSeq,
|
||||||
eventType: EventType.Translation,
|
eventType: params.translationType,
|
||||||
sentMessage: JSON.stringify(translationInfo)
|
sentMessage
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
@ -147,6 +147,12 @@
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<ucap-profile-my-profile-widget
|
||||||
|
[profileImageRoot]="sessionVerinfo.profileRoot"
|
||||||
|
[profileImageFile]="getMyProfileImageWidget()"
|
||||||
|
(openProfile)="onClickOpenProfile()"
|
||||||
|
class="myprofile"
|
||||||
|
></ucap-profile-my-profile-widget>
|
||||||
<span class="stroke-bar"></span>
|
<span class="stroke-bar"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-layout-native-title-bar-actions">
|
<div class="app-layout-native-title-bar-actions">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, OnInit, Inject, OnDestroy, ViewChild } from '@angular/core';
|
import { Component, OnInit, Inject, OnDestroy } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
UCAP_NATIVE_SERVICE,
|
UCAP_NATIVE_SERVICE,
|
||||||
NativeService,
|
NativeService,
|
||||||
|
@ -21,7 +21,8 @@ import {
|
||||||
KEY_URL_INFO,
|
KEY_URL_INFO,
|
||||||
LoginInfo,
|
LoginInfo,
|
||||||
KEY_LOGIN_INFO,
|
KEY_LOGIN_INFO,
|
||||||
KEY_LOGIN_RES_INFO
|
KEY_LOGIN_RES_INFO,
|
||||||
|
KEY_VER_INFO
|
||||||
} from '@app/types';
|
} from '@app/types';
|
||||||
import {
|
import {
|
||||||
WebLink,
|
WebLink,
|
||||||
|
@ -33,8 +34,18 @@ import {
|
||||||
} from '@ucap-webmessenger/web-storage';
|
} from '@ucap-webmessenger/web-storage';
|
||||||
import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type';
|
import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type';
|
||||||
import { environment } from '../../../../environments/environment';
|
import { environment } from '../../../../environments/environment';
|
||||||
import { DaesangApiService } from '@ucap-webmessenger/daesang';
|
import {
|
||||||
|
DaesangApiService,
|
||||||
|
DaesangProtocolService
|
||||||
|
} from '@ucap-webmessenger/daesang';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
|
import {
|
||||||
|
ProfileDialogComponent,
|
||||||
|
ProfileDialogResult,
|
||||||
|
ProfileDialogData
|
||||||
|
} from '@app/layouts/messenger/dialogs/profile/profile.dialog.component';
|
||||||
|
import { DialogService } from '@ucap-webmessenger/ui';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layout-native-top-bar',
|
selector: 'app-layout-native-top-bar',
|
||||||
|
@ -47,6 +58,7 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
loginRes: LoginResponse;
|
loginRes: LoginResponse;
|
||||||
loginResSubscription: Subscription;
|
loginResSubscription: Subscription;
|
||||||
|
sessionVerinfo: VersionInfo2Response;
|
||||||
|
|
||||||
updateInfo$: Observable<UpdateInfo>;
|
updateInfo$: Observable<UpdateInfo>;
|
||||||
|
|
||||||
|
@ -59,11 +71,17 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||||
|
private dialogService: DialogService,
|
||||||
private localStorageService: LocalStorageService,
|
private localStorageService: LocalStorageService,
|
||||||
private sessionStorageService: SessionStorageService,
|
private sessionStorageService: SessionStorageService,
|
||||||
private daesangApiService: DaesangApiService,
|
private daesangApiService: DaesangApiService,
|
||||||
|
private daesangProtocolService: DaesangProtocolService,
|
||||||
private logger: NGXLogger
|
private logger: NGXLogger
|
||||||
) {}
|
) {
|
||||||
|
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
||||||
|
KEY_VER_INFO
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.windowStateChanged$ = this.nativeService.windowStateChanged();
|
this.windowStateChanged$ = this.nativeService.windowStateChanged();
|
||||||
|
@ -223,6 +241,68 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
||||||
this.store.dispatch(AuthenticationStore.logoutConfirmation());
|
this.store.dispatch(AuthenticationStore.logoutConfirmation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getMyProfileImageWidget(): string {
|
||||||
|
if (!!this.loginRes) {
|
||||||
|
return this.loginRes.userInfo.profileImageFile;
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClickOpenProfile() {
|
||||||
|
// [GROUP]
|
||||||
|
// this.queryProtocolService
|
||||||
|
// .dataUser({
|
||||||
|
// divCd: 'OPENPROF',
|
||||||
|
// seq: userInfo.seq,
|
||||||
|
// senderCompanyCode: this.loginRes.userInfo.companyCode,
|
||||||
|
// senderEmployeeType: this.loginRes.userInfo.employeeType
|
||||||
|
// })
|
||||||
|
// .pipe(
|
||||||
|
// take(1),
|
||||||
|
// map(res => {
|
||||||
|
// if (!!res && !!res.userInfo) {
|
||||||
|
// this.dialogService.open<
|
||||||
|
// ProfileDialogComponent,
|
||||||
|
// ProfileDialogData,
|
||||||
|
// ProfileDialogResult
|
||||||
|
// >(ProfileDialogComponent, {
|
||||||
|
// data: {
|
||||||
|
// userInfo: res.userInfo
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// )
|
||||||
|
// .subscribe();
|
||||||
|
|
||||||
|
// [Daesang]
|
||||||
|
this.daesangProtocolService
|
||||||
|
.dataUserDaesang({
|
||||||
|
divCd: 'OPENPROF',
|
||||||
|
seq: this.loginRes.userSeq,
|
||||||
|
senderCompanyCode: this.loginRes.userInfo.companyCode,
|
||||||
|
senderEmployeeType: this.loginRes.userInfo.employeeType
|
||||||
|
})
|
||||||
|
.pipe(
|
||||||
|
take(1),
|
||||||
|
map(res => {
|
||||||
|
if (!!res && !!res.userInfo) {
|
||||||
|
this.dialogService.open<
|
||||||
|
ProfileDialogComponent,
|
||||||
|
ProfileDialogData,
|
||||||
|
ProfileDialogResult
|
||||||
|
>(ProfileDialogComponent, {
|
||||||
|
data: {
|
||||||
|
userInfo: res.userInfo
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.subscribe();
|
||||||
|
}
|
||||||
|
|
||||||
onClickNotice(): void {
|
onClickNotice(): void {
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
ChatStore.selectedRightDrawer({
|
ChatStore.selectedRightDrawer({
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { MatIconModule } from '@angular/material/icon';
|
||||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||||
|
|
||||||
import { UCapUiModule } from '@ucap-webmessenger/ui';
|
import { UCapUiModule } from '@ucap-webmessenger/ui';
|
||||||
|
import { UCapUiProfileModule } from '@ucap-webmessenger/ui-profile';
|
||||||
|
|
||||||
import { COMPONENTS } from './components';
|
import { COMPONENTS } from './components';
|
||||||
import { MatTooltipModule, MatBadgeModule } from '@angular/material';
|
import { MatTooltipModule, MatBadgeModule } from '@angular/material';
|
||||||
|
@ -20,7 +21,8 @@ import { MatTooltipModule, MatBadgeModule } from '@angular/material';
|
||||||
MatTooltipModule,
|
MatTooltipModule,
|
||||||
MatBadgeModule,
|
MatBadgeModule,
|
||||||
|
|
||||||
UCapUiModule
|
UCapUiModule,
|
||||||
|
UCapUiProfileModule
|
||||||
],
|
],
|
||||||
exports: [...COMPONENTS],
|
exports: [...COMPONENTS],
|
||||||
declarations: [...COMPONENTS],
|
declarations: [...COMPONENTS],
|
||||||
|
|
|
@ -5,7 +5,6 @@ import {
|
||||||
Inject,
|
Inject,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
ViewChild,
|
ViewChild,
|
||||||
ChangeDetectorRef,
|
|
||||||
NgZone
|
NgZone
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
|
@ -21,11 +20,10 @@ import { UserInfo } from '@ucap-webmessenger/protocol-sync';
|
||||||
import {
|
import {
|
||||||
UserInfoSS,
|
UserInfoSS,
|
||||||
UserInfoF,
|
UserInfoF,
|
||||||
UserInfoDN,
|
UserInfoDN
|
||||||
QueryProtocolService
|
|
||||||
} from '@ucap-webmessenger/protocol-query';
|
} from '@ucap-webmessenger/protocol-query';
|
||||||
import { StatusProtocolService } from '@ucap-webmessenger/protocol-status';
|
import { StatusProtocolService } from '@ucap-webmessenger/protocol-status';
|
||||||
import { StatusType, StatusCode, DeviceType } from '@ucap-webmessenger/core';
|
import { StatusType, StatusCode } from '@ucap-webmessenger/core';
|
||||||
import {
|
import {
|
||||||
DialogService,
|
DialogService,
|
||||||
ConfirmDialogComponent,
|
ConfirmDialogComponent,
|
||||||
|
@ -48,19 +46,7 @@ import { DaesangProtocolService, SmsUtils } from '@ucap-webmessenger/daesang';
|
||||||
import { CallService } from '@ucap-webmessenger/api-prompt';
|
import { CallService } from '@ucap-webmessenger/api-prompt';
|
||||||
import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types';
|
import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import {
|
import { MessageApiService, MessageType } from '@ucap-webmessenger/api-message';
|
||||||
MessageApiService,
|
|
||||||
MessageType,
|
|
||||||
DetailRequest,
|
|
||||||
MessageDetailInfo,
|
|
||||||
DelRequest
|
|
||||||
} from '@ucap-webmessenger/api-message';
|
|
||||||
import { MessageStatusCode } from '@ucap-webmessenger/api';
|
|
||||||
import {
|
|
||||||
MessageDetailDialogComponent,
|
|
||||||
MessageDetailDialogResult,
|
|
||||||
MessageDetailDialogData
|
|
||||||
} from '@app/layouts/messenger/dialogs/message/message-detail.dialog.component';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-page-messenger-main',
|
selector: 'app-page-messenger-main',
|
||||||
|
|
|
@ -1,23 +1,26 @@
|
||||||
<div class="translation-main">
|
<div class="translation-main">
|
||||||
<div class="original">
|
<div
|
||||||
{{ message.sentMessageJson.translation }}
|
*ngIf="!translationSimpleview || (!!translationSimpleview && !!isMe)"
|
||||||
</div>
|
class="original"
|
||||||
<div class="translation">
|
[innerHTML]="message.sentMessageJson.original | linky"
|
||||||
<span class="language">Kor</span>
|
></div>
|
||||||
녕하세요 장문장문 롱텍스트안녕하세요 장문장문 롱텍스트안녕하세요 장문장문
|
<div
|
||||||
롱텍스트안녕하세요 장문장문 롱텍스트안녕하세요 장문장문 롱텍스트안녕하세요
|
*ngIf="!translationSimpleview || (!!translationSimpleview && !isMe)"
|
||||||
장문장문 롱텍스트안녕하세요 장문장문 롱텍스트안녕하세요 장문장문
|
class="translation"
|
||||||
롱텍스트안녕하세요 장문장문 롱텍스트안녕하세요 장문장문 롱텍스트안녕하세요
|
>
|
||||||
장문장문 롱텍스트안녕하세요 장문장문 롱텍스트안녕하세요 장문장문
|
<span class="language">{{ message.sentMessageJson.destLocale }}</span>
|
||||||
롱텍스트안녕하세요 장문장문 롱텍스트안녕하세요 장문장문 롱텍스트
|
<span [innerHTML]="message.sentMessageJson.translation | linky"> </span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-box">
|
<div class="btn-box">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<button mat-button>Save</button>
|
<button mat-button>전체보기</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button mat-button><span class="language">Kor</span>번역보기</button>
|
<button mat-button>
|
||||||
|
<span class="language">{{ message.sentMessageJson.destLocale }}</span
|
||||||
|
>번역보기
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
import { Component, OnInit, Input } from '@angular/core';
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
import { TranslationEventJson, Info } from '@ucap-webmessenger/protocol-event';
|
import {
|
||||||
|
TranslationEventJson,
|
||||||
|
Info,
|
||||||
|
MassTranslationEventJson
|
||||||
|
} from '@ucap-webmessenger/protocol-event';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ucap-chat-message-box-mass-translation',
|
selector: 'ucap-chat-message-box-mass-translation',
|
||||||
|
@ -8,7 +12,13 @@ import { TranslationEventJson, Info } from '@ucap-webmessenger/protocol-event';
|
||||||
})
|
})
|
||||||
export class MassTranslationComponent implements OnInit {
|
export class MassTranslationComponent implements OnInit {
|
||||||
@Input()
|
@Input()
|
||||||
message: Info<TranslationEventJson>;
|
message: Info<MassTranslationEventJson>;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
translationSimpleview: boolean;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
isMe: boolean;
|
||||||
|
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,14 @@
|
||||||
[isMe]="message.senderSeq === loginRes.userSeq"
|
[isMe]="message.senderSeq === loginRes.userSeq"
|
||||||
class="information-msg"
|
class="information-msg"
|
||||||
></ucap-chat-message-box-translation>
|
></ucap-chat-message-box-translation>
|
||||||
|
<ucap-chat-message-box-mass-translation
|
||||||
|
*ngSwitchCase="EventType.MassTranslation"
|
||||||
|
[message]="message"
|
||||||
|
[translationSimpleview]="translationSimpleview"
|
||||||
|
[isMe]="message.senderSeq === loginRes.userSeq"
|
||||||
|
class="information-msg"
|
||||||
|
>
|
||||||
|
</ucap-chat-message-box-mass-translation>
|
||||||
|
|
||||||
<ucap-chat-message-box-allim
|
<ucap-chat-message-box-allim
|
||||||
*ngSwitchCase="EventType.AllimTms"
|
*ngSwitchCase="EventType.AllimTms"
|
||||||
|
@ -201,8 +209,7 @@
|
||||||
</ucap-chat-message-box-allim>
|
</ucap-chat-message-box-allim>
|
||||||
|
|
||||||
<div *ngSwitchDefault>
|
<div *ngSwitchDefault>
|
||||||
<!-- mass-translation
|
<!--
|
||||||
<ucap-chat-message-box-mass-translation></ucap-chat-message-box-mass-translation>
|
|
||||||
notice
|
notice
|
||||||
<ucap-chat-message-box-notice></ucap-chat-message-box-notice>
|
<ucap-chat-message-box-notice></ucap-chat-message-box-notice>
|
||||||
video-conference
|
video-conference
|
||||||
|
|
|
@ -2,12 +2,13 @@
|
||||||
*ngIf="
|
*ngIf="
|
||||||
isShowTranslationPreview &&
|
isShowTranslationPreview &&
|
||||||
!!translationPreviewInfo &&
|
!!translationPreviewInfo &&
|
||||||
!!translationPreviewInfo.translation
|
!!translationPreviewInfo.previewInfo &&
|
||||||
|
!!translationPreviewInfo.previewInfo.translation
|
||||||
"
|
"
|
||||||
class="translation-preview"
|
class="translation-preview"
|
||||||
>
|
>
|
||||||
<span class="translation-section">
|
<span class="translation-section">
|
||||||
{{ translationPreviewInfo.translation }}
|
{{ translationPreviewInfo.previewInfo.translation }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
@ -56,53 +57,3 @@
|
||||||
>
|
>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div *ngIf="currentSticker" class="selected-sticker">
|
|
||||||
<img [src]="getStickerContentsImage(currentSticker)" />
|
|
||||||
<span class="btn-close">
|
|
||||||
<button
|
|
||||||
mat-button
|
|
||||||
matSuffix
|
|
||||||
mat-icon-button
|
|
||||||
aria-label="Close"
|
|
||||||
(click)="onClickClose()"
|
|
||||||
>
|
|
||||||
<mat-icon>close</mat-icon>
|
|
||||||
</button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="sticker-selector">
|
|
||||||
<mat-tab-group
|
|
||||||
mat-stretch-tabs
|
|
||||||
animationDuration="0ms"
|
|
||||||
(selectedIndexChange)="onSelectedIndexChange($event)"
|
|
||||||
>
|
|
||||||
<mat-tab
|
|
||||||
*ngFor="let stickerInfo of stickerInfoList; let idx = index"
|
|
||||||
[aria-label]="stickerInfo.title"
|
|
||||||
>
|
|
||||||
<ng-template mat-tab-label>
|
|
||||||
<img
|
|
||||||
#stickerTitle
|
|
||||||
[matTooltip]="stickerInfo.title"
|
|
||||||
matTooltipPosition="after"
|
|
||||||
[src]="getStickerTitleImage(stickerInfo, false, idx)"
|
|
||||||
(mouseover)="
|
|
||||||
stickerTitle.src = getStickerTitleImage(stickerInfo, true, idx)
|
|
||||||
"
|
|
||||||
(mouseout)="
|
|
||||||
stickerTitle.src = getStickerTitleImage(stickerInfo, false, idx)
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</ng-template>
|
|
||||||
<div fxFlex fxLayout="row" fxLayoutGap="20px" class="sticker-item-box">
|
|
||||||
<div
|
|
||||||
*ngFor="let sticker of getStickerInfos(stickerInfo)"
|
|
||||||
(click)="onClickSelectSticker(sticker)"
|
|
||||||
class="sticker-item"
|
|
||||||
>
|
|
||||||
<img [src]="getStickerContentsImage(sticker)" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</mat-tab>
|
|
||||||
</mat-tab-group>
|
|
||||||
</div> -->
|
|
||||||
|
|
|
@ -7,7 +7,12 @@ import {
|
||||||
} from '@ucap-webmessenger/core';
|
} from '@ucap-webmessenger/core';
|
||||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||||
import { MatSlideToggleChange, MatSelectChange } from '@angular/material';
|
import { MatSlideToggleChange, MatSelectChange } from '@angular/material';
|
||||||
import { TranslationEventJson } from '@ucap-webmessenger/protocol-event';
|
import {
|
||||||
|
TranslationEventJson,
|
||||||
|
MassTranslationEventJson,
|
||||||
|
EventType
|
||||||
|
} from '@ucap-webmessenger/protocol-event';
|
||||||
|
import { TranslationSaveResponse } from '@ucap-webmessenger/api-common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ucap-translation-section',
|
selector: 'ucap-translation-section',
|
||||||
|
@ -22,7 +27,10 @@ export class TranslationSectionComponent implements OnInit {
|
||||||
@Input()
|
@Input()
|
||||||
preView: boolean;
|
preView: boolean;
|
||||||
@Input()
|
@Input()
|
||||||
translationPreviewInfo: TranslationEventJson | null;
|
translationPreviewInfo: {
|
||||||
|
previewInfo: TranslationSaveResponse | null;
|
||||||
|
translationType: EventType.Translation | EventType.MassTranslation;
|
||||||
|
};
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
changeTranslationSimpleview = new EventEmitter<boolean>();
|
changeTranslationSimpleview = new EventEmitter<boolean>();
|
||||||
|
@ -33,7 +41,10 @@ export class TranslationSectionComponent implements OnInit {
|
||||||
@Output()
|
@Output()
|
||||||
cancelTranslation = new EventEmitter<void>();
|
cancelTranslation = new EventEmitter<void>();
|
||||||
@Output()
|
@Output()
|
||||||
sendTranslationMessage = new EventEmitter<TranslationEventJson>();
|
sendTranslationMessage = new EventEmitter<{
|
||||||
|
previewInfo: TranslationSaveResponse | null;
|
||||||
|
translationType: EventType.Translation | EventType.MassTranslation;
|
||||||
|
}>();
|
||||||
|
|
||||||
isShowTranslationSimpleview = false;
|
isShowTranslationSimpleview = false;
|
||||||
isShowTranslationPreview = false;
|
isShowTranslationPreview = false;
|
||||||
|
@ -171,7 +182,10 @@ export class TranslationSectionComponent implements OnInit {
|
||||||
this.changeTranslationPreview.emit(event.checked);
|
this.changeTranslationPreview.emit(event.checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickSendTranslationMessage(translationInfo: TranslationEventJson) {
|
onClickSendTranslationMessage(translationInfo: {
|
||||||
|
previewInfo: TranslationSaveResponse | null;
|
||||||
|
translationType: EventType.Translation | EventType.MassTranslation;
|
||||||
|
}) {
|
||||||
this.sendTranslationMessage.emit(translationInfo);
|
this.sendTranslationMessage.emit(translationInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user