-
+
diff --git a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts
index c633f724..f92f0010 100644
--- a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts
+++ b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts
@@ -27,7 +27,8 @@ import {
AlertDialogComponent,
AlertDialogResult,
AlertDialogData,
- ConfirmDialogData
+ ConfirmDialogData,
+ StatusBarService
} from '@ucap-webmessenger/ui';
import {
ProfileDialogComponent,
@@ -64,6 +65,9 @@ export class MainPageComponent implements OnInit, OnDestroy {
@ViewChild('leftSideContainer', { static: false })
leftSideContainer: LeftSideComponent;
+ @ViewChild('statusbarContainer', { static: true })
+ statusbarContainer: ElementRef
;
+
selectedChat$: Observable;
selectedRightDrawer$: Observable;
idleStateChangedSubscription: Subscription;
@@ -95,6 +99,7 @@ export class MainPageComponent implements OnInit, OnDestroy {
private sessionStorageService: SessionStorageService,
private translateService: TranslateService,
private dialogService: DialogService,
+ private statusBarService: StatusBarService,
private logger: NGXLogger
) {
this.environmentsInfo = this.sessionStorageService.get(
@@ -103,6 +108,8 @@ export class MainPageComponent implements OnInit, OnDestroy {
}
ngOnInit(): void {
+ this.statusBarService.container = this.statusbarContainer;
+
this.selectedChat$ = this.store.pipe(
select(AppStore.MessengerSelector.ChatSelector.selectedRoom),
tap(selectedRoom => {
diff --git a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts
index 2c48ba90..7a8c0f4f 100644
--- a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts
+++ b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts
@@ -17,9 +17,10 @@ import {
import { NGXLogger } from 'ngx-logger';
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
-import { TranslatePipe } from 'projects/ucap-webmessenger-ui/src/lib/pipes/translate.pipe';
+
import {
- TranslateService as UcapUiTranslateService,
+ TranslateService as UiTranslateService,
+ TranslatePipe as UiTranslatePipe,
StringUtil
} from '@ucap-webmessenger/ui';
import { TranslateService } from '@ngx-translate/core';
@@ -62,7 +63,7 @@ export class ListItemComponent implements OnInit {
constructor(
private logger: NGXLogger,
- private ucapUiTranslateService: UcapUiTranslateService,
+ private uiTranslateService: UiTranslateService,
private translateService: TranslateService,
private changeDetectorRef: ChangeDetectorRef
) {}
@@ -128,8 +129,8 @@ export class ListItemComponent implements OnInit {
}
getRoomNameByRoomUser(roomUserInfos: (RoomUserInfo | UserInfoShort)[]) {
- let roomName = new TranslatePipe(
- this.ucapUiTranslateService,
+ let roomName = new UiTranslatePipe(
+ this.uiTranslateService,
this.changeDetectorRef
).transform(roomUserInfos, 'name', ',');
diff --git a/projects/ucap-webmessenger-ui/src/lib/services/status-bar.service.ts b/projects/ucap-webmessenger-ui/src/lib/services/status-bar.service.ts
index 7a80eec7..3e45239b 100644
--- a/projects/ucap-webmessenger-ui/src/lib/services/status-bar.service.ts
+++ b/projects/ucap-webmessenger-ui/src/lib/services/status-bar.service.ts
@@ -1,10 +1,26 @@
-import { Injectable } from '@angular/core';
+import { Injectable, ViewContainerRef, ElementRef } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class StatusBarService {
+ get container() {
+ return this._container;
+ }
+ set container(container: ElementRef) {
+ this._container = container;
+ this._container.nativeElement.style.display = 'none';
+ }
+ // tslint:disable-next-line: variable-name
+ private _container: ElementRef;
+
public constructor() {}
- open() {}
+ open(message: string) {
+ this._container.nativeElement.style.display = '';
+ }
+
+ dismiss() {
+ this._container.nativeElement.style.display = 'none';
+ }
}
diff --git a/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts b/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts
index ce0d2ea4..aa3bc3a4 100644
--- a/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts
+++ b/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts
@@ -56,6 +56,7 @@ 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 { StatusBarService } from './services/status-bar.service';
import { ClickOutsideDirective } from './directives/click-outside.directive';
import { FileUploadForDirective } from './directives/file-upload-for.directive';
@@ -137,7 +138,8 @@ const SERVICES = [
SplashScreenService,
TranslateService,
DateService,
- PaginatorIntlService
+ PaginatorIntlService,
+ StatusBarService
];
@NgModule({
diff --git a/projects/ucap-webmessenger-ui/src/public-api.ts b/projects/ucap-webmessenger-ui/src/public-api.ts
index 347d3eb2..15561e61 100644
--- a/projects/ucap-webmessenger-ui/src/public-api.ts
+++ b/projects/ucap-webmessenger-ui/src/public-api.ts
@@ -19,6 +19,7 @@ export * from './lib/components/step-input.component';
export * from './lib/components/split-button.component';
export * from './lib/components/sticker-selector.component';
export * from './lib/components/inline-edit-input.component';
+export * from './lib/components/integrated-search.component';
export * from './lib/data-source/virtual-scroll-tree-flat.data-source';
@@ -37,6 +38,10 @@ 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/services/status-bar.service';
+
+export * from './lib/pipes/string.pipe';
+export * from './lib/pipes/translate.pipe';
export * from './lib/snackbars/alert.snackbar.component';