next-ucap-messenger/projects/ucap-webmessenger-ui/src/lib/components/translation-section.component.html

64 lines
1.7 KiB
HTML
Raw Normal View History

2019-12-31 14:36:32 +09:00
<div
*ngIf="
isShowTranslationPreview &&
!!translationPreviewInfo &&
2019-12-31 16:10:24 +09:00
!!translationPreviewInfo.previewInfo &&
!!translationPreviewInfo.previewInfo.translation
2019-12-31 14:36:32 +09:00
"
class="translation-preview"
>
<span class="translation-section">
2019-12-31 16:10:24 +09:00
{{ translationPreviewInfo.previewInfo.translation }}
2019-12-31 14:36:32 +09:00
</span>
<button
mat-stroked-button
(click)="onClickSendTranslationMessage(translationPreviewInfo)"
>
2020-01-08 14:43:43 +09:00
{{ 'chat.send' | translate }}
2019-12-31 14:36:32 +09:00
</button>
<span class="btn-close">
<button
mat-button
matSuffix
mat-icon-button
aria-label="Close"
(click)="onClickTranslationCancel()"
>
<mat-icon>close</mat-icon>
</button>
</span>
</div>
<div>
<form name="translationForm" [formGroup]="translationForm">
<mat-form-field>
2020-01-08 14:43:43 +09:00
<mat-label>{{
'common.translations.targetLanguage' | translate
}}</mat-label>
2019-12-31 14:36:32 +09:00
<mat-select
formControlName="destType"
(selectionChange)="onChangeSelection($event)"
>
2020-01-08 14:43:43 +09:00
<mat-option value="">{{
'common.translations.noTranslation' | translate
}}</mat-option>
2019-12-31 14:36:32 +09:00
<mat-option *ngFor="let dest of translationDestList" [value]="dest.key"
>{{ dest.text }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-slide-toggle
labelPosition="before"
[checked]="simpleView"
(change)="onChangToggleSimpleview($event)"
2020-01-08 14:43:43 +09:00
>{{ 'common.translations.simpleView' | translate }}</mat-slide-toggle
2019-12-31 14:36:32 +09:00
>
<mat-slide-toggle
labelPosition="before"
[checked]="preView"
(change)="onChangTogglePreview($event)"
2020-01-08 14:43:43 +09:00
>{{ 'common.translations.preview' | translate }}</mat-slide-toggle
2019-12-31 14:36:32 +09:00
>
</form>
</div>