1. 파일 에러시 발생하는 snackbar 에 '확인' 버튼 추가.

2. snackbar 다국어 처리.
3. 화상회의 권한으로 처리.
This commit is contained in:
leejinho 2020-01-09 14:24:09 +09:00
parent 0f72beeca9
commit ebc5744442
17 changed files with 98 additions and 113 deletions

View File

@ -115,7 +115,8 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
this.snackBarService.open(
this.translateService.instant(
'common.file.errors.failToSave'
)
),
this.translateService.instant('common.file.errors.label')
);
}
})
@ -123,7 +124,8 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
this.snackBarService.open(
this.translateService.instant(
'common.file.errors.failToSave'
)
),
this.translateService.instant('common.file.errors.label')
);
});
})

View File

@ -33,7 +33,6 @@ import { ExpansionPanelComponent as GroupExpansionPanelComponent } from '@ucap-w
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
import { UserInfo, GroupDetailData } from '@ucap-webmessenger/protocol-sync';
import { StatusProtocolService } from '@ucap-webmessenger/protocol-status';
import {
DeptSearchType,
UserInfoSS,
@ -74,6 +73,7 @@ import {
MessageWriteDialogData
} from '../../dialogs/message/message-write.dialog.component';
import { environment } from '../../../../../environments/environment';
import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'app-layout-chat-left-sidenav-group',
@ -125,7 +125,7 @@ export class GroupComponent implements OnInit, OnDestroy {
private sessionStorageService: SessionStorageService,
private dialogService: DialogService,
private queryProtocolService: QueryProtocolService,
private statusProtocolService: StatusProtocolService,
private translateService: TranslateService,
private logger: NGXLogger
) {
this.environmentsInfo = this.sessionStorageService.get<EnvironmentsInfo>(
@ -506,8 +506,16 @@ export class GroupComponent implements OnInit, OnDestroy {
>(ConfirmDialogComponent, {
width: '360px',
data: {
title: 'Delete Member in Group',
html: `[${userInfo.name} ${userInfo.grade}]를 [${group.name}]그룹에서 삭제하시겠습니까?`
title: this.translateService.instant(
'group.removeBuddyFromGroup'
),
html: this.translateService.instant(
'group.confirmRemoveBuddyFromGroupInContextMenu',
{
target: `${userInfo.name} ${userInfo.grade}`,
targetGroup: `${group.name}`
}
)
}
});
@ -533,7 +541,7 @@ export class GroupComponent implements OnInit, OnDestroy {
>(SelectGroupDialogComponent, {
width: '600px',
data: {
title: 'Group Select'
title: this.translateService.instant('group.selectTargetGroup')
}
});
@ -572,7 +580,7 @@ export class GroupComponent implements OnInit, OnDestroy {
>(SelectGroupDialogComponent, {
width: '600px',
data: {
title: 'Group Select'
title: this.translateService.instant('group.selectTargetGroup')
}
});
@ -707,7 +715,7 @@ export class GroupComponent implements OnInit, OnDestroy {
EditGroupDialogResult
>(EditGroupDialogComponent, {
data: {
title: 'Group Name Edit',
title: this.translateService.instant('group.changeGroupName'),
group
}
});
@ -735,7 +743,7 @@ export class GroupComponent implements OnInit, OnDestroy {
width: '600px',
data: {
type: UserSelectDialogType.EditMember,
title: 'Group Member Edit',
title: this.translateService.instant('group.modifyGroupMember'),
group
}
});
@ -764,8 +772,10 @@ export class GroupComponent implements OnInit, OnDestroy {
>(ConfirmDialogComponent, {
width: '360px',
data: {
title: 'Delete group',
html: `그룹(${group.name})을 삭제하시겠습니까?<br/>그룹 멤버는 해당 그룹에서만 삭제됩니다.`
title: this.translateService.instant('group.removeGroup'),
html: this.translateService.instant('group.confirmRemoveGroup', {
nameOfGroup: `${group.name}`
})
}
});

View File

@ -156,7 +156,7 @@
{{ 'organization.startChat' | translate }}
</button>
</li>
<li>
<li *ngIf="!!authInfo && authInfo.canVideoConference">
<button
mat-flat-button
[disabled]="selectedUserList.length > 0 ? 'false' : 'true'"

View File

@ -8,11 +8,7 @@ import {
ViewChild,
AfterViewChecked
} from '@angular/core';
import {
ucapAnimations,
DialogService,
TranslateService
} from '@ucap-webmessenger/ui';
import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui';
import { Observable, Subscription, of } from 'rxjs';
import {
DeptInfo,
@ -24,7 +20,8 @@ import {
UserInfoDN,
SSVC_TYPE_QUERY_DEPT_USER_DATA,
SSVC_TYPE_QUERY_DEPT_USER_RES,
DeptUserData
DeptUserData,
AuthResponse
} from '@ucap-webmessenger/protocol-query';
import { UserInfo, GroupDetailData } from '@ucap-webmessenger/protocol-sync';
import { Store, select } from '@ngrx/store';
@ -41,7 +38,8 @@ import {
KEY_LOGIN_INFO,
KEY_VER_INFO,
EnvironmentsInfo,
KEY_ENVIRONMENTS_INFO
KEY_ENVIRONMENTS_INFO,
KEY_AUTH_INFO
} from '@app/types';
import { take, map, tap, delay, catchError } from 'rxjs/operators';
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
@ -65,6 +63,7 @@ import {
SelectedUserListDialogResult,
SelectedUserListDialogData
} from '../../dialogs/organization/selected-user-list.dialog.component';
import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'app-layout-chat-left-sidenav-organization',
@ -144,6 +143,7 @@ export class OrganizationComponent
loginRes: LoginResponse;
sessionVerinfo: VersionInfo2Response;
environmentsInfo: EnvironmentsInfo;
authInfo: AuthResponse;
isShowSearch = false;
searchUserInfos: UserInfoSS[] = [];
@ -166,6 +166,7 @@ export class OrganizationComponent
this.environmentsInfo = this.sessionStorageService.get<EnvironmentsInfo>(
KEY_ENVIRONMENTS_INFO
);
this.authInfo = this.sessionStorageService.get<AuthResponse>(KEY_AUTH_INFO);
}
ngOnInit() {
@ -448,7 +449,7 @@ export class OrganizationComponent
SelectedUserListDialogResult
>(SelectedUserListDialogComponent, {
data: {
title: '선택된 유저',
title: this.translateService.instant('organization.selectedUser'),
selectedUserList: this.selectedUserList
}
});
@ -470,7 +471,7 @@ export class OrganizationComponent
>(SelectGroupDialogComponent, {
width: '600px',
data: {
title: 'Group Select'
title: this.translateService.instant('group.selectTargetGroup')
}
});

View File

@ -271,11 +271,15 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
this.searchEventListProcessing = process;
if (!process && this.isShowSearchArea) {
this.doSearchTextInEvent(this.searchText);
this.snackBarService.open('대화검색을 마쳤습니다.', '확인', {
duration: 3000,
verticalPosition: 'top',
horizontalPosition: 'center'
});
this.snackBarService.open(
this.translateService.instant('chat.searchEventByTextEnd'),
this.translateService.instant('common.messages.confirm'),
{
duration: 3000,
verticalPosition: 'top',
horizontalPosition: 'center'
}
);
}
})
)
@ -580,7 +584,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
info.sentMessageJson || info.sentMessage
);
this.snackBarPreviewEvent = this.snackBarService.open(message, 'GO', {
this.snackBarPreviewEvent = this.snackBarService.open(message, this.translateService.instant('common.messages.confirm'), {
// duration: 3000,
verticalPosition: 'bottom',
horizontalPosition: 'center',
@ -1010,7 +1014,8 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
this.snackBarService.open(
this.translateService.instant(
'common.file.errors.failToSave'
)
),
this.translateService.instant('common.file.errors.label')
);
}
})
@ -1018,7 +1023,8 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
this.snackBarService.open(
this.translateService.instant(
'common.file.errors.failToSave'
)
),
this.translateService.instant('common.file.errors.label')
);
});
})
@ -1638,7 +1644,11 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
contents = (event.sentMessageJson as FileEventJson).fileName;
} else if (event.type === EventType.MassText && !!event.sentMessageJson) {
contents = (event.sentMessageJson as MassTextEventJson).content;
} else if ((event.type === EventType.Translation || event.type === EventType.MassTranslation) && !!event.sentMessageJson) {
} else if (
(event.type === EventType.Translation ||
event.type === EventType.MassTranslation) &&
!!event.sentMessageJson
) {
contents = (event.sentMessageJson as TranslationEventJson).original;
contents += (event.sentMessageJson as TranslationEventJson).translation;
}

View File

@ -250,7 +250,8 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
this.snackBarService.open(
this.translateService.instant(
'common.file.errors.failToSave'
)
),
this.translateService.instant('common.file.errors.label')
);
}
})
@ -258,7 +259,8 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
this.snackBarService.open(
this.translateService.instant(
'common.file.errors.failToSave'
)
),
this.translateService.instant('common.file.errors.label')
);
});
})

View File

@ -294,7 +294,8 @@ export class FileBoxComponent implements OnInit, OnDestroy {
this.snackBarService.open(
this.translateService.instant(
'common.file.errors.failToSave'
)
),
this.translateService.instant('common.file.errors.label')
);
}
})
@ -302,7 +303,8 @@ export class FileBoxComponent implements OnInit, OnDestroy {
this.snackBarService.open(
this.translateService.instant(
'common.file.errors.failToSave'
)
),
this.translateService.instant('common.file.errors.label')
);
});
})

View File

@ -7,6 +7,7 @@
[isBuddy]="isBuddy"
[isFavorit]="isFavorit"
[openProfileOptions]="data.openProfileOptions"
[authInfo]="authInfo"
(openChat)="onClickChat($event)"
(sendMessage)="onClickSendMessage($event)"
(sendCall)="onClickSendClickToCall($event)"

View File

@ -1,6 +1,6 @@
import { Component, OnInit, Inject, ViewChild, OnDestroy } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { KEY_LOGIN_RES_INFO, KEY_VER_INFO } from '@app/types';
import { KEY_LOGIN_RES_INFO, KEY_VER_INFO, KEY_AUTH_INFO } from '@app/types';
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
import { Store, select } from '@ngrx/store';
@ -13,7 +13,8 @@ import { UserInfo, GroupDetailData } from '@ucap-webmessenger/protocol-sync';
import {
UserInfoSS,
UserInfoF,
UserInfoDN
UserInfoDN,
AuthResponse
} from '@ucap-webmessenger/protocol-query';
import {
DialogService,
@ -71,6 +72,7 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
loginRes: LoginResponse;
sessionVerinfo: VersionInfo2Response;
environmentsInfo: EnvironmentsInfo;
authInfo: AuthResponse;
isMe: boolean;
isBuddy: boolean;
@ -101,6 +103,7 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
this.environmentsInfo = this.sessionStorageService.get<EnvironmentsInfo>(
KEY_ENVIRONMENTS_INFO
);
this.authInfo = this.sessionStorageService.get<AuthResponse>(KEY_AUTH_INFO);
this.userInfo = data.userInfo;

View File

@ -146,76 +146,6 @@
*ngIf="(!!weblink && weblink.length > 0) || (updateInfo$ | async)"
class="stroke-bar"
></span>
<!--S[삭제예정] 마이프로필 설정을 이동
<button
mat-icon-button
class="button app-layout-native-title-bar-setting"
matTooltip="공지사항"
(click)="onClickNotice()"
>
<svg class="svg-icon" viewBox="0 0 24 24" fill="currentColor">
<path
d="M22.13,8.91h-1.94V1.56c0-0.31-0.18-0.58-0.47-0.7c-0.28-0.12-0.61-0.05-0.82,0.16c-3.35,3.35-6.25,4.95-8.09,5.7
C8.82,7.54,7.61,7.56,7.6,7.56H1.87c-0.42,0-0.76,0.34-0.76,0.76v6.76c0,0.42,0.34,0.76,0.76,0.76h0.77l2.86,6.9
c0.12,0.28,0.39,0.47,0.7,0.47h4.19c0,0,0,0,0,0c0.42,0,0.76-0.34,0.76-0.76c0-0.12-0.03-0.23-0.08-0.33l-2.55-6.16
c1.69,0.33,5.57,1.6,10.38,6.42c0.14,0.14,0.34,0.22,0.53,0.22c0,0,0.01,0,0.01,0c0.41-0.01,0.74-0.34,0.74-0.76
c0-0.02,0-0.03,0-0.05l0-7.31h1.94c0.42,0,0.76-0.34,0.76-0.76V9.67C22.88,9.25,22.54,8.91,22.13,8.91z M2.63,9.07h4.22v5.25H2.63
V9.07z M6.7,21.68l-2.35-5.67h2.55l2.35,5.67H6.7z M8.36,14.39V9c1.57-0.24,5.45-1.26,10.31-5.68v6.34v0v4.05c0,0,0,0,0,0l0,6.34
C13.81,15.65,9.93,14.63,8.36,14.39z M21.37,12.97h-1.19v-2.54h1.19V12.97z"
/>
</svg>
</button>
<button
mat-icon-button
class="button app-layout-native-title-bar-setting"
matTooltip="환경설정"
(click)="onClickSettings()"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="18"
height="18"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="butt"
stroke-linejoin="round"
matTooltip="환경설정"
>
<circle cx="12" cy="12" r="3"></circle>
<path
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"
></path>
</svg>
</button>
<button
mat-icon-button
class="button app-layout-native-title-bar-logout"
matTooltip="로그아웃"
(click)="onClickLogout()"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="18"
height="18"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="butt"
stroke-linejoin="round"
matTooltip="로그아웃"
class="stroke-warn-color"
>
<path
d="M10 3H6a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h4M16 17l5-5-5-5M19.8 12H9"
/>
</svg>
</button>
E[삭제예정] 마이프로필 설정을 이동-->
</div>
<ucap-profile-my-profile-widget
[profileImageRoot]="sessionVerinfo.profileRoot"

View File

@ -28,7 +28,8 @@ import {
KEY_LOGIN_INFO,
EnvironmentsInfo,
KEY_ENVIRONMENTS_INFO,
KEY_URL_INFO
KEY_URL_INFO,
KEY_AUTH_INFO
} from '@app/types';
import { InnerProtocolService } from '@ucap-webmessenger/protocol-inner';
import {
@ -39,7 +40,10 @@ import {
import * as AuthenticationStore from '@app/store/account/authentication';
import { NGXLogger } from 'ngx-logger';
import { QueryProtocolService } from '@ucap-webmessenger/protocol-query';
import {
QueryProtocolService,
AuthResponse
} from '@ucap-webmessenger/protocol-query';
import { OptionProtocolService } from '@ucap-webmessenger/protocol-option';
import { TranslateService as UCapTranslateService } from '@ucap-webmessenger/ui';
@ -203,6 +207,11 @@ export class AppMessengerResolver implements Resolve<void> {
this.store.dispatch(
OptionStore.regViewSuccess({ res: regViewRes })
);
this.sessionStorageService.set<AuthResponse>(KEY_AUTH_INFO, {
...authRes
});
this.store.dispatch(QueryStore.authSuccess({ res: authRes }));
this.store.dispatch(

View File

@ -0,0 +1 @@
export const KEY_AUTH_INFO = 'ucap::AUTH_INFO';

View File

@ -1,3 +1,4 @@
export * from './auth-info.type';
export * from './environment.type';
export * from './login-info.type';
export * from './logout-info.type';

View File

@ -137,6 +137,8 @@
"confirmAddNewWith": "Do you want to add a new ({{nameOfGroup}}) group?",
"confirmAddNewWithout": "Do you want to add a new group?<br/>Created as an empty group.",
"confirmRemoveBuddyFromGroup": "Do you want to remove [{{target}}] from group?<br/>Deleting it from your profile will remove it from all groups.",
"confirmRemoveBuddyFromGroupInContextMenu": "Do you want to remove [{{target}}] from [{{targetGroup}}] group?",
"confirmRemoveGroup": "Are you sure you want to delete the group {{nameOfGroup}}?<br/>Group members will only be deleted from that group.",
"errors": {
"label": "Group errors",
"requireName": "Group name is required."
@ -148,6 +150,7 @@
"send": "Send",
"searchRoomByName": "Search by room name",
"searchEventByText": "Search by chat",
"searchEventByTextEnd": "Complate Search by chat",
"nameOfRoom": "Name of chat room",
"scopeOfChangeNameOfRoom": "Scope of Changing",
"newTimerChat": "New Timer Chat",
@ -228,7 +231,8 @@
"makeExtensionCall": "Make extension call",
"makeMobileCall": "Make mobile call",
"sendMessage": "Send message",
"sendSMS": "Send SMS"
"sendSMS": "Send SMS",
"selectedUser": "Selected User"
},
"message": {
"label": "Message",

View File

@ -137,6 +137,8 @@
"confirmAddNewWith": "새로운 그룹({{nameOfGroup}})을 추가하시겠습니까?",
"confirmAddNewWithout": "새로운 그룹을 추가하시겠습니까?<br/>빈 그룹으로 생성됩니다.",
"confirmRemoveBuddyFromGroup": "[{{target}}]를 그룹에서 삭제하시겠습니까?<br/>프로필에서 삭제하면 모든 그룹에서 삭제됩니다.",
"confirmRemoveBuddyFromGroupInContextMenu": "[{{target}}]를 [{{targetGroup}}]그룹에서 삭제하시겠습니까?",
"confirmRemoveGroup": "그룹({{nameOfGroup}})을 삭제하시겠습니까?<br/>그룹 멤버는 해당 그룹에서만 삭제됩니다.",
"errors": {
"label": "그룹 에러",
"requireName": "그룹명은 필수입력입니다."
@ -148,6 +150,7 @@
"send": "보내기",
"searchRoomByName": "대화방 이름 검색",
"searchEventByText": "대화 내용 검색",
"searchEventByTextEnd": "대화 검색을 마쳤습니다.",
"nameOfRoom": "대화방 이름",
"scopeOfChangeNameOfRoom": "변경 범위",
"newTimerChat": "새로운 타이머 대화",
@ -228,7 +231,8 @@
"makeExtensionCall": "내선번호 전화걸기",
"makeMobileCall": "모바일 전화걸기",
"sendMessage": "쪽지 보내기",
"sendSMS": "SMS 보내기"
"sendSMS": "SMS 보내기",
"selectedUser": "선택된 유저"
},
"message": {
"label": "쪽지",

View File

@ -328,7 +328,10 @@
<span class="button-text">{{ 'profile.fieldSMS' | translate }}</span>
</div>
<div class="button-text-item" *ngIf="!isMe">
<div
class="button-text-item"
*ngIf="!isMe && !!authInfo && authInfo.canVideoConference"
>
<button
mat-mini-fab
class="mat-elevation-z bg-accent-darkest"

View File

@ -9,7 +9,7 @@ import {
Inject
} from '@angular/core';
import { UserInfoSS } from '@ucap-webmessenger/protocol-query';
import { UserInfoSS, AuthResponse } from '@ucap-webmessenger/protocol-query';
import { OpenProfileOptions } from '@ucap-webmessenger/protocol-buddy';
import { FileUploadItem } from '@ucap-webmessenger/api';
import { FormControl } from '@angular/forms';
@ -40,6 +40,8 @@ export class ProfileComponent implements OnInit {
myMadn?: string;
@Input()
openProfileOptions?: OpenProfileOptions;
@Input()
authInfo: AuthResponse;
@Output()
openChat = new EventEmitter<UserInfoSS>();