Merge branch 'master' of https://git.loafle.net/ucap-web/next-ucap-messenger
This commit is contained in:
commit
c022c82ac4
|
@ -156,6 +156,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="isShowSearchArea" class="chat-search">
|
<div *ngIf="isShowSearchArea" class="chat-search">
|
||||||
<ucap-chat-search
|
<ucap-chat-search
|
||||||
|
#chatSearch
|
||||||
[totalCount]="searchTotalCount"
|
[totalCount]="searchTotalCount"
|
||||||
[curIndex]="searchCurrentIndex"
|
[curIndex]="searchCurrentIndex"
|
||||||
(searchText)="onSearchChat($event)"
|
(searchText)="onSearchChat($event)"
|
||||||
|
@ -181,7 +182,9 @@
|
||||||
(fileDragLeave)="onFileDragLeave()"
|
(fileDragLeave)="onFileDragLeave()"
|
||||||
>
|
>
|
||||||
<!-- CHAT MESSAGES -->
|
<!-- CHAT MESSAGES -->
|
||||||
<button mat-stroked-button class=" icon-button text-accent-darkest"><i class="mid mdi-arrow-collapse-down"></i></button>
|
<button mat-stroked-button class=" icon-button text-accent-darkest">
|
||||||
|
<i class="mid mdi-arrow-collapse-down"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
<ucap-chat-messages
|
<ucap-chat-messages
|
||||||
#chatMessages
|
#chatMessages
|
||||||
|
|
|
@ -72,7 +72,8 @@ import {
|
||||||
import { take, map, catchError } from 'rxjs/operators';
|
import { take, map, catchError } from 'rxjs/operators';
|
||||||
import {
|
import {
|
||||||
FormComponent as UCapUiChatFormComponent,
|
FormComponent as UCapUiChatFormComponent,
|
||||||
MessagesComponent as UCapUiChatMessagesComponent
|
MessagesComponent as UCapUiChatMessagesComponent,
|
||||||
|
SearchComponent
|
||||||
} from '@ucap-webmessenger/ui-chat';
|
} from '@ucap-webmessenger/ui-chat';
|
||||||
import { KEY_VER_INFO } from '@app/types';
|
import { KEY_VER_INFO } from '@app/types';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
|
@ -145,6 +146,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
@Output()
|
@Output()
|
||||||
closeRightDrawer = new EventEmitter();
|
closeRightDrawer = new EventEmitter();
|
||||||
|
|
||||||
|
@ViewChild('chatSearch', { static: false })
|
||||||
|
private chatSearch: SearchComponent;
|
||||||
|
|
||||||
@ViewChild('chatForm', { static: false })
|
@ViewChild('chatForm', { static: false })
|
||||||
private chatForm: UCapUiChatFormComponent;
|
private chatForm: UCapUiChatFormComponent;
|
||||||
|
|
||||||
|
@ -1704,6 +1708,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
}
|
}
|
||||||
onSelectedSticker(stickerInfo: StickerFilesInfo) {
|
onSelectedSticker(stickerInfo: StickerFilesInfo) {
|
||||||
this.selectedSticker = stickerInfo;
|
this.selectedSticker = stickerInfo;
|
||||||
|
if (!!this.chatForm) {
|
||||||
|
this.chatForm.replyInput.nativeElement.focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setStickerHistory(sticker: StickerFilesInfo) {
|
setStickerHistory(sticker: StickerFilesInfo) {
|
||||||
const history = this.localStorageService.get<string[]>(KEY_STICKER_HISTORY);
|
const history = this.localStorageService.get<string[]>(KEY_STICKER_HISTORY);
|
||||||
|
@ -1737,6 +1744,12 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
this.searchedListSubject.next([]);
|
this.searchedListSubject.next([]);
|
||||||
this.searchedFocusEvent = null;
|
this.searchedFocusEvent = null;
|
||||||
this.searchText = '';
|
this.searchText = '';
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (!!this.chatSearch) {
|
||||||
|
this.chatSearch.inputSearch.nativeElement.focus();
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onCloseSearchArea() {
|
onCloseSearchArea() {
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
import {
|
||||||
|
Component,
|
||||||
|
OnInit,
|
||||||
|
Input,
|
||||||
|
Output,
|
||||||
|
EventEmitter,
|
||||||
|
ElementRef,
|
||||||
|
ViewChild
|
||||||
|
} from '@angular/core';
|
||||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
|
|
||||||
|
@ -24,6 +32,8 @@ export class SearchComponent implements OnInit {
|
||||||
@Output()
|
@Output()
|
||||||
closeSearchArea = new EventEmitter();
|
closeSearchArea = new EventEmitter();
|
||||||
|
|
||||||
|
@ViewChild('inputSearch', { static: false }) inputSearch: ElementRef;
|
||||||
|
|
||||||
fgSearch: FormGroup;
|
fgSearch: FormGroup;
|
||||||
isSearch = false;
|
isSearch = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user