i18n is working
This commit is contained in:
parent
1d7cfbb9e5
commit
4293c8b16c
|
@ -100,7 +100,7 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
||||||
if (!!result) {
|
if (!!result) {
|
||||||
this.translateService
|
this.translateService
|
||||||
.get('common.file.savedToPath', {
|
.get('common.file.savedToPath', {
|
||||||
v: result
|
path: result
|
||||||
})
|
})
|
||||||
.pipe(take(1))
|
.pipe(take(1))
|
||||||
.subscribe(v => {
|
.subscribe(v => {
|
||||||
|
|
|
@ -32,7 +32,9 @@
|
||||||
class="icon-item"
|
class="icon-item"
|
||||||
[matBadgeHidden]="badgeChatUnReadCount <= 0"
|
[matBadgeHidden]="badgeChatUnReadCount <= 0"
|
||||||
[matBadge]="badgeChatUnReadCount"
|
[matBadge]="badgeChatUnReadCount"
|
||||||
matBadgeDescription="확인하지 않은 메시지가 있습니다."
|
matBadgeDescription="{{
|
||||||
|
'chat.badgeDescriptionForUnread' | translate
|
||||||
|
}}"
|
||||||
matBadgeColor="accent"
|
matBadgeColor="accent"
|
||||||
matBadgePosition="above after"
|
matBadgePosition="above after"
|
||||||
matTooltip="Chat"
|
matTooltip="Chat"
|
||||||
|
@ -93,7 +95,9 @@
|
||||||
class="icon-item"
|
class="icon-item"
|
||||||
[matBadgeHidden]="(badgeMessageUnReadCount$ | async) <= 0"
|
[matBadgeHidden]="(badgeMessageUnReadCount$ | async) <= 0"
|
||||||
[matBadge]="badgeMessageUnReadCount$ | async"
|
[matBadge]="badgeMessageUnReadCount$ | async"
|
||||||
matBadgeDescription="확인하지 않은 메시지가 있습니다."
|
matBadgeDescription="{{
|
||||||
|
'message.badgeDescriptionForUnread' | translate
|
||||||
|
}}"
|
||||||
matBadgeColor="accent"
|
matBadgeColor="accent"
|
||||||
matBadgePosition="above after"
|
matBadgePosition="above after"
|
||||||
matTooltip="Message"
|
matTooltip="Message"
|
||||||
|
|
|
@ -36,7 +36,7 @@ import { OpenProfileOptions } from '@ucap-webmessenger/protocol-buddy';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { MessageType } from '@ucap-webmessenger/api-message';
|
import { MessageType } from '@ucap-webmessenger/api-message';
|
||||||
import { tap } from 'rxjs/operators';
|
import { tap, take } from 'rxjs/operators';
|
||||||
import {
|
import {
|
||||||
MessageWriteDialogComponent,
|
MessageWriteDialogComponent,
|
||||||
MessageWriteDialogResult,
|
MessageWriteDialogResult,
|
||||||
|
@ -49,6 +49,7 @@ import {
|
||||||
} from '@app/types';
|
} from '@app/types';
|
||||||
import { MessageBoxComponent } from './left-sidenav/message.component';
|
import { MessageBoxComponent } from './left-sidenav/message.component';
|
||||||
import { environment } from '../../../../environments/environment';
|
import { environment } from '../../../../environments/environment';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
export enum MainMenu {
|
export enum MainMenu {
|
||||||
Group = 'GROUP',
|
Group = 'GROUP',
|
||||||
|
@ -105,6 +106,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private sessionStorageService: SessionStorageService,
|
private sessionStorageService: SessionStorageService,
|
||||||
|
private translateService: TranslateService,
|
||||||
private logger: NGXLogger
|
private logger: NGXLogger
|
||||||
) {
|
) {
|
||||||
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
||||||
|
@ -164,65 +166,78 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
this.logger.debug('-----------------------LeftSideComponent ngOnDestroy');
|
this.logger.debug('-----------------------LeftSideComponent ngOnDestroy');
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickNewChat(type: string = 'NORMAL') {
|
onClickNewChat(type: string = 'NORMAL') {
|
||||||
const result = await this.dialogService.open<
|
this.translateService
|
||||||
CreateChatDialogComponent,
|
.get(['chat.newTimerChat', 'chat.newChat'])
|
||||||
CreateChatDialogData,
|
.pipe(take(1))
|
||||||
CreateChatDialogResult
|
.subscribe(async vs => {
|
||||||
>(CreateChatDialogComponent, {
|
const result = await this.dialogService.open<
|
||||||
width: '600px',
|
CreateChatDialogComponent,
|
||||||
data: {
|
CreateChatDialogData,
|
||||||
type: UserSelectDialogType.NewChat,
|
CreateChatDialogResult
|
||||||
title: type === 'TIMER' ? 'chat.newTimerChat' : 'chat.newChat'
|
>(CreateChatDialogComponent, {
|
||||||
}
|
width: '600px',
|
||||||
});
|
data: {
|
||||||
|
type: UserSelectDialogType.NewChat,
|
||||||
|
title:
|
||||||
|
type === 'TIMER' ? vs['chat.newTimerChat'] : vs['chat.newChat']
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!!result && !!result.choice && result.choice) {
|
if (!!result && !!result.choice && result.choice) {
|
||||||
if (!!result.selectedUserList && result.selectedUserList.length > 0) {
|
if (!!result.selectedUserList && result.selectedUserList.length > 0) {
|
||||||
const userSeqs: number[] = [];
|
const userSeqs: number[] = [];
|
||||||
result.selectedUserList.map(user => userSeqs.push(user.seq));
|
result.selectedUserList.map(user => userSeqs.push(user.seq));
|
||||||
|
|
||||||
if (type === 'NORMAL') {
|
if (type === 'NORMAL') {
|
||||||
this.store.dispatch(ChatStore.openRoom({ userSeqList: userSeqs }));
|
this.store.dispatch(
|
||||||
} else if (type === 'TIMER') {
|
ChatStore.openRoom({ userSeqList: userSeqs })
|
||||||
this.store.dispatch(
|
);
|
||||||
ChatStore.openRoom({ userSeqList: userSeqs, isTimeRoom: true })
|
} else if (type === 'TIMER') {
|
||||||
);
|
this.store.dispatch(
|
||||||
|
ChatStore.openRoom({ userSeqList: userSeqs, isTimeRoom: true })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickNewGroupAndMember() {
|
onClickNewGroupAndMember() {
|
||||||
const result = await this.dialogService.open<
|
this.translateService
|
||||||
CreateChatDialogComponent,
|
.get(['group.addNew'])
|
||||||
CreateChatDialogData,
|
.pipe(take(1))
|
||||||
CreateChatDialogResult
|
.subscribe(async vs => {
|
||||||
>(CreateChatDialogComponent, {
|
const result = await this.dialogService.open<
|
||||||
width: '600px',
|
CreateChatDialogComponent,
|
||||||
data: {
|
CreateChatDialogData,
|
||||||
type: UserSelectDialogType.NewGroup,
|
CreateChatDialogResult
|
||||||
title: 'group.addNew'
|
>(CreateChatDialogComponent, {
|
||||||
}
|
width: '600px',
|
||||||
});
|
data: {
|
||||||
|
type: UserSelectDialogType.NewGroup,
|
||||||
|
title: vs['group.addNew']
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!!result && !!result.choice && result.choice) {
|
if (!!result && !!result.choice && result.choice) {
|
||||||
if (
|
if (
|
||||||
!!result.selectedUserList &&
|
!!result.selectedUserList &&
|
||||||
// result.selectedUserList.length > 0 &&
|
// result.selectedUserList.length > 0 &&
|
||||||
result.groupName.trim().length > 0
|
result.groupName.trim().length > 0
|
||||||
) {
|
) {
|
||||||
const userSeqs: number[] = [];
|
const userSeqs: number[] = [];
|
||||||
result.selectedUserList.map(user => userSeqs.push(user.seq));
|
result.selectedUserList.map(user => userSeqs.push(user.seq));
|
||||||
|
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
SyncStore.createGroupAndBuddy({
|
SyncStore.createGroupAndBuddy({
|
||||||
groupName: result.groupName,
|
groupName: result.groupName,
|
||||||
trgtUserSeq: userSeqs
|
trgtUserSeq: userSeqs
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickNewMessage() {
|
async onClickNewMessage() {
|
||||||
|
@ -289,67 +304,78 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setFabInitial(type: string) {
|
|
||||||
switch (type) {
|
|
||||||
case MainMenu.Group:
|
|
||||||
{
|
|
||||||
this.fabButtonShow = true;
|
|
||||||
this.fabButtons = [
|
|
||||||
{
|
|
||||||
icon: 'add',
|
|
||||||
tooltip: 'New Group Add',
|
|
||||||
divisionType: 'GROUP_NEW_ADD'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case MainMenu.Chat:
|
|
||||||
{
|
|
||||||
this.fabButtonShow = true;
|
|
||||||
this.fabButtons = [
|
|
||||||
{
|
|
||||||
icon: 'chat',
|
|
||||||
tooltip: 'New Chat',
|
|
||||||
divisionType: 'CAHT_NEW_ADD'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
if (environment.productConfig.CommonSetting.useTimerRoom) {
|
setFabInitial(type: string) {
|
||||||
this.fabButtons.push({
|
this.translateService
|
||||||
icon: 'timer',
|
.get([
|
||||||
tooltip: 'New Timer Chat',
|
'group.addNew',
|
||||||
divisionType: 'CHAT_NEW_TIMER_ADD'
|
'chat.newChat',
|
||||||
});
|
'chat.newTimerChat',
|
||||||
|
'message.newMessage'
|
||||||
|
])
|
||||||
|
.pipe(take(1))
|
||||||
|
.subscribe(async vs => {
|
||||||
|
switch (type) {
|
||||||
|
case MainMenu.Group:
|
||||||
|
{
|
||||||
|
this.fabButtonShow = true;
|
||||||
|
this.fabButtons = [
|
||||||
|
{
|
||||||
|
icon: 'add',
|
||||||
|
tooltip: vs['group.addNew'],
|
||||||
|
divisionType: 'GROUP_NEW_ADD'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MainMenu.Chat:
|
||||||
|
{
|
||||||
|
this.fabButtonShow = true;
|
||||||
|
this.fabButtons = [
|
||||||
|
{
|
||||||
|
icon: 'chat',
|
||||||
|
tooltip: vs['chat.newChat'],
|
||||||
|
divisionType: 'CAHT_NEW_ADD'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
if (environment.productConfig.CommonSetting.useTimerRoom) {
|
||||||
|
this.fabButtons.push({
|
||||||
|
icon: 'timer',
|
||||||
|
tooltip: vs['chat.newTimerChat'],
|
||||||
|
divisionType: 'CHAT_NEW_TIMER_ADD'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MainMenu.Organization:
|
||||||
|
{
|
||||||
|
this.fabButtonShow = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MainMenu.Message:
|
||||||
|
{
|
||||||
|
this.fabButtonShow = true;
|
||||||
|
this.fabButtons = [
|
||||||
|
{
|
||||||
|
icon: 'add',
|
||||||
|
tooltip: vs['message.newMessage'],
|
||||||
|
divisionType: 'MESSAGE_NEW'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MainMenu.Call:
|
||||||
|
{
|
||||||
|
this.fabButtonShow = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: {
|
||||||
|
this.fabButtonShow = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
});
|
||||||
case MainMenu.Organization:
|
|
||||||
{
|
|
||||||
this.fabButtonShow = false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case MainMenu.Message:
|
|
||||||
{
|
|
||||||
this.fabButtonShow = true;
|
|
||||||
this.fabButtons = [
|
|
||||||
{
|
|
||||||
icon: 'add',
|
|
||||||
tooltip: 'New Message',
|
|
||||||
divisionType: 'MESSAGE_NEW'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case MainMenu.Call:
|
|
||||||
{
|
|
||||||
this.fabButtonShow = false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default: {
|
|
||||||
this.fabButtonShow = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onCheckAllUser(params: {
|
onCheckAllUser(params: {
|
||||||
|
|
|
@ -234,7 +234,7 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
|
||||||
if (!!result) {
|
if (!!result) {
|
||||||
this.translateService
|
this.translateService
|
||||||
.get('common.file.savedToPath', {
|
.get('common.file.savedToPath', {
|
||||||
v: result
|
path: result
|
||||||
})
|
})
|
||||||
.pipe(take(1))
|
.pipe(take(1))
|
||||||
.subscribe(v => {
|
.subscribe(v => {
|
||||||
|
|
|
@ -278,7 +278,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
||||||
if (!!result) {
|
if (!!result) {
|
||||||
this.translateService
|
this.translateService
|
||||||
.get('common.file.savedToPath', {
|
.get('common.file.savedToPath', {
|
||||||
v: result
|
path: result
|
||||||
})
|
})
|
||||||
.pipe(take(1))
|
.pipe(take(1))
|
||||||
.subscribe(v => {
|
.subscribe(v => {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<table mat-table [dataSource]="noticelist">
|
<table mat-table [dataSource]="noticelist">
|
||||||
<ng-container matColumnDef="title">
|
<ng-container matColumnDef="title">
|
||||||
<th mat-header-cell *matHeaderCellDef class="infos">
|
<th mat-header-cell *matHeaderCellDef class="infos">
|
||||||
제목
|
{{ 'notice.fieldTitle' | translate }}
|
||||||
</th>
|
</th>
|
||||||
<td mat-cell *matCellDef="let element" class="notice-info">
|
<td mat-cell *matCellDef="let element" class="notice-info">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="regDate">
|
<ng-container matColumnDef="regDate">
|
||||||
<th mat-header-cell *matHeaderCellDef>
|
<th mat-header-cell *matHeaderCellDef>
|
||||||
게시일
|
{{ 'notice.fieldPostDate' | translate }}
|
||||||
</th>
|
</th>
|
||||||
<td mat-cell *matCellDef="let element" class="date">
|
<td mat-cell *matCellDef="let element" class="date">
|
||||||
<div class="date">
|
<div class="date">
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
class="btn-box"
|
class="btn-box"
|
||||||
>
|
>
|
||||||
<button mat-flat-button class="mat-primary" (click)="onClickAddMember()">
|
<button mat-flat-button class="mat-primary" (click)="onClickAddMember()">
|
||||||
대화상대추가
|
{{ 'chat.addMemberToRoom' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button mat-flat-button class="mat-primary" (click)="onClickAddGroup()">
|
<button mat-flat-button class="mat-primary" (click)="onClickAddGroup()">
|
||||||
그룹멤버로추가
|
{{ 'chat.addMemberToGroup' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
>
|
>
|
||||||
<ng-template matMenuContent let-buddy="buddy">
|
<ng-template matMenuContent let-buddy="buddy">
|
||||||
<button mat-menu-item (click)="onClickContextMenu('FORCING_EXIT', buddy)">
|
<button mat-menu-item (click)="onClickContextMenu('FORCING_EXIT', buddy)">
|
||||||
대화방 퇴장
|
{{ 'chat.ejectFromRoom' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
import { Store, select } from '@ngrx/store';
|
import { Store, select } from '@ngrx/store';
|
||||||
import { tap, map } from 'rxjs/operators';
|
import { tap, map, take } from 'rxjs/operators';
|
||||||
|
|
||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
import * as SyncStore from '@app/store/messenger/sync';
|
import * as SyncStore from '@app/store/messenger/sync';
|
||||||
|
@ -41,6 +41,7 @@ import {
|
||||||
} from '@app/types';
|
} from '@app/types';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { MatMenuTrigger, MatDialog } from '@angular/material';
|
import { MatMenuTrigger, MatDialog } from '@angular/material';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layout-chat-right-drawer-room-user-list',
|
selector: 'app-layout-chat-right-drawer-room-user-list',
|
||||||
|
@ -67,6 +68,7 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private sessionStorageService: SessionStorageService,
|
private sessionStorageService: SessionStorageService,
|
||||||
|
private translateService: TranslateService,
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private dialogRef: MatDialog
|
private dialogRef: MatDialog
|
||||||
) {
|
) {
|
||||||
|
@ -135,83 +137,93 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
|
||||||
this.openProfile.emit(userSeq);
|
this.openProfile.emit(userSeq);
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickAddMember() {
|
onClickAddMember() {
|
||||||
const result = await this.dialogService.open<
|
this.translateService
|
||||||
CreateChatDialogComponent,
|
.get('chat.modifyRoomMember')
|
||||||
CreateChatDialogData,
|
.pipe(take(1))
|
||||||
CreateChatDialogResult
|
.subscribe(async v => {
|
||||||
>(CreateChatDialogComponent, {
|
const result = await this.dialogService.open<
|
||||||
width: '600px',
|
CreateChatDialogComponent,
|
||||||
data: {
|
CreateChatDialogData,
|
||||||
type: UserSelectDialogType.EditChatMember,
|
CreateChatDialogResult
|
||||||
title: 'Edit Chat Member',
|
>(CreateChatDialogComponent, {
|
||||||
curRoomUser: this.userInfoList.filter(
|
width: '600px',
|
||||||
user => user.seq !== this.loginRes.userSeq && user.isJoinRoom
|
data: {
|
||||||
)
|
type: UserSelectDialogType.EditChatMember,
|
||||||
}
|
title: v,
|
||||||
});
|
curRoomUser: this.userInfoList.filter(
|
||||||
|
user => user.seq !== this.loginRes.userSeq && user.isJoinRoom
|
||||||
if (!!result && !!result.choice && result.choice) {
|
)
|
||||||
const userSeqs: number[] = this.userInfoList.map(userInfo => {
|
|
||||||
if (userInfo.isJoinRoom) {
|
|
||||||
return userInfo.seq;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (!!result.selectedUserList && result.selectedUserList.length > 0) {
|
|
||||||
result.selectedUserList.forEach(user => {
|
|
||||||
if (userSeqs.indexOf(user.seq) < 0) {
|
|
||||||
userSeqs.push(user.seq);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (userSeqs.length > 0) {
|
if (!!result && !!result.choice && result.choice) {
|
||||||
// include me
|
const userSeqs: number[] = this.userInfoList.map(userInfo => {
|
||||||
userSeqs.push(this.loginRes.userSeq);
|
if (userInfo.isJoinRoom) {
|
||||||
|
return userInfo.seq;
|
||||||
this.store.dispatch(
|
|
||||||
RoomStore.inviteOrOpen({
|
|
||||||
req: {
|
|
||||||
divCd: 'Invite',
|
|
||||||
userSeqs
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
);
|
if (!!result.selectedUserList && result.selectedUserList.length > 0) {
|
||||||
}
|
result.selectedUserList.forEach(user => {
|
||||||
}
|
if (userSeqs.indexOf(user.seq) < 0) {
|
||||||
|
userSeqs.push(user.seq);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (userSeqs.length > 0) {
|
||||||
|
// include me
|
||||||
|
userSeqs.push(this.loginRes.userSeq);
|
||||||
|
|
||||||
|
this.store.dispatch(
|
||||||
|
RoomStore.inviteOrOpen({
|
||||||
|
req: {
|
||||||
|
divCd: 'Invite',
|
||||||
|
userSeqs
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickAddGroup() {
|
onClickAddGroup() {
|
||||||
const result = await this.dialogService.open<
|
this.translateService
|
||||||
SelectGroupDialogComponent,
|
.get('group.selectTargetGroup')
|
||||||
SelectGroupDialogData,
|
.pipe(take(1))
|
||||||
SelectGroupDialogResult
|
.subscribe(async v => {
|
||||||
>(SelectGroupDialogComponent, {
|
const result = await this.dialogService.open<
|
||||||
width: '600px',
|
SelectGroupDialogComponent,
|
||||||
data: {
|
SelectGroupDialogData,
|
||||||
title: 'Group Select'
|
SelectGroupDialogResult
|
||||||
}
|
>(SelectGroupDialogComponent, {
|
||||||
});
|
width: '600px',
|
||||||
|
data: {
|
||||||
|
title: v
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!!result && !!result.choice && result.choice) {
|
if (!!result && !!result.choice && result.choice) {
|
||||||
if (!!result.group) {
|
if (!!result.group) {
|
||||||
const oldGroup: GroupDetailData = result.group;
|
const oldGroup: GroupDetailData = result.group;
|
||||||
const trgtUserSeq: number[] = [];
|
const trgtUserSeq: number[] = [];
|
||||||
result.group.userSeqs.map(seq => trgtUserSeq.push(seq));
|
result.group.userSeqs.map(seq => trgtUserSeq.push(seq));
|
||||||
this.userInfoList
|
this.userInfoList
|
||||||
.filter(v => result.group.userSeqs.indexOf(v.seq) < 0)
|
.filter(v => result.group.userSeqs.indexOf(v.seq) < 0)
|
||||||
.forEach(user => {
|
.forEach(user => {
|
||||||
trgtUserSeq.push(user.seq);
|
trgtUserSeq.push(user.seq);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
SyncStore.updateGroupMember({
|
SyncStore.updateGroupMember({
|
||||||
oldGroup,
|
oldGroup,
|
||||||
trgtUserSeq
|
trgtUserSeq
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onContextMenuRoomUser(event: MouseEvent, buddy: UserInfo) {
|
onContextMenuRoomUser(event: MouseEvent, buddy: UserInfo) {
|
||||||
|
@ -229,33 +241,40 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
|
||||||
this.roomUserContextMenuTrigger.openMenu();
|
this.roomUserContextMenuTrigger.openMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickContextMenu(type: string, buddy: UserInfo) {
|
onClickContextMenu(type: string, buddy: UserInfo) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'FORCING_EXIT':
|
case 'FORCING_EXIT':
|
||||||
{
|
{
|
||||||
const result = await this.dialogService.open<
|
this.translateService
|
||||||
ConfirmDialogComponent,
|
.get(['chat.ejectFromRoom', 'chat.confirmEjectFromRoom'], {
|
||||||
ConfirmDialogData,
|
targetMember: buddy.name
|
||||||
ConfirmDialogResult
|
})
|
||||||
>(ConfirmDialogComponent, {
|
.pipe(take(1))
|
||||||
data: {
|
.subscribe(async vs => {
|
||||||
title: '강제 퇴장',
|
const result = await this.dialogService.open<
|
||||||
html: `${buddy.name} 님을 대화방에서 퇴장 시키겠습니까?`
|
ConfirmDialogComponent,
|
||||||
}
|
ConfirmDialogData,
|
||||||
});
|
ConfirmDialogResult
|
||||||
|
>(ConfirmDialogComponent, {
|
||||||
if (!!result && !!result.choice && result.choice) {
|
data: {
|
||||||
this.store.dispatch(
|
title: vs['chat.ejectFromRoom'],
|
||||||
RoomStore.exitForcing({
|
html: vs['chat.confirmEjectFromRoom']
|
||||||
req: {
|
|
||||||
roomSeq: this.roomInfo.roomSeq,
|
|
||||||
senderSeq: this.loginRes.userSeq,
|
|
||||||
type: 'A',
|
|
||||||
userSeqs: [buddy.seq]
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
);
|
|
||||||
}
|
if (!!result && !!result.choice && result.choice) {
|
||||||
|
this.store.dispatch(
|
||||||
|
RoomStore.exitForcing({
|
||||||
|
req: {
|
||||||
|
roomSeq: this.roomInfo.roomSeq,
|
||||||
|
senderSeq: this.loginRes.userSeq,
|
||||||
|
type: 'A',
|
||||||
|
userSeqs: [buddy.seq]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
<mat-card class="confirm-card mat-elevation-z">
|
<mat-card class="confirm-card mat-elevation-z">
|
||||||
<mat-card-header cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle>
|
<mat-card-header cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle>
|
||||||
<mat-card-title>{{ data.title | translate }}</mat-card-title>
|
<mat-card-title>{{ data.title }}</mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div *ngIf="data.type === UserSelectDialogType.NewGroup">
|
<div *ngIf="data.type === UserSelectDialogType.NewGroup">
|
||||||
<form name="inputForm" [formGroup]="inputForm" novalidate>
|
<form name="inputForm" [formGroup]="inputForm" novalidate>
|
||||||
<mat-form-field
|
<mat-form-field
|
||||||
hintLabel="{{
|
hintLabel="{{
|
||||||
'common.useOnlyForSpecialCharacter' | translate: { v: '-,_' }
|
'common.useOnlyForSpecialCharacter'
|
||||||
|
| translate: { specialCharacter: '-,_' }
|
||||||
}}"
|
}}"
|
||||||
style="display:block;margin-bottom:10px;"
|
style="display:block;margin-bottom:10px;"
|
||||||
>
|
>
|
||||||
|
|
|
@ -654,7 +654,8 @@
|
||||||
"modifyGroupMember": "Modify member of group",
|
"modifyGroupMember": "Modify member of group",
|
||||||
"removeGroup": "Remove group",
|
"removeGroup": "Remove group",
|
||||||
"startChatWithGroup": "Chat with group",
|
"startChatWithGroup": "Chat with group",
|
||||||
"sendMessageToGroup": "Send message to group"
|
"sendMessageToGroup": "Send message to group",
|
||||||
|
"selectTargetGroup": "Select target group"
|
||||||
},
|
},
|
||||||
"chat": {
|
"chat": {
|
||||||
"label": "Chat",
|
"label": "Chat",
|
||||||
|
@ -674,7 +675,13 @@
|
||||||
"sentDate": "Sent date",
|
"sentDate": "Sent date",
|
||||||
"validityPeriod": "Validity period",
|
"validityPeriod": "Validity period",
|
||||||
"forwardFileToMe": "Forward file to me",
|
"forwardFileToMe": "Forward file to me",
|
||||||
"forwardFileTo": "Forward file to ..."
|
"forwardFileTo": "Forward file to ...",
|
||||||
|
"addMemberToRoom": "Add member to room",
|
||||||
|
"addMemberToGroup": "Add member to group",
|
||||||
|
"modifyRoomMember": "Modify chat room member",
|
||||||
|
"ejectFromRoom": "Eject from room",
|
||||||
|
"confirmEjectFromRoom": "Do you want to eject member[{{targetMember}}] from room?",
|
||||||
|
"badgeDescriptionForUnread": "There is an unconfirmed message."
|
||||||
},
|
},
|
||||||
"organization": {
|
"organization": {
|
||||||
"chart": "Organization chart",
|
"chart": "Organization chart",
|
||||||
|
@ -688,6 +695,7 @@
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"label": "Message",
|
"label": "Message",
|
||||||
|
"newMessage": "New message",
|
||||||
"sendTo": "Send message",
|
"sendTo": "Send message",
|
||||||
"placeholderForSearch": "search for name, title, content",
|
"placeholderForSearch": "search for name, title, content",
|
||||||
"messageTypeAll": "All",
|
"messageTypeAll": "All",
|
||||||
|
@ -696,6 +704,11 @@
|
||||||
"messageTypeReservation": "Reservation",
|
"messageTypeReservation": "Reservation",
|
||||||
"searchTypeName": "Name",
|
"searchTypeName": "Name",
|
||||||
"searchTypeTitle": "Title",
|
"searchTypeTitle": "Title",
|
||||||
"searchTypeContent": "Content"
|
"searchTypeContent": "Content",
|
||||||
|
"badgeDescriptionForUnread": "There is an unconfirmed message."
|
||||||
|
},
|
||||||
|
"notice": {
|
||||||
|
"fieldTitle": "Title",
|
||||||
|
"fieldPostDate": "Post date"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"search": "검색",
|
"search": "검색",
|
||||||
"searchWord": "검색어",
|
"searchWord": "검색어",
|
||||||
"searchResult": "검색 결과",
|
"searchResult": "검색 결과",
|
||||||
"useOnlyForSpecialCharacter": "특수문자는 {{v}}만 사용할 수 있습니다.",
|
"useOnlyForSpecialCharacter": "특수문자는 {{specialCharacter}}만 사용할 수 있습니다.",
|
||||||
"howManyPersons": "명",
|
"howManyPersons": "명",
|
||||||
"file": {
|
"file": {
|
||||||
"name": "파일 이름",
|
"name": "파일 이름",
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
"download": "파일 다운로드",
|
"download": "파일 다운로드",
|
||||||
"delete": "파일 삭제",
|
"delete": "파일 삭제",
|
||||||
"saved": "파일이 저장되었습니다.",
|
"saved": "파일이 저장되었습니다.",
|
||||||
"savedToPath": "파일이 경로[{{v}}]에 저장되었습니다.",
|
"savedToPath": "파일이 경로[{{path}}]에 저장되었습니다.",
|
||||||
"failToSave": "파일 저장에 실패하였습니다.",
|
"failToSave": "파일 저장에 실패하였습니다.",
|
||||||
"downloadSelected": "선택된 파일 다운로드",
|
"downloadSelected": "선택된 파일 다운로드",
|
||||||
"openDownloadFolder": "다운로드 폴더 열기",
|
"openDownloadFolder": "다운로드 폴더 열기",
|
||||||
|
@ -654,7 +654,8 @@
|
||||||
"modifyGroupMember": "그룹 멤버 변경",
|
"modifyGroupMember": "그룹 멤버 변경",
|
||||||
"removeGroup": "그룹 삭제",
|
"removeGroup": "그룹 삭제",
|
||||||
"startChatWithGroup": "그룹 대화하기",
|
"startChatWithGroup": "그룹 대화하기",
|
||||||
"sendMessageToGroup": "그룹 쪽지 보내기"
|
"sendMessageToGroup": "그룹 쪽지 보내기",
|
||||||
|
"selectTargetGroup": "대상 그룹 선택"
|
||||||
},
|
},
|
||||||
"chat": {
|
"chat": {
|
||||||
"label": "대화",
|
"label": "대화",
|
||||||
|
@ -674,7 +675,13 @@
|
||||||
"sentDate": "보낸 날짜",
|
"sentDate": "보낸 날짜",
|
||||||
"validityPeriod": "유효 기간",
|
"validityPeriod": "유효 기간",
|
||||||
"forwardFileToMe": "파일을 나에게 전달",
|
"forwardFileToMe": "파일을 나에게 전달",
|
||||||
"forwardFileTo": "파일 전달"
|
"forwardFileTo": "파일 전달",
|
||||||
|
"addMemberToRoom": "대화 상대 추가",
|
||||||
|
"addMemberToGroup": "그룹 멤버로 추가",
|
||||||
|
"modifyRoomMember": "대화방 멤버 편집",
|
||||||
|
"ejectFromRoom": "Eject from room",
|
||||||
|
"confirmEjectFromRoom": "{{targetMember}} 님을 대화방에서 퇴장 시키겠습니까?",
|
||||||
|
"badgeDescriptionForUnread": "확인하지 않은 메시지가 있습니다."
|
||||||
},
|
},
|
||||||
"organization": {
|
"organization": {
|
||||||
"chart": "조직도",
|
"chart": "조직도",
|
||||||
|
@ -688,6 +695,7 @@
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"label": "쪽지",
|
"label": "쪽지",
|
||||||
|
"newMessage": "새로운 쪽지",
|
||||||
"sendTo": "쪽지 보내기",
|
"sendTo": "쪽지 보내기",
|
||||||
"placeholderForSearch": "이름, 제목, 내용 검색",
|
"placeholderForSearch": "이름, 제목, 내용 검색",
|
||||||
"messageTypeAll": "전체",
|
"messageTypeAll": "전체",
|
||||||
|
@ -696,6 +704,11 @@
|
||||||
"messageTypeReservation": "예약",
|
"messageTypeReservation": "예약",
|
||||||
"searchTypeName": "이름",
|
"searchTypeName": "이름",
|
||||||
"searchTypeTitle": "제목",
|
"searchTypeTitle": "제목",
|
||||||
"searchTypeContent": "내용"
|
"searchTypeContent": "내용",
|
||||||
|
"badgeDescriptionForUnread": "확인하지 않은 쪽지가 있습니다."
|
||||||
|
},
|
||||||
|
"notice": {
|
||||||
|
"fieldTitle": "제목",
|
||||||
|
"fieldPostDate": "게시일"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user