This commit is contained in:
khk 2020-01-08 15:43:12 +09:00
commit 12143b038f
61 changed files with 1616 additions and 1171 deletions

View File

@ -5,7 +5,6 @@ import {
APIEncoder, APIEncoder,
APIDecoder, APIDecoder,
ParameterUtil, ParameterUtil,
JsonAnalization,
StatusCode StatusCode
} from '@ucap-webmessenger/api'; } from '@ucap-webmessenger/api';
@ -51,20 +50,19 @@ export const decodeFileTalkShare: APIDecoder<FileTalkShareResponse> = (
res: any res: any
) => { ) => {
try { try {
const json = JsonAnalization.receiveAnalization(res);
return { return {
statusCode: json.StatusCode, statusCode: res.StatusCode,
roomSeq: json.RoomID, roomSeq: res.RoomID,
fileName: json.FileName, fileName: res.FileName,
fileExt: json.FileExt, fileExt: res.FileExt,
fileType: json.FileType, fileType: res.FileType,
thumbnailUrl: json.ThumbURL, thumbnailUrl: res.ThumbURL,
attachmentSeq: json.AttSEQ, attachmentSeq: res.AttSEQ,
attachmentSize: json.AttSize, attachmentSize: res.AttSize,
attachmentRegDate: json.AttRegDate, attachmentRegDate: res.AttRegDate,
companyCode: json.CompanyCode, companyCode: res.CompanyCode,
synapKey: json.SynapKey, synapKey: res.SynapKey,
returnJson: res returnJson: JSON.stringify(res)
} as FileTalkShareResponse; } as FileTalkShareResponse;
} catch (e) { } catch (e) {
return { return {

View File

@ -5,9 +5,11 @@ export * from './lib/apis/del';
export * from './lib/apis/detail'; export * from './lib/apis/detail';
export * from './lib/apis/edit-reservation-ex'; export * from './lib/apis/edit-reservation-ex';
export * from './lib/apis/my-message'; export * from './lib/apis/my-message';
export * from './lib/apis/notice';
export * from './lib/apis/retrieve'; export * from './lib/apis/retrieve';
export * from './lib/apis/send-copy'; export * from './lib/apis/send-copy';
export * from './lib/apis/send'; export * from './lib/apis/send';
export * from './lib/apis/unread-count';
export * from './lib/services/message-api.service'; export * from './lib/services/message-api.service';

View File

@ -98,33 +98,33 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
.saveFile(buffer, this.fileInfo.fileName, mimeType) .saveFile(buffer, this.fileInfo.fileName, mimeType)
.then(result => { .then(result => {
if (!!result) { if (!!result) {
this.translateService this.snackBarService.open(
.get('common.file.results.savedToPath', { this.translateService.instant(
'common.file.results.savedToPath',
{
path: result path: result
}) }
.pipe(take(1)) ),
.subscribe(v => { '',
this.snackBarService.open(v, '', { {
duration: 3000, duration: 3000,
verticalPosition: 'bottom' verticalPosition: 'bottom'
}); }
}); );
} else { } else {
this.translateService this.snackBarService.open(
.get('common.file.errors.failToSave') this.translateService.instant(
.pipe(take(1)) 'common.file.errors.failToSave'
.subscribe(v => { )
this.snackBarService.open(v); );
});
} }
}) })
.catch(reason => { .catch(reason => {
this.translateService this.snackBarService.open(
.get('common.file.errors.failToSave') this.translateService.instant(
.pipe(take(1)) 'common.file.errors.failToSave'
.subscribe(v => { )
this.snackBarService.open(v); );
});
}); });
}) })
.catch(reason => { .catch(reason => {

View File

@ -166,11 +166,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
this.logger.debug('-----------------------LeftSideComponent ngOnDestroy'); this.logger.debug('-----------------------LeftSideComponent ngOnDestroy');
} }
onClickNewChat(type: string = 'NORMAL') { async onClickNewChat(type: string = 'NORMAL') {
this.translateService
.get(['chat.newTimerChat', 'chat.newChat'])
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
CreateChatDialogComponent, CreateChatDialogComponent,
CreateChatDialogData, CreateChatDialogData,
@ -180,7 +176,9 @@ export class LeftSideComponent implements OnInit, OnDestroy {
data: { data: {
type: UserSelectDialogType.NewChat, type: UserSelectDialogType.NewChat,
title: title:
type === 'TIMER' ? vs['chat.newTimerChat'] : vs['chat.newChat'] type === 'TIMER'
? this.translateService.instant('chat.newTimerChat')
: this.translateService.instant('chat.newChat')
} }
}); });
@ -190,9 +188,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
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( this.store.dispatch(ChatStore.openRoom({ userSeqList: userSeqs }));
ChatStore.openRoom({ userSeqList: userSeqs })
);
} else if (type === 'TIMER') { } else if (type === 'TIMER') {
this.store.dispatch( this.store.dispatch(
ChatStore.openRoom({ userSeqList: userSeqs, isTimeRoom: true }) ChatStore.openRoom({ userSeqList: userSeqs, isTimeRoom: true })
@ -200,14 +196,9 @@ export class LeftSideComponent implements OnInit, OnDestroy {
} }
} }
} }
});
} }
onClickNewGroupAndMember() { async onClickNewGroupAndMember() {
this.translateService
.get(['group.addNew'])
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
CreateChatDialogComponent, CreateChatDialogComponent,
CreateChatDialogData, CreateChatDialogData,
@ -216,7 +207,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
width: '600px', width: '600px',
data: { data: {
type: UserSelectDialogType.NewGroup, type: UserSelectDialogType.NewGroup,
title: vs['group.addNew'] title: this.translateService.instant('group.addNew')
} }
}); });
@ -237,7 +228,6 @@ export class LeftSideComponent implements OnInit, OnDestroy {
); );
} }
} }
});
} }
async onClickNewMessage() { async onClickNewMessage() {
@ -306,15 +296,6 @@ export class LeftSideComponent implements OnInit, OnDestroy {
} }
setFabInitial(type: string) { setFabInitial(type: string) {
this.translateService
.get([
'group.addNew',
'chat.newChat',
'chat.newTimerChat',
'message.newMessage'
])
.pipe(take(1))
.subscribe(async vs => {
switch (type) { switch (type) {
case MainMenu.Group: case MainMenu.Group:
{ {
@ -322,7 +303,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
this.fabButtons = [ this.fabButtons = [
{ {
icon: 'add', icon: 'add',
tooltip: vs['group.addNew'], tooltip: this.translateService.instant('group.addNew'),
divisionType: 'GROUP_NEW_ADD' divisionType: 'GROUP_NEW_ADD'
} }
]; ];
@ -334,7 +315,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
this.fabButtons = [ this.fabButtons = [
{ {
icon: 'chat', icon: 'chat',
tooltip: vs['chat.newChat'], tooltip: this.translateService.instant('chat.newChat'),
divisionType: 'CAHT_NEW_ADD' divisionType: 'CAHT_NEW_ADD'
} }
]; ];
@ -342,7 +323,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
if (environment.productConfig.CommonSetting.useTimerRoom) { if (environment.productConfig.CommonSetting.useTimerRoom) {
this.fabButtons.push({ this.fabButtons.push({
icon: 'timer', icon: 'timer',
tooltip: vs['chat.newTimerChat'], tooltip: this.translateService.instant('chat.newTimerChat'),
divisionType: 'CHAT_NEW_TIMER_ADD' divisionType: 'CHAT_NEW_TIMER_ADD'
}); });
} }
@ -359,7 +340,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
this.fabButtons = [ this.fabButtons = [
{ {
icon: 'add', icon: 'add',
tooltip: vs['message.newMessage'], tooltip: this.translateService.instant('message.new'),
divisionType: 'MESSAGE_NEW' divisionType: 'MESSAGE_NEW'
} }
]; ];
@ -375,7 +356,6 @@ export class LeftSideComponent implements OnInit, OnDestroy {
this.fabButtonShow = false; this.fabButtonShow = false;
} }
} }
});
} }
onCheckAllUser(params: { onCheckAllUser(params: {

View File

@ -253,7 +253,7 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked {
this.chatContextMenuTrigger.openMenu(); this.chatContextMenuTrigger.openMenu();
} }
onClickContextMenu(type: string, roomInfo: RoomInfo) { async onClickContextMenu(type: string, roomInfo: RoomInfo) {
switch (type) { switch (type) {
case 'SELECT_ROOM': case 'SELECT_ROOM':
this.store.dispatch( this.store.dispatch(
@ -265,27 +265,20 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked {
break; break;
case 'EXIT_ROOM': case 'EXIT_ROOM':
{ {
this.translateService
.get(['chat.exitFromRoom', 'chat.confirmExitFromRoom'])
.pipe(take(1))
.subscribe(async values => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
ConfirmDialogComponent, ConfirmDialogComponent,
ConfirmDialogData, ConfirmDialogData,
ConfirmDialogResult ConfirmDialogResult
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
data: { data: {
title: values['chat.exitFromRoom'], title: this.translateService.instant('chat.exitFromRoom'),
html: values['chat.confirmExitFromRoom'] html: this.translateService.instant('chat.confirmExitFromRoom')
} }
}); });
if (!!result && !!result.choice && result.choice) { if (!!result && !!result.choice && result.choice) {
this.store.dispatch( this.store.dispatch(RoomStore.exit({ roomSeq: roomInfo.roomSeq }));
RoomStore.exit({ roomSeq: roomInfo.roomSeq })
);
} }
});
} }
break; break;
} }

View File

@ -56,7 +56,7 @@
{{ 'common.searchResult' | translate {{ 'common.searchResult' | translate
}}<span class="text-accent-color" }}<span class="text-accent-color"
>({{ searchUserInfos.length >({{ searchUserInfos.length
}}{{ 'common.howManyPersons' | translate }})</span }}{{ 'common.units.persons' | translate }})</span
> >
</div> </div>
<ucap-profile-user-list-item <ucap-profile-user-list-item

View File

@ -144,7 +144,9 @@ export class GroupComponent implements OnInit, OnDestroy {
.pipe( .pipe(
select(AppStore.AccountSelector.AuthenticationSelector.loginRes), select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
tap(loginRes => { tap(loginRes => {
if (!!loginRes) {
this.loginRes = loginRes; this.loginRes = loginRes;
}
}) })
) )
.subscribe(); .subscribe();

View File

@ -39,7 +39,7 @@
{{ 'common.searchResult' | translate {{ 'common.searchResult' | translate
}}<span class="text-accent-color" }}<span class="text-accent-color"
>({{ searchUserInfos.length }} >({{ searchUserInfos.length }}
{{ 'common.howManyPersons' | translate }})</span {{ 'common.units.persons' | translate }})</span
> >
</ng-container> </ng-container>
</dt> </dt>

View File

@ -116,6 +116,8 @@ export class OrganizationComponent
@ViewChild('cvsvDeptUser', { static: false }) @ViewChild('cvsvDeptUser', { static: false })
cvsvDeptUser: CdkVirtualScrollViewport; cvsvDeptUser: CdkVirtualScrollViewport;
@ViewChild('cvsvDeptSearchUser', { static: false })
cvsvDeptSearchUser: CdkVirtualScrollViewport;
@ViewChild(PerfectScrollbarDirective, { static: false }) @ViewChild(PerfectScrollbarDirective, { static: false })
psDirectiveRef?: PerfectScrollbarDirective; psDirectiveRef?: PerfectScrollbarDirective;
@ -290,15 +292,21 @@ export class OrganizationComponent
this.selectedDepartmentProcessing = false; this.selectedDepartmentProcessing = false;
// 검색 결과에 따른 프레즌스 조회. // 검색 결과에 따른 프레즌스 조회.
const userSeqList: number[] = []; const userSeqList: number[] = [];
this.searchUserInfos.map(user => userSeqList.push(user.seq));
if (userSeqList.length > 0) { if (userSeqList.length > 0) {
this.store.dispatch( this.store.dispatch(
StatusStore.bulkInfo({ StatusStore.bulkInfo({
divCd: 'orgSrch', divCd: 'orgSrch',
userSeqs: userSeqList userSeqs: this.searchUserInfos.map(user => user.seq)
}) })
); );
} }
if (!!this.cvsvDeptSearchUser) {
this.cvsvDeptSearchUser.scrollToOffset(0);
}
if (!!this.psDirectiveRef) {
this.psDirectiveRef.update();
}
} }
break; break;
} }

View File

@ -119,6 +119,8 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
openProfile = new EventEmitter<{ openProfile = new EventEmitter<{
userSeq: number; userSeq: number;
}>(); }>();
@Output()
closeRightDrawer = new EventEmitter();
@ViewChild('chatForm', { static: false }) @ViewChild('chatForm', { static: false })
private chatForm: UCapUiChatFormComponent; private chatForm: UCapUiChatFormComponent;
@ -410,6 +412,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
* . * .
*/ */
clearView() { clearView() {
// Right Drawer closed..
this.closeRightDrawer.emit();
// Sticker Selector Clear.. // Sticker Selector Clear..
this.isShowStickerSelector = false; this.isShowStickerSelector = false;
this.selectedSticker = undefined; this.selectedSticker = undefined;
@ -646,15 +651,11 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
} }
/** Send Event */ /** Send Event */
onSendMessage(message: string) { async onSendMessage(message: string) {
this.setEventMoreInit(); this.setEventMoreInit();
if (!this.selectedSticker) { if (!this.selectedSticker) {
if (!message || message.trim().length === 0) { if (!message || message.trim().length === 0) {
this.translateService
.get(['chat.errors.label', 'chat.errors.inputChatMessage'])
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
AlertDialogComponent, AlertDialogComponent,
AlertDialogData, AlertDialogData,
@ -662,12 +663,12 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
>(AlertDialogComponent, { >(AlertDialogComponent, {
width: '360px', width: '360px',
data: { data: {
title: vs['chat.errors.label'], title: this.translateService.instant('chat.errors.label'),
message: vs['chat.errors.inputChatMessage'] message: this.translateService.instant(
'chat.errors.inputChatMessage'
)
} }
}); });
});
return; return;
} }
} }
@ -769,12 +770,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
message.trim().length > message.trim().length >
environment.productConfig.CommonSetting.masstextLength environment.productConfig.CommonSetting.masstextLength
) { ) {
this.translateService
.get(['chat.errors.label', 'chat.errors.maxLengthOfMassText'], {
maxLength: environment.productConfig.CommonSetting.masstextLength
})
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
AlertDialogComponent, AlertDialogComponent,
AlertDialogData, AlertDialogData,
@ -782,10 +777,15 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
>(AlertDialogComponent, { >(AlertDialogComponent, {
width: '360px', width: '360px',
data: { data: {
title: vs['chat.errors.label'], title: this.translateService.instant('chat.errors.label'),
message: vs['chat.errors.maxLengthOfMassText'] message: this.translateService.instant(
'chat.errors.maxLengthOfMassText',
{
maxLength:
environment.productConfig.CommonSetting.masstextLength
}
)
} }
});
}); });
return; return;
} }
@ -902,13 +902,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
}) { }) {
this.logger.debug('fileSave', value); this.logger.debug('fileSave', value);
if (value.type === 'saveAs') { if (value.type === 'saveAs') {
this.translateService
.get([
'common.file.errors.label',
'common.file.errors.failToSpecifyPath'
])
.pipe(take(1))
.subscribe(vs => {
this.nativeService this.nativeService
.selectSaveFilePath(value.fileInfo.fileName) .selectSaveFilePath(value.fileInfo.fileName)
.then(result => { .then(result => {
@ -916,18 +909,21 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
this.saveFile(value, result); this.saveFile(value, result);
} else { } else {
this.snackBarService.open( this.snackBarService.open(
vs['common.file.errors.failToSpecifyPath'], this.translateService.instant(
vs['common.file.errors.label'] 'common.file.errors.failToSpecifyPath'
),
this.translateService.instant('common.file.errors.label')
); );
} }
}) })
.catch(reason => { .catch(reason => {
this.snackBarService.open( this.snackBarService.open(
vs['common.file.errors.failToSpecifyPath'], this.translateService.instant(
vs['common.file.errors.label'] 'common.file.errors.failToSpecifyPath'
),
this.translateService.instant('common.file.errors.label')
); );
}); });
});
} else { } else {
this.saveFile(value); this.saveFile(value);
} }
@ -976,33 +972,33 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
.saveFile(buffer, value.fileInfo.fileName, mimeType, savePath) .saveFile(buffer, value.fileInfo.fileName, mimeType, savePath)
.then(result => { .then(result => {
if (!!result) { if (!!result) {
this.translateService this.snackBarService.open(
.get('common.file.results.savedToPath', { this.translateService.instant(
'common.file.results.savedToPath',
{
path: result path: result
}) }
.pipe(take(1)) ),
.subscribe(v => { '',
this.snackBarService.open(v, '', { {
duration: 3000, duration: 3000,
verticalPosition: 'bottom' verticalPosition: 'bottom'
}); }
}); );
} else { } else {
this.translateService this.snackBarService.open(
.get('common.file.errors.failToSave') this.translateService.instant(
.pipe(take(1)) 'common.file.errors.failToSave'
.subscribe(v => { )
this.snackBarService.open(v); );
});
} }
}) })
.catch(reason => { .catch(reason => {
this.translateService this.snackBarService.open(
.get('common.file.errors.failToSave') this.translateService.instant(
.pipe(take(1)) 'common.file.errors.failToSave'
.subscribe(v => { )
this.snackBarService.open(v); );
});
}); });
}) })
.catch(reason => { .catch(reason => {
@ -1100,19 +1096,10 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
}, },
error => { error => {
this.logger.debug('onFileSelected error', error); this.logger.debug('onFileSelected error', error);
this.translateService
.get([
'common.file.errors.label',
'common.file.errors.failToUpload'
])
.pipe(take(1))
.subscribe(vs => {
this.snackBarService.open( this.snackBarService.open(
vs['common.file.errors.failToUpload'], this.translateService.instant('common.file.errors.failToUpload'),
vs['common.file.errors.label'] this.translateService.instant('common.file.errors.label')
); );
});
}, },
() => { () => {
this.fileUploadQueue.onUploadComplete(); this.fileUploadQueue.onUploadComplete();
@ -1137,7 +1124,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
this.messageContextMenuTrigger.openMenu(); this.messageContextMenuTrigger.openMenu();
} }
onClickMessageContextMenu(menuType: string, message: Info<EventJson>) { async onClickMessageContextMenu(menuType: string, message: Info<EventJson>) {
switch (menuType) { switch (menuType) {
case 'COPY': case 'COPY':
{ {
@ -1149,12 +1136,10 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
(message as Info<string>).sentMessage (message as Info<string>).sentMessage
) )
) { ) {
this.translateService
.get(['common.clipboard.results.copied'])
.pipe(take(1))
.subscribe(async vs => {
this.snackBarService.open( this.snackBarService.open(
vs['common.clipboard.results.copied'], this.translateService.instant(
'common.clipboard.results.copied'
),
'', '',
{ {
duration: 3000, duration: 3000,
@ -1162,7 +1147,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
horizontalPosition: 'center' horizontalPosition: 'center'
} }
); );
});
} }
} }
break; break;
@ -1178,12 +1162,10 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
.pipe(take(1)) .pipe(take(1))
.subscribe(res => { .subscribe(res => {
if (this.clipboardService.copyFromContent(res.content)) { if (this.clipboardService.copyFromContent(res.content)) {
this.translateService
.get(['common.clipboard.results.copied'])
.pipe(take(1))
.subscribe(async vs => {
this.snackBarService.open( this.snackBarService.open(
vs['common.clipboard.results.copied'], this.translateService.instant(
'common.clipboard.results.copied'
),
'', '',
{ {
duration: 3000, duration: 3000,
@ -1191,7 +1173,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
horizontalPosition: 'center' horizontalPosition: 'center'
} }
); );
});
} }
}); });
} }
@ -1204,10 +1185,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
break; break;
case 'REPLAY': case 'REPLAY':
{ {
this.translateService
.get(['chat.forwardEventTo'])
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
CreateChatDialogComponent, CreateChatDialogComponent,
CreateChatDialogData, CreateChatDialogData,
@ -1216,7 +1193,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
width: '600px', width: '600px',
data: { data: {
type: UserSelectDialogType.MessageForward, type: UserSelectDialogType.MessageForward,
title: vs['chat.forwardEventTo'], title: this.translateService.instant('chat.forwardEventTo'),
ignoreRoom: [this.roomInfo] ignoreRoom: [this.roomInfo]
} }
}); });
@ -1250,7 +1227,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
); );
} }
} }
});
} }
break; break;
case 'REPLAY_TO_ME': case 'REPLAY_TO_ME':
@ -1272,10 +1248,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
break; break;
case 'DELETE': case 'DELETE':
{ {
this.translateService
.get(['chat.removeEvent', 'chat.confirmRemoveEvent'])
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
ConfirmDialogComponent, ConfirmDialogComponent,
ConfirmDialogData, ConfirmDialogData,
@ -1283,8 +1255,8 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
width: '400px', width: '400px',
data: { data: {
title: vs['chat.removeEvent'], title: this.translateService.instant('chat.removeEvent'),
html: vs['chat.confirmRemoveEvent'] html: this.translateService.instant('chat.confirmRemoveEvent')
} }
}); });
@ -1296,15 +1268,10 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
}) })
); );
} }
});
} }
break; break;
case 'RECALL': case 'RECALL':
{ {
this.translateService
.get(['chat.recallEvent', 'chat.confirmRecallEvent'])
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
ConfirmDialogComponent, ConfirmDialogComponent,
ConfirmDialogData, ConfirmDialogData,
@ -1312,8 +1279,8 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
width: '400px', width: '400px',
data: { data: {
title: vs['chat.recallEvent'], title: this.translateService.instant('chat.recallEvent'),
html: vs['chat.confirmRecallEvent'] html: this.translateService.instant('chat.confirmRecallEvent')
} }
}); });
@ -1326,7 +1293,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
}) })
); );
} }
});
} }
break; break;
default: default:
@ -1334,7 +1300,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
} }
} }
onClickContextMenu(menuType: string) { async onClickContextMenu(menuType: string) {
switch (menuType) { switch (menuType) {
case 'OPEN_ALBUM_LIST': case 'OPEN_ALBUM_LIST':
{ {
@ -1370,10 +1336,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
break; break;
case 'ADD_MEMBER': case 'ADD_MEMBER':
{ {
this.translateService
.get(['chat.modifyRoomMember'])
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
CreateChatDialogComponent, CreateChatDialogComponent,
CreateChatDialogData, CreateChatDialogData,
@ -1382,10 +1344,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
width: '600px', width: '600px',
data: { data: {
type: UserSelectDialogType.EditChatMember, type: UserSelectDialogType.EditChatMember,
title: vs['chat.modifyRoomMember'], title: this.translateService.instant('chat.modifyRoomMember'),
curRoomUser: this.userInfoList.filter( curRoomUser: this.userInfoList.filter(
user => user => user.seq !== this.loginRes.userSeq && user.isJoinRoom
user.seq !== this.loginRes.userSeq && user.isJoinRoom
) )
} }
}); });
@ -1421,15 +1382,10 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
); );
} }
} }
});
} }
break; break;
case 'ADD_GROUP': case 'ADD_GROUP':
{ {
this.translateService
.get(['chat.addMemberToGroup'])
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
SelectGroupDialogComponent, SelectGroupDialogComponent,
SelectGroupDialogData, SelectGroupDialogData,
@ -1437,7 +1393,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
>(SelectGroupDialogComponent, { >(SelectGroupDialogComponent, {
width: '600px', width: '600px',
data: { data: {
title: vs['chat.addMemberToGroup'] title: this.translateService.instant('chat.addMemberToGroup')
} }
}); });
@ -1460,15 +1416,10 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
); );
} }
} }
});
} }
break; break;
case 'EDIT_ROOM': case 'EDIT_ROOM':
{ {
this.translateService
.get(['chat.settingsOfRoom'])
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
EditChatRoomDialogComponent, EditChatRoomDialogComponent,
EditChatRoomDialogData, EditChatRoomDialogData,
@ -1476,15 +1427,14 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
>(EditChatRoomDialogComponent, { >(EditChatRoomDialogComponent, {
width: '600px', width: '600px',
data: { data: {
title: vs['chat.settingsOfRoom'], title: this.translateService.instant('chat.settingsOfRoom'),
roomInfo: this.roomInfo roomInfo: this.roomInfo
} }
}); });
if (!!result && !!result.choice && result.choice) { if (!!result && !!result.choice && result.choice) {
const roomName: string = result.roomName; const roomName: string = result.roomName;
const roomNameChangeTarget: string = const roomNameChangeTarget: string = result.roomNameChangeTarget;
result.roomNameChangeTarget;
const timeRoomInterval: number = result.timeRoomInterval; const timeRoomInterval: number = result.timeRoomInterval;
const roomInfo: RoomInfo = result.roomInfo; const roomInfo: RoomInfo = result.roomInfo;
@ -1496,9 +1446,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
roomName, roomName,
receiveAlarm: roomInfo.receiveAlarm, receiveAlarm: roomInfo.receiveAlarm,
syncAll: syncAll:
roomNameChangeTarget.toUpperCase() === 'ALL' roomNameChangeTarget.toUpperCase() === 'ALL' ? true : false
? true
: false
} }
}) })
); );
@ -1516,7 +1464,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
); );
} }
} }
});
} }
break; break;
case 'CLOSE_ROOM': case 'CLOSE_ROOM':

View File

@ -100,6 +100,7 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
tap(([roomInfo, fileInfoList, fileInfoCheckList]) => { tap(([roomInfo, fileInfoList, fileInfoCheckList]) => {
this.fileInfoList = fileInfoList.filter(fileInfo => { this.fileInfoList = fileInfoList.filter(fileInfo => {
if ( if (
!!roomInfo &&
fileInfo.roomSeq === roomInfo.roomSeq && fileInfo.roomSeq === roomInfo.roomSeq &&
(fileInfo.type === FileType.Image || (fileInfo.type === FileType.Image ||
fileInfo.type === FileType.Video) fileInfo.type === FileType.Video)
@ -232,33 +233,33 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
.saveFile(buffer, fileInfo.info.name, mimeType) .saveFile(buffer, fileInfo.info.name, mimeType)
.then(result => { .then(result => {
if (!!result) { if (!!result) {
this.translateService this.snackBarService.open(
.get('common.file.results.savedToPath', { this.translateService.instant(
'common.file.results.savedToPath',
{
path: result path: result
}) }
.pipe(take(1)) ),
.subscribe(v => { '',
this.snackBarService.open(v, '', { {
duration: 3000, duration: 3000,
verticalPosition: 'bottom' verticalPosition: 'bottom'
}); }
}); );
} else { } else {
this.translateService this.snackBarService.open(
.get('common.file.errors.failToSave') this.translateService.instant(
.pipe(take(1)) 'common.file.errors.failToSave'
.subscribe(v => { )
this.snackBarService.open(v); );
});
} }
}) })
.catch(reason => { .catch(reason => {
this.translateService this.snackBarService.open(
.get('common.file.errors.failToSave') this.translateService.instant(
.pipe(take(1)) 'common.file.errors.failToSave'
.subscribe(v => { )
this.snackBarService.open(v); );
});
}); });
}) })
.catch(reason => { .catch(reason => {

View File

@ -109,6 +109,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
this.fileInfoList = fileInfoList.filter(fileInfo => { this.fileInfoList = fileInfoList.filter(fileInfo => {
if ( if (
!!roomInfo &&
fileInfo.roomSeq === roomInfo.roomSeq && fileInfo.roomSeq === roomInfo.roomSeq &&
(fileInfo.type === FileType.File || (fileInfo.type === FileType.File ||
fileInfo.type === FileType.Sound) fileInfo.type === FileType.Sound)
@ -276,33 +277,33 @@ export class FileBoxComponent implements OnInit, OnDestroy {
.saveFile(buffer, fileInfo.info.name, mimeType) .saveFile(buffer, fileInfo.info.name, mimeType)
.then(result => { .then(result => {
if (!!result) { if (!!result) {
this.translateService this.snackBarService.open(
.get('common.file.results.savedToPath', { this.translateService.instant(
'common.file.results.savedToPath',
{
path: result path: result
}) }
.pipe(take(1)) ),
.subscribe(v => { '',
this.snackBarService.open(v, '', { {
duration: 3000, duration: 3000,
verticalPosition: 'bottom' verticalPosition: 'bottom'
}); }
}); );
} else { } else {
this.translateService this.snackBarService.open(
.get('common.file.errors.failToSave') this.translateService.instant(
.pipe(take(1)) 'common.file.errors.failToSave'
.subscribe(v => { )
this.snackBarService.open(v); );
});
} }
}) })
.catch(reason => { .catch(reason => {
this.translateService this.snackBarService.open(
.get('common.file.errors.failToSave') this.translateService.instant(
.pipe(take(1)) 'common.file.errors.failToSave'
.subscribe(v => { )
this.snackBarService.open(v); );
});
}); });
}) })
.catch(reason => { .catch(reason => {
@ -352,11 +353,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
); );
} }
onClickForward(fileInfo: FileInfoTotal) { async onClickForward(fileInfo: FileInfoTotal) {
this.translateService
.get('chat.forwardFileTo')
.pipe(take(1))
.subscribe(async v => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
CreateChatDialogComponent, CreateChatDialogComponent,
CreateChatDialogData, CreateChatDialogData,
@ -365,7 +362,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
width: '600px', width: '600px',
data: { data: {
type: UserSelectDialogType.MessageForward, type: UserSelectDialogType.MessageForward,
title: v, title: this.translateService.instant('chat.forwardFileTo'),
ignoreRoom: [this.roomInfo] ignoreRoom: [this.roomInfo]
} }
}); });
@ -396,14 +393,9 @@ export class FileBoxComponent implements OnInit, OnDestroy {
); );
} }
} }
});
} }
onClickDelete(fileInfo: FileInfoTotal) { async onClickDelete(fileInfo: FileInfoTotal) {
this.translateService
.get('chat.confirmDeleteFile')
.pipe(take(1))
.subscribe(async v => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
ConfirmDialogComponent, ConfirmDialogComponent,
ConfirmDialogData, ConfirmDialogData,
@ -412,7 +404,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
width: '400px', width: '400px',
data: { data: {
title: 'Delete', title: 'Delete',
html: v html: this.translateService.instant('chat.confirmDeleteFile')
} }
}); });
@ -429,7 +421,6 @@ export class FileBoxComponent implements OnInit, OnDestroy {
); );
this.onSelectedIndexChange(this.currentTabIndex); this.onSelectedIndexChange(this.currentTabIndex);
} }
});
} }
get fileRetentionPeriodOptions(): DateOptions { get fileRetentionPeriodOptions(): DateOptions {

View File

@ -13,8 +13,11 @@ import { SessionStorageService } from '@ucap-webmessenger/web-storage';
import { DialogService } from '@ucap-webmessenger/ui'; import { DialogService } from '@ucap-webmessenger/ui';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type'; import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
import { MessageApiService, NoticeList } from '@ucap-webmessenger/api-message'; import {
import { RetrieveNoticeRequest } from 'projects/ucap-webmessenger-api-message/src/lib/apis/notice'; MessageApiService,
NoticeList,
RetrieveNoticeRequest
} from '@ucap-webmessenger/api-message';
import { NGXLogger } from 'ngx-logger'; import { NGXLogger } from 'ngx-logger';
import { MatPaginator } from '@angular/material'; import { MatPaginator } from '@angular/material';
import { import {

View File

@ -137,11 +137,7 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
this.openProfile.emit(userSeq); this.openProfile.emit(userSeq);
} }
onClickAddMember() { async onClickAddMember() {
this.translateService
.get('chat.modifyRoomMember')
.pipe(take(1))
.subscribe(async v => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
CreateChatDialogComponent, CreateChatDialogComponent,
CreateChatDialogData, CreateChatDialogData,
@ -150,7 +146,7 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
width: '600px', width: '600px',
data: { data: {
type: UserSelectDialogType.EditChatMember, type: UserSelectDialogType.EditChatMember,
title: v, title: this.translateService.instant('chat.modifyRoomMember'),
curRoomUser: this.userInfoList.filter( curRoomUser: this.userInfoList.filter(
user => user.seq !== this.loginRes.userSeq && user.isJoinRoom user => user.seq !== this.loginRes.userSeq && user.isJoinRoom
) )
@ -185,14 +181,9 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
); );
} }
} }
});
} }
onClickAddGroup() { async onClickAddGroup() {
this.translateService
.get('group.selectTargetGroup')
.pipe(take(1))
.subscribe(async v => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
SelectGroupDialogComponent, SelectGroupDialogComponent,
SelectGroupDialogData, SelectGroupDialogData,
@ -200,7 +191,7 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
>(SelectGroupDialogComponent, { >(SelectGroupDialogComponent, {
width: '600px', width: '600px',
data: { data: {
title: v title: this.translateService.instant('group.selectTargetGroup')
} }
}); });
@ -223,7 +214,6 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
); );
} }
} }
});
} }
onContextMenuRoomUser(event: MouseEvent, buddy: UserInfo) { onContextMenuRoomUser(event: MouseEvent, buddy: UserInfo) {
@ -241,24 +231,20 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
this.roomUserContextMenuTrigger.openMenu(); this.roomUserContextMenuTrigger.openMenu();
} }
onClickContextMenu(type: string, buddy: UserInfo) { async onClickContextMenu(type: string, buddy: UserInfo) {
switch (type) { switch (type) {
case 'FORCING_EXIT': case 'FORCING_EXIT':
{ {
this.translateService
.get(['chat.ejectFromRoom', 'chat.confirmEjectFromRoom'], {
targetMember: buddy.name
})
.pipe(take(1))
.subscribe(async vs => {
const result = await this.dialogService.open< const result = await this.dialogService.open<
ConfirmDialogComponent, ConfirmDialogComponent,
ConfirmDialogData, ConfirmDialogData,
ConfirmDialogResult ConfirmDialogResult
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
data: { data: {
title: vs['chat.ejectFromRoom'], title: this.translateService.instant('chat.ejectFromRoom'),
html: vs['chat.confirmEjectFromRoom'] html: this.translateService.instant('chat.confirmEjectFromRoom', {
targetMember: buddy.name
})
} }
}); });
@ -274,7 +260,6 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
}) })
); );
} }
});
} }
break; break;
} }

View File

@ -1,6 +1,6 @@
<mat-card class="confirm-card mat-elevation-z setting-frame"> <mat-card class="confirm-card mat-elevation-z setting-frame">
<mat-card-header cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle> <mat-card-header cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle>
<mat-card-title>패스워드 변경</mat-card-title> <mat-card-title>{{ 'accounts.changePassword' | translate }}</mat-card-title>
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
<div fxFlex class="setting-tab"> <div fxFlex class="setting-tab">
@ -18,7 +18,7 @@
(click)="onClickChoice(false)" (click)="onClickChoice(false)"
class="mat-primary" class="mat-primary"
> >
취소 {{ 'common.messages.cancel' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -10,7 +10,7 @@
</mat-card-content> </mat-card-content>
<mat-card-actions class="button-farm flex-row"> <mat-card-actions class="button-farm flex-row">
<button mat-stroked-button (click)="onClickConfirm()" class="mat-primary"> <button mat-stroked-button (click)="onClickConfirm()" class="mat-primary">
Confirm {{ 'common.messages.confirm' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -113,7 +113,7 @@
{{ 'common.searchResult' | translate }} {{ 'common.searchResult' | translate }}
<span class="text-accent-color"> <span class="text-accent-color">
({{ searchUserInfos.length ({{ searchUserInfos.length
}}{{ 'common.howManyPersons' | translate }}) }}{{ 'common.units.persons' | translate }})
</span> </span>
</div> </div>
<ucap-profile-user-list-item <ucap-profile-user-list-item
@ -196,7 +196,7 @@
</div> </div>
<span *ngIf="isShowSelectedUserList" <span *ngIf="isShowSelectedUserList"
>{{ selectedUserList.length }} >{{ selectedUserList.length }}
{{ 'common.howManyPersons' | translate }}</span {{ 'common.units.persons' | translate }}</span
> >
</div> </div>
</mat-card-content> </mat-card-content>
@ -206,7 +206,7 @@
(click)="onClickChoice(false)" (click)="onClickChoice(false)"
class="mat-primary" class="mat-primary"
> >
No {{ 'common.messages.no' | translate }}
</button> </button>
<button <button
mat-flat-button mat-flat-button
@ -214,7 +214,7 @@
(click)="onClickChoice(true)" (click)="onClickChoice(true)"
class="mat-primary" class="mat-primary"
> >
Yes {{ 'common.messages.yes' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -15,7 +15,7 @@ import {
} from '@angular/material'; } from '@angular/material';
import { NGXLogger } from 'ngx-logger'; import { NGXLogger } from 'ngx-logger';
import { Observable, combineLatest, Subscription, of } from 'rxjs'; import { Observable, combineLatest, Subscription, of } from 'rxjs';
import { map, tap, catchError } from 'rxjs/operators'; import { map, tap, catchError, take } from 'rxjs/operators';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import * as AppStore from '@app/store'; import * as AppStore from '@app/store';
@ -46,7 +46,8 @@ import {
import { import {
RoomInfo, RoomInfo,
UserInfoShort, UserInfoShort,
UserInfo as RoomUserInfo UserInfo as RoomUserInfo,
RoomType
} from '@ucap-webmessenger/protocol-room'; } from '@ucap-webmessenger/protocol-room';
import { import {
ConfirmDialogComponent, ConfirmDialogComponent,
@ -57,6 +58,7 @@ import {
AlertDialogResult, AlertDialogResult,
AlertDialogData AlertDialogData
} from '@ucap-webmessenger/ui'; } from '@ucap-webmessenger/ui';
import { TranslateService } from '@ngx-translate/core';
export interface CreateChatDialogData { export interface CreateChatDialogData {
type?: string; type?: string;
@ -107,6 +109,7 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
private formBuilder: FormBuilder, private formBuilder: FormBuilder,
private logger: NGXLogger, private logger: NGXLogger,
private dialogService: DialogService, private dialogService: DialogService,
private translateService: TranslateService,
private changeDetectorRef: ChangeDetectorRef private changeDetectorRef: ChangeDetectorRef
) { ) {
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>( this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
@ -545,6 +548,10 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
} }
} }
onToggleRoom(roomInfo: RoomInfo) { onToggleRoom(roomInfo: RoomInfo) {
if (!this.getCheckableRoom(roomInfo)) {
return;
}
if (!!this.selectedRoom) { if (!!this.selectedRoom) {
if (this.selectedRoom.roomSeq === roomInfo.roomSeq) { if (this.selectedRoom.roomSeq === roomInfo.roomSeq) {
this.selectedRoom = null; this.selectedRoom = null;
@ -589,6 +596,16 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
// .length > 0 // .length > 0
// ); // );
// } // }
if (
roomInfo.roomType === RoomType.Bot ||
roomInfo.roomType === RoomType.Allim ||
roomInfo.roomType === RoomType.Link ||
roomInfo.roomType === RoomType.Allim_Elephant ||
roomInfo.roomType === RoomType.Allim_TMS
) {
return false;
}
return true; return true;
} }
getCheckedRoom(roomInfo: RoomInfo) { getCheckedRoom(roomInfo: RoomInfo) {
@ -609,6 +626,12 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
getBtnValid() { getBtnValid() {
if (this.data.type === UserSelectDialogType.NewGroup) { if (this.data.type === UserSelectDialogType.NewGroup) {
return this.inputForm.invalid; return this.inputForm.invalid;
} else if (this.data.type === UserSelectDialogType.MessageForward) {
if (this.selectedUserList.length === 0 && !this.selectedRoom) {
return true;
}
return false;
} else { } else {
return false; return false;
} }
@ -629,8 +652,8 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
AlertDialogResult AlertDialogResult
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: '', title: this.translateService.instant('group.errors.label'),
html: `그룹명은 필수입력입니다.` html: this.translateService.instant('group.errors.requireName')
} }
}); });
@ -638,9 +661,11 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
return; return;
} }
let cfmMsg = `새로운 그룹을 추가하시겠습니까?`; let cfmMsg: string;
if (this.selectedUserList.length === 0) { if (this.selectedUserList.length === 0) {
cfmMsg += `<br/>빈 그룹으로 생성됩니다.`; cfmMsg = this.translateService.instant('group.confirmAddNewWithout');
} else {
cfmMsg = this.translateService.instant('group.confirmAddNew');
} }
const result = await this.dialogService.open< const result = await this.dialogService.open<
ConfirmDialogComponent, ConfirmDialogComponent,
@ -649,7 +674,7 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
width: '400px', width: '400px',
data: { data: {
title: 'Confirm', title: this.translateService.instant('group.addNew'),
html: cfmMsg html: cfmMsg
} }
}); });

View File

@ -10,26 +10,30 @@
matInput matInput
#input #input
maxlength="20" maxlength="20"
placeholder="대화방이름" placeholder="{{ 'chat.nameOfRoom' | translate }}"
formControlName="roomName" formControlName="roomName"
/> />
<mat-hint align="end">{{ input.value?.length || 0 }}/20</mat-hint> <mat-hint align="end">{{ input.value?.length || 0 }}/20</mat-hint>
</mat-form-field> </mat-form-field>
</div> </div>
<div class="targetSelect"> <div class="targetSelect">
<span>변경 대상자</span> <span>{{ 'chat.scopeOfChangeNameOfRoom' | translate }}</span>
<mat-radio-group <mat-radio-group
aria-label="Select an option" aria-label="Select an option"
value="me" value="me"
formControlName="changeTarget" formControlName="changeTarget"
> >
<mat-radio-button value="me"></mat-radio-button> <mat-radio-button value="me">{{
<mat-radio-button value="all">전체</mat-radio-button> 'common.pronoun.me' | translate
}}</mat-radio-button>
<mat-radio-button value="all">{{
'common.pronoun.all' | translate
}}</mat-radio-button>
</mat-radio-group> </mat-radio-group>
</div> </div>
<div *ngIf="data.roomInfo.isTimeRoom"> <div *ngIf="data.roomInfo.isTimeRoom">
<mat-form-field> <mat-form-field>
<mat-label>Setting Timer</mat-label> <mat-label>{{ 'chat.setTimer' | translate }}</mat-label>
<mat-select formControlName="timerInterval"> <mat-select formControlName="timerInterval">
<mat-option *ngFor="let timer of timerArray" [value]="timer.value"> <mat-option *ngFor="let timer of timerArray" [value]="timer.value">
{{ timer.text }} {{ timer.text }}
@ -45,7 +49,7 @@
(click)="onClickChoice(false)" (click)="onClickChoice(false)"
class="mat-primary" class="mat-primary"
> >
No {{ 'common.messages.no' | translate }}
</button> </button>
<button <button
mat-flat-button mat-flat-button
@ -53,7 +57,7 @@
(click)="onClickChoice(true)" (click)="onClickChoice(true)"
class="mat-primary" class="mat-primary"
> >
Yes {{ 'common.messages.yes' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -1,7 +1,10 @@
import { RoomInfo } from '@ucap-webmessenger/protocol-room'; import { RoomInfo } from '@ucap-webmessenger/protocol-room';
import { Component, OnInit, Inject } from '@angular/core'; import { Component, OnInit, Inject, OnDestroy } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { TranslateService } from '@ngx-translate/core';
import { take } from 'rxjs/operators';
import { Subscription } from 'rxjs';
export interface EditChatRoomDialogData { export interface EditChatRoomDialogData {
title: string; title: string;
@ -21,23 +24,13 @@ export interface EditChatRoomDialogResult {
templateUrl: './edit-chat-room.dialog.component.html', templateUrl: './edit-chat-room.dialog.component.html',
styleUrls: ['./edit-chat-room.dialog.component.scss'] styleUrls: ['./edit-chat-room.dialog.component.scss']
}) })
export class EditChatRoomDialogComponent implements OnInit { export class EditChatRoomDialogComponent implements OnInit, OnDestroy {
roomName: string; roomName: string;
inputForm: FormGroup; inputForm: FormGroup;
timerArray: { value: number; text: string }[] = [ timerArray: { value: number; text: string }[];
{ value: 5, text: '5 초' },
{ value: 10, text: '10 초' }, unitsI18nSubscription: Subscription;
{ value: 30, text: '30 초' },
{ value: 60, text: '1 분' },
{ value: 300, text: '5 분' },
{ value: 600, text: '10 분' },
{ value: 1800, text: '30 분' },
{ value: 3600, text: '1 시간' },
{ value: 21600, text: '6 시간' },
{ value: 43200, text: '12 시간' },
{ value: 86400, text: '24 시간' }
];
constructor( constructor(
public dialogRef: MatDialogRef< public dialogRef: MatDialogRef<
@ -45,7 +38,8 @@ export class EditChatRoomDialogComponent implements OnInit {
EditChatRoomDialogResult EditChatRoomDialogResult
>, >,
@Inject(MAT_DIALOG_DATA) public data: EditChatRoomDialogData, @Inject(MAT_DIALOG_DATA) public data: EditChatRoomDialogData,
private formBuilder: FormBuilder private formBuilder: FormBuilder,
private translateService: TranslateService
) {} ) {}
ngOnInit(): void { ngOnInit(): void {
@ -57,6 +51,35 @@ export class EditChatRoomDialogComponent implements OnInit {
changeTarget: ['me'], changeTarget: ['me'],
timerInterval: [this.data.roomInfo.timeRoomInterval] timerInterval: [this.data.roomInfo.timeRoomInterval]
}); });
this.unitsI18nSubscription = this.translateService
.get([
'common.units.hourFrom',
'common.units.minute',
'common.units.second'
])
.pipe(take(1))
.subscribe(vs => {
this.timerArray = [
{ value: 5, text: `5 ${vs['common.units.second']}` },
{ value: 10, text: `10 ${vs['common.units.second']}` },
{ value: 30, text: `30 ${vs['common.units.second']}` },
{ value: 60, text: `1 ${vs['common.units.minute']}` },
{ value: 300, text: `5 ${vs['common.units.minute']}` },
{ value: 600, text: `10 ${vs['common.units.minute']}` },
{ value: 1800, text: `30 ${vs['common.units.minute']}` },
{ value: 3600, text: `1 ${vs['common.units.hourFrom']}` },
{ value: 21600, text: `6 ${vs['common.units.hourFrom']}` },
{ value: 43200, text: `12 ${vs['common.units.hourFrom']}` },
{ value: 86400, text: `24 ${vs['common.units.hourFrom']}` }
];
});
}
ngOnDestroy(): void {
if (!!this.unitsI18nSubscription) {
this.unitsI18nSubscription.unsubscribe();
}
} }
onClickChoice(choice: boolean): void { onClickChoice(choice: boolean): void {

View File

@ -9,7 +9,7 @@
</mat-card-content> </mat-card-content>
<mat-card-actions class="button-farm flex-row"> <mat-card-actions class="button-farm flex-row">
<button mat-stroked-button (click)="onClickConfirm()" class="mat-primary"> <button mat-stroked-button (click)="onClickConfirm()" class="mat-primary">
confirm {{ 'common.messages.confirm' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -4,12 +4,17 @@
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
<form name="inputForm" [formGroup]="inputForm" novalidate> <form name="inputForm" [formGroup]="inputForm" novalidate>
<mat-form-field hintLabel="특수문자는 '-,_'만 사용할 수 있습니다."> <mat-form-field
hintLabel="{{
'common.useOnlyForSpecialCharacter'
| translate: { specialCharacter: '-,_' }
}}"
>
<input <input
matInput matInput
#input #input
maxlength="20" maxlength="20"
placeholder="그룹이름" placeholder="{{ 'group.name' | translate }}"
formControlName="groupName" formControlName="groupName"
/> />
<mat-hint align="end">{{ input.value?.length || 0 }}/20</mat-hint> <mat-hint align="end">{{ input.value?.length || 0 }}/20</mat-hint>
@ -22,10 +27,10 @@
(click)="onClickChoice(false)" (click)="onClickChoice(false)"
class="mat-primary" class="mat-primary"
> >
No {{ 'common.messages.no' | translate }}
</button> </button>
<button mat-flat-button (click)="onClickChoice(true)" class="mat-primary"> <button mat-flat-button (click)="onClickChoice(true)" class="mat-primary">
Yes {{ 'common.messages.yes' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -14,13 +14,18 @@
<span class="mat-fab__label">{{ 'group.addNew' | translate }}</span> <span class="mat-fab__label">{{ 'group.addNew' | translate }}</span>
</button> </button>
<div *ngIf="isShowAddGroupField" class="input-groupname-box"> <div *ngIf="isShowAddGroupField" class="input-groupname-box">
<mat-form-field hintLabel="특수문자는 '-,_'만 사용할 수 있습니다."> <mat-form-field
hintLabel="{{
'common.useOnlyForSpecialCharacter'
| translate: { specialCharacter: '-,_' }
}}"
>
<input <input
matInput matInput
#inputGroupName #inputGroupName
type="text" type="text"
maxlength="20" maxlength="20"
placeholder="그룹이름" placeholder="{{ 'group.name' | translate }}"
value="" value=""
/> />
@ -41,7 +46,7 @@
<div class="btn-box"> <div class="btn-box">
<button mat-stroked-button (click)="onClickAddGroupCancel()"> <button mat-stroked-button (click)="onClickAddGroupCancel()">
닫기 {{ 'common.messages.close' | translate }}
</button> </button>
<button <button
mat-stroked-button mat-stroked-button
@ -49,7 +54,7 @@
(click)="onClickAddGroup(inputGroupName.value)" (click)="onClickAddGroup(inputGroupName.value)"
class="mat-accent" class="mat-accent"
> >
그룹명 추가 {{ 'group.addNew' | translate }}
</button> </button>
</div> </div>
</div> </div>
@ -61,7 +66,8 @@
> >
<span class="title-name ellipsis"> {{ groupBuddy.group.name }} </span> <span class="title-name ellipsis"> {{ groupBuddy.group.name }} </span>
<span class="text-accent-color number" <span class="text-accent-color number"
>({{ groupBuddy.buddyList.length }}명)</span >({{ groupBuddy.buddyList.length
}}{{ 'common.units.persons' | translate }})</span
> >
</mat-list-option> </mat-list-option>
</mat-selection-list> </mat-selection-list>
@ -80,10 +86,10 @@
(click)="onClickChoice(false)" (click)="onClickChoice(false)"
class="mat-primary" class="mat-primary"
> >
No {{ 'common.messages.no' | translate }}
</button> </button>
<button mat-flat-button (click)="onClickChoice(true)" class="mat-primary"> <button mat-flat-button (click)="onClickChoice(true)" class="mat-primary">
Yes {{ 'common.messages.yes' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -7,7 +7,7 @@ import {
} from '@angular/material'; } from '@angular/material';
import { Observable, combineLatest } from 'rxjs'; import { Observable, combineLatest } from 'rxjs';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { map } from 'rxjs/operators'; import { 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';
@ -20,6 +20,7 @@ import {
} from '@ucap-webmessenger/ui'; } from '@ucap-webmessenger/ui';
import { GroupDetailData, UserInfo } from '@ucap-webmessenger/protocol-sync'; import { GroupDetailData, UserInfo } from '@ucap-webmessenger/protocol-sync';
import { environment } from '../../../../../environments/environment'; import { environment } from '../../../../../environments/environment';
import { TranslateService } from '@ngx-translate/core';
export interface SelectGroupDialogData { export interface SelectGroupDialogData {
title: string; title: string;
@ -43,7 +44,8 @@ export class SelectGroupDialogComponent implements OnInit {
>, >,
@Inject(MAT_DIALOG_DATA) public data: SelectGroupDialogData, @Inject(MAT_DIALOG_DATA) public data: SelectGroupDialogData,
private store: Store<any>, private store: Store<any>,
private dialogService: DialogService private dialogService: DialogService,
private translateService: TranslateService
) {} ) {}
@ViewChild('groups', { static: true }) groups: MatSelectionList; @ViewChild('groups', { static: true }) groups: MatSelectionList;
@ -109,8 +111,10 @@ export class SelectGroupDialogComponent implements OnInit {
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
width: '300px', width: '300px',
data: { data: {
title: 'Add group', title: this.translateService.instant('group.addNew'),
html: `그룹(${groupName})을 추가하시겠습니까?` html: this.translateService.instant('group.confirmAddNewWith', {
nameOfGroup: groupName
})
} }
}); });

View File

@ -2,9 +2,15 @@
<mat-card-header> <mat-card-header>
<mat-card-title> <mat-card-title>
<ng-container [ngSwitch]="messageInfo.type"> <ng-container [ngSwitch]="messageInfo.type">
<span *ngSwitchCase="MessageType.Receive">받은 쪽지</span> <span *ngSwitchCase="MessageType.Receive">{{
<span *ngSwitchCase="MessageType.Send">보낸 쪽지</span> 'message.messageTypeReceiving' | translate
<span *ngSwitchCase="MessageType.Reservation">예약 쪽지</span> }}</span>
<span *ngSwitchCase="MessageType.Send">{{
'message.messageTypeOutgoing' | translate
}}</span>
<span *ngSwitchCase="MessageType.Reservation">{{
'message.messageTypeReservation' | translate
}}</span>
</ng-container> </ng-container>
</mat-card-title> </mat-card-title>
</mat-card-header> </mat-card-header>
@ -27,7 +33,6 @@
<span <span
*ngIf="messageInfo.type === MessageType.Receive" *ngIf="messageInfo.type === MessageType.Receive"
class="people sender bg-accent-color" class="people sender bg-accent-color"
alt="보낸사람"
> >
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -47,7 +52,6 @@
<span <span
*ngIf="messageInfo.type !== MessageType.Receive" *ngIf="messageInfo.type !== MessageType.Receive"
class="people receiver bg-accent-color" class="people receiver bg-accent-color"
alt="받는사람"
> >
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -85,17 +89,17 @@
<span <span
*ngIf="messageInfo.type === MessageType.Receive" *ngIf="messageInfo.type === MessageType.Receive"
class="label bg-warn-color " class="label bg-warn-color "
>받은시간</span >{{ 'message.receivedTime' | translate }}</span
> >
<span <span
*ngIf="messageInfo.type === MessageType.Send" *ngIf="messageInfo.type === MessageType.Send"
class="label bg-warn-color " class="label bg-warn-color "
>보낸시간</span >{{ 'message.sendingTime' | translate }}</span
> >
<span <span
*ngIf="messageInfo.type === MessageType.Reservation" *ngIf="messageInfo.type === MessageType.Reservation"
class="label bg-warn-color " class="label bg-warn-color "
>발송예정시간</span >{{ 'message.reservationTime' | translate }}</span
> >
<span *ngIf="messageInfo.type !== MessageType.Reservation">{{ <span *ngIf="messageInfo.type !== MessageType.Reservation">{{
messageInfo.regDate | ucapDate: 'YYYY.MM.DD (ddd) a hh:mm' messageInfo.regDate | ucapDate: 'YYYY.MM.DD (ddd) a hh:mm'
@ -123,13 +127,15 @@
<div *ngIf="attachFile && attachFile.length > 0" class="attachFile"> <div *ngIf="attachFile && attachFile.length > 0" class="attachFile">
<div> <div>
<div class="title"> <div class="title">
<span *ngIf="isExpiredAttachFile">기간이 만료된 파일입니다</span> <span *ngIf="isExpiredAttachFile">{{
'common.file.errors.expired' | translate
}}</span>
<button <button
mat-stroked-button mat-stroked-button
class="mat-primary" class="mat-primary"
(click)="downloadAttachFileAll()" (click)="downloadAttachFileAll()"
> >
모두저장 {{ 'common.file.saveAll' | translate }}
</button> </button>
</div> </div>
@ -161,7 +167,8 @@
> >
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label>
읽은 사람 {{ getReadUserCount(true) }} {{ 'message.countOfReadUser' | translate }}
{{ getReadUserCount(true) }}
</ng-template> </ng-template>
<mat-list> <mat-list>
<ng-container *ngFor="let user of receivers"> <ng-container *ngFor="let user of receivers">
@ -176,11 +183,12 @@
</mat-tab> </mat-tab>
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label>
읽지 않은 사람 {{ getReadUserCount(true) }} {{ 'message.countOfUnreadUser' | translate }}
{{ getReadUserCount(true) }}
</ng-template> </ng-template>
<ul> <ul>
<div> <div>
전체선택 {{ 'common.messages.selectAll' | translate }}
<mat-checkbox <mat-checkbox
#checkbox #checkbox
(change)=" (change)="
@ -210,7 +218,7 @@
" "
class="mat-primary" class="mat-primary"
> >
발송취소 {{ 'message.cancelReservation' | translate }}
</button> </button>
</div> </div>
</ul> </ul>
@ -237,21 +245,21 @@
*ngIf="messageInfo.type === MessageType.Send" *ngIf="messageInfo.type === MessageType.Send"
(click)="onClickMessageMenu('MESSAGE_READ')" (click)="onClickMessageMenu('MESSAGE_READ')"
> >
<span>읽음확인</span> <span>{{ 'message.detailOfViewers' | translate }}</span>
</button> </button>
<button <button
mat-menu-item mat-menu-item
*ngIf="messageInfo.type === MessageType.Reservation" *ngIf="messageInfo.type === MessageType.Reservation"
(click)="onClickMessageMenu('MESSAGE_CANCEL')" (click)="onClickMessageMenu('MESSAGE_CANCEL')"
> >
<span>발송취소</span> <span>{{ 'message.cancelReservation' | translate }}</span>
</button> </button>
<button <button
mat-menu-item mat-menu-item
*ngIf="messageInfo.type === MessageType.Reservation" *ngIf="messageInfo.type === MessageType.Reservation"
(click)="onClickMessageMenu('MESSAGE_UPDATE')" (click)="onClickMessageMenu('MESSAGE_UPDATE')"
> >
<span>수정</span> <span>{{ 'common.messages.modify' | translate }}</span>
</button> </button>
<button <button
mat-menu-item mat-menu-item
@ -261,6 +269,6 @@
" "
(click)="onClickMessageMenu('MESSAGE_DEL')" (click)="onClickMessageMenu('MESSAGE_DEL')"
> >
<span>삭제</span> <span>{{ 'common.messages.remove' | translate }}</span>
</button> </button>
</mat-menu> </mat-menu>

View File

@ -40,6 +40,7 @@ import {
MessageWriteDialogData MessageWriteDialogData
} from './message-write.dialog.component'; } from './message-write.dialog.component';
import { EnvironmentsInfo } from '@app/types'; import { EnvironmentsInfo } from '@app/types';
import { TranslateService } from '@ngx-translate/core';
export interface MessageDetailDialogData { export interface MessageDetailDialogData {
detail: DetailResponse; detail: DetailResponse;
@ -91,7 +92,8 @@ export class MessageDetailDialogComponent implements OnInit {
private messageApiService: MessageApiService, private messageApiService: MessageApiService,
private snackBarService: SnackBarService, private snackBarService: SnackBarService,
private logger: NGXLogger, private logger: NGXLogger,
private dialogService: DialogService private dialogService: DialogService,
private translateService: TranslateService
) {} ) {}
ngOnInit(): void { ngOnInit(): void {
@ -300,7 +302,9 @@ export class MessageDetailDialogComponent implements OnInit {
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: '', title: '',
html: `다운로드가 진행중입니다.` html: this.translateService.instant(
'common.file.results.downloadInProgress'
)
} }
}); });
} }
@ -378,12 +382,16 @@ export class MessageDetailDialogComponent implements OnInit {
attachFile.downloadType === 'SINGLE' attachFile.downloadType === 'SINGLE'
) { ) {
// single :: fail // single :: fail
errMsg = '파일 저장에 실패하였습니다.'; errMsg = this.translateService.instant(
'common.file.errors.failToSave'
);
} else { } else {
// all // all
errMsg = '일부 저장중 오류가 발생하였습니다.'; errMsg = this.translateService.instant(
'common.file.errors.failToSaveSomeOfAll'
);
} }
this.snackBarService.open(errMsg, '확인', { this.snackBarService.open(errMsg, '', {
duration: 8000, duration: 8000,
verticalPosition: 'bottom' verticalPosition: 'bottom'
}); });
@ -395,7 +403,10 @@ export class MessageDetailDialogComponent implements OnInit {
) { ) {
// single :: success // single :: success
this.snackBarService.open( this.snackBarService.open(
`파일이 경로[${attachFile.downloadType}]에 저장되었습니다.`, this.translateService.instant(
'common.file.errors.savedToPath',
{ path: attachFile.downloadType }
),
'', '',
{ {
duration: 3000, duration: 3000,
@ -404,10 +415,16 @@ export class MessageDetailDialogComponent implements OnInit {
); );
} else { } else {
// all // all
this.snackBarService.open('모두 저장하였습니다.', '', { this.snackBarService.open(
this.translateService.instant(
'common.file.errors.savedAll'
),
'',
{
duration: 3000, duration: 3000,
verticalPosition: 'bottom' verticalPosition: 'bottom'
}); }
);
} }
} }
this.downloadProgress = false; this.downloadProgress = false;
@ -433,8 +450,10 @@ export class MessageDetailDialogComponent implements OnInit {
ConfirmDialogResult ConfirmDialogResult
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
data: { data: {
title: '발송취소', title: this.translateService.instant('message.cancelReservation'),
html: `예약발송을 취소 하시겠습니까?<br/>취소하면 목록에서도 영구 삭제됩니다.` html: this.translateService.instant(
'message.confirmCancelReservation'
)
} }
}); });
@ -454,8 +473,8 @@ export class MessageDetailDialogComponent implements OnInit {
ConfirmDialogResult ConfirmDialogResult
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
data: { data: {
title: '삭제', title: this.translateService.instant('message.remove'),
message: '선택한 쪽지를 삭제하시겠습니까?' message: this.translateService.instant('message.confirmRemove')
} }
}); });
@ -524,9 +543,8 @@ export class MessageDetailDialogComponent implements OnInit {
ConfirmDialogResult ConfirmDialogResult
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
data: { data: {
title: '발송 취소', title: this.translateService.instant('message.cancelSending'),
message: message: this.translateService.instant('message.confirmCancelSending')
'발송 취소를 하시면 받는 사람의 쪽지함에서 쪽지가 삭제됩니다.'
} }
}); });

View File

@ -1,6 +1,8 @@
<mat-card class="confirm-card mat-elevation-z"> <mat-card class="confirm-card mat-elevation-z">
<mat-card-header> <mat-card-header>
<mat-card-title> 쪽지 {{ isModify ? '수정' : '보내기' }} </mat-card-title> <mat-card-title>
{{ (isModify ? 'message.modify' : 'message.sendTo') | translate }}
</mat-card-title>
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
<ucap-message-write <ucap-message-write

View File

@ -28,6 +28,7 @@ import {
import { UserSelectDialogType, EnvironmentsInfo } from '@app/types'; import { UserSelectDialogType, EnvironmentsInfo } from '@app/types';
import { take } from 'rxjs/operators'; import { take } from 'rxjs/operators';
import { UserInfoSS } from '@ucap-webmessenger/protocol-query'; import { UserInfoSS } from '@ucap-webmessenger/protocol-query';
import { TranslateService } from '@ngx-translate/core';
export interface MessageWriteDialogData { export interface MessageWriteDialogData {
loginRes: LoginResponse; loginRes: LoginResponse;
@ -66,6 +67,7 @@ export class MessageWriteDialogComponent implements OnInit {
@Inject(MAT_DIALOG_DATA) public data: MessageWriteDialogData, @Inject(MAT_DIALOG_DATA) public data: MessageWriteDialogData,
private messageApiService: MessageApiService, private messageApiService: MessageApiService,
private snackBarService: SnackBarService, private snackBarService: SnackBarService,
private translateService: TranslateService,
private logger: NGXLogger, private logger: NGXLogger,
private dialogService: DialogService private dialogService: DialogService
) {} ) {}
@ -85,7 +87,7 @@ export class MessageWriteDialogComponent implements OnInit {
width: '600px', width: '600px',
data: { data: {
type: UserSelectDialogType.EditChatMember, type: UserSelectDialogType.EditChatMember,
title: '쪽지 수신자 선택', title: this.translateService.instant('message.selectRecipient'),
curRoomUser: receiverList curRoomUser: receiverList
} }
}); });
@ -122,9 +124,13 @@ export class MessageWriteDialogComponent implements OnInit {
res => { res => {
let msg = ''; let msg = '';
if (!!message.reservationTime) { if (!!message.reservationTime) {
msg = `쪽지 전송을 예약 하였습니다.`; msg = this.translateService.instant(
'message.results.successForReservation'
);
} else { } else {
msg = `쪽지를 전송하였습니다.`; msg = this.translateService.instant(
'message.results.successForSending'
);
} }
this.snackBarService.open(msg, '', { this.snackBarService.open(msg, '', {
@ -135,10 +141,15 @@ export class MessageWriteDialogComponent implements OnInit {
this.dialogRef.close({ sendFlag: true, sendType: message.type }); this.dialogRef.close({ sendFlag: true, sendType: message.type });
}, },
error => { error => {
this.snackBarService.open(`쪽지를 전송에 실패 하였습니다.`, '', { this.snackBarService.open(
this.translateService.instant('message.errors.failToSending'),
'',
{
duration: 3000, duration: 3000,
verticalPosition: 'bottom' verticalPosition: 'bottom'
}); }
);
// this.dialogRef.close({}); // this.dialogRef.close({});
} }
); );
@ -155,18 +166,29 @@ export class MessageWriteDialogComponent implements OnInit {
.pipe(take(1)) .pipe(take(1))
.subscribe( .subscribe(
res => { res => {
this.snackBarService.open('쪽지를 수정하였습니다.', '', { this.snackBarService.open(
this.translateService.instant(
'message.results.successForModifying'
),
'',
{
duration: 3000, duration: 3000,
verticalPosition: 'bottom' verticalPosition: 'bottom'
}); }
);
this.dialogRef.close({ sendFlag: true, sendType: message.type }); this.dialogRef.close({ sendFlag: true, sendType: message.type });
}, },
error => { error => {
this.snackBarService.open(`쪽지 수정에 실패 하였습니다.`, '', { this.snackBarService.open(
this.translateService.instant('message.errors.failToModify'),
'',
{
duration: 3000, duration: 3000,
verticalPosition: 'bottom' verticalPosition: 'bottom'
}); }
);
// this.dialogRef.close({}); // this.dialogRef.close({});
} }
); );

View File

@ -1,7 +1,9 @@
<mat-card class="confirm-card mat-elevation-z"> <mat-card class="confirm-card mat-elevation-z">
<mat-card-header> <mat-card-header>
<mat-card-title class="title"> <mat-card-title class="title">
<span *ngIf="data.notice.topYn"> [중요] </span> <span *ngIf="data.notice.topYn">
[{{ 'notice.important' | translate }}]
</span>
{{ data.notice.title }} {{ data.notice.title }}
</mat-card-title> </mat-card-title>
</mat-card-header> </mat-card-header>
@ -15,7 +17,7 @@
</mat-card-content> </mat-card-content>
<mat-card-actions class="button-farm flex-row"> <mat-card-actions class="button-farm flex-row">
<button mat-stroked-button (click)="onClickConfirm()" class="mat-primary"> <button mat-stroked-button (click)="onClickConfirm()" class="mat-primary">
confirm {{ 'common.messages.confirm' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -15,7 +15,7 @@
(change)="onCheckAllUser(checkbox.checked)" (change)="onCheckAllUser(checkbox.checked)"
(click)="$event.stopPropagation()" (click)="$event.stopPropagation()"
> >
전체선택 {{ 'common.messages.selectAll' | translate }}
</mat-checkbox> </mat-checkbox>
</mat-card-title> </mat-card-title>
</mat-card-header> </mat-card-header>
@ -57,10 +57,10 @@
(click)="onClickChoice(false)" (click)="onClickChoice(false)"
class="mat-primary" class="mat-primary"
> >
취소 {{ 'common.messages.cancel' | translate }}
</button> </button>
<button mat-flat-button (click)="onClickChoice(true)" class="mat-primary"> <button mat-flat-button (click)="onClickChoice(true)" class="mat-primary">
적용 {{ 'common.messages.apply' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -52,6 +52,7 @@ import { NGXLogger } from 'ngx-logger';
import { SmsUtils } from '@ucap-webmessenger/daesang'; import { SmsUtils } from '@ucap-webmessenger/daesang';
import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native'; import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native';
import { environment } from '../../../../../environments/environment'; import { environment } from '../../../../../environments/environment';
import { TranslateService } from '@ngx-translate/core';
export interface ProfileDialogData { export interface ProfileDialogData {
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
@ -87,6 +88,7 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
private commonApiService: CommonApiService, private commonApiService: CommonApiService,
private callService: CallService, private callService: CallService,
private snackBarService: SnackBarService, private snackBarService: SnackBarService,
private translateService: TranslateService,
private store: Store<any>, private store: Store<any>,
private logger: NGXLogger private logger: NGXLogger
) { ) {
@ -174,10 +176,11 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
AlertDialogResult AlertDialogResult
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: '', title: this.translateService.instant('call.errors.label'),
html: `전화를 걸 수 없는 사용자 입니다.` html: this.translateService.instant('call.errors.cannotCallToUser')
} }
}); });
return false; return false;
} }
@ -191,8 +194,10 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
width: '360px', width: '360px',
data: { data: {
title: '전화 걸기', title: this.translateService.instant('call.callTo'),
html: `${calleeNumber}로 전화를 거시겠습니까?` html: this.translateService.instant('call.callWithNumber', {
phoneNumber: calleeNumber
})
} }
}); });
@ -225,8 +230,10 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
AlertDialogResult AlertDialogResult
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: '', title: this.translateService.instant('call.errors.label'),
html: `상대방 번호가 없어 전화를 걸 수 없습니다.` html: this.translateService.instant(
'call.errors.cannotCallToUserWithoutPhomeNumber'
)
} }
}); });
} }
@ -244,8 +251,8 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
AlertDialogResult AlertDialogResult
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: '', title: this.translateService.instant('sms.errors.label'),
html: `SMS 사용 권한이 없습니다.` html: this.translateService.instant('sms.errors.haveNoPermission')
} }
}); });
return false; return false;
@ -287,7 +294,7 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
>(SelectGroupDialogComponent, { >(SelectGroupDialogComponent, {
width: '600px', width: '600px',
data: { data: {
title: 'Group Select' title: this.translateService.instant('group.selectTargetGroup')
} }
}); });
@ -315,8 +322,11 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
width: '360px', width: '360px',
data: { data: {
title: 'Delete Buddy', title: this.translateService.instant('group.removeBuddyFromGroup'),
html: `[${param.userInfo.name} ${param.userInfo.grade}]를 그룹에서 삭제하시겠습니까?<br/>프로필에서 삭제하면 모든 그룹에서 삭제됩니다.` html: this.translateService.instant(
'group.confirmRemoveBuddyFromGroup',
{ target: `${param.userInfo.name} ${param.userInfo.grade}` }
)
} }
}); });
@ -378,7 +388,9 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
}, },
error => { error => {
this.snackBarService.open( this.snackBarService.open(
`프로필 이미지 변경중에 문제가 발생하였습니다.`, this.translateService.instant(
'profile.errors.failToChangeProfileImage'
),
'', '',
{ {
duration: 3000, duration: 3000,

View File

@ -1,6 +1,6 @@
<mat-card class="confirm-card mat-elevation-z setting-frame"> <mat-card class="confirm-card mat-elevation-z setting-frame">
<mat-card-header cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle> <mat-card-header cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle>
<mat-card-title>설정</mat-card-title> <mat-card-title>{{ 'settings.label' | translate }}</mat-card-title>
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
<div fxFlex class="setting-tab"> <div fxFlex class="setting-tab">
@ -8,7 +8,7 @@
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label>
<span class="mdi mdi-settings"></span> <span class="mdi mdi-settings"></span>
일반 {{ 'settings.typeGenernal' | translate }}
</ng-template> </ng-template>
<ucap-settings-general <ucap-settings-general
@ -29,7 +29,7 @@
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label>
<span class="mdi mdi-bell"></span> <span class="mdi mdi-bell"></span>
알림 {{ 'settings.typeNotification' | translate }}
</ng-template> </ng-template>
<ucap-settings-notification <ucap-settings-notification
[setting]="appUserInfo.settings.notification" [setting]="appUserInfo.settings.notification"
@ -63,7 +63,7 @@
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label>
<span class="mdi mdi-chat"></span> <span class="mdi mdi-chat"></span>
대화 {{ 'settings.typeChat' | translate }}
</ng-template> </ng-template>
<ucap-settings-chat <ucap-settings-chat
[setting]="appUserInfo.settings.chat" [setting]="appUserInfo.settings.chat"
@ -115,10 +115,10 @@
(click)="onClickChoice(false)" (click)="onClickChoice(false)"
class="mat-primary" class="mat-primary"
> >
No {{ 'common.messages.no' | translate }}
</button> </button>
<button mat-flat-button (click)="onClickChoice(true)" class="mat-primary"> <button mat-flat-button (click)="onClickChoice(true)" class="mat-primary">
Yes {{ 'common.messages.yes' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -242,7 +242,6 @@
stroke-width="2" stroke-width="2"
stroke-linecap="butt" stroke-linecap="butt"
stroke-linejoin="round" stroke-linejoin="round"
alt="창 최소화"
> >
<line x1="5" y1="18" x2="19" y2="18"></line> <line x1="5" y1="18" x2="19" y2="18"></line>
</svg> </svg>
@ -265,7 +264,6 @@
stroke-linecap="butt" stroke-linecap="butt"
stroke-linejoin="round" stroke-linejoin="round"
*ngSwitchCase="WindowState.Maximized" *ngSwitchCase="WindowState.Maximized"
alt="창 이전크기"
> >
<path <path
class="st0" class="st0"
@ -289,7 +287,6 @@
stroke-linecap="butt" stroke-linecap="butt"
stroke-linejoin="round" stroke-linejoin="round"
*ngSwitchDefault *ngSwitchDefault
alt="창크기 최대"
> >
<rect x="5" y="5" width="12" height="12" rx="2" ry="2"></rect> <rect x="5" y="5" width="12" height="12" rx="2" ry="2"></rect>
</svg> </svg>
@ -311,7 +308,6 @@
stroke-width="2" stroke-width="2"
stroke-linecap="butt" stroke-linecap="butt"
stroke-linejoin="round" stroke-linejoin="round"
alt="창닫기"
> >
<line x1="18" y1="6" x2="6" y2="18"></line> <line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line> <line x1="6" y1="6" x2="18" y2="18"></line>
@ -332,7 +328,7 @@
</div> </div>
<div class="setting"> <div class="setting">
<button mat-menu-item (click)="onClickOpenProfile($event)"> <button mat-menu-item (click)="onClickOpenProfile($event)">
프로필 보기 {{ 'profile.open' | translate }}
</button> </button>
</div> </div>
<!-- <div class="setting"> <!-- <div class="setting">
@ -352,23 +348,33 @@
</button> </button>
</div> --> </div> -->
<div class="setting"> <div class="setting">
<button mat-menu-item (click)="onClickNotice()">공지사항</button> <button mat-menu-item (click)="onClickNotice()">
{{ 'notice.label' | translate }}
</button>
</div> </div>
<div class="setting"> <div class="setting">
<button mat-menu-item (click)="onClickSettings()">설정</button> <button mat-menu-item (click)="onClickSettings()">
{{ 'settings.label' | translate }}
</button>
</div> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<div class="setting"> <div class="setting">
<button mat-menu-item (click)="onClickLogout()">로그아웃</button> <button mat-menu-item (click)="onClickLogout()">
{{ 'accounts.logout' | translate }}
</button>
</div> </div>
</mat-menu> </mat-menu>
<mat-menu #presenseMenu="matMenu" class="status-pc-set"> <mat-menu #presenseMenu="matMenu" class="status-pc-set">
<div class="setting"> <div class="setting">
<button mat-menu-item><span class="presence pcOn"> </span>온라인</button> <button mat-menu-item>
<span class="presence pcOn"> </span>{{ 'presence.online' | translate }}
</button>
</div> </div>
<div class="setting"> <div class="setting">
<button mat-menu-item><span class="presence pcOut"> </span>부재중</button <button mat-menu-item>
<span class="presence pcOut"> </span
>{{ 'presence.offline' | translate }}</button
><button mat-menu-item class="clock"></button> ><button mat-menu-item class="clock"></button>
</div> </div>
<div class="setting"> <div class="setting">

View File

@ -113,9 +113,7 @@ export class TopBarComponent implements OnInit, OnDestroy {
>(KEY_VER_INFO); >(KEY_VER_INFO);
// WebLink init.. // WebLink init..
if (!this.weblink || this.weblink.length === 0) {
this.initWebLink(); this.initWebLink();
}
}) })
) )
.subscribe(); .subscribe();

View File

@ -8,6 +8,8 @@ import { MatIconModule } from '@angular/material/icon';
import { MatMenuModule } from '@angular/material/menu'; import { MatMenuModule } from '@angular/material/menu';
import { MatToolbarModule } from '@angular/material/toolbar'; import { MatToolbarModule } from '@angular/material/toolbar';
import { TranslateModule } from '@ngx-translate/core';
import { UCapUiModule } from '@ucap-webmessenger/ui'; import { UCapUiModule } from '@ucap-webmessenger/ui';
import { UCapUiProfileModule } from '@ucap-webmessenger/ui-profile'; import { UCapUiProfileModule } from '@ucap-webmessenger/ui-profile';
@ -25,6 +27,8 @@ import { MatTooltipModule, MatBadgeModule } from '@angular/material';
MatMenuModule, MatMenuModule,
MatBadgeModule, MatBadgeModule,
TranslateModule,
UCapUiModule, UCapUiModule,
UCapUiProfileModule UCapUiProfileModule
], ],

View File

@ -37,6 +37,7 @@
<app-layout-messenger-messages <app-layout-messenger-messages
*ngIf="!!(this.selectedChat$ | async)" *ngIf="!!(this.selectedChat$ | async)"
(openProfile)="onClickOpenProfile($event)" (openProfile)="onClickOpenProfile($event)"
(closeRightDrawer)="onCloseRightDrawer()"
></app-layout-messenger-messages> ></app-layout-messenger-messages>
</div> </div>
<mat-drawer <mat-drawer

View File

@ -46,6 +46,7 @@ import {
import { MessageType } from '@ucap-webmessenger/api-message'; import { MessageType } from '@ucap-webmessenger/api-message';
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 { TranslateService } from '@ngx-translate/core';
@Component({ @Component({
selector: 'app-page-messenger-main', selector: 'app-page-messenger-main',
@ -77,6 +78,7 @@ export class MainPageComponent implements OnInit, OnDestroy {
private callService: CallService, private callService: CallService,
private localStorageService: LocalStorageService, private localStorageService: LocalStorageService,
private sessionStorageService: SessionStorageService, private sessionStorageService: SessionStorageService,
private translateService: TranslateService,
private dialogService: DialogService, private dialogService: DialogService,
private logger: NGXLogger private logger: NGXLogger
) { ) {
@ -274,10 +276,11 @@ export class MainPageComponent implements OnInit, OnDestroy {
AlertDialogResult AlertDialogResult
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: '', title: this.translateService.instant('call.errors.label'),
html: `전화를 걸 수 없는 사용자 입니다.` html: this.translateService.instant('call.errors.cannotCallToUser')
} }
}); });
return false; return false;
} }
@ -291,8 +294,10 @@ export class MainPageComponent implements OnInit, OnDestroy {
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
width: '360px', width: '360px',
data: { data: {
title: '전화 걸기', title: this.translateService.instant('call.callTo'),
html: `${calleeNumber}로 전화를 거시겠습니까?` html: this.translateService.instant('call.callWithNumber', {
phoneNumber: calleeNumber
})
} }
}); });
@ -320,8 +325,10 @@ export class MainPageComponent implements OnInit, OnDestroy {
AlertDialogResult AlertDialogResult
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: '', title: this.translateService.instant('call.errors.label'),
html: `상대방 번호가 없어 전화를 걸 수 없습니다.` html: this.translateService.instant(
'call.errors.cannotCallToUserWithoutPhomeNumber'
)
} }
}); });
} }
@ -339,10 +346,11 @@ export class MainPageComponent implements OnInit, OnDestroy {
AlertDialogResult AlertDialogResult
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: '', title: this.translateService.instant('sms.errors.label'),
html: `SMS 사용 권한이 없습니다.` html: this.translateService.instant('sms.errors.haveNoPermission')
} }
}); });
return false; return false;
} }

View File

@ -1,7 +1,7 @@
import { delGroupSuccess, buddy2 } from './../store/messenger/sync/actions'; import { delGroupSuccess, buddy2 } from './../store/messenger/sync/actions';
import { Injectable, Inject } from '@angular/core'; import { Injectable, Inject } from '@angular/core';
import { tap, withLatestFrom } from 'rxjs/operators'; import { tap, withLatestFrom, take } from 'rxjs/operators';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
@ -109,6 +109,7 @@ import { NotificationMethod } from '@ucap-webmessenger/core';
import { Dictionary } from '@ngrx/entity'; import { Dictionary } from '@ngrx/entity';
import { MessageType } from '@ucap-webmessenger/api-message'; import { MessageType } from '@ucap-webmessenger/api-message';
import { LogoutInfo, KEY_LOGOUT_INFO } from '@app/types'; import { LogoutInfo, KEY_LOGOUT_INFO } from '@app/types';
import { TranslateService } from '@ngx-translate/core';
@Injectable() @Injectable()
export class AppNotificationService { export class AppNotificationService {
@ -120,6 +121,7 @@ export class AppNotificationService {
private groupProtocolService: GroupProtocolService, private groupProtocolService: GroupProtocolService,
private buddyProtocolService: BuddyProtocolService, private buddyProtocolService: BuddyProtocolService,
private statusProtocolService: StatusProtocolService, private statusProtocolService: StatusProtocolService,
private translateService: TranslateService,
private umgProtocolService: UmgProtocolService, private umgProtocolService: UmgProtocolService,
private localStorageService: LocalStorageService, private localStorageService: LocalStorageService,
private sessionStorageService: SessionStorageService, private sessionStorageService: SessionStorageService,
@ -235,7 +237,9 @@ export class AppNotificationService {
const notiReq: NotificationRequest = { const notiReq: NotificationRequest = {
type: NotificationType.Event, type: NotificationType.Event,
seq: noti.roomSeq, seq: noti.roomSeq,
title: '메세지가 도착했습니다.', title: this.translateService.instant(
'notification.titleChatEventArrived'
),
contents: StringUtil.convertFinalEventMessage( contents: StringUtil.convertFinalEventMessage(
noti.eventType, noti.eventType,
noti.info.sentMessageJson noti.info.sentMessageJson
@ -611,7 +615,9 @@ export class AppNotificationService {
const notiReq: NotificationRequest = { const notiReq: NotificationRequest = {
type: NotificationType.Message, type: NotificationType.Message,
seq: noti.keyId, seq: noti.keyId,
title: '쪽지가 도착했습니다.', title: this.translateService.instant(
'notification.titleMessageArrived'
),
contents: noti.text, contents: noti.text,
image: noti.senderInfo.profileImageFile, image: noti.senderInfo.profileImageFile,
useSound: [ useSound: [

View File

@ -68,11 +68,7 @@ import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
import { ProtocolService } from '@ucap-webmessenger/protocol'; import { ProtocolService } from '@ucap-webmessenger/protocol';
import { environment } from '../../../../environments/environment'; import { environment } from '../../../../environments/environment';
import {
ChangePasswordDialogComponent,
ChangePasswordDialogData,
ChangePasswordDialogResult
} from '@app/layouts/messenger/dialogs/account/change-password.dialog.component';
import { import {
ServiceProtocolService, ServiceProtocolService,
UserPasswordSetResponse UserPasswordSetResponse
@ -80,6 +76,7 @@ import {
import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external'; import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external';
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 { DaesangCipherService, WebLinkType } from '@ucap-webmessenger/daesang'; import { DaesangCipherService, WebLinkType } from '@ucap-webmessenger/daesang';
import { TranslateService } from '@ngx-translate/core';
@Injectable() @Injectable()
export class Effects { export class Effects {
@ -205,8 +202,8 @@ export class Effects {
ConfirmDialogResult ConfirmDialogResult
>(ConfirmDialogComponent, { >(ConfirmDialogComponent, {
data: { data: {
title: 'Logout', title: this.translateService.instant('accounts.logout'),
message: '로그아웃 하시겠습니까?' message: this.translateService.instant('accounts.confirmLogout')
} }
}); });
@ -259,7 +256,9 @@ export class Effects {
height: '500px', height: '500px',
disableClose: true, disableClose: true,
data: { data: {
title: '개인정보 동의', title: this.translateService.instant(
'accounts.consentOfPrivacy'
),
html: `<iframe id="ifm_privacy" src="${privacyTotalUrl}" style="width: 100%;height: 300px;" />` html: `<iframe id="ifm_privacy" src="${privacyTotalUrl}" style="width: 100%;height: 300px;" />`
} }
}); });
@ -288,7 +287,7 @@ export class Effects {
height: '500px', height: '500px',
disableClose: true, disableClose: true,
data: { data: {
title: '패스워드 초기화', title: this.translateService.instant('accounts.resetPassword'),
html: `<iframe id="ifm_privacy" src="${passwordInitStep1Url}" style="width: 100%;height: 300px;" />` html: `<iframe id="ifm_privacy" src="${passwordInitStep1Url}" style="width: 100%;height: 300px;" />`
} }
}); });
@ -311,8 +310,12 @@ export class Effects {
AlertDialogResult AlertDialogResult
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: '비밀번호 만기', title: this.translateService.instant(
html: `비밀번호가 만료되었습니다.<br/>비밀번호 변경 후 다시 로그인 하세요.` 'accounts.passwordExpired'
),
html: this.translateService.instant(
'accounts.descriptionOfPasswordExpired'
)
} }
}); });
@ -444,8 +447,10 @@ export class Effects {
width: '360px', width: '360px',
disableClose: true, disableClose: true,
data: { data: {
title: '비밀번호 변경', title: this.translateService.instant('accounts.changePassword'),
message: '비밀번호가 변경되었습니다. 다시 로그인하여 주십시오' message: this.translateService.instant(
'accounts.results.changedPassword'
)
} }
}); });
@ -462,7 +467,9 @@ export class Effects {
ofType(userPasswordSetFailure), ofType(userPasswordSetFailure),
tap(action => { tap(action => {
this.snackBarService.open( this.snackBarService.open(
`비밀번호 변경 중에 문제가 발생하였습니다.`, this.translateService.instant(
'accounts.errors.failToChangePassword'
),
'', '',
{ {
duration: 3000, duration: 3000,
@ -487,6 +494,7 @@ export class Effects {
private protocolService: ProtocolService, private protocolService: ProtocolService,
private authenticationProtocolService: AuthenticationProtocolService, private authenticationProtocolService: AuthenticationProtocolService,
private serviceProtocolService: ServiceProtocolService, private serviceProtocolService: ServiceProtocolService,
private translateService: TranslateService,
private dialogService: DialogService, private dialogService: DialogService,
private snackBarService: SnackBarService, private snackBarService: SnackBarService,
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService, @Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,

View File

@ -1,17 +1,16 @@
import { Injectable, Inject } from '@angular/core'; import { Injectable } from '@angular/core';
import { Actions, ofType, createEffect } from '@ngrx/effects'; import { Actions, ofType, createEffect } from '@ngrx/effects';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { NGXLogger } from 'ngx-logger'; import { NGXLogger } from 'ngx-logger';
import { catchError, exhaustMap, map, tap, switchMap } from 'rxjs/operators'; import { catchError, exhaustMap, map } from 'rxjs/operators';
import { import {
selectedMassDetail, selectedMassDetail,
massTalkDownload, massTalkDownload,
massTalkDownloadFailure, massTalkDownloadFailure,
massTalkDownloadSuccess, massTalkDownloadSuccess
clearSelectedRoom
} from './actions'; } from './actions';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { SessionStorageService } from '@ucap-webmessenger/web-storage';
@ -20,16 +19,12 @@ import { CommonApiService } from '@ucap-webmessenger/api-common';
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type'; import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types'; import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
import { import { DialogService } from '@ucap-webmessenger/ui';
DialogService,
AlertDialogComponent,
AlertDialogData
} from '@ucap-webmessenger/ui';
import { initialState } from '../event';
import { import {
MassDetailComponent, MassDetailComponent,
MassDetailDialogData MassDetailDialogData
} from '@app/layouts/messenger/dialogs/chat/mass-detail.component'; } from '@app/layouts/messenger/dialogs/chat/mass-detail.component';
import { TranslateService } from '@ngx-translate/core';
@Injectable() @Injectable()
export class Effects { export class Effects {
@ -73,7 +68,7 @@ export class Effects {
disableClose: false, disableClose: false,
width: '550px', width: '550px',
data: { data: {
title: 'Detail View', title: this.translateService.instant('chat.detailView'),
contents: res.content contents: res.content
} }
}); });
@ -94,6 +89,7 @@ export class Effects {
private commonApiService: CommonApiService, private commonApiService: CommonApiService,
private sessionStorageService: SessionStorageService, private sessionStorageService: SessionStorageService,
private dialogService: DialogService, private dialogService: DialogService,
private translateService: TranslateService,
private store: Store<any>, private store: Store<any>,
private logger: NGXLogger private logger: NGXLogger
) {} ) {}

View File

@ -1,6 +1,7 @@
import { import {
CommonApiService, CommonApiService,
MassTalkSaveRequest MassTalkSaveRequest,
FileTalkShareRequest
} from '@ucap-webmessenger/api-common'; } from '@ucap-webmessenger/api-common';
import { KEY_ENVIRONMENTS_INFO } from './../../../types/environment.type'; import { KEY_ENVIRONMENTS_INFO } from './../../../types/environment.type';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
@ -19,7 +20,8 @@ import {
catchError, catchError,
exhaustMap, exhaustMap,
withLatestFrom, withLatestFrom,
concatMap concatMap,
take
} from 'rxjs/operators'; } from 'rxjs/operators';
import moment from 'moment'; import moment from 'moment';
import { import {
@ -43,7 +45,8 @@ import {
FileEventJson, FileEventJson,
MassTextEventJson, MassTextEventJson,
TranslationEventJson, TranslationEventJson,
MassTranslationEventJson MassTranslationEventJson,
decodeFileEventJson
} from '@ucap-webmessenger/protocol-event'; } from '@ucap-webmessenger/protocol-event';
import * as ChatStore from '@app/store/messenger/chat'; import * as ChatStore from '@app/store/messenger/chat';
@ -83,7 +86,8 @@ import {
roomOpenAfterForward, roomOpenAfterForward,
infoForSearch, infoForSearch,
infoForSearchEnd, infoForSearchEnd,
infoAll infoAll,
forwardFailure
} from './actions'; } from './actions';
import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { SessionStorageService } from '@ucap-webmessenger/web-storage';
import { import {
@ -110,13 +114,13 @@ import {
FileType FileType
} from '@ucap-webmessenger/protocol-file'; } from '@ucap-webmessenger/protocol-file';
import { environment } from '../../../../environments/environment'; import { environment } from '../../../../environments/environment';
import { RoomUserData } from '@ucap-webmessenger/protocol-sync';
import { import {
AlertDialogComponent, AlertDialogComponent,
AlertDialogResult, AlertDialogResult,
AlertDialogData, AlertDialogData,
DialogService DialogService
} from '@ucap-webmessenger/ui'; } from '@ucap-webmessenger/ui';
import { TranslateService } from '@ngx-translate/core';
@Injectable() @Injectable()
export class Effects { export class Effects {
@ -371,7 +375,9 @@ export class Effects {
disableClose: true, disableClose: true,
data: { data: {
title: '', title: '',
message: '더이상 검색할 내용이 없습니다.' message: this.translateService.instant(
'chat.noMoreEvents'
)
} }
}); });
} }
@ -661,8 +667,52 @@ export class Effects {
ofType(forward), ofType(forward),
tap(action => { tap(action => {
if (!!action.trgtRoomSeq) { if (!!action.trgtRoomSeq) {
// 대화전달 후 방오픈. // 대화전달 후 방오픈. Exist roomSeq.
if (action.req.eventType === EventType.File) {
const loginResInfo: LoginResponse = this.sessionStorageService.get<
LoginResponse
>(KEY_LOGIN_RES_INFO);
const environmentsInfo = this.sessionStorageService.get<
EnvironmentsInfo
>(KEY_ENVIRONMENTS_INFO);
const fileEventJson: FileEventJson = decodeFileEventJson(
action.req.sentMessage
);
const req: FileTalkShareRequest = {
userSeq: loginResInfo.userSeq,
deviceType: environmentsInfo.deviceType,
token: loginResInfo.tokenString,
attachmentsSeq: fileEventJson.attachmentSeq.toString(),
roomSeq: action.trgtRoomSeq,
synapKey: ''
};
this.commonApiService
.fileTalkShare(req)
.pipe(
take(1),
map(res => {
if (res.statusCode === StatusCode.Success) {
action = {
...action,
req: {
...action.req,
sentMessage: res.returnJson
}
};
this.store.dispatch(roomOpenAfterForward(action)); this.store.dispatch(roomOpenAfterForward(action));
} else {
this.store.dispatch(forwardFailure({ error: res }));
}
}),
catchError(error => of(forwardFailure({ error })))
)
.subscribe();
} else {
this.store.dispatch(roomOpenAfterForward(action));
}
} else if (!!action.trgtUserSeqs && action.trgtUserSeqs.length > 0) { } else if (!!action.trgtUserSeqs && action.trgtUserSeqs.length > 0) {
// 방오픈 후 대화전달. // 방오픈 후 대화전달.
this.store.dispatch(forwardAfterRoomOpen(action)); this.store.dispatch(forwardAfterRoomOpen(action));
@ -687,6 +737,40 @@ export class Effects {
return openSuccess({ res }); return openSuccess({ res });
}), }),
map(res => { map(res => {
if (action.req.eventType === EventType.File) {
const loginResInfo: LoginResponse = this.sessionStorageService.get<
LoginResponse
>(KEY_LOGIN_RES_INFO);
const environmentsInfo = this.sessionStorageService.get<
EnvironmentsInfo
>(KEY_ENVIRONMENTS_INFO);
const fileEventJson: FileEventJson = decodeFileEventJson(
action.req.sentMessage
);
const req: FileTalkShareRequest = {
userSeq: loginResInfo.userSeq,
deviceType: environmentsInfo.deviceType,
token: loginResInfo.tokenString,
attachmentsSeq: fileEventJson.attachmentSeq.toString(),
roomSeq: action.trgtRoomSeq,
synapKey: ''
};
this.commonApiService
.fileTalkShare(req)
.pipe(
take(1),
map(resFileShare => {
if (resFileShare.statusCode === StatusCode.Success) {
action = {
...action,
req: {
...action.req,
sentMessage: resFileShare.returnJson
}
};
this.store.dispatch( this.store.dispatch(
send({ send({
senderSeq: action.senderSeq, senderSeq: action.senderSeq,
@ -697,6 +781,26 @@ export class Effects {
} }
}) })
); );
} else {
this.store.dispatch(forwardFailure({ error: res }));
}
}),
catchError(error => of(forwardFailure({ error })))
)
.subscribe();
} else {
this.store.dispatch(
send({
senderSeq: action.senderSeq,
req: {
roomSeq: res.res.roomSeq,
eventType: action.req.eventType,
sentMessage: action.req.sentMessage
}
})
);
}
return res; return res;
}), }),
catchError(error => of(openFailure({ error }))) catchError(error => of(openFailure({ error })))
@ -958,6 +1062,7 @@ export class Effects {
private fileProtocolService: FileProtocolService, private fileProtocolService: FileProtocolService,
private roomProtocolService: RoomProtocolService, private roomProtocolService: RoomProtocolService,
private sessionStorageService: SessionStorageService, private sessionStorageService: SessionStorageService,
private translateService: TranslateService,
private dialogService: DialogService, private dialogService: DialogService,
private logger: NGXLogger private logger: NGXLogger
) {} ) {}

View File

@ -7,36 +7,14 @@ import { Store, select } from '@ngrx/store';
import { NGXLogger } from 'ngx-logger'; import { NGXLogger } from 'ngx-logger';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { import { switchMap, map, catchError, withLatestFrom } from 'rxjs/operators';
tap,
switchMap,
map,
catchError,
exhaustMap,
withLatestFrom,
concatMap,
take
} from 'rxjs/operators';
import moment from 'moment';
import * as ChatStore from '@app/store/messenger/chat';
import * as RoomStore from '@app/store/messenger/room';
import * as SyncStore from '@app/store/messenger/sync';
import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { SessionStorageService } from '@ucap-webmessenger/web-storage';
import { KEY_ENVIRONMENTS_INFO } from './../../../types/environment.type'; import { KEY_ENVIRONMENTS_INFO } from './../../../types/environment.type';
import { LoginInfo, KEY_LOGIN_INFO, EnvironmentsInfo } from '@app/types'; import { EnvironmentsInfo } from '@app/types';
import { Dictionary } from '@ngrx/entity';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
import { MessageStatusCode } from '@ucap-webmessenger/api'; import { MessageStatusCode } from '@ucap-webmessenger/api';
import { environment } from '../../../../environments/environment'; import { DialogService } from '@ucap-webmessenger/ui';
import {
AlertDialogComponent,
AlertDialogResult,
AlertDialogData,
DialogService
} from '@ucap-webmessenger/ui';
import { import {
retrieveMessage, retrieveMessage,
retrieveMessageFailure, retrieveMessageFailure,
@ -65,14 +43,9 @@ import {
MessageSearchType, MessageSearchType,
DelRequest, DelRequest,
CancelReservationRequest, CancelReservationRequest,
DetailRequest DetailRequest,
UnreadCountRequest
} from '@ucap-webmessenger/api-message'; } from '@ucap-webmessenger/api-message';
import { UnreadCountRequest } from 'projects/ucap-webmessenger-api-message/src/lib/apis/unread-count';
import {
MessageDetailDialogComponent,
MessageDetailDialogResult,
MessageDetailDialogData
} from '@app/layouts/messenger/dialogs/message/message-detail.dialog.component';
@Injectable() @Injectable()
export class Effects { export class Effects {

View File

@ -112,6 +112,7 @@ import {
AlertDialogData AlertDialogData
} from '@ucap-webmessenger/ui'; } from '@ucap-webmessenger/ui';
import { UserInfoSS } from '@ucap-webmessenger/protocol-query'; import { UserInfoSS } from '@ucap-webmessenger/protocol-query';
import { TranslateService } from '@ngx-translate/core';
@Injectable() @Injectable()
export class Effects { export class Effects {
@ -422,8 +423,14 @@ export class Effects {
AlertDialogResult AlertDialogResult
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: '', title: this.translateService.instant('chat.errors.label'),
html: `${environment.productConfig.CommonSetting.maxChatRoomUser}명 이상 대화할 수 없습니다.` html: this.translateService.instant(
'chat.errors.maxCountOfRoomMemberWith',
{
maxCount:
environment.productConfig.CommonSetting.maxChatRoomUser
}
)
} }
}); });
return; return;
@ -1095,6 +1102,7 @@ export class Effects {
private groupProtocolService: GroupProtocolService, private groupProtocolService: GroupProtocolService,
private buddyProtocolService: BuddyProtocolService, private buddyProtocolService: BuddyProtocolService,
private sessionStorageService: SessionStorageService, private sessionStorageService: SessionStorageService,
private translateService: TranslateService,
private dialogService: DialogService, private dialogService: DialogService,
private logger: NGXLogger private logger: NGXLogger
) {} ) {}

View File

@ -1,6 +1,62 @@
{ {
"accounts": {
"instructionsOfLogin": "LOGIN TO YOUR ACCOUNT",
"login": "Login",
"logout": "Logout",
"fieldCompany": "Company",
"fieldLoginId": "Login ID",
"fieldLoginPw": "Login password",
"fieldPassword": "Password",
"fieldCurrentPassword": "Current password",
"fieldNewPassword": "New password",
"fieldNewPasswordConfirm": "New password confirm",
"rememberMe": "Remember me",
"autoLogin": "Auto login",
"consentOfPrivacy": "Agreement of ",
"changePassword": "Change password",
"resetPassword": "Reset password",
"passwordExpired": "Password expired",
"descriptionOfPasswordExpired": "Password has expired.<br/>Please change your password and log in again.",
"confirmLogout": "Do you want to log out?",
"results": {
"changedPassword": "Password changed. Please log in again."
},
"errors": {
"requireLoginId": "Login ID is required.",
"requireLoginPw": "Login password is required.",
"requireCompany": "Company is required.",
"requireCurrentPassword": "Current password is required.",
"notSameWithCurrentPassword": "Does not match current password",
"sameWithCurrentPassword": "Same as current password",
"requireNewPassword": "New password is required.",
"requireNewPasswordConfirm": "New password confirm is required.",
"notSameWithNewPassword": "Does not match new password and new password confirm.",
"notContainSpacesForPassword": "Passwords cannot contain spaces",
"notContainUseridForPassword": "User ID cannot be included in the password",
"notContainPhonenumberForPassword": "Your mobile phone number cannot be included in your password",
"notAllowedAlphaNumOver3TimesForPassword": "You can't use numbers or letters over 3 times.",
"notAllowedConsecutiveAlphaNumOver3TimesForPassword": "You cannot use consecutive numbers or letters more than 3 times.",
"notSatisfiedCombineForPassword": "Combination of two or more kinds of letters, numbers and special characters.",
"minLengthCombineForPassword": "Password must be {{lengthOfPassword}} characters if {{countOfCombine}} combination.",
"failToChangePassword": "Failed to change password."
}
},
"profile": { "profile": {
"open": "Open profile" "open": "Open profile",
"errors": {
"label": "Profile error",
"failToChangeProfileImage": "Failed to change profile image."
}
},
"settings": {
"label": "Settings",
"typeGenernal": "Genernal",
"typeNotification": "Notification",
"typeChat": "Chat"
},
"presence": {
"online": "Online",
"offline": "Offline"
}, },
"group": { "group": {
"label": "Group", "label": "Group",
@ -21,13 +77,24 @@
"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" "selectTargetGroup": "Select target group",
"confirmAddNew": "Do you want to add a new group?",
"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.",
"errors": {
"label": "Group errors",
"requireName": "Group name is required."
}
}, },
"chat": { "chat": {
"label": "Chat", "label": "Chat",
"room": "Chat room", "room": "Chat room",
"send": "Send",
"searchRoomByName": "Search by room name", "searchRoomByName": "Search by room name",
"searchEventByText": "Search by chat", "searchEventByText": "Search by chat",
"nameOfRoom": "Name of chat room",
"scopeOfChangeNameOfRoom": "Scope of Changing",
"newTimerChat": "New Timer Chat", "newTimerChat": "New Timer Chat",
"newChat": "New Chat", "newChat": "New Chat",
"startChat": "Chat", "startChat": "Chat",
@ -68,9 +135,12 @@
"errors": { "errors": {
"label": "Chat erros", "label": "Chat erros",
"inputChatMessage": "Please enter a chat message", "inputChatMessage": "Please enter a chat message",
"maxLengthOfMassText": "If you include a sticker, you can't send more than {{maxLength}} characters." "maxLengthOfMassText": "If you include a sticker, you can't send more than {{maxLength}} characters.",
"maxCountOfRoomMemberWith": "you can't open room with more than {{maxCount}} peoples."
}, },
"detailView": "Detail View" "noMoreEvents": "There is no more messages",
"detailView": "Detail View",
"setTimer": "Set timer"
}, },
"organization": { "organization": {
"chart": "Organization chart", "chart": "Organization chart",
@ -84,7 +154,9 @@
}, },
"message": { "message": {
"label": "Message", "label": "Message",
"newMessage": "New message", "new": "New message",
"remove": "Remove message",
"modify": "Modify message",
"sendTo": "Send message", "sendTo": "Send message",
"placeholderForSearch": "search for name, title, content", "placeholderForSearch": "search for name, title, content",
"messageTypeAll": "All", "messageTypeAll": "All",
@ -94,26 +166,80 @@
"searchTypeName": "Name", "searchTypeName": "Name",
"searchTypeTitle": "Title", "searchTypeTitle": "Title",
"searchTypeContent": "Content", "searchTypeContent": "Content",
"badgeDescriptionForUnread": "There is an unconfirmed message." "sender": "Sender",
"receiver": "Receiver",
"receivedTime": "Received Time",
"sendingTime": "Sending Time",
"reservationTime": "Reservation Time",
"countOfReadUser": "count of read",
"countOfUnreadUser": "count of unread",
"badgeDescriptionForUnread": "There is an unconfirmed message.",
"cancelReservation": "Cancel reservation",
"cancelSending": "Cancel sending",
"confirmCancelReservation": "Do you want to cancel reservation?<br/>Canceling will also permanently remove you from the list.",
"confirmCancelSending": "If you cancel the shipment, the message will be deleted from the recipient's message box.",
"confirmRemove": "Do you want to delete selected message(s)?",
"detailOfViewers": "Detail of viewers",
"selectRecipient": "Select recipient",
"results": {
"successForSending": "Your message has been sent.",
"successForReservation": "You have scheduled a message transfer.",
"successForModifying": "Your message has been modified."
},
"errors": {
"label": "Message error",
"failToSending": "The message failed to send.",
"failToModify": "The message failed to modify."
}
}, },
"notice": { "notice": {
"label": "Notice",
"fieldTitle": "Title", "fieldTitle": "Title",
"fieldPostDate": "Post date" "fieldPostDate": "Post date",
"important": "Important"
},
"call": {
"callTo": "Make a call",
"callWithNumber": "Do you want to call {{phoneNumber}}?",
"errors": {
"label": "Call error",
"cannotCallToUser": "You cannot call that user.",
"cannotCallToUserWithoutPhomeNumber": "You cannot call because you do not have a contact number."
}
},
"sms": {
"errors": {
"label": "SMS error",
"haveNoPermission": "You do not have SMS permissions."
}
},
"notification": {
"titleChatEventArrived": "A message of chat has arrived.",
"titleMessageArrived": "A message has arrived."
}, },
"common": { "common": {
"search": "Search", "search": "Search",
"searchWord": "Search word", "searchWord": "Search word",
"searchResult": "Search result", "searchResult": "Search result",
"useOnlyForSpecialCharacter": "Can only use Special characters: {{v}}", "useOnlyForSpecialCharacter": "Can only use Special characters: {{v}}",
"howManyPersons": "person(s)", "units": {
"hour": "hour",
"hourFrom": "hour",
"minute": "minute",
"second": "second",
"persons": "person(s)"
},
"file": { "file": {
"name": "Name of file", "name": "Name of file",
"size": "Size of file", "size": "Size of file",
"download": "Download", "download": "Download",
"delete": "Delete", "delete": "Delete",
"save": "Save",
"saveAll": "Save all",
"downloadSelected": "Download selected", "downloadSelected": "Download selected",
"openDownloadFolder": "Open download folder", "openDownloadFolder": "Open download folder",
"selectFiles": "Select files", "selectFiles": "Select files",
"dropZoneForUpload": "Drop files here to upload.",
"type": { "type": {
"label": "Type of file", "label": "Type of file",
"images": "Images", "images": "Images",
@ -121,13 +247,19 @@
}, },
"results": { "results": {
"saved": "The file has been saved.", "saved": "The file has been saved.",
"savedToPath": "The file has been saved to path[{{path}}]." "savedAll": "All file(s) have(has) been saved.",
"savedToPath": "The file has been saved to path[{{path}}].",
"downloadInProgress": "Download is in progress."
}, },
"errors": { "errors": {
"label": "File errors", "label": "File errors",
"failToUpload": "File upload failed.", "failToUpload": "File upload failed.",
"failToSave": "File save failed.", "failToSave": "File save failed.",
"failToSpecifyPath": "Specifing of save path failed." "failToSaveSomeOfAll": "Some of file(s) save failed",
"failToSpecifyPath": "Specifing of save path failed.",
"expired": "This file has expired",
"noPreview": "This file does not support preview.",
"notSupporedType": "File format is not supported."
} }
}, },
"clipboard": { "clipboard": {
@ -140,8 +272,21 @@
"no": "No", "no": "No",
"confirm": "Confirm", "confirm": "Confirm",
"select": "Select", "select": "Select",
"selectAll": "Select all",
"unselect": "Unselect", "unselect": "Unselect",
"searching": "Searching" "searching": "Searching",
"cancel": "Cancel",
"close": "Close",
"modify": "Modify",
"remove": "Remove",
"apply": "Apply",
"minimizeWindow": "Minimize window",
"maxmizeWindow": "Maxmize window",
"restoreWindow": "Restore window",
"Close window": "Close window",
"zoomOut": "Zoom out",
"zoomIn": "Zoom in",
"zoomReset": "Zoom reset"
}, },
"paginator": { "paginator": {
"itemsPerPage": "Items per page", "itemsPerPage": "Items per page",
@ -150,6 +295,20 @@
"firstPage": "First page", "firstPage": "First page",
"lastPage": "Last page" "lastPage": "Last page"
}, },
"player": {
"play": "Play",
"stop": "Stop"
},
"pronoun": {
"me": "Me",
"all": "All"
},
"translations": {
"targetLanguage": "Traget language",
"noTranslation": "No translation",
"simpleView": "Simple View",
"preview": "Preview"
},
"timezone": { "timezone": {
"Africa/Abidjan": "Africa/Abidjan", "Africa/Abidjan": "Africa/Abidjan",
"Africa/Accra": "Africa/Accra", "Africa/Accra": "Africa/Accra",

View File

@ -1,6 +1,62 @@
{ {
"accounts": {
"instructionsOfLogin": "계정에 로그인 하세요.",
"login": "로그인",
"logout": "로그아웃",
"fieldCompany": "회사",
"fieldLoginId": "로그인 아이디",
"fieldLoginPw": "로그인 비밀번호",
"fieldPassword": "비밀번호",
"fieldCurrentPassword": "현재 비밀번호",
"fieldNewPassword": "신규 비밀번호",
"fieldNewPasswordConfirm": "신규 비밀번호 확인",
"rememberMe": "아이디 저장",
"autoLogin": "자동 로그인",
"consentOfPrivacy": "개인정보 동의",
"changePassword": "비밀번호 변경",
"resetPassword": "비밀번호 초기화",
"passwordExpired": "비밀번호 만기",
"descriptionOfPasswordExpired": "비밀번호가 만료되었습니다.<br/>비밀번호 변경 후 다시 로그인 하세요.",
"confirmLogout": "로그아웃 하시겠습니까?",
"results": {
"changedPassword": "비밀번호가 변경되었습니다. 다시 로그인하여 주십시오"
},
"errors": {
"requireLoginId": "로그인 아이디를 입력해 주세요.",
"requireLoginPw": "로그인 비밀번호를 입력해 주세요.",
"requireCompany": "회사를 입력해 주세요.",
"requireCurrentPassword": "현재 비밀번호를 입력해 주세요",
"notSameWithCurrentPassword": "현재 비밀번호와 일치하지 않습니다",
"sameWithCurrentPassword": "현재 비밀번호와 동일합니다",
"requireNewPassword": "신규 비밀번호를 입력해 주세요",
"requireNewPasswordConfirm": "신규 비밀번호 확인을 입력해 주세요",
"notSameWithNewPassword": "신규 비밀번호와 신규 비밀번호 확인이 다릅니다",
"notContainSpacesForPassword": "비밀번호에는 공백을 입력할 수 없습니다",
"notContainUseridForPassword": "사용자 ID를 비밀번호에 포함할 수 없습니다",
"notContainPhonenumberForPassword": "사용자 휴대폰번호를 비밀번호에 포함할 수 없습니다",
"notAllowedAlphaNumOver3TimesForPassword": "숫자나 문자를 3번이상 반복적으로 사용할 수 없습니다",
"notAllowedConsecutiveAlphaNumOver3TimesForPassword": "연속되는 숫자나 문자를 3번이상 사용할 수 없습니다",
"notSatisfiedCombineForPassword": "문자, 숫자, 특수문자 중 2종류 이상 조합을 해야 합니다",
"minLengthCombineForPassword": "비밀번호는 {{countOfCombine}}가지가 조합된 경우 {{lengthOfPassword}}자를 넘어야 합니다",
"failToChangePassword": "비밀번호 변경에 실패하였습니다."
}
},
"profile": { "profile": {
"open": "프로필 보기" "open": "프로필 보기",
"errors": {
"label": "프로필 에러",
"failToChangeProfileImage": "프로필 이미지 변경에 실패 하였습니다."
}
},
"settings": {
"label": "설정",
"typeGenernal": "일반",
"typeNotification": "알림",
"typeChat": "대화"
},
"presence": {
"online": "온라인",
"offline": "부재중"
}, },
"group": { "group": {
"label": "그룹", "label": "그룹",
@ -13,7 +69,7 @@
"nameDefault": "기본", "nameDefault": "기본",
"favorite": "즐겨찾기 등록", "favorite": "즐겨찾기 등록",
"unfavorite": "즐겨찾기 해제", "unfavorite": "즐겨찾기 해제",
"removeBuddyFromGroup": "그룹에서 삭제", "removeBuddyFromGroup": "그룹에서 삭제",
"copyBuddyToGroup": "대화 상대 복사", "copyBuddyToGroup": "대화 상대 복사",
"moveBuddyToGroup": "대화 상대 이동", "moveBuddyToGroup": "대화 상대 이동",
"changeGroupName": "그룹 이름 바꾸기", "changeGroupName": "그룹 이름 바꾸기",
@ -21,13 +77,24 @@
"removeGroup": "그룹 삭제", "removeGroup": "그룹 삭제",
"startChatWithGroup": "그룹 대화하기", "startChatWithGroup": "그룹 대화하기",
"sendMessageToGroup": "그룹 쪽지 보내기", "sendMessageToGroup": "그룹 쪽지 보내기",
"selectTargetGroup": "대상 그룹 선택" "selectTargetGroup": "대상 그룹 선택",
"confirmAddNew": "새로운 그룹을 추가하시겠습니까?",
"confirmAddNewWith": "새로운 그룹({{nameOfGroup}})을 추가하시겠습니까?",
"confirmAddNewWithout": "새로운 그룹을 추가하시겠습니까?<br/>빈 그룹으로 생성됩니다.",
"confirmRemoveBuddyFromGroup": "[{{target}}]를 그룹에서 삭제하시겠습니까?<br/>프로필에서 삭제하면 모든 그룹에서 삭제됩니다.",
"errors": {
"label": "그룹 에러",
"requireName": "그룹명은 필수입력입니다."
}
}, },
"chat": { "chat": {
"label": "대화", "label": "대화",
"room": "대화방", "room": "대화방",
"send": "보내기",
"searchRoomByName": "대화방 이름 검색", "searchRoomByName": "대화방 이름 검색",
"searchEventByText": "대화 내용 검색", "searchEventByText": "대화 내용 검색",
"nameOfRoom": "대화방 이름",
"scopeOfChangeNameOfRoom": "변경 범위",
"newTimerChat": "새로운 타이머 대화", "newTimerChat": "새로운 타이머 대화",
"newChat": "새로운 대화", "newChat": "새로운 대화",
"startChat": "대화하기", "startChat": "대화하기",
@ -68,9 +135,12 @@
"errors": { "errors": {
"label": "대화 에러", "label": "대화 에러",
"inputChatMessage": "대화 내용을 입력해 주세요.", "inputChatMessage": "대화 내용을 입력해 주세요.",
"maxLengthOfMassText": "스티커를 포함할 경우 {{maxLength}}자 이상 보낼 수 없습니다." "maxLengthOfMassText": "스티커를 포함할 경우 {{maxLength}}자 이상 보낼 수 없습니다.",
"maxCountOfRoomMemberWith": "{{maxCount}}명 이상 대화할 수 없습니다."
}, },
"detailView": "상세 보기" "noMoreEvents": "더이상 검색할 내용이 없습니다.",
"detailView": "상세 보기",
"setTimer": "타이머 설정"
}, },
"organization": { "organization": {
"chart": "조직도", "chart": "조직도",
@ -84,7 +154,9 @@
}, },
"message": { "message": {
"label": "쪽지", "label": "쪽지",
"newMessage": "새로운 쪽지", "new": "새로운 쪽지",
"remove": "쪽지 삭제",
"modify": "쪽지 수정",
"sendTo": "쪽지 보내기", "sendTo": "쪽지 보내기",
"placeholderForSearch": "이름, 제목, 내용 검색", "placeholderForSearch": "이름, 제목, 내용 검색",
"messageTypeAll": "전체", "messageTypeAll": "전체",
@ -94,26 +166,80 @@
"searchTypeName": "이름", "searchTypeName": "이름",
"searchTypeTitle": "제목", "searchTypeTitle": "제목",
"searchTypeContent": "내용", "searchTypeContent": "내용",
"badgeDescriptionForUnread": "확인하지 않은 쪽지가 있습니다." "sender": "보낸 사람",
"receiver": "받는 사람",
"receivedTime": "받은 시간",
"sendingTime": "보낸 시간",
"reservationTime": "발송 예정 시간",
"countOfReadUser": "읽은 사람",
"countOfUnreadUser": "읽은 않은 사람",
"badgeDescriptionForUnread": "확인하지 않은 쪽지가 있습니다.",
"cancelReservation": "예약 발송 취소",
"cancelSending": "발송 취소",
"confirmCancelReservation": "예약발송을 취소 하시겠습니까?<br/>취소하면 목록에서도 영구 삭제됩니다.",
"confirmCancelSending": "발송 취소를 하시면 받는 사람의 쪽지함에서 쪽지가 삭제됩니다.",
"confirmRemove": "선택한 쪽지를 삭제하시겠습니까?",
"detailOfViewers": "읽음 확인",
"selectRecipient": "수신자 선택",
"results": {
"successForSending": "쪽지를 전송하였습니다.",
"successForReservation": "쪽지 전송을 예약 하였습니다.",
"successForModifying": "쪽지를 수정하였습니다."
},
"errors": {
"label": "쪽지 에러",
"failToSending": "쪽지를 전송에 실패 하였습니다.",
"failToModify": "쪽지 수정에 실패 하였습니다."
}
}, },
"notice": { "notice": {
"label": "공지사항",
"fieldTitle": "제목", "fieldTitle": "제목",
"fieldPostDate": "게시일" "fieldPostDate": "게시일",
"important": "중요"
},
"call": {
"callTo": "전화 걸기",
"callWithNumber": "{{phoneNumber}}로 전화를 거시겠습니까?",
"errors": {
"label": "전화 에러",
"cannotCallToUser": "전화를 걸 수 없는 사용자 입니다.",
"cannotCallToUserWithoutPhomeNumber": "상대방 번호가 없어 전화를 걸 수 없습니다."
}
},
"sms": {
"errors": {
"label": "SMS 에러",
"haveNoPermission": "SMS 사용 권한이 없습니다."
}
},
"notification": {
"titleChatEventArrived": "메세지가 도착했습니다.",
"titleMessageArrived": "쪽지가 도착했습니다."
}, },
"common": { "common": {
"search": "검색", "search": "검색",
"searchWord": "검색어", "searchWord": "검색어",
"searchResult": "검색 결과", "searchResult": "검색 결과",
"useOnlyForSpecialCharacter": "특수문자는 {{specialCharacter}}만 사용할 수 있습니다.", "useOnlyForSpecialCharacter": "특수문자는 {{specialCharacter}}만 사용할 수 있습니다.",
"howManyPersons": "명", "units": {
"hour": "시",
"hourFrom": "시간",
"minute": "분",
"second": "초",
"persons": "명"
},
"file": { "file": {
"name": "파일 이름", "name": "파일 이름",
"size": "파일 크기", "size": "파일 크기",
"download": "파일 다운로드", "download": "파일 다운로드",
"delete": "파일 삭제", "delete": "파일 삭제",
"save": "파일 저장",
"saveAll": "파일 모두 저장",
"downloadSelected": "선택된 파일 다운로드", "downloadSelected": "선택된 파일 다운로드",
"openDownloadFolder": "다운로드 폴더 열기", "openDownloadFolder": "다운로드 폴더 열기",
"selectFiles": "파일을 선택하세요", "selectFiles": "파일을 선택하세요",
"dropZoneForUpload": "여기에 파일을 Drop하시면 업로드 됩니다.",
"type": { "type": {
"label": "파일 종류", "label": "파일 종류",
"images": "이미지", "images": "이미지",
@ -121,13 +247,19 @@
}, },
"results": { "results": {
"saved": "파일이 저장되었습니다.", "saved": "파일이 저장되었습니다.",
"savedToPath": "파일이 경로[{{path}}]에 저장되었습니다." "savedAll": "모든 파일이 저장되었습니다.",
"savedToPath": "파일이 경로[{{path}}]에 저장되었습니다.",
"downloadInProgress": "다운로드가 진행중입니다."
}, },
"errors": { "errors": {
"label": "파일 에러", "label": "파일 에러",
"failToUpload": "파일 업로드에 실패하였습니다.", "failToUpload": "파일 업로드에 실패하였습니다.",
"failToSave": "파일 저장에 실패하였습니다.", "failToSave": "파일 저장에 실패하였습니다.",
"failToSpecifyPath": "저장경로 지정에 실패하였습니다." "failToSaveSomeOfAll": "파일 저장 중 일부 파일이 실패하였습니다.",
"failToSpecifyPath": "저장경로 지정에 실패하였습니다.",
"expired": "기간이 만료된 파일입니다",
"noPreview": "미리보기를 지원하지 않는 파일입니다.",
"notSupporedType": "지원하지 않는 파일형식입니다."
} }
}, },
"clipboard": { "clipboard": {
@ -136,12 +268,25 @@
} }
}, },
"messages": { "messages": {
"yes": "", "yes": "",
"no": "아니오", "no": "아니오",
"confirm": "확인", "confirm": "확인",
"select": "선택", "select": "선택",
"selectAll": "전체 선택",
"unselect": "선택 해제", "unselect": "선택 해제",
"searching": "검색중" "searching": "검색중",
"cancel": "취소",
"close": "닫기",
"modify": "수정",
"remove": "삭제",
"apply": "적용",
"minimizeWindow": "창 최소화",
"maxmizeWindow": "창 최대화",
"restoreWindow": "창 이전 크기",
"closeWindow": "창 닫기",
"zoomOut": "축소",
"zoomIn": "확대",
"zoomReset": "원본 비율"
}, },
"paginator": { "paginator": {
"itemsPerPage": "페이지별 갯수", "itemsPerPage": "페이지별 갯수",
@ -150,6 +295,20 @@
"firstPage": "처음 페이지", "firstPage": "처음 페이지",
"lastPage": "마지막 페이지" "lastPage": "마지막 페이지"
}, },
"player": {
"play": "재생",
"stop": "멈춤"
},
"pronoun": {
"me": "나",
"all": "전체"
},
"translations": {
"targetLanguage": "대상 언어",
"noTranslation": "번역 없음",
"simpleView": "간략 보기",
"preview": "미리 보기"
},
"timezone": { "timezone": {
"Africa/Abidjan": "아프리카/아비 장", "Africa/Abidjan": "아프리카/아비 장",
"Africa/Accra": "아프리카/아크라", "Africa/Accra": "아프리카/아크라",

View File

@ -1,7 +1,7 @@
<div class="change-password-form"> <div class="change-password-form">
<form name="changePasswordForm" [formGroup]="changePasswordForm" novalidate> <form name="changePasswordForm" [formGroup]="changePasswordForm" novalidate>
<mat-form-field> <mat-form-field>
<mat-label>현재 패스워드</mat-label> <mat-label>{{ 'accounts.fieldCurrentPassword' | translate }}</mat-label>
<input <input
matInput matInput
type="password" type="password"
@ -9,11 +9,13 @@
/> />
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-label>신규 패스워드</mat-label> <mat-label>{{ 'accounts.fieldNewPassword' | translate }}</mat-label>
<input matInput type="password" [formControl]="newLoginPwFormControl" /> <input matInput type="password" [formControl]="newLoginPwFormControl" />
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-label>신규 패스워드 확인</mat-label> <mat-label>{{
'accounts.fieldNewPasswordConfirm' | translate
}}</mat-label>
<input <input
matInput matInput
type="password" type="password"
@ -28,7 +30,7 @@
currentLoginPwFormControl.hasError('required') currentLoginPwFormControl.hasError('required')
" "
> >
현재 비밀번호를 입력해 주세요 {{ 'accounts.errors.requireCurrentPassword' | translate }}
</mat-error> </mat-error>
<mat-error <mat-error
*ngIf=" *ngIf="
@ -36,7 +38,7 @@
currentLoginPwFormControl.hasError('ucapPasswordSame') currentLoginPwFormControl.hasError('ucapPasswordSame')
" "
> >
현재 비밀번호와 일치하지 않습니다 {{ 'accounts.errors.notSameWithCurrentPassword' | translate }}
</mat-error> </mat-error>
<mat-error <mat-error
@ -45,7 +47,7 @@
newLoginPwFormControl.hasError('required') newLoginPwFormControl.hasError('required')
" "
> >
신규 비밀번호를 입력해 주세요 {{ 'accounts.errors.requireNewPassword' | translate }}
</mat-error> </mat-error>
<mat-error <mat-error
*ngIf=" *ngIf="
@ -53,7 +55,7 @@
newLoginPwFormControl.hasError('ucapNotSameWith') newLoginPwFormControl.hasError('ucapNotSameWith')
" "
> >
현재 비밀번호와 동일합니다 {{ 'accounts.errors.sameWithCurrentPassword' | translate }}
</mat-error> </mat-error>
<mat-error <mat-error
*ngIf=" *ngIf="
@ -67,46 +69,60 @@
" "
> >
<ng-container *ngSwitchCase="PasswordValidationResult.IncludeSpace"> <ng-container *ngSwitchCase="PasswordValidationResult.IncludeSpace">
비밀번호에는 공백을 입력할 수 없습니다 {{ 'accounts.errors.notContainSpacesForPassword' | translate }}
</ng-container> </ng-container>
<ng-container *ngSwitchCase="PasswordValidationResult.IncludeUserId"> <ng-container *ngSwitchCase="PasswordValidationResult.IncludeUserId">
사용자 ID를 비밀번호에 포함할 수 없습니다 {{ 'accounts.errors.notContainUseridForPassword' | translate }}
</ng-container> </ng-container>
<ng-container <ng-container
*ngSwitchCase="PasswordValidationResult.IncludePhoneNumber" *ngSwitchCase="PasswordValidationResult.IncludePhoneNumber"
> >
사용자 휴대폰번호를 비밀번호에 포함할 수 없습니다 {{ 'accounts.errors.notContainPhonenumberForPassword' | translate }}
</ng-container> </ng-container>
<ng-container <ng-container
*ngSwitchCase="PasswordValidationResult.IncludeRepeated" *ngSwitchCase="PasswordValidationResult.IncludeRepeated"
> >
숫자나 문자를 3번이상 반복적으로 사용할 수 없습니다 {{
'accounts.errors.notAllowedAlphaNumOver3TimesForPassword'
| translate
}}
</ng-container> </ng-container>
<ng-container <ng-container
*ngSwitchCase="PasswordValidationResult.IncludeIncrements" *ngSwitchCase="PasswordValidationResult.IncludeIncrements"
> >
연속되는 숫자나 문자를 3번이상 사용할 수 없습니다 {{
'accounts.errors.notAllowedConsecutiveAlphaNumOver3TimesForPassword'
| translate
}}
</ng-container> </ng-container>
<ng-container <ng-container
*ngSwitchCase="PasswordValidationResult.IncludeDecrements" *ngSwitchCase="PasswordValidationResult.IncludeDecrements"
> >
연속되는 숫자나 문자를 3번이상 사용할 수 없습니다 {{
'accounts.errors.notAllowedConsecutiveAlphaNumOver3TimesForPassword'
| translate
}}
</ng-container> </ng-container>
<ng-container <ng-container
*ngSwitchCase="PasswordValidationResult.LackOfCombination" *ngSwitchCase="PasswordValidationResult.LackOfCombination"
> >
문자, 숫자, 특수문자 중 2종류 이상 조합을 해야 합니다 {{ 'accounts.errors.notSatisfiedCombineForPassword' | translate }}
</ng-container> </ng-container>
<ng-container <ng-container
*ngSwitchCase="PasswordValidationResult.TooShortCombinationLength" *ngSwitchCase="PasswordValidationResult.TooShortCombinationLength"
> >
비밀번호는{{ {{
newLoginPwFormControl.getError('ucapPassword').result.extra 'accounts.errors.minLengthCombineForPassword'
.combinationCount | translate
}}가지가 조합된 경우{{ : {
newLoginPwFormControl.getError('ucapPassword').result.extra countOfCombine: newLoginPwFormControl.getError(
.minPwLen 'ucapPassword'
}}자를 넘어야 합니다 ).result.extra.combinationCount,
lengthOfPassword: newLoginPwFormControl.getError(
'ucapPassword'
).result.extra.minPwLen
}
}}
</ng-container> </ng-container>
</ng-container> </ng-container>
</mat-error> </mat-error>
@ -116,7 +132,7 @@
newConfirmLoginPwFormControl.hasError('required') newConfirmLoginPwFormControl.hasError('required')
" "
> >
신규 비밀번호 확인을 입력해 주세요 {{ 'accounts.errors.requireNewPassword' | translate }}
</mat-error> </mat-error>
<mat-error <mat-error
*ngIf=" *ngIf="
@ -124,7 +140,7 @@
newConfirmLoginPwFormControl.hasError('ucapSameWith') newConfirmLoginPwFormControl.hasError('ucapSameWith')
" "
> >
신규 비밀번호와 신규 비밀번호 확인이 다릅니다 {{ 'accounts.errors.notSameWithNewPassword' | translate }}
</mat-error> </mat-error>
</div> </div>
@ -135,7 +151,7 @@
[disabled]="changePasswordForm.invalid" [disabled]="changePasswordForm.invalid"
(click)="onClickChangePassword()" (click)="onClickChangePassword()"
> >
패스워드 변경 {{ 'accounts.changePassword' | translate }}
</button> </button>
</form> </form>
</div> </div>

View File

@ -3,12 +3,12 @@
class="mat-title" class="mat-title"
style="background-image: url(./assets/images/logo/bg_login_w160.png);" style="background-image: url(./assets/images/logo/bg_login_w160.png);"
> >
LOGIN TO YOUR ACCOUNT {{ 'accounts.instructionsOfLogin' | translate }}
</div> </div>
<form name="loginForm" [formGroup]="loginForm" novalidate> <form name="loginForm" [formGroup]="loginForm" novalidate>
<mat-form-field [style.display]="!!curCompanyCode ? 'none' : 'block'"> <mat-form-field [style.display]="!!curCompanyCode ? 'none' : 'block'">
<mat-label>Company</mat-label> <mat-label>{{ 'accounts.fieldCompany' | translate }}</mat-label>
<mat-select formControlName="companyCode" required> <mat-select formControlName="companyCode" required>
<mat-option <mat-option
*ngFor="let company of companyList" *ngFor="let company of companyList"
@ -17,26 +17,23 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="loginForm.get('companyCode').hasError('required')"> <mat-error *ngIf="loginForm.get('companyCode').hasError('required')">
Company is required {{ 'accounts.errors.requireCompany' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-label>Login ID</mat-label> <mat-label>{{ 'accounts.fieldLoginId' | translate }}</mat-label>
<input matInput formControlName="loginId" /> <input matInput formControlName="loginId" />
<mat-error *ngIf="loginForm.get('loginId').hasError('required')"> <mat-error *ngIf="loginForm.get('loginId').hasError('required')">
Login ID is required {{ 'accounts.errors.requireLoginId' | translate }}
</mat-error>
<mat-error *ngIf="!loginForm.get('loginId').hasError('required')">
Please enter a valid login id
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-label>Password</mat-label> <mat-label>{{ 'accounts.fieldLoginPw' | translate }}</mat-label>
<input matInput type="password" formControlName="loginPw" #loginPw /> <input matInput type="password" formControlName="loginPw" #loginPw />
<mat-error> <mat-error>
Password is required {{ 'accounts.errors.requireLoginPw' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
@ -62,7 +59,7 @@
formControlName="rememberMe" formControlName="rememberMe"
aria-label="Remember Me" aria-label="Remember Me"
> >
아이디 저장 {{ 'accounts.rememberMe' | translate }}
</mat-checkbox> </mat-checkbox>
<mat-checkbox <mat-checkbox
@ -71,7 +68,7 @@
formControlName="autoLogin" formControlName="autoLogin"
aria-label="Auto Login" aria-label="Auto Login"
> >
자동 로그인 {{ 'accounts.autoLogin' | translate }}
</mat-checkbox> </mat-checkbox>
</div> </div>
</form> </form>

View File

@ -15,6 +15,7 @@ import { ChangePasswordComponent } from './components/change-password.component'
import { LoginComponent } from './components/login.component'; import { LoginComponent } from './components/login.component';
import { AccountService } from './services/account.service'; import { AccountService } from './services/account.service';
import { TranslateModule } from '@ngx-translate/core';
const COMPONENTS = [ChangePasswordComponent, LoginComponent]; const COMPONENTS = [ChangePasswordComponent, LoginComponent];
const SERVICES = [AccountService]; const SERVICES = [AccountService];
@ -31,7 +32,9 @@ const SERVICES = [AccountService];
MatFormFieldModule, MatFormFieldModule,
MatIconModule, MatIconModule,
MatInputModule, MatInputModule,
MatSelectModule MatSelectModule,
TranslateModule
], ],
exports: [...COMPONENTS], exports: [...COMPONENTS],
declarations: [...COMPONENTS] declarations: [...COMPONENTS]

View File

@ -72,8 +72,6 @@
</div> </div>
<div class="date"> <div class="date">
<!-- {{ roomInfo.finalEventDate | dateToStringChatList }}
.. -->
{{ roomInfo.finalEventDate | ucapDate: 'C' }} {{ roomInfo.finalEventDate | ucapDate: 'C' }}
</div> </div>
</dd> </dd>

View File

@ -3,11 +3,20 @@
<div fxLayout="row" class="file-upload-info"> <div fxLayout="row" class="file-upload-info">
<!--<mat-icon>image</mat-icon>--> <!--<mat-icon>image</mat-icon>-->
<!--파일이미지 svg--> <!--파일이미지 svg-->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" <svg
stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" stroke-linejoin="round"> xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="butt"
stroke-linejoin="round"
>
<path <path
d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"> d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"
</path> ></path>
</svg> </svg>
<div class="file-upload-name">{{ fileUploadItem.file.name }}</div> <div class="file-upload-name">{{ fileUploadItem.file.name }}</div>
@ -17,13 +26,16 @@
</div> </div>
<div fxLayout="row" class="file-upload-progress"> <div fxLayout="row" class="file-upload-progress">
<mat-progress-bar mode="determinate" [value]="fileUploadItem.uploadingProgress$ | async"> <mat-progress-bar
mode="determinate"
[value]="fileUploadItem.uploadingProgress$ | async"
>
</mat-progress-bar> </mat-progress-bar>
</div> </div>
</div> </div>
<div *ngIf="uploadItems" fxLayout="column"> <div *ngIf="uploadItems" fxLayout="column">
<div>여기에 파일을 Drop하시면 업로드 됩니다.</div> <div>{{ 'common.file.dropZoneForUpload' | translate }}</div>
<div></div> <div></div>
</div> </div>
</div> </div>

View File

@ -23,7 +23,7 @@
<button <button
mat-icon-button mat-icon-button
class="ucap-binary-viewer-action" class="ucap-binary-viewer-action"
matTooltip="다운로드" matTooltip="{{ 'common.file.download' | translate }}"
matTooltipPosition="below" matTooltipPosition="below"
aria-label="" aria-label=""
(click)="onClickDownload()" (click)="onClickDownload()"
@ -92,7 +92,7 @@
</div> </div>
</div> </div>
<div class="guide-msg"> <div class="guide-msg">
미리보기를 지원하지 않는 파일입니다. {{ 'common.file.errors.noPreview' | translate }}
</div> </div>
<div> <div>
<button <button
@ -101,7 +101,7 @@
aria-label="" aria-label=""
(click)="onClickDownload()" (click)="onClickDownload()"
> >
Download {{ 'common.file.download' | translate }}
</button> </button>
</div> </div>
</div> </div>

View File

@ -23,7 +23,7 @@
<button <button
mat-icon-button mat-icon-button
class="ucap-image-viewer-action" class="ucap-image-viewer-action"
matTooltip="이미지 크기 재설정" matTooltip="{{ 'common.messages.zoomReset' | translate }}"
matTooltipPosition="below" matTooltipPosition="below"
aria-label="" aria-label=""
> >
@ -48,7 +48,7 @@
<button <button
mat-icon-button mat-icon-button
class="ucap-image-viewer-action" class="ucap-image-viewer-action"
matTooltip="축소" matTooltip="{{ 'common.messages.zoomOut' | translate }}"
matTooltipPosition="below" matTooltipPosition="below"
aria-label="" aria-label=""
> >
@ -72,7 +72,7 @@
<button <button
mat-icon-button mat-icon-button
class="ucap-image-viewer-action" class="ucap-image-viewer-action"
matTooltip="확대" matTooltip="{{ 'common.messages.zoomIn' | translate }}"
matTooltipPosition="below" matTooltipPosition="below"
aria-label="" aria-label=""
> >
@ -97,7 +97,7 @@
<button <button
mat-icon-button mat-icon-button
class="ucap-image-viewer-action" class="ucap-image-viewer-action"
matTooltip="다운로드" matTooltip="{{ 'common.file.download' | translate }}"
matTooltipPosition="below" matTooltipPosition="below"
aria-label="" aria-label=""
(click)="onClickDownload()" (click)="onClickDownload()"
@ -124,7 +124,7 @@
mat-icon-button mat-icon-button
color="warn" color="warn"
class="ucap-image-viewer-action btn-close" class="ucap-image-viewer-action btn-close"
matTooltip="뷰어닫기" matTooltip="{{ 'common.messages.close' | translate }}"
(click)="onClickClose()" (click)="onClickClose()"
> >
<svg <svg

View File

@ -6,7 +6,7 @@
<button <button
mat-icon-button mat-icon-button
class="ucap-image-viewer-action" class="ucap-image-viewer-action"
matTooltip="다운로드" matTooltip="{{ 'common.file.download' | translate }}"
matTooltipPosition="below" matTooltipPosition="below"
aria-label="" aria-label=""
(click)="onClickDownload()" (click)="onClickDownload()"
@ -33,6 +33,7 @@
mat-icon-button mat-icon-button
color="warn" color="warn"
class="ucap-image-viewer-action btn-close" class="ucap-image-viewer-action btn-close"
matTooltip="{{ 'common.messages.close' | translate }}"
(click)="onClickClose()" (click)="onClickClose()"
> >
<svg <svg
@ -125,7 +126,9 @@
<button <button
mat-icon-button mat-icon-button
class="ucap-sound-viewer-action" class="ucap-sound-viewer-action"
[matTooltip]="playing ? '멈춤' : '재생'" matTooltip="{{
(playing ? 'common.player.stop' : 'common.player.play') | translate
}}"
aria-label="" aria-label=""
(click)="onClickPlayOrPause()" (click)="onClickPlayOrPause()"
> >

View File

@ -27,7 +27,7 @@
<button <button
mat-icon-button mat-icon-button
class="ucap-video-viewer-action" class="ucap-video-viewer-action"
matTooltip="다운로드" matTooltip="{{ 'common.file.download' | translate }}"
matTooltipPosition="below" matTooltipPosition="below"
aria-label="" aria-label=""
(click)="onClickDownload()" (click)="onClickDownload()"
@ -54,7 +54,7 @@
mat-icon-button mat-icon-button
color="warn" color="warn"
class="ucap-image-viewer-action btn-close" class="ucap-image-viewer-action btn-close"
matTooltip="뷰어닫기" matTooltip="{{ 'common.messages.close' | translate }}"
(click)="onClickClose()" (click)="onClickClose()"
> >
<svg <svg
@ -130,7 +130,9 @@
<button <button
mat-icon-button mat-icon-button
class="ucap-video-viewer-action" class="ucap-video-viewer-action"
[matTooltip]="playing ? '멈춤' : '재생'" matTooltip="{{
(playing ? 'common.player.stop' : 'common.player.play') | translate
}}"
aria-label="" aria-label=""
(click)="onClickPlayOrPause()" (click)="onClickPlayOrPause()"
> >

View File

@ -15,7 +15,7 @@
mat-stroked-button mat-stroked-button
(click)="onClickSendTranslationMessage(translationPreviewInfo)" (click)="onClickSendTranslationMessage(translationPreviewInfo)"
> >
Send {{ 'chat.send' | translate }}
</button> </button>
<span class="btn-close"> <span class="btn-close">
<button <button
@ -32,12 +32,16 @@
<div> <div>
<form name="translationForm" [formGroup]="translationForm"> <form name="translationForm" [formGroup]="translationForm">
<mat-form-field> <mat-form-field>
<mat-label>Dest Type</mat-label> <mat-label>{{
'common.translations.targetLanguage' | translate
}}</mat-label>
<mat-select <mat-select
formControlName="destType" formControlName="destType"
(selectionChange)="onChangeSelection($event)" (selectionChange)="onChangeSelection($event)"
> >
<mat-option value="">번역없음</mat-option> <mat-option value="">{{
'common.translations.noTranslation' | translate
}}</mat-option>
<mat-option *ngFor="let dest of translationDestList" [value]="dest.key" <mat-option *ngFor="let dest of translationDestList" [value]="dest.key"
>{{ dest.text }} >{{ dest.text }}
</mat-option> </mat-option>
@ -47,13 +51,13 @@
labelPosition="before" labelPosition="before"
[checked]="simpleView" [checked]="simpleView"
(change)="onChangToggleSimpleview($event)" (change)="onChangToggleSimpleview($event)"
>Simple View</mat-slide-toggle >{{ 'common.translations.simpleView' | translate }}</mat-slide-toggle
> >
<mat-slide-toggle <mat-slide-toggle
labelPosition="before" labelPosition="before"
[checked]="preView" [checked]="preView"
(change)="onChangTogglePreview($event)" (change)="onChangTogglePreview($event)"
>Preview</mat-slide-toggle >{{ 'common.translations.preview' | translate }}</mat-slide-toggle
> >
</form> </form>
</div> </div>

View File

@ -10,7 +10,7 @@
</mat-card-content> </mat-card-content>
<mat-card-actions class="button-farm flex-row"> <mat-card-actions class="button-farm flex-row">
<button mat-stroked-button (click)="onClickConfirm()" class="mat-primary"> <button mat-stroked-button (click)="onClickConfirm()" class="mat-primary">
Confirm {{ 'common.messages.confirm' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -1,6 +1,11 @@
<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 class="card-header"> <mat-card-header
<mat-card-title >{{ data.title }}</mat-card-title> cdkDrag
cdkDragRootElement=".cdk-overlay-pane"
cdkDragHandle
class="card-header"
>
<mat-card-title>{{ data.title }}</mat-card-title>
<!-- <mat-card-subtitle>Confirm</mat-card-subtitle> --> <!-- <mat-card-subtitle>Confirm</mat-card-subtitle> -->
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
@ -14,10 +19,10 @@
(click)="onClickChoice(false)" (click)="onClickChoice(false)"
class="mat-primary" class="mat-primary"
> >
No {{ 'common.messages.no' | translate }}
</button> </button>
<button mat-flat-button (click)="onClickChoice(true)" class="mat-primary"> <button mat-flat-button (click)="onClickChoice(true)" class="mat-primary">
Yes {{ 'common.messages.yes' | translate }}
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>

View File

@ -32,7 +32,7 @@ export class ClickDebounceDirective implements OnInit, OnDestroy {
} }
@HostListener('click', ['$event']) @HostListener('click', ['$event'])
clickEvent(event) { clickEvent(event: Event) {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
this.clicks.next(event); this.clicks.next(event);

View File

@ -19,6 +19,7 @@ import {
AlertDialogResult, AlertDialogResult,
AlertDialogData AlertDialogData
} from '../dialogs/alert.dialog.component'; } from '../dialogs/alert.dialog.component';
import { TranslateService } from '@ngx-translate/core';
@Directive({ @Directive({
selector: 'input[ucapFileUploadFor], div[ucapFileUploadFor]' selector: 'input[ucapFileUploadFor], div[ucapFileUploadFor]'
@ -45,6 +46,7 @@ export class FileUploadForDirective implements AfterViewInit {
private commonApiService: CommonApiService, private commonApiService: CommonApiService,
private elementRef: ElementRef, private elementRef: ElementRef,
private logger: NGXLogger, private logger: NGXLogger,
private translateService: TranslateService,
private dialogService: DialogService private dialogService: DialogService
) {} ) {}
@ -126,7 +128,9 @@ export class FileUploadForDirective implements AfterViewInit {
>(AlertDialogComponent, { >(AlertDialogComponent, {
data: { data: {
title: 'Alert', title: 'Alert',
html: `지원하지 않는 파일형식입니다.${ html: `${this.translateService.instant(
'common.file.errors.notSupporedType'
)} ${
checkExt.reject.length > 0 checkExt.reject.length > 0
? '<br/>(' + checkExt.reject.join(',') + ')' ? '<br/>(' + checkExt.reject.join(',') + ')'
: '' : ''

View File

@ -1,66 +0,0 @@
import { Pipe, PipeTransform } from '@angular/core';
import { StringUtil } from '../utils/string.util';
import moment from 'moment';
@Pipe({
name: 'dateToStringChatList'
})
export class DateToStringForChatRoomListPipe implements PipeTransform {
transform(value: any): string {
const curDate = new Date();
const yesterDate = new Date(curDate.getTime() - 1 * 24 * 60 * 60 * 1000);
let date: Date;
if (typeof value === 'string') {
date = moment(value.toString()).toDate();
} else if (value instanceof Date) {
date = value;
} else {
return value;
}
if (
curDate.getFullYear() === date.getFullYear() &&
curDate.getMonth() === date.getMonth() &&
curDate.getDate() === date.getDate()
) {
// 당일
return StringUtil.dateFormat(date, 'a/p HH:mm');
} else if (
yesterDate.getFullYear() === date.getFullYear() &&
yesterDate.getMonth() === date.getMonth() &&
yesterDate.getDate() === date.getDate()
) {
// 어제
return '어제';
} else {
return StringUtil.dateFormat(date, 'MM.dd');
}
}
}
@Pipe({
name: 'dateToStringFormat'
})
export class DateToStringFormatPipe implements PipeTransform {
transform(value: any, format?: string): string {
const date = moment(value.toString()).toDate();
if (!!format) {
return StringUtil.dateFormat(date, format);
} else {
return StringUtil.dateFormat(date, 'YYYY.MM.DD');
}
}
}
@Pipe({
name: 'dateDistanceToDay'
})
export class DateDistanceToDatePipe implements PipeTransform {
transform(value: any, distanceDay?: number): Date {
distanceDay = distanceDay || 0;
const date: Date = moment(value.toString()).toDate();
date.setDate(date.getDate() + distanceDay);
return date;
}
}

View File

@ -27,6 +27,8 @@ import {
import { DragDropModule } from '@angular/cdk/drag-drop'; import { DragDropModule } from '@angular/cdk/drag-drop';
import { TranslateModule } from '@ngx-translate/core';
import { FileUploadQueueComponent } from './components/file-upload-queue.component'; import { FileUploadQueueComponent } from './components/file-upload-queue.component';
import { FloatActionButtonComponent } from './components/float-action-button.component'; import { FloatActionButtonComponent } from './components/float-action-button.component';
import { FileViewerComponent } from './components/file-viewer.component'; import { FileViewerComponent } from './components/file-viewer.component';
@ -62,11 +64,6 @@ import { ConfirmDialogComponent } from './dialogs/confirm.dialog.component';
import { BytesPipe } from './pipes/bytes.pipe'; import { BytesPipe } from './pipes/bytes.pipe';
import { LinefeedToHtmlPipe, HtmlToLinefeedPipe } from './pipes/linefeed.pipe'; import { LinefeedToHtmlPipe, HtmlToLinefeedPipe } from './pipes/linefeed.pipe';
import {
DateToStringForChatRoomListPipe,
DateToStringFormatPipe,
DateDistanceToDatePipe
} from './pipes/dates.pipe';
import { SecondsToMinutesPipe } from './pipes/seconds-to-minutes.pipe'; import { SecondsToMinutesPipe } from './pipes/seconds-to-minutes.pipe';
import { LinkyPipe } from './pipes/linky.pipe'; import { LinkyPipe } from './pipes/linky.pipe';
import { TranslatePipe } from './pipes/translate.pipe'; import { TranslatePipe } from './pipes/translate.pipe';
@ -109,9 +106,6 @@ const PIPES = [
BytesPipe, BytesPipe,
LinefeedToHtmlPipe, LinefeedToHtmlPipe,
HtmlToLinefeedPipe, HtmlToLinefeedPipe,
DateToStringForChatRoomListPipe,
DateToStringFormatPipe,
DateDistanceToDatePipe,
SecondsToMinutesPipe, SecondsToMinutesPipe,
LinkyPipe, LinkyPipe,
TranslatePipe, TranslatePipe,
@ -152,7 +146,8 @@ const SERVICES = [
MatDatepickerModule, MatDatepickerModule,
MatSelectModule, MatSelectModule,
MatSlideToggleModule, MatSlideToggleModule,
DragDropModule DragDropModule,
TranslateModule
], ],
exports: [...COMPONENTS, ...DIRECTIVES, ...PIPES], exports: [...COMPONENTS, ...DIRECTIVES, ...PIPES],
declarations: [...COMPONENTS, ...DIALOGS, ...DIRECTIVES, ...PIPES], declarations: [...COMPONENTS, ...DIALOGS, ...DIRECTIVES, ...PIPES],