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 {
|
||||
Component,
|
||||
OnInit,
|
||||
OnDestroy,
|
||||
Inject,
|
||||
EventEmitter
|
||||
} from '@angular/core';
|
||||
import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
|
||||
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
|
@ -20,6 +14,7 @@ import {
|
|||
import { FileDownloadItem } from '@ucap-webmessenger/api';
|
||||
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { FileProtocolService } from '@ucap-webmessenger/protocol-file';
|
||||
|
||||
export interface FileViewerDialogData {
|
||||
fileInfo: FileEventJson;
|
||||
|
@ -55,6 +50,7 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
|||
private translateService: TranslateService,
|
||||
private snackBarService: SnackBarService,
|
||||
private commonApiService: CommonApiService,
|
||||
private fileProtocolService: FileProtocolService,
|
||||
private logger: NGXLogger
|
||||
) {
|
||||
this.fileInfo = data.fileInfo;
|
||||
|
@ -98,6 +94,14 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
|||
|
||||
FileUtil.fromBlobToBuffer(blob)
|
||||
.then(buffer => {
|
||||
/** download check */
|
||||
this.fileProtocolService
|
||||
.downCheck({
|
||||
seq: this.fileInfo.attachmentSeq
|
||||
})
|
||||
.pipe(take(1))
|
||||
.subscribe();
|
||||
|
||||
this.nativeService
|
||||
.saveFile(buffer, this.fileInfo.fileName, mimeType)
|
||||
.then(result => {
|
||||
|
|
|
@ -481,20 +481,7 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||
);
|
||||
switch (menuType) {
|
||||
case 'VIEW_PROFILE':
|
||||
let useBuddyButton = false;
|
||||
if (
|
||||
!!group &&
|
||||
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||
environment.productConfig.CommonSetting.myDeptGroupSeq !== group.seq
|
||||
) {
|
||||
useBuddyButton = true;
|
||||
}
|
||||
this.openProfile.emit({
|
||||
userSeq: userInfo.seq,
|
||||
openProfileOptions: {
|
||||
useBuddyButton
|
||||
}
|
||||
});
|
||||
this.onClickOpenProfile(userInfo.seq, group);
|
||||
break;
|
||||
case 'CHAT':
|
||||
this.onSelectBuddy(userInfo);
|
||||
|
@ -630,6 +617,11 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
onClickOpenProfile(userSeq: number, group: GroupDetailData) {
|
||||
if (this.isShowSearch) {
|
||||
this.openProfile.emit({
|
||||
userSeq
|
||||
});
|
||||
} else {
|
||||
let useBuddyButton = false;
|
||||
if (
|
||||
!!group &&
|
||||
|
@ -646,6 +638,7 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onContextMenuProfile(
|
||||
event: MouseEvent,
|
||||
|
|
|
@ -127,6 +127,7 @@ import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native';
|
|||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TranslatePipe } from 'projects/ucap-webmessenger-ui/src/lib/pipes/translate.pipe';
|
||||
import { TranslateService as UiTranslateService } from '@ucap-webmessenger/ui';
|
||||
import { FileProtocolService } from '@ucap-webmessenger/protocol-file';
|
||||
|
||||
@Component({
|
||||
selector: 'app-layout-messenger-messages',
|
||||
|
@ -230,6 +231,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
private sessionStorageService: SessionStorageService,
|
||||
private localStorageService: LocalStorageService,
|
||||
private commonApiService: CommonApiService,
|
||||
private fileProtocolService: FileProtocolService,
|
||||
private clipboardService: ClipboardService,
|
||||
private uiTranslateService: UiTranslateService,
|
||||
private translateService: TranslateService,
|
||||
|
@ -979,6 +981,14 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
|
||||
FileUtil.fromBlobToBuffer(blob)
|
||||
.then(buffer => {
|
||||
/** download check */
|
||||
this.fileProtocolService
|
||||
.downCheck({
|
||||
seq: value.fileInfo.attachmentSeq
|
||||
})
|
||||
.pipe(take(1))
|
||||
.subscribe();
|
||||
|
||||
this.nativeService
|
||||
.saveFile(buffer, value.fileInfo.fileName, mimeType, savePath)
|
||||
.then(result => {
|
||||
|
|
|
@ -2,14 +2,15 @@ import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
|
|||
import {
|
||||
FileInfo,
|
||||
FileDownloadInfo,
|
||||
FileType
|
||||
FileType,
|
||||
FileProtocolService
|
||||
} from '@ucap-webmessenger/protocol-file';
|
||||
import { Subscription, combineLatest } from 'rxjs';
|
||||
import { Store, select } from '@ngrx/store';
|
||||
|
||||
import * as AppStore from '@app/store';
|
||||
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 { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||
|
@ -65,6 +66,7 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
|
|||
private store: Store<any>,
|
||||
private sessionStorageService: SessionStorageService,
|
||||
private commonApiService: CommonApiService,
|
||||
private fileProtocolService: FileProtocolService,
|
||||
private translateService: TranslateService,
|
||||
private snackBarService: SnackBarService,
|
||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||
|
@ -232,6 +234,14 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
|
|||
|
||||
FileUtil.fromBlobToBuffer(blob)
|
||||
.then(buffer => {
|
||||
/** download check */
|
||||
this.fileProtocolService
|
||||
.downCheck({
|
||||
seq: fileInfo.info.seq
|
||||
})
|
||||
.pipe(take(1))
|
||||
.subscribe();
|
||||
|
||||
this.nativeService
|
||||
.saveFile(buffer, fileInfo.info.name, mimeType)
|
||||
.then(result => {
|
||||
|
|
|
@ -3,7 +3,8 @@ import { MatPaginator, MatTableDataSource, MatSort } from '@angular/material';
|
|||
import {
|
||||
FileInfo,
|
||||
FileDownloadInfo,
|
||||
FileType
|
||||
FileType,
|
||||
FileProtocolService
|
||||
} from '@ucap-webmessenger/protocol-file';
|
||||
import { Subscription, combineLatest } from 'rxjs';
|
||||
import { Store, select } from '@ngrx/store';
|
||||
|
@ -11,7 +12,7 @@ import { Store, select } from '@ngrx/store';
|
|||
import * as AppStore from '@app/store';
|
||||
import * as EventStore from '@app/store/messenger/event';
|
||||
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 { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||
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 sessionStorageService: SessionStorageService,
|
||||
private commonApiService: CommonApiService,
|
||||
private fileProtocolService: FileProtocolService,
|
||||
private translateService: TranslateService,
|
||||
private snackBarService: SnackBarService,
|
||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||
|
@ -275,6 +277,14 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
|||
|
||||
FileUtil.fromBlobToBuffer(blob)
|
||||
.then(buffer => {
|
||||
/** download check */
|
||||
this.fileProtocolService
|
||||
.downCheck({
|
||||
seq: fileInfo.info.seq
|
||||
})
|
||||
.pipe(take(1))
|
||||
.subscribe();
|
||||
|
||||
this.nativeService
|
||||
.saveFile(buffer, fileInfo.info.name, mimeType)
|
||||
.then(result => {
|
||||
|
|
|
@ -350,6 +350,7 @@
|
|||
"
|
||||
(edit)="$event.stopPropagation()"
|
||||
(cancel)="$event.stopPropagation()"
|
||||
class="form-eidt"
|
||||
>
|
||||
<span ucapInlineEditInput="view">{{ loginRes?.statusMessage1 }}</span>
|
||||
<span ucapInlineEditInput="edit"
|
||||
|
@ -359,6 +360,7 @@
|
|||
type="text"
|
||||
[value]="loginRes?.statusMessage1"
|
||||
(click)="$event.stopPropagation()"
|
||||
|
||||
/></span>
|
||||
</ucap-inline-edit-input>
|
||||
</button>
|
||||
|
@ -373,6 +375,7 @@
|
|||
"
|
||||
(edit)="$event.stopPropagation()"
|
||||
(cancel)="$event.stopPropagation()"
|
||||
class="form-eidt"
|
||||
>
|
||||
<span ucapInlineEditInput="view">{{ loginRes?.statusMessage2 }}</span>
|
||||
<span ucapInlineEditInput="edit"
|
||||
|
@ -396,6 +399,7 @@
|
|||
"
|
||||
(edit)="$event.stopPropagation()"
|
||||
(cancel)="$event.stopPropagation()"
|
||||
class="form-eidt"
|
||||
>
|
||||
<span ucapInlineEditInput="view">{{ loginRes?.statusMessage3 }}</span>
|
||||
<span ucapInlineEditInput="edit"
|
||||
|
|
|
@ -253,8 +253,26 @@
|
|||
button {
|
||||
.presence {
|
||||
margin-right: 10px;
|
||||
transform: translateY(0px);
|
||||
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) {
|
||||
margin-right: 20px;
|
||||
margin-left: auto;
|
||||
|
@ -265,7 +283,6 @@
|
|||
width: 24px;
|
||||
height: 24px;
|
||||
&.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 {
|
||||
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[] = [];
|
||||
|
||||
bodyList.push({ type: PacketBodyValue.Integer, value: req.seq });
|
||||
bodyList.push({ type: PacketBodyValue.String, value: req.seq });
|
||||
return bodyList;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user