Merge branch 'master' of https://git.loafle.net/ucap-web/next-ucap-messenger
This commit is contained in:
commit
93944da65d
|
@ -1,10 +1,4 @@
|
||||||
import {
|
import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
|
||||||
Component,
|
|
||||||
OnInit,
|
|
||||||
OnDestroy,
|
|
||||||
Inject,
|
|
||||||
EventEmitter
|
|
||||||
} from '@angular/core';
|
|
||||||
|
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
|
@ -20,6 +14,7 @@ import {
|
||||||
import { FileDownloadItem } from '@ucap-webmessenger/api';
|
import { FileDownloadItem } from '@ucap-webmessenger/api';
|
||||||
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { FileProtocolService } from '@ucap-webmessenger/protocol-file';
|
||||||
|
|
||||||
export interface FileViewerDialogData {
|
export interface FileViewerDialogData {
|
||||||
fileInfo: FileEventJson;
|
fileInfo: FileEventJson;
|
||||||
|
@ -55,6 +50,7 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
||||||
private translateService: TranslateService,
|
private translateService: TranslateService,
|
||||||
private snackBarService: SnackBarService,
|
private snackBarService: SnackBarService,
|
||||||
private commonApiService: CommonApiService,
|
private commonApiService: CommonApiService,
|
||||||
|
private fileProtocolService: FileProtocolService,
|
||||||
private logger: NGXLogger
|
private logger: NGXLogger
|
||||||
) {
|
) {
|
||||||
this.fileInfo = data.fileInfo;
|
this.fileInfo = data.fileInfo;
|
||||||
|
@ -98,6 +94,14 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
FileUtil.fromBlobToBuffer(blob)
|
FileUtil.fromBlobToBuffer(blob)
|
||||||
.then(buffer => {
|
.then(buffer => {
|
||||||
|
/** download check */
|
||||||
|
this.fileProtocolService
|
||||||
|
.downCheck({
|
||||||
|
seq: this.fileInfo.attachmentSeq
|
||||||
|
})
|
||||||
|
.pipe(take(1))
|
||||||
|
.subscribe();
|
||||||
|
|
||||||
this.nativeService
|
this.nativeService
|
||||||
.saveFile(buffer, this.fileInfo.fileName, mimeType)
|
.saveFile(buffer, this.fileInfo.fileName, mimeType)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
|
|
|
@ -481,20 +481,7 @@ export class GroupComponent implements OnInit, OnDestroy {
|
||||||
);
|
);
|
||||||
switch (menuType) {
|
switch (menuType) {
|
||||||
case 'VIEW_PROFILE':
|
case 'VIEW_PROFILE':
|
||||||
let useBuddyButton = false;
|
this.onClickOpenProfile(userInfo.seq, group);
|
||||||
if (
|
|
||||||
!!group &&
|
|
||||||
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
|
||||||
environment.productConfig.CommonSetting.myDeptGroupSeq !== group.seq
|
|
||||||
) {
|
|
||||||
useBuddyButton = true;
|
|
||||||
}
|
|
||||||
this.openProfile.emit({
|
|
||||||
userSeq: userInfo.seq,
|
|
||||||
openProfileOptions: {
|
|
||||||
useBuddyButton
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case 'CHAT':
|
case 'CHAT':
|
||||||
this.onSelectBuddy(userInfo);
|
this.onSelectBuddy(userInfo);
|
||||||
|
@ -630,21 +617,27 @@ export class GroupComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickOpenProfile(userSeq: number, group: GroupDetailData) {
|
onClickOpenProfile(userSeq: number, group: GroupDetailData) {
|
||||||
let useBuddyButton = false;
|
if (this.isShowSearch) {
|
||||||
if (
|
this.openProfile.emit({
|
||||||
!!group &&
|
userSeq
|
||||||
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
});
|
||||||
environment.productConfig.CommonSetting.myDeptGroupSeq !== group.seq
|
} else {
|
||||||
) {
|
let useBuddyButton = false;
|
||||||
useBuddyButton = true;
|
if (
|
||||||
}
|
!!group &&
|
||||||
|
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||||
this.openProfile.emit({
|
environment.productConfig.CommonSetting.myDeptGroupSeq !== group.seq
|
||||||
userSeq,
|
) {
|
||||||
openProfileOptions: {
|
useBuddyButton = true;
|
||||||
useBuddyButton
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
this.openProfile.emit({
|
||||||
|
userSeq,
|
||||||
|
openProfileOptions: {
|
||||||
|
useBuddyButton
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onContextMenuProfile(
|
onContextMenuProfile(
|
||||||
|
|
|
@ -127,6 +127,7 @@ import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { TranslatePipe } from 'projects/ucap-webmessenger-ui/src/lib/pipes/translate.pipe';
|
import { TranslatePipe } from 'projects/ucap-webmessenger-ui/src/lib/pipes/translate.pipe';
|
||||||
import { TranslateService as UiTranslateService } from '@ucap-webmessenger/ui';
|
import { TranslateService as UiTranslateService } from '@ucap-webmessenger/ui';
|
||||||
|
import { FileProtocolService } from '@ucap-webmessenger/protocol-file';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layout-messenger-messages',
|
selector: 'app-layout-messenger-messages',
|
||||||
|
@ -230,6 +231,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
private sessionStorageService: SessionStorageService,
|
private sessionStorageService: SessionStorageService,
|
||||||
private localStorageService: LocalStorageService,
|
private localStorageService: LocalStorageService,
|
||||||
private commonApiService: CommonApiService,
|
private commonApiService: CommonApiService,
|
||||||
|
private fileProtocolService: FileProtocolService,
|
||||||
private clipboardService: ClipboardService,
|
private clipboardService: ClipboardService,
|
||||||
private uiTranslateService: UiTranslateService,
|
private uiTranslateService: UiTranslateService,
|
||||||
private translateService: TranslateService,
|
private translateService: TranslateService,
|
||||||
|
@ -979,6 +981,14 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
|
|
||||||
FileUtil.fromBlobToBuffer(blob)
|
FileUtil.fromBlobToBuffer(blob)
|
||||||
.then(buffer => {
|
.then(buffer => {
|
||||||
|
/** download check */
|
||||||
|
this.fileProtocolService
|
||||||
|
.downCheck({
|
||||||
|
seq: value.fileInfo.attachmentSeq
|
||||||
|
})
|
||||||
|
.pipe(take(1))
|
||||||
|
.subscribe();
|
||||||
|
|
||||||
this.nativeService
|
this.nativeService
|
||||||
.saveFile(buffer, value.fileInfo.fileName, mimeType, savePath)
|
.saveFile(buffer, value.fileInfo.fileName, mimeType, savePath)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
|
|
|
@ -2,14 +2,15 @@ import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
FileInfo,
|
FileInfo,
|
||||||
FileDownloadInfo,
|
FileDownloadInfo,
|
||||||
FileType
|
FileType,
|
||||||
|
FileProtocolService
|
||||||
} from '@ucap-webmessenger/protocol-file';
|
} from '@ucap-webmessenger/protocol-file';
|
||||||
import { Subscription, combineLatest } from 'rxjs';
|
import { Subscription, combineLatest } from 'rxjs';
|
||||||
import { Store, select } from '@ngrx/store';
|
import { Store, select } from '@ngrx/store';
|
||||||
|
|
||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
import { tap, map, take, finalize } from 'rxjs/operators';
|
import { tap, map, take, finalize } from 'rxjs/operators';
|
||||||
import { FileUtil, MimeUtil, DeviceType } from '@ucap-webmessenger/core';
|
import { FileUtil, MimeUtil } from '@ucap-webmessenger/core';
|
||||||
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
|
@ -65,6 +66,7 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private sessionStorageService: SessionStorageService,
|
private sessionStorageService: SessionStorageService,
|
||||||
private commonApiService: CommonApiService,
|
private commonApiService: CommonApiService,
|
||||||
|
private fileProtocolService: FileProtocolService,
|
||||||
private translateService: TranslateService,
|
private translateService: TranslateService,
|
||||||
private snackBarService: SnackBarService,
|
private snackBarService: SnackBarService,
|
||||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||||
|
@ -232,6 +234,14 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
FileUtil.fromBlobToBuffer(blob)
|
FileUtil.fromBlobToBuffer(blob)
|
||||||
.then(buffer => {
|
.then(buffer => {
|
||||||
|
/** download check */
|
||||||
|
this.fileProtocolService
|
||||||
|
.downCheck({
|
||||||
|
seq: fileInfo.info.seq
|
||||||
|
})
|
||||||
|
.pipe(take(1))
|
||||||
|
.subscribe();
|
||||||
|
|
||||||
this.nativeService
|
this.nativeService
|
||||||
.saveFile(buffer, fileInfo.info.name, mimeType)
|
.saveFile(buffer, fileInfo.info.name, mimeType)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
|
|
|
@ -3,7 +3,8 @@ import { MatPaginator, MatTableDataSource, MatSort } from '@angular/material';
|
||||||
import {
|
import {
|
||||||
FileInfo,
|
FileInfo,
|
||||||
FileDownloadInfo,
|
FileDownloadInfo,
|
||||||
FileType
|
FileType,
|
||||||
|
FileProtocolService
|
||||||
} from '@ucap-webmessenger/protocol-file';
|
} from '@ucap-webmessenger/protocol-file';
|
||||||
import { Subscription, combineLatest } from 'rxjs';
|
import { Subscription, combineLatest } from 'rxjs';
|
||||||
import { Store, select } from '@ngrx/store';
|
import { Store, select } from '@ngrx/store';
|
||||||
|
@ -11,7 +12,7 @@ import { Store, select } from '@ngrx/store';
|
||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
import * as EventStore from '@app/store/messenger/event';
|
import * as EventStore from '@app/store/messenger/event';
|
||||||
import { tap, map, take, finalize } from 'rxjs/operators';
|
import { tap, map, take, finalize } from 'rxjs/operators';
|
||||||
import { FileUtil, MimeUtil, DeviceType } from '@ucap-webmessenger/core';
|
import { FileUtil, MimeUtil } from '@ucap-webmessenger/core';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
||||||
|
@ -78,6 +79,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private sessionStorageService: SessionStorageService,
|
private sessionStorageService: SessionStorageService,
|
||||||
private commonApiService: CommonApiService,
|
private commonApiService: CommonApiService,
|
||||||
|
private fileProtocolService: FileProtocolService,
|
||||||
private translateService: TranslateService,
|
private translateService: TranslateService,
|
||||||
private snackBarService: SnackBarService,
|
private snackBarService: SnackBarService,
|
||||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||||
|
@ -275,6 +277,14 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
FileUtil.fromBlobToBuffer(blob)
|
FileUtil.fromBlobToBuffer(blob)
|
||||||
.then(buffer => {
|
.then(buffer => {
|
||||||
|
/** download check */
|
||||||
|
this.fileProtocolService
|
||||||
|
.downCheck({
|
||||||
|
seq: fileInfo.info.seq
|
||||||
|
})
|
||||||
|
.pipe(take(1))
|
||||||
|
.subscribe();
|
||||||
|
|
||||||
this.nativeService
|
this.nativeService
|
||||||
.saveFile(buffer, fileInfo.info.name, mimeType)
|
.saveFile(buffer, fileInfo.info.name, mimeType)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
|
|
|
@ -350,6 +350,7 @@
|
||||||
"
|
"
|
||||||
(edit)="$event.stopPropagation()"
|
(edit)="$event.stopPropagation()"
|
||||||
(cancel)="$event.stopPropagation()"
|
(cancel)="$event.stopPropagation()"
|
||||||
|
class="form-eidt"
|
||||||
>
|
>
|
||||||
<span ucapInlineEditInput="view">{{ loginRes?.statusMessage1 }}</span>
|
<span ucapInlineEditInput="view">{{ loginRes?.statusMessage1 }}</span>
|
||||||
<span ucapInlineEditInput="edit"
|
<span ucapInlineEditInput="edit"
|
||||||
|
@ -359,6 +360,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
[value]="loginRes?.statusMessage1"
|
[value]="loginRes?.statusMessage1"
|
||||||
(click)="$event.stopPropagation()"
|
(click)="$event.stopPropagation()"
|
||||||
|
|
||||||
/></span>
|
/></span>
|
||||||
</ucap-inline-edit-input>
|
</ucap-inline-edit-input>
|
||||||
</button>
|
</button>
|
||||||
|
@ -373,6 +375,7 @@
|
||||||
"
|
"
|
||||||
(edit)="$event.stopPropagation()"
|
(edit)="$event.stopPropagation()"
|
||||||
(cancel)="$event.stopPropagation()"
|
(cancel)="$event.stopPropagation()"
|
||||||
|
class="form-eidt"
|
||||||
>
|
>
|
||||||
<span ucapInlineEditInput="view">{{ loginRes?.statusMessage2 }}</span>
|
<span ucapInlineEditInput="view">{{ loginRes?.statusMessage2 }}</span>
|
||||||
<span ucapInlineEditInput="edit"
|
<span ucapInlineEditInput="edit"
|
||||||
|
@ -396,6 +399,7 @@
|
||||||
"
|
"
|
||||||
(edit)="$event.stopPropagation()"
|
(edit)="$event.stopPropagation()"
|
||||||
(cancel)="$event.stopPropagation()"
|
(cancel)="$event.stopPropagation()"
|
||||||
|
class="form-eidt"
|
||||||
>
|
>
|
||||||
<span ucapInlineEditInput="view">{{ loginRes?.statusMessage3 }}</span>
|
<span ucapInlineEditInput="view">{{ loginRes?.statusMessage3 }}</span>
|
||||||
<span ucapInlineEditInput="edit"
|
<span ucapInlineEditInput="edit"
|
||||||
|
|
|
@ -253,8 +253,26 @@
|
||||||
button {
|
button {
|
||||||
.presence {
|
.presence {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
transform: translateY(0px);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.form-eidt {
|
||||||
|
display: inline-flex;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding-right: 20px;
|
||||||
|
align-items: center;
|
||||||
|
span {
|
||||||
|
display: inline-flex;
|
||||||
|
&:nth-child(2) {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
padding: 4px;
|
||||||
|
height: 70%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
&:nth-child(2) {
|
&:nth-child(2) {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
@ -265,7 +283,6 @@
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
&.clock {
|
&.clock {
|
||||||
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-clock'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
|
|
||||||
}
|
}
|
||||||
&.edit {
|
&.edit {
|
||||||
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-edit-2'%3E%3Cpath d='M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z'%3E%3C/path%3E%3C/svg%3E");
|
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-edit-2'%3E%3Cpath d='M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z'%3E%3C/path%3E%3C/svg%3E");
|
||||||
|
|
|
@ -25,7 +25,7 @@ export const encodeDownCheck: ProtocolEncoder<DownCheckRequest> = (
|
||||||
) => {
|
) => {
|
||||||
const bodyList: PacketBody[] = [];
|
const bodyList: PacketBody[] = [];
|
||||||
|
|
||||||
bodyList.push({ type: PacketBodyValue.Integer, value: req.seq });
|
bodyList.push({ type: PacketBodyValue.String, value: req.seq });
|
||||||
return bodyList;
|
return bodyList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user