mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
939 B
33 lines
939 B
/*
|
|
* Squidex Headless CMS
|
|
*
|
|
* @license
|
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
|
|
*/
|
|
|
|
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
import { AppsState, CommentsService, switchSafe } from '@app/shared/internal';
|
|
import { timer } from 'rxjs';
|
|
|
|
@Component({
|
|
selector: 'sqx-watching-users[resource]',
|
|
styleUrls: ['./watching-users.component.scss'],
|
|
templateUrl: './watching-users.component.html',
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
})
|
|
export class WatchingUsersComponent {
|
|
private appName: string;
|
|
|
|
@Input()
|
|
public resource: string;
|
|
|
|
public users =
|
|
timer(0, 5000).pipe(
|
|
switchSafe((() => this.commentsService.getWatchingUsers(this.appName, this.resource))));
|
|
|
|
constructor(appsState: AppsState,
|
|
private readonly commentsService: CommentsService,
|
|
) {
|
|
this.appName = appsState.appName;
|
|
}
|
|
}
|
|
|