Merge branch 'master' of https://git.loafle.net/ucap-web/next-ucap-messenger
# Conflicts: # projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.html
This commit is contained in:
commit
085f625ef6
|
@ -11,6 +11,9 @@ import { AppService } from './services/app.service';
|
|||
import { environment } from '../environments/environment';
|
||||
import { BrowserNativeService } from '@ucap-webmessenger/native-browser';
|
||||
import { ElectronNativeService } from '@ucap-webmessenger/native-electron';
|
||||
import { MatPaginatorIntl, MatPaginatorModule } from '@angular/material';
|
||||
import { PaginatorIntlService } from '@ucap-webmessenger/ui';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
export function initializeApp(
|
||||
appService: AppService,
|
||||
|
@ -22,7 +25,7 @@ export function initializeApp(
|
|||
}
|
||||
|
||||
@NgModule({
|
||||
imports: [],
|
||||
imports: [MatPaginatorModule],
|
||||
exports: [],
|
||||
providers: [
|
||||
{
|
||||
|
@ -34,6 +37,10 @@ export function initializeApp(
|
|||
: ElectronNativeService,
|
||||
deps: [HttpClient]
|
||||
},
|
||||
{
|
||||
provide: MatPaginatorIntl,
|
||||
useClass: PaginatorIntlService
|
||||
},
|
||||
...SERVICES,
|
||||
...RESOLVERS,
|
||||
{
|
||||
|
|
|
@ -177,10 +177,12 @@
|
|||
"
|
||||
(click)="onClickProfileContextMenu('REGISTER_FAVORITE', userInfo)"
|
||||
>
|
||||
즐겨찾기 {{ userInfo.isFavorit ? '해제' : '등록' }}
|
||||
{{
|
||||
(userInfo.isFavorit ? 'group.unfavorite' : 'group.favorite') | translate
|
||||
}}
|
||||
</button>
|
||||
<button mat-menu-item (click)="onClickProfileContextMenu('CHAT', userInfo)">
|
||||
대화하기
|
||||
{{ 'chat.startChat' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
|
@ -194,7 +196,7 @@
|
|||
"
|
||||
(click)="onClickProfileContextMenu('REMOVE_FROM_GROUP', userInfo, group)"
|
||||
>
|
||||
이 그룹에서 삭제
|
||||
{{ 'group.removeBuddyFromGroup' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
|
@ -203,7 +205,7 @@
|
|||
"
|
||||
(click)="onClickProfileContextMenu('COPY_BUDDY', userInfo)"
|
||||
>
|
||||
대화 상대 복사
|
||||
{{ 'group.copyBuddyToGroup' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
|
@ -212,7 +214,7 @@
|
|||
"
|
||||
(click)="onClickProfileContextMenu('MOVE_BUDDY', userInfo, group)"
|
||||
>
|
||||
대화 상대 이동
|
||||
{{ 'group.moveBuddyToGroup' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
|
@ -221,7 +223,7 @@
|
|||
"
|
||||
(click)="onClickProfileContextMenu('SEND_MESSAGE', userInfo)"
|
||||
>
|
||||
쪽지 보내기
|
||||
{{ 'message.sendTo' | translate }}
|
||||
</button>
|
||||
<!-- <button
|
||||
mat-menu-item
|
||||
|
@ -251,14 +253,14 @@
|
|||
*ngIf="getShowGroupContextMenu('CHAT', group)"
|
||||
(click)="onClickGroupContextMenu('CHAT', group)"
|
||||
>
|
||||
그룹 대화하기
|
||||
{{ 'group.startChatWithGroup' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowGroupContextMenu('SEND_MESSAGE', group)"
|
||||
(click)="onClickGroupContextMenu('SEND_MESSAGE', group)"
|
||||
>
|
||||
그룹 쪽지 보내기
|
||||
{{ 'group.sendMessageToGroup' | translate }}
|
||||
</button>
|
||||
<mat-divider *ngIf="getShowGroupContextMenu('DIV1', group)"></mat-divider>
|
||||
<button
|
||||
|
@ -266,21 +268,21 @@
|
|||
*ngIf="getShowGroupContextMenu('RENAME', group)"
|
||||
(click)="onClickGroupContextMenu('RENAME', group)"
|
||||
>
|
||||
그룹 이름 바꾸기
|
||||
{{ 'group.changeGroupName' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowGroupContextMenu('EDIT_MEMBER', group)"
|
||||
(click)="onClickGroupContextMenu('EDIT_MEMBER', group)"
|
||||
>
|
||||
그룹 멤버 변경
|
||||
{{ 'group.modifyGroupMember' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowGroupContextMenu('DELETE', group)"
|
||||
(click)="onClickGroupContextMenu('DELETE', group)"
|
||||
>
|
||||
그룹 삭제
|
||||
{{ 'group.removeGroup' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
</mat-menu>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="message-box container">
|
||||
<div class="current-head">
|
||||
<h3>쪽지</h3>
|
||||
<h3>{{ 'message.label' | translate }}</h3>
|
||||
<div class="btn-box">
|
||||
<!-- <button mat-icon-button>
|
||||
<mat-icon>timer</mat-icon>
|
||||
|
@ -19,7 +19,7 @@
|
|||
#inputSearch
|
||||
type="text"
|
||||
maxlength="20"
|
||||
placeholder="이름, 제목, 내용 검색"
|
||||
placeholder="{{ 'message.placeholderForSearch' | translate }}"
|
||||
value=""
|
||||
formControlName="searchInput"
|
||||
(keydown.enter)="onKeyDownEnter($event, inputSearch.value)"
|
||||
|
@ -47,7 +47,7 @@
|
|||
>
|
||||
<mat-tab [label]="MessageType.Receive">
|
||||
<ng-template mat-tab-label>
|
||||
수신
|
||||
{{ 'message.messageTypeReceiving' | translate }}
|
||||
</ng-template>
|
||||
|
||||
<ucap-message-list-item
|
||||
|
@ -59,7 +59,7 @@
|
|||
</mat-tab>
|
||||
<mat-tab [label]="MessageType.Send">
|
||||
<ng-template mat-tab-label>
|
||||
발신
|
||||
{{ 'message.messageTypeOutgoing' | translate }}
|
||||
</ng-template>
|
||||
|
||||
<ucap-message-list-item
|
||||
|
@ -71,7 +71,7 @@
|
|||
</mat-tab>
|
||||
<mat-tab [label]="MessageType.Reservation">
|
||||
<ng-template mat-tab-label>
|
||||
예약
|
||||
{{ 'message.messageTypeReservation' | translate }}
|
||||
</ng-template>
|
||||
|
||||
<ucap-message-list-item
|
||||
|
@ -91,10 +91,18 @@
|
|||
formControlName="searchMessageType"
|
||||
(selectionChange)="onChangeSelection($event)"
|
||||
>
|
||||
<mat-option [value]="MessageType.All">전체</mat-option>
|
||||
<mat-option [value]="MessageType.Receive">수신</mat-option>
|
||||
<mat-option [value]="MessageType.Send">발신</mat-option>
|
||||
<mat-option [value]="MessageType.Reservation">예약</mat-option>
|
||||
<mat-option [value]="MessageType.All">{{
|
||||
'message.messageTypeAll' | translate
|
||||
}}</mat-option>
|
||||
<mat-option [value]="MessageType.Receive">{{
|
||||
'message.messageTypeReceiving' | translate
|
||||
}}</mat-option>
|
||||
<mat-option [value]="MessageType.Send">{{
|
||||
'message.messageTypeOutgoing' | translate
|
||||
}}</mat-option>
|
||||
<mat-option [value]="MessageType.Reservation">{{
|
||||
'message.messageTypeReservation' | translate
|
||||
}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-radio-group
|
||||
|
@ -102,15 +110,15 @@
|
|||
aria-label="Select an searchType"
|
||||
(change)="onChangeSearchType($event)"
|
||||
>
|
||||
<mat-radio-button [value]="MessageSearchType.Name" [checked]="true"
|
||||
>이름</mat-radio-button
|
||||
>
|
||||
<mat-radio-button [value]="MessageSearchType.Title"
|
||||
>제목</mat-radio-button
|
||||
>
|
||||
<mat-radio-button [value]="MessageSearchType.Contents"
|
||||
>내용</mat-radio-button
|
||||
>
|
||||
<mat-radio-button [value]="MessageSearchType.Name" [checked]="true">{{
|
||||
'message.searchTypeName' | translate
|
||||
}}</mat-radio-button>
|
||||
<mat-radio-button [value]="MessageSearchType.Title">{{
|
||||
'message.searchTypeTitle' | translate
|
||||
}}</mat-radio-button>
|
||||
<mat-radio-button [value]="MessageSearchType.Contents">{{
|
||||
'message.searchTypeContent' | translate
|
||||
}}</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div *ngIf="showTitle">
|
||||
<div class="current-head">
|
||||
<h3>조직도</h3>
|
||||
<h3>{{ 'organization.chart' | translate }}</h3>
|
||||
</div>
|
||||
<ucap-organization-tenant-search
|
||||
[companyList]="companyList$ | async"
|
||||
|
@ -23,11 +23,23 @@
|
|||
<dl class="select-dept text-accent-color">
|
||||
<dt>
|
||||
<ng-container *ngIf="!isShowSearch">
|
||||
{{ getSelectedDepartmentName() }}
|
||||
<ng-container
|
||||
*ngIf="
|
||||
!!selectedDepartmentProcessing || !selectedDepartmentName;
|
||||
else useSelectedDepartmentName
|
||||
"
|
||||
>
|
||||
{{ 'common.messages.searching' | translate }} ...
|
||||
</ng-container>
|
||||
<ng-template #useSelectedDepartmentName>
|
||||
{{ selectedDepartmentName }}
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="isShowSearch">
|
||||
검색결과<span class="text-accent-color"
|
||||
>({{ searchUserInfos.length }}명)</span
|
||||
{{ 'common.searchResult' | translate
|
||||
}}<span class="text-accent-color"
|
||||
>({{ searchUserInfos.length }}
|
||||
{{ 'common.howManyPersons' | translate }})</span
|
||||
>
|
||||
</ng-container>
|
||||
</dt>
|
||||
|
@ -118,7 +130,8 @@
|
|||
class="mat-primary"
|
||||
(click)="onClickShowSelectedUserList()"
|
||||
>
|
||||
선택<span *ngIf="selectedUserList.length > 0"
|
||||
{{ 'common.messages.select' | translate
|
||||
}}<span *ngIf="selectedUserList.length > 0"
|
||||
>({{ selectedUserList.length }})</span
|
||||
>
|
||||
</button>
|
||||
|
@ -130,7 +143,7 @@
|
|||
(click)="onClickAddGroup()"
|
||||
class="mat-primary"
|
||||
>
|
||||
그룹에 추가
|
||||
{{ 'organization.addToGroup' | translate }}
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -140,7 +153,7 @@
|
|||
(click)="onClickChatOpen()"
|
||||
class="mat-primary"
|
||||
>
|
||||
대화
|
||||
{{ 'organization.startChat' | translate }}
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -150,7 +163,7 @@
|
|||
(click)="onClickConference()"
|
||||
class="mat-primary"
|
||||
>
|
||||
화상회의
|
||||
{{ 'organization.startVideoConference' | translate }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -176,7 +189,7 @@
|
|||
[disabled]="getEnableCall()"
|
||||
(click)="onClickContextMenu('CALL_LINE', userInfo)"
|
||||
>
|
||||
내선번호 전화걸기
|
||||
{{ 'organization.makeExtensionCall' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
|
@ -184,16 +197,16 @@
|
|||
[disabled]="getEnableCall()"
|
||||
(click)="onClickContextMenu('CALL_MOBILE', userInfo)"
|
||||
>
|
||||
모바일 전화걸기
|
||||
{{ 'organization.makeMobileCall' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
(click)="onClickContextMenu('SEND_MESSAGE', userInfo)"
|
||||
>
|
||||
쪽지 보내기
|
||||
{{ 'organization.sendMessage' | translate }}
|
||||
</button>
|
||||
<button mat-menu-item (click)="onClickContextMenu('SEND_SMS', userInfo)">
|
||||
SMS 보내기
|
||||
{{ 'organization.sendSMS' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
</mat-menu>
|
||||
|
|
|
@ -46,6 +46,7 @@ import { Company } from '@ucap-webmessenger/api-external';
|
|||
import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
|
||||
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
||||
import { MatMenuTrigger } from '@angular/material';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import {
|
||||
MessageWriteDialogComponent,
|
||||
MessageWriteDialogResult,
|
||||
|
@ -146,6 +147,7 @@ export class OrganizationComponent
|
|||
private sessionStorageService: SessionStorageService,
|
||||
private queryProtocolService: QueryProtocolService,
|
||||
private dialogService: DialogService,
|
||||
private translateService: TranslateService,
|
||||
private logger: NGXLogger
|
||||
) {
|
||||
this.loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
|
||||
|
@ -342,18 +344,6 @@ export class OrganizationComponent
|
|||
.subscribe();
|
||||
}
|
||||
|
||||
getSelectedDepartmentName() {
|
||||
if (!!this.selectedDepartmentProcessing) {
|
||||
return '조회중..';
|
||||
}
|
||||
|
||||
if (!!this.selectedDepartmentName) {
|
||||
return this.selectedDepartmentName;
|
||||
} else {
|
||||
return '조회중..';
|
||||
}
|
||||
}
|
||||
|
||||
/** 전체 체크여부 */
|
||||
getCheckedAllUser() {
|
||||
const compareList: UserInfoSS[] = this.isShowSearch
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
animationDuration="0ms"
|
||||
(selectedIndexChange)="onSelectedIndexChange($event)"
|
||||
>
|
||||
<mat-tab label="Image"></mat-tab>
|
||||
<mat-tab label="Video"></mat-tab>
|
||||
<mat-tab label="{{ 'common.file.type.images' | translate }}"></mat-tab>
|
||||
<mat-tab label="{{ 'common.file.type.video' | translate }}"></mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
<div fxFlex="1 1 240px" class="select-filebox bg-accent-brightest">
|
||||
|
@ -28,7 +28,7 @@
|
|||
<circle cx="8.5" cy="8.5" r="1.5" />
|
||||
<path d="M20.4 14.5L16 10 4 20" />
|
||||
</svg>
|
||||
<span>Select File.</span>
|
||||
<span>{{ 'common.file.selectFiles' | translate }}</span>
|
||||
</div>
|
||||
|
||||
<div class="empty-msg" *ngIf="currentTabIndex === 1">
|
||||
|
@ -53,7 +53,7 @@
|
|||
<line x1="17" y1="17" x2="22" y2="17"></line>
|
||||
<line x1="17" y1="7" x2="22" y2="7"></line>
|
||||
</svg>
|
||||
<span>Select File.</span>
|
||||
<span>{{ 'common.file.selectFiles' | translate }}</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="selectedFile">
|
||||
|
@ -160,14 +160,14 @@
|
|||
class="mat-primary"
|
||||
(click)="onClickDownloadAll()"
|
||||
>
|
||||
Download All
|
||||
{{ 'common.file.downloadSelected' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-flat-button
|
||||
class="mat-primary"
|
||||
(click)="onClickOpenDownloadFolder()"
|
||||
>
|
||||
Open Folder
|
||||
{{ 'common.file.openDownloadFolder' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -27,6 +27,7 @@ import { SnackBarService } from '@ucap-webmessenger/ui';
|
|||
import { FileDownloadItem } from '@ucap-webmessenger/api';
|
||||
import { ModuleConfig } from '@ucap-webmessenger/api-common';
|
||||
import { _MODULE_CONFIG } from 'projects/ucap-webmessenger-api-common/src/lib/config/token';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
export interface FileInfoTotal {
|
||||
info: FileInfo;
|
||||
|
@ -61,6 +62,7 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
|
|||
private store: Store<any>,
|
||||
private sessionStorageService: SessionStorageService,
|
||||
private commonApiService: CommonApiService,
|
||||
private translateService: TranslateService,
|
||||
private snackBarService: SnackBarService,
|
||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||
@Inject(_MODULE_CONFIG) private moduleConfig: ModuleConfig,
|
||||
|
@ -230,26 +232,33 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
|
|||
.saveFile(buffer, fileInfo.info.name, mimeType)
|
||||
.then(result => {
|
||||
if (!!result) {
|
||||
this.snackBarService.open(
|
||||
`파일이 경로[${result}]에 저장되었습니다.`,
|
||||
'',
|
||||
{
|
||||
duration: 3000,
|
||||
verticalPosition: 'bottom'
|
||||
}
|
||||
);
|
||||
this.translateService
|
||||
.get('common.file.savedToPath', {
|
||||
v: result
|
||||
})
|
||||
.pipe(take(1))
|
||||
.subscribe(v => {
|
||||
this.snackBarService.open(v, '', {
|
||||
duration: 3000,
|
||||
verticalPosition: 'bottom'
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.snackBarService.open(
|
||||
'파일 저장에 실패하였습니다.',
|
||||
'확인'
|
||||
);
|
||||
this.translateService
|
||||
.get('common.file.failToSave')
|
||||
.pipe(take(1))
|
||||
.subscribe(v => {
|
||||
this.snackBarService.open(v);
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(reason => {
|
||||
this.snackBarService.open(
|
||||
'파일 저장에 실패하였습니다.',
|
||||
'확인'
|
||||
);
|
||||
this.translateService
|
||||
.get('common.file.failToSave')
|
||||
.pipe(take(1))
|
||||
.subscribe(v => {
|
||||
this.snackBarService.open(v);
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(reason => {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
animationDuration="0ms"
|
||||
(selectedIndexChange)="onSelectedIndexChange($event)"
|
||||
>
|
||||
<mat-tab label="Receive"></mat-tab>
|
||||
<mat-tab label="Send"></mat-tab>
|
||||
<mat-tab label="{{ 'chat.typeReceived' | translate }}"></mat-tab>
|
||||
<mat-tab label="{{ 'chat.typeSent' | translate }}"></mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
<div fxFlex="1 1 200px" class="select-filebox bg-accent-brightest">
|
||||
|
@ -28,7 +28,7 @@
|
|||
/>
|
||||
<path d="M13 3v6h6" />
|
||||
</svg>
|
||||
<span>Select File.</span>
|
||||
<span>{{ 'common.file.selectFiles' | translate }}</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="selectedFile">
|
||||
|
@ -45,11 +45,15 @@
|
|||
<ul>
|
||||
<li class="name">{{ selectedFile.info.name }}</li>
|
||||
<li>
|
||||
<span class="text-accent-color">size :</span>
|
||||
<span class="text-accent-color"
|
||||
>{{ 'common.file.size' | translate }} :</span
|
||||
>
|
||||
{{ selectedFile.info.size | ucapBytes }}
|
||||
</li>
|
||||
<li>
|
||||
<span class="text-accent-color">date :</span>
|
||||
<span class="text-accent-color"
|
||||
>{{ 'chat.validityPeriod' | translate }} :</span
|
||||
>
|
||||
{{ selectedFile.info.sendDate | ucapDate: 'YYYY.MM.DD' }}
|
||||
<span *ngIf="loginRes.fileRetentionPeriod > 0">
|
||||
~
|
||||
|
@ -63,7 +67,7 @@
|
|||
</div>
|
||||
<div class="select-file-option">
|
||||
<span
|
||||
matTooltip="다운로드"
|
||||
matTooltip="{{ 'common.file.download' | translate }}"
|
||||
class="text-accent-darkest"
|
||||
(click)="onClickDownload(selectedFile)"
|
||||
>
|
||||
|
@ -91,7 +95,10 @@
|
|||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span matTooltip="나에게전달" class="text-accent-darkest">
|
||||
<span
|
||||
matTooltip="{{ 'chat.forwardFileToMe' | translate }}"
|
||||
class="text-accent-darkest"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
|
@ -111,7 +118,10 @@
|
|||
<circle cx="12" cy="12" r="10" />
|
||||
</svg>
|
||||
</span>
|
||||
<span matTooltip="파일전달" class="text-accent-darkest">
|
||||
<span
|
||||
matTooltip="{{ 'chat.forwardFileTo' | translate }}"
|
||||
class="text-accent-darkest"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
|
@ -131,7 +141,10 @@
|
|||
</g>
|
||||
</svg>
|
||||
</span>
|
||||
<span matTooltip="파일삭제" class="text-accent-darkest">
|
||||
<span
|
||||
matTooltip="{{ 'common.file.delete' | translate }}"
|
||||
class="text-accent-darkest"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
|
@ -176,7 +189,7 @@
|
|||
</ng-container>
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header class="infos">
|
||||
Name
|
||||
{{ 'common.file.name' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element" class="file-info">
|
||||
<div class="file-name">
|
||||
|
@ -205,7 +218,9 @@
|
|||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="sendDate" class="date">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Size</th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
{{ 'chat.sentDate' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<!--{{ element.info.sendDate | ucapDate: 'YYYY.MM.DD' }}-->
|
||||
{{ element.info.size | ucapBytes }}
|
||||
|
@ -242,14 +257,14 @@
|
|||
class="mat-primary"
|
||||
(click)="onClickDownloadAll()"
|
||||
>
|
||||
Download All
|
||||
{{ 'common.file.downloadSelected' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-flat-button
|
||||
class="mat-primary"
|
||||
(click)="onClickOpenDownloadFolder()"
|
||||
>
|
||||
Open Folder
|
||||
{{ 'common.file.openDownloadFolder' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -39,6 +39,7 @@ import {
|
|||
KEY_ENVIRONMENTS_INFO
|
||||
} from '@app/types';
|
||||
import { RoomInfo } from '@ucap-webmessenger/protocol-room';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
export interface FileInfoTotal {
|
||||
info: FileInfo;
|
||||
|
@ -75,6 +76,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
|||
private store: Store<any>,
|
||||
private sessionStorageService: SessionStorageService,
|
||||
private commonApiService: CommonApiService,
|
||||
private translateService: TranslateService,
|
||||
private snackBarService: SnackBarService,
|
||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||
private dialogService: DialogService,
|
||||
|
@ -274,26 +276,33 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
|||
.saveFile(buffer, fileInfo.info.name, mimeType)
|
||||
.then(result => {
|
||||
if (!!result) {
|
||||
this.snackBarService.open(
|
||||
`파일이 경로[${result}]에 저장되었습니다.`,
|
||||
'',
|
||||
{
|
||||
duration: 3000,
|
||||
verticalPosition: 'bottom'
|
||||
}
|
||||
);
|
||||
this.translateService
|
||||
.get('common.file.savedToPath', {
|
||||
v: result
|
||||
})
|
||||
.pipe(take(1))
|
||||
.subscribe(v => {
|
||||
this.snackBarService.open(v, '', {
|
||||
duration: 3000,
|
||||
verticalPosition: 'bottom'
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.snackBarService.open(
|
||||
'파일 저장에 실패하였습니다.',
|
||||
'확인'
|
||||
);
|
||||
this.translateService
|
||||
.get('common.file.failToSave')
|
||||
.pipe(take(1))
|
||||
.subscribe(v => {
|
||||
this.snackBarService.open(v);
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(reason => {
|
||||
this.snackBarService.open(
|
||||
'파일 저장에 실패하였습니다.',
|
||||
'확인'
|
||||
);
|
||||
this.translateService
|
||||
.get('common.file.failToSave')
|
||||
.pipe(take(1))
|
||||
.subscribe(v => {
|
||||
this.snackBarService.open(v);
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(reason => {
|
||||
|
@ -343,74 +352,84 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
|||
);
|
||||
}
|
||||
|
||||
async onClickForward(fileInfo: FileInfoTotal) {
|
||||
const result = await this.dialogService.open<
|
||||
CreateChatDialogComponent,
|
||||
CreateChatDialogData,
|
||||
CreateChatDialogResult
|
||||
>(CreateChatDialogComponent, {
|
||||
width: '600px',
|
||||
data: {
|
||||
type: UserSelectDialogType.MessageForward,
|
||||
title: 'MessageForward',
|
||||
ignoreRoom: [this.roomInfo]
|
||||
}
|
||||
});
|
||||
onClickForward(fileInfo: FileInfoTotal) {
|
||||
this.translateService
|
||||
.get('chat.forwardFileTo')
|
||||
.pipe(take(1))
|
||||
.subscribe(async v => {
|
||||
const result = await this.dialogService.open<
|
||||
CreateChatDialogComponent,
|
||||
CreateChatDialogData,
|
||||
CreateChatDialogResult
|
||||
>(CreateChatDialogComponent, {
|
||||
width: '600px',
|
||||
data: {
|
||||
type: UserSelectDialogType.MessageForward,
|
||||
title: v,
|
||||
ignoreRoom: [this.roomInfo]
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
const userSeqs: number[] = [];
|
||||
let roomSeq = '';
|
||||
if (!!result.selectedUserList && result.selectedUserList.length > 0) {
|
||||
result.selectedUserList.map(user => userSeqs.push(user.seq));
|
||||
}
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
const userSeqs: number[] = [];
|
||||
let roomSeq = '';
|
||||
if (!!result.selectedUserList && result.selectedUserList.length > 0) {
|
||||
result.selectedUserList.map(user => userSeqs.push(user.seq));
|
||||
}
|
||||
|
||||
if (!!result.selectedRoom) {
|
||||
roomSeq = result.selectedRoom.roomSeq;
|
||||
}
|
||||
if (!!result.selectedRoom) {
|
||||
roomSeq = result.selectedRoom.roomSeq;
|
||||
}
|
||||
|
||||
if (userSeqs.length > 0 || roomSeq.trim().length > 0) {
|
||||
this.store.dispatch(
|
||||
EventStore.forward({
|
||||
senderSeq: this.loginRes.userSeq,
|
||||
req: {
|
||||
roomSeq: '-999',
|
||||
eventType: EventType.File,
|
||||
sentMessage: fileInfo.info.sentMessage
|
||||
},
|
||||
trgtUserSeqs: userSeqs,
|
||||
trgtRoomSeq: roomSeq
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
if (userSeqs.length > 0 || roomSeq.trim().length > 0) {
|
||||
this.store.dispatch(
|
||||
EventStore.forward({
|
||||
senderSeq: this.loginRes.userSeq,
|
||||
req: {
|
||||
roomSeq: '-999',
|
||||
eventType: EventType.File,
|
||||
sentMessage: fileInfo.info.sentMessage
|
||||
},
|
||||
trgtUserSeqs: userSeqs,
|
||||
trgtRoomSeq: roomSeq
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async onClickDelete(fileInfo: FileInfoTotal) {
|
||||
const result = await this.dialogService.open<
|
||||
ConfirmDialogComponent,
|
||||
ConfirmDialogData,
|
||||
ConfirmDialogResult
|
||||
>(ConfirmDialogComponent, {
|
||||
width: '400px',
|
||||
data: {
|
||||
title: 'Delete',
|
||||
html: `선택한 파일(메시지)를 삭제하시겠습니까?<br/>삭제된 파일(메시지)는 내 대화방에서만 적용되며 상대방의 대화방에서는 삭제되지 않습니다.`
|
||||
}
|
||||
});
|
||||
onClickDelete(fileInfo: FileInfoTotal) {
|
||||
this.translateService
|
||||
.get('chat.confirmDeleteFile')
|
||||
.pipe(take(1))
|
||||
.subscribe(async v => {
|
||||
const result = await this.dialogService.open<
|
||||
ConfirmDialogComponent,
|
||||
ConfirmDialogData,
|
||||
ConfirmDialogResult
|
||||
>(ConfirmDialogComponent, {
|
||||
width: '400px',
|
||||
data: {
|
||||
title: 'Delete',
|
||||
html: v
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
this.store.dispatch(
|
||||
EventStore.del({
|
||||
roomSeq: this.roomInfo.roomSeq,
|
||||
eventSeq: fileInfo.info.eventSeq
|
||||
})
|
||||
);
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
this.store.dispatch(
|
||||
EventStore.del({
|
||||
roomSeq: this.roomInfo.roomSeq,
|
||||
eventSeq: fileInfo.info.eventSeq
|
||||
})
|
||||
);
|
||||
|
||||
this.fileInfoTotal = this.fileInfoTotal.filter(
|
||||
fInfo => fInfo.info.seq !== fileInfo.info.seq
|
||||
);
|
||||
this.onSelectedIndexChange(this.currentTabIndex);
|
||||
}
|
||||
this.fileInfoTotal = this.fileInfoTotal.filter(
|
||||
fInfo => fInfo.info.seq !== fileInfo.info.seq
|
||||
);
|
||||
this.onSelectedIndexChange(this.currentTabIndex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
get fileRetentionPeriodOptions(): DateOptions {
|
||||
|
|
|
@ -6,14 +6,36 @@
|
|||
"useOnlyForSpecialCharacter": "Can only use Special characters: {{v}}",
|
||||
"howManyPersons": "person(s)",
|
||||
"file": {
|
||||
"name": "Name of file",
|
||||
"size": "Size of file",
|
||||
"download": "Download",
|
||||
"delete": "Delete",
|
||||
"saved": "The file has been saved.",
|
||||
"savedToPath": "The file has been saved to path[{{v}}].",
|
||||
"failToSave": "File save failed."
|
||||
"failToSave": "File save failed.",
|
||||
"downloadSelected": "Download selected",
|
||||
"openDownloadFolder": "Open download folder",
|
||||
"selectFiles": "Select files",
|
||||
"type": {
|
||||
"label": "Type of file",
|
||||
"images": "Images",
|
||||
"video": "Video"
|
||||
}
|
||||
},
|
||||
"messages": {
|
||||
"yes": "Yes",
|
||||
"no": "No",
|
||||
"confirm": "Confirm"
|
||||
"confirm": "Confirm",
|
||||
"select": "Select",
|
||||
"unselect": "Unselect",
|
||||
"searching": "Searching"
|
||||
},
|
||||
"paginator": {
|
||||
"itemsPerPage": "Items per page",
|
||||
"nextPage": "Next page",
|
||||
"prevPage": "Previous page",
|
||||
"firstPage": "First page",
|
||||
"lastPage": "Last page"
|
||||
},
|
||||
"timezone": {
|
||||
"Africa/Abidjan": "Africa/Abidjan",
|
||||
|
@ -622,7 +644,17 @@
|
|||
"name": "Group name",
|
||||
"nameFavorit": "Favorit",
|
||||
"nameMyDept": "My Dept",
|
||||
"nameDefault": "Default"
|
||||
"nameDefault": "Default",
|
||||
"favorite": "Favorite",
|
||||
"unfavorite": "Unfavorite",
|
||||
"removeBuddyFromGroup": "Remove buddy from group",
|
||||
"copyBuddyToGroup": "Copy buddy to other group",
|
||||
"moveBuddyToGroup": "Move buddy to otyer group",
|
||||
"changeGroupName": "Change name of group",
|
||||
"modifyGroupMember": "Modify member of group",
|
||||
"removeGroup": "Remove group",
|
||||
"startChatWithGroup": "Chat with group",
|
||||
"sendMessageToGroup": "Send message to group"
|
||||
},
|
||||
"chat": {
|
||||
"label": "Chat",
|
||||
|
@ -630,14 +662,40 @@
|
|||
"searchRoomByName": "Search by room name",
|
||||
"newTimerChat": "New Timer Chat",
|
||||
"newChat": "New Chat",
|
||||
"startChat": "Chat",
|
||||
"openRoom": "Open room",
|
||||
"turnOnRoomAlert": "turn on room alert",
|
||||
"turnOffRoomAlert": "turn off room alert",
|
||||
"leaveFromRoom": "leave room",
|
||||
"confirmLeaveFromRoom": "Are you sure you want to leave the chat room?<br/>Leave your chat history and chat room information."
|
||||
"confirmLeaveFromRoom": "Do you want to leave the chat room?<br/>Leave your chat history and chat room information.",
|
||||
"confirmDeleteFile": "Do you want to delete the file?<br/>The deleted file (message) will only be applied to your chat room and will not be deleted from their chat room.",
|
||||
"typeReceived": "Received",
|
||||
"typeSent": "Sent",
|
||||
"sentDate": "Sent date",
|
||||
"validityPeriod": "Validity period",
|
||||
"forwardFileToMe": "Forward file to me",
|
||||
"forwardFileTo": "Forward file to ..."
|
||||
},
|
||||
"organization": {
|
||||
"chart": "Organization chart"
|
||||
"chart": "Organization chart",
|
||||
"addToGroup": "Add to group",
|
||||
"startChat": "Chat",
|
||||
"startVideoConference": "Video conference",
|
||||
"makeExtensionCall": "Make extension call",
|
||||
"makeMobileCall": "Make mobile call",
|
||||
"sendMessage": "Send message",
|
||||
"sendSMS": "Send SMS"
|
||||
},
|
||||
"message": {}
|
||||
"message": {
|
||||
"label": "Message",
|
||||
"sendTo": "Send message",
|
||||
"placeholderForSearch": "search for name, title, content",
|
||||
"messageTypeAll": "All",
|
||||
"messageTypeReceiving": "Receiving",
|
||||
"messageTypeOutgoing": "Outgoing",
|
||||
"messageTypeReservation": "Reservation",
|
||||
"searchTypeName": "Name",
|
||||
"searchTypeTitle": "Title",
|
||||
"searchTypeContent": "Content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,14 +6,36 @@
|
|||
"useOnlyForSpecialCharacter": "특수문자는 {{v}}만 사용할 수 있습니다.",
|
||||
"howManyPersons": "명",
|
||||
"file": {
|
||||
"name": "파일 이름",
|
||||
"size": "파일 크기",
|
||||
"download": "파일 다운로드",
|
||||
"delete": "파일 삭제",
|
||||
"saved": "파일이 저장되었습니다.",
|
||||
"savedToPath": "파일이 경로[{{v}}]에 저장되었습니다.",
|
||||
"failToSave": "파일 저장에 실패하였습니다."
|
||||
"failToSave": "파일 저장에 실패하였습니다.",
|
||||
"downloadSelected": "선택된 파일 다운로드",
|
||||
"openDownloadFolder": "다운로드 폴더 열기",
|
||||
"selectFiles": "파일을 선택하세요",
|
||||
"type": {
|
||||
"label": "파일 종류",
|
||||
"images": "이미지",
|
||||
"video": "동영상"
|
||||
}
|
||||
},
|
||||
"messages": {
|
||||
"yes": "네",
|
||||
"no": "아니오",
|
||||
"confirm": "확인"
|
||||
"confirm": "확인",
|
||||
"select": "선택",
|
||||
"unselect": "선택 해제",
|
||||
"searching": "검색중"
|
||||
},
|
||||
"paginator": {
|
||||
"itemsPerPage": "페이지별 갯수",
|
||||
"nextPage": "다음 페이지",
|
||||
"prevPage": "이전 페이지",
|
||||
"firstPage": "처음 페이지",
|
||||
"lastPage": "마지막 페이지"
|
||||
},
|
||||
"timezone": {
|
||||
"Africa/Abidjan": "아프리카/아비 장",
|
||||
|
@ -622,7 +644,17 @@
|
|||
"name": "그룹 이름",
|
||||
"nameFavorit": "즐겨찾기",
|
||||
"nameMyDept": "소속부서",
|
||||
"nameDefault": "기본"
|
||||
"nameDefault": "기본",
|
||||
"favorite": "즐겨찾기 등록",
|
||||
"unfavorite": "즐겨찾기 해제",
|
||||
"removeBuddyFromGroup": "이 그룹에서 삭제",
|
||||
"copyBuddyToGroup": "대화 상대 복사",
|
||||
"moveBuddyToGroup": "대화 상대 이동",
|
||||
"changeGroupName": "그룹 이름 바꾸기",
|
||||
"modifyGroupMember": "그룹 멤버 변경",
|
||||
"removeGroup": "그룹 삭제",
|
||||
"startChatWithGroup": "그룹 대화하기",
|
||||
"sendMessageToGroup": "그룹 쪽지 보내기"
|
||||
},
|
||||
"chat": {
|
||||
"label": "대화",
|
||||
|
@ -630,14 +662,40 @@
|
|||
"searchRoomByName": "대화방 이름 검색",
|
||||
"newTimerChat": "새로운 타이머 대화",
|
||||
"newChat": "새로운 대화",
|
||||
"startChat": "대화하기",
|
||||
"openRoom": "대화방 열기",
|
||||
"turnOnRoomAlert": "대화방 알람 켜기",
|
||||
"turnOffRoomAlert": "대화방 알람 끄기",
|
||||
"leaveFromRoom": "대화방 나가기",
|
||||
"confirmLeaveFromRoom": "대화방을 나가시겠습니까?<br/>나가기를 하면 대화내용 및 대화방 정보가 삭제됩니다."
|
||||
"confirmLeaveFromRoom": "대화방을 나가시겠습니까?<br/>나가기를 하면 대화내용 및 대화방 정보가 삭제됩니다.",
|
||||
"confirmDeleteFile": "선택한 파일(메시지)를 삭제하시겠습니까?<br/>삭제된 파일(메시지)는 내 대화방에서만 적용되며 상대방의 대화방에서는 삭제되지 않습니다.",
|
||||
"typeReceived": "수신",
|
||||
"typeSent": "발신",
|
||||
"sentDate": "보낸 날짜",
|
||||
"validityPeriod": "유효 기간",
|
||||
"forwardFileToMe": "파일을 나에게 전달",
|
||||
"forwardFileTo": "파일 전달"
|
||||
},
|
||||
"organization": {
|
||||
"chart": "조직도"
|
||||
"chart": "조직도",
|
||||
"addToGroup": "그룹에 추가",
|
||||
"startChat": "대화",
|
||||
"startVideoConference": "화상회의",
|
||||
"makeExtensionCall": "내선번호 전화걸기",
|
||||
"makeMobileCall": "모바일 전화걸기",
|
||||
"sendMessage": "쪽지 보내기",
|
||||
"sendSMS": "SMS 보내기"
|
||||
},
|
||||
"message": {}
|
||||
"message": {
|
||||
"label": "쪽지",
|
||||
"sendTo": "쪽지 보내기",
|
||||
"placeholderForSearch": "이름, 제목, 내용 검색",
|
||||
"messageTypeAll": "전체",
|
||||
"messageTypeReceiving": "수신",
|
||||
"messageTypeOutgoing": "발신",
|
||||
"messageTypeReservation": "예약",
|
||||
"searchTypeName": "이름",
|
||||
"searchTypeTitle": "제목",
|
||||
"searchTypeContent": "내용"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { MatPaginatorIntl } from '@angular/material';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
const KEY_ITEMS_PER_PAGE = 'common.paginator.itemsPerPage';
|
||||
const KEY_NEXT_PAGE = 'common.paginator.nextPage';
|
||||
const KEY_PREV_PAGE = 'common.paginator.prevPage';
|
||||
const KEY_FIRST_PAGE = 'common.paginator.firstPage';
|
||||
const KEY_LAST_PAGE = 'common.paginator.lastPage';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class PaginatorIntlService extends MatPaginatorIntl {
|
||||
public constructor(private translateService: TranslateService) {
|
||||
super();
|
||||
|
||||
this.translateService.onLangChange.subscribe((e: Event) => {
|
||||
this.getAndInitTranslations();
|
||||
});
|
||||
|
||||
this.getAndInitTranslations();
|
||||
}
|
||||
|
||||
public getRangeLabel = (
|
||||
page: number,
|
||||
pageSize: number,
|
||||
length: number
|
||||
): string => {
|
||||
if (0 === length || 0 === pageSize) {
|
||||
return `0 / ${length}`;
|
||||
}
|
||||
|
||||
length = Math.max(length, 0);
|
||||
|
||||
const startIndex = page * pageSize;
|
||||
const endIndex =
|
||||
startIndex < length
|
||||
? Math.min(startIndex + pageSize, length)
|
||||
: startIndex + pageSize;
|
||||
|
||||
return `${startIndex + 1} - ${endIndex} / ${length}`;
|
||||
// tslint:disable-next-line: semicolon
|
||||
};
|
||||
|
||||
public getAndInitTranslations(): void {
|
||||
this.translateService
|
||||
.get([
|
||||
KEY_ITEMS_PER_PAGE,
|
||||
KEY_NEXT_PAGE,
|
||||
KEY_PREV_PAGE,
|
||||
KEY_FIRST_PAGE,
|
||||
KEY_LAST_PAGE
|
||||
])
|
||||
.subscribe((translation: any) => {
|
||||
this.itemsPerPageLabel = translation[KEY_ITEMS_PER_PAGE];
|
||||
this.nextPageLabel = translation[KEY_NEXT_PAGE];
|
||||
this.previousPageLabel = translation[KEY_PREV_PAGE];
|
||||
this.firstPageLabel = translation[KEY_FIRST_PAGE];
|
||||
this.lastPageLabel = translation[KEY_LAST_PAGE];
|
||||
|
||||
this.changes.next();
|
||||
});
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@ import { MatDatepickerModule } from '@angular/material/datepicker';
|
|||
import {
|
||||
MatTabsModule,
|
||||
MatSelectModule,
|
||||
MatSlideToggleModule,
|
||||
MatSlideToggleModule
|
||||
} from '@angular/material';
|
||||
|
||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||
|
@ -50,6 +50,7 @@ import { SnackBarService } from './services/snack-bar.service';
|
|||
import { SplashScreenService } from './services/splash-screen.service';
|
||||
import { TranslateService } from './services/translate.service';
|
||||
import { DateService } from './services/date.service';
|
||||
import { PaginatorIntlService } from './services/paginator-intl.service';
|
||||
|
||||
import { ClickOutsideDirective } from './directives/click-outside.directive';
|
||||
import { FileUploadForDirective } from './directives/file-upload-for.directive';
|
||||
|
@ -125,7 +126,8 @@ const SERVICES = [
|
|||
SnackBarService,
|
||||
SplashScreenService,
|
||||
TranslateService,
|
||||
DateService
|
||||
DateService,
|
||||
PaginatorIntlService
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
@ -35,6 +35,7 @@ export * from './lib/services/snack-bar.service';
|
|||
export * from './lib/services/splash-screen.service';
|
||||
export * from './lib/services/translate.service';
|
||||
export * from './lib/services/date.service';
|
||||
export * from './lib/services/paginator-intl.service';
|
||||
|
||||
export * from './lib/types/file-viewer.type';
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user