Merge branch 'master' of https://git.loafle.net/ucap-web/next-ucap-messenger
This commit is contained in:
commit
c0bfae71e2
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ucap-webmessenger",
|
||||
"version": "0.0.21",
|
||||
"version": "0.0.22",
|
||||
"author": {
|
||||
"name": "LG CNS",
|
||||
"email": "lgucap@lgcns.com"
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
[userInfo]="userInfo"
|
||||
[sessionVerinfo]="sessionVerinfo"
|
||||
[selectedUserList]="selectedUserList"
|
||||
[checkable]="userInfo.seq !== loginRes.userSeq"
|
||||
[checkable]="!!loginRes && userInfo.seq !== loginRes.userSeq"
|
||||
[checkDisabled]="!getCheckableUser(userInfo)"
|
||||
[isChecked]="getCheckedUser(userInfo)"
|
||||
(checkUser)="onCheckUser($event)"
|
||||
|
|
|
@ -15,13 +15,15 @@
|
|||
<mat-tab-group animationDuration="0ms" vertical>
|
||||
<mat-tab *ngIf="data.content.text">
|
||||
<ng-template mat-tab-label>
|
||||
<mat-checkbox #chkText> </mat-checkbox>
|
||||
<mat-checkbox #chkText checked="true"> </mat-checkbox>
|
||||
<span class="title-text">{{
|
||||
'common.file.clipboardType.text' | translate
|
||||
}}</span>
|
||||
</ng-template>
|
||||
<perfect-scrollbar>
|
||||
<div style="white-space: pre-wrap;">{{ data.content.text }}</div>
|
||||
<div class="clipboard-text" style="white-space: pre-wrap;">
|
||||
{{ data.content.text }}
|
||||
</div>
|
||||
</perfect-scrollbar>
|
||||
</mat-tab>
|
||||
<!-- <mat-tab *ngIf="data.content.rtf">
|
||||
|
@ -59,7 +61,7 @@
|
|||
</ng-template>
|
||||
|
||||
<perfect-scrollbar>
|
||||
<div>
|
||||
<div class="clipboard-img">
|
||||
<img [src]="data.content.imageDataUrl" />
|
||||
</div>
|
||||
</perfect-scrollbar>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
.clipboard-frame {
|
||||
.clipboard {
|
||||
&-frame {
|
||||
padding: 16px;
|
||||
height: 100%;
|
||||
min-width: 500px;
|
||||
|
@ -53,3 +54,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
&-text {
|
||||
padding: 0 10px;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
&-img {
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,6 +182,12 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
|||
const loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
|
||||
this.companyCode = loginInfo.companyCode;
|
||||
|
||||
this.store.dispatch(
|
||||
SettingsStore.organizationTreeActivated({
|
||||
activate: false
|
||||
})
|
||||
);
|
||||
|
||||
this.companyList$ = this.store.pipe(
|
||||
select(AppStore.SettingSelector.CompanySelector.companyList)
|
||||
);
|
||||
|
|
|
@ -38,7 +38,21 @@
|
|||
perfectScrollbar
|
||||
fxFlexFill
|
||||
>
|
||||
<ucap-profile-user-list-item
|
||||
<ucap-daesang-profile-user-list-item
|
||||
*cdkVirtualFor="let userInfo of data.selectedUserList"
|
||||
[userInfo]="userInfo"
|
||||
[showPresence]="false"
|
||||
[sessionVerinfo]="sessionVerinfo"
|
||||
[selectedUserList]="selectedUserList"
|
||||
[checkable]="!!loginRes && userInfo.seq !== loginRes.userSeq"
|
||||
[checkDisabled]="false"
|
||||
[isChecked]="getCheckedUser(userInfo)"
|
||||
(checkUser)="onCheckUser($event)"
|
||||
(click)="onToggleUser(userInfo)"
|
||||
(openProfile)="onClickOpenProfile($event)"
|
||||
>
|
||||
</ucap-daesang-profile-user-list-item>
|
||||
<!-- <ucap-profile-user-list-item
|
||||
*cdkVirtualFor="let userInfo of data.selectedUserList"
|
||||
[userInfo]="userInfo"
|
||||
[showPresence]="false"
|
||||
|
@ -50,16 +64,8 @@
|
|||
(checkUser)="onCheckUser($event)"
|
||||
(click)="onToggleUser(userInfo)"
|
||||
(openProfile)="onClickOpenProfile($event)"
|
||||
[matTooltip]="
|
||||
userInfo.companyName +
|
||||
' / ' +
|
||||
userInfo.lineNumber +
|
||||
' / ' +
|
||||
userInfo.hpNumber
|
||||
"
|
||||
matTooltipPosition="after"
|
||||
>
|
||||
</ucap-profile-user-list-item>
|
||||
</ucap-profile-user-list-item> -->
|
||||
</cdk-virtual-scroll-viewport>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
|
|
@ -64,7 +64,7 @@ import {
|
|||
import { DialogService } from '@ucap-webmessenger/ui';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
import { MatMenu, MatRadioChange, MatMenuTrigger } from '@angular/material';
|
||||
import { StatusCode, StatusType } from '@ucap-webmessenger/core';
|
||||
import { StatusCode, StatusType, WindowUtil } from '@ucap-webmessenger/core';
|
||||
import {
|
||||
StatusInfo,
|
||||
MessageIndexType,
|
||||
|
@ -411,16 +411,71 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
.replace(/(\(%USER_ID%\))/g, loginId)
|
||||
.replace(/(\(%USER_PASS%\))/g, loginPw);
|
||||
|
||||
let width = 1160;
|
||||
let height = 800;
|
||||
let openType = 'INNER-POPUP';
|
||||
switch (link.key) {
|
||||
case WebLinkType.Sms:
|
||||
/** SMS URL */
|
||||
{
|
||||
width = 685;
|
||||
height = 640;
|
||||
}
|
||||
break;
|
||||
// case WebLinkType.Itsvcdesk:
|
||||
// /** IT서비스데스크 URL */
|
||||
// {
|
||||
// width = 1400;
|
||||
// height = 1000;
|
||||
// }
|
||||
// break;
|
||||
case WebLinkType.Conf:
|
||||
/** 화상회의 URL */
|
||||
{
|
||||
}
|
||||
break;
|
||||
case WebLinkType.Itsvcdesk:
|
||||
/** IT서비스데스크 URL */
|
||||
case WebLinkType.Dsp:
|
||||
/** DSP URL */
|
||||
case WebLinkType.Webhard:
|
||||
/** 웹하드 URL */
|
||||
case WebLinkType.Ep:
|
||||
/** EP URL */
|
||||
case WebLinkType.Sop:
|
||||
/** S&OP회의 URL */
|
||||
case WebLinkType.Som:
|
||||
/** S&OM회의 URL */
|
||||
case WebLinkType.Elephant:
|
||||
/** 코끼리 URL */
|
||||
case WebLinkType.UrgntNews:
|
||||
/** 개인속보 URL */
|
||||
case WebLinkType.MailCnt:
|
||||
/** 메일Count URL */
|
||||
case WebLinkType.Mail:
|
||||
/** 메일 링크 URL */
|
||||
case WebLinkType.PaymentCnt:
|
||||
/** 결재Count URL */
|
||||
case WebLinkType.Payment:
|
||||
/** 결재링크 URL */
|
||||
case WebLinkType.ChgPassword:
|
||||
/** 비밀번호변경 URL ; PC 메신저만 해당 비밀번호 만료시 */
|
||||
{
|
||||
openType = 'DEFAULT-BROWSER';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (openType === 'DEFAULT-BROWSER') {
|
||||
// // Old popup open.. >> default browser open.
|
||||
// this.nativeService.openDefaultBrowser(url, {
|
||||
// features:
|
||||
// 'menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,width=400,height=400'
|
||||
// });
|
||||
|
||||
open(
|
||||
url,
|
||||
link.title,
|
||||
'frame=true,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,width=1000,height=800'
|
||||
);
|
||||
this.nativeService.openDefaultBrowser(url);
|
||||
} else {
|
||||
WindowUtil.popupOpen(url, link.title, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
onClosedProfileMenu() {
|
||||
|
|
|
@ -209,10 +209,9 @@ export class AppNotificationService {
|
|||
(state: any) =>
|
||||
state.messenger.sync.room.entities as Dictionary<RoomInfo>
|
||||
)
|
||||
)
|
||||
),
|
||||
this.nativeService.windowStateChanged()
|
||||
),
|
||||
tap(([notiOrRes, curRoomInfo, roomList, windowStateChanged]) => {
|
||||
tap(([notiOrRes, curRoomInfo, roomList]) => {
|
||||
switch (notiOrRes.SSVC_TYPE) {
|
||||
case SSVC_TYPE_EVENT_SEND_RES:
|
||||
case SSVC_TYPE_EVENT_SEND_NOTI:
|
||||
|
@ -241,14 +240,16 @@ export class AppNotificationService {
|
|||
doNoti = false;
|
||||
}
|
||||
|
||||
const windowState = this.nativeService.getWindowState();
|
||||
|
||||
// 현재 열려 있는 방일경우 노티 안함.
|
||||
if (
|
||||
!!curRoomInfo &&
|
||||
!!curRoomInfo.roomSeq &&
|
||||
curRoomInfo.roomSeq === noti.roomSeq &&
|
||||
!!windowStateChanged &&
|
||||
windowStateChanged !== WindowState.Minimized &&
|
||||
windowStateChanged !== WindowState.Hidden
|
||||
!!windowState &&
|
||||
windowState !== WindowState.Minimized &&
|
||||
windowState !== WindowState.Hidden
|
||||
) {
|
||||
doNoti = false;
|
||||
}
|
||||
|
|
|
@ -407,6 +407,8 @@ $daesang-grey: (
|
|||
mat-tab-group[vertical] {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.mat-tab-header {
|
||||
border-bottom: none;
|
||||
.mat-tab-labels {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -414,18 +416,22 @@ $daesang-grey: (
|
|||
.mat-tab-label {
|
||||
justify-content: flex-start;
|
||||
padding: 0;
|
||||
&[aria-selected='true'] {
|
||||
opacity: 1;
|
||||
}
|
||||
.mat-checkbox {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.mat-ink-bar {
|
||||
opacity: 0;
|
||||
}
|
||||
.mat-tab-body-wrapper {
|
||||
flex: 1 1 auto;
|
||||
border-left: 1px solid #dddddd;
|
||||
padding: 0 10px;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
17
projects/ucap-webmessenger-core/src/lib/utils/window.util.ts
Normal file
17
projects/ucap-webmessenger-core/src/lib/utils/window.util.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
export class WindowUtil {
|
||||
public static popupOpen(
|
||||
url: string,
|
||||
title: string = 'Messenger',
|
||||
width: number,
|
||||
height: number
|
||||
): void {
|
||||
let optionStr = `frame=true,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no`;
|
||||
if (width > 0) {
|
||||
optionStr += `,width=${width}`;
|
||||
}
|
||||
if (width > 0) {
|
||||
optionStr += `,height=${height + 15}`;
|
||||
}
|
||||
open(url, title, optionStr);
|
||||
}
|
||||
}
|
|
@ -25,6 +25,7 @@ export * from './lib/utils/mime.util';
|
|||
export * from './lib/utils/object.util';
|
||||
export * from './lib/utils/sticker.util';
|
||||
export * from './lib/utils/string.util';
|
||||
export * from './lib/utils/window.util';
|
||||
|
||||
export * from './lib/config/host.config';
|
||||
export * from './lib/config/url.config';
|
||||
|
|
|
@ -3,6 +3,7 @@ import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
|||
import { KEY_URL_INFO } from '@app/types';
|
||||
import { NativeService } from '@ucap-webmessenger/native';
|
||||
import { WebLinkType } from '../types/web-link.type';
|
||||
import { WindowUtil } from '@ucap-webmessenger/core';
|
||||
|
||||
export class SmsUtils {
|
||||
constructor(
|
||||
|
@ -39,10 +40,11 @@ export class SmsUtils {
|
|||
const url = this.url.replace(/(\(%USER_TOKEN%\))/g, token);
|
||||
|
||||
// this.nativeService.openDefaultBrowser(url);
|
||||
open(
|
||||
url + `&ruser=${employeeNum},`, // ruser 파라미터에 ','가 마지막에 꼭 붙어야 한다.
|
||||
WindowUtil.popupOpen(
|
||||
url + `&ruser=${employeeNum},`,
|
||||
'DaesangSMS',
|
||||
'frame=true,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,width=685,height=700'
|
||||
685,
|
||||
640
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -227,6 +227,9 @@ export class BrowserNativeService extends NativeService {
|
|||
windowMinimize(): void {}
|
||||
|
||||
windowMaximize(): void {}
|
||||
getWindowState(): WindowState {
|
||||
return WindowState.Normal;
|
||||
}
|
||||
|
||||
appExit(): void {}
|
||||
|
||||
|
|
|
@ -391,6 +391,22 @@ export class ElectronNativeService implements NativeService {
|
|||
}
|
||||
}
|
||||
|
||||
getWindowState(): WindowState {
|
||||
if (!remote.getCurrentWindow().isVisible()) {
|
||||
return WindowState.Hidden;
|
||||
} else if (remote.getCurrentWindow().isMinimized()) {
|
||||
return WindowState.Minimized;
|
||||
} else if (remote.getCurrentWindow().isNormal()) {
|
||||
return WindowState.Normal;
|
||||
} else if (remote.getCurrentWindow().isMaximized()) {
|
||||
return WindowState.Maximized;
|
||||
} else if (remote.getCurrentWindow().isFullScreen()) {
|
||||
return WindowState.FullScreen;
|
||||
} else {
|
||||
return WindowState.Normal;
|
||||
}
|
||||
}
|
||||
|
||||
appExit(): void {
|
||||
this.ipcRenderer.send(AppChannel.Exit);
|
||||
}
|
||||
|
|
|
@ -72,6 +72,7 @@ export abstract class NativeService {
|
|||
abstract windowClose(): void;
|
||||
abstract windowMinimize(): void;
|
||||
abstract windowMaximize(): void;
|
||||
abstract getWindowState(): WindowState;
|
||||
abstract zoomTo(factor: number): Promise<number>;
|
||||
abstract appExit(): void;
|
||||
|
||||
|
|
|
@ -182,10 +182,10 @@ export class MessagesComponent implements OnInit, OnDestroy {
|
|||
this.roomInfo.roomSeq !== roomInfo.roomSeq)
|
||||
) {
|
||||
this.baseEventSeq = 0;
|
||||
this.showMore = false;
|
||||
}
|
||||
|
||||
this.roomInfo = roomInfo;
|
||||
this.showMore = false;
|
||||
|
||||
/** [S] initializing by changed room */
|
||||
// reset :: roomLastEventSeq
|
||||
|
|
|
@ -178,6 +178,10 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
return;
|
||||
}
|
||||
|
||||
this.validUploadFile(fileList).then(async result => {
|
||||
if (!result) {
|
||||
return;
|
||||
} else {
|
||||
for (let i = 0; i < fileList.length; i++) {
|
||||
const file = fileList.item(i);
|
||||
|
||||
|
@ -198,6 +202,8 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
|
||||
self.checkContentLength();
|
||||
self.changeDetectorRef.detectChanges();
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -228,7 +234,7 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
};
|
||||
}
|
||||
|
||||
validUploadFile(fileList: FileList): boolean {
|
||||
async validUploadFile(fileList: FileList): Promise<boolean> {
|
||||
let valid = true;
|
||||
if (this.fileAllowSize > 0) {
|
||||
for (let i = 0; i < fileList.length; i++) {
|
||||
|
@ -283,6 +289,39 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
return valid;
|
||||
}
|
||||
|
||||
const files: File[] = [];
|
||||
for (let i = 0; i < fileList.length; i++) {
|
||||
files.push(fileList.item(i));
|
||||
}
|
||||
const fakeMedia = await this.commonApiService.checkInvalidMediaMimeForFileTalk(
|
||||
files
|
||||
);
|
||||
if (!fakeMedia.accept) {
|
||||
this.ngZone.run(() => {
|
||||
this.snackBarService.openFromComponent<
|
||||
AlertSnackbarComponent,
|
||||
AlertSnackbarData
|
||||
>(AlertSnackbarComponent, {
|
||||
duration: 1000,
|
||||
verticalPosition: 'bottom',
|
||||
horizontalPosition: 'center',
|
||||
data: {
|
||||
html: this.translateService.instant(
|
||||
'common.file.errors.notAcceptableMime',
|
||||
{
|
||||
supporedType:
|
||||
fakeMedia.rejected.length > 0
|
||||
? fakeMedia.rejected.join(',')
|
||||
: ''
|
||||
}
|
||||
)
|
||||
}
|
||||
});
|
||||
});
|
||||
valid = false;
|
||||
return valid;
|
||||
}
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user