diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-20 10:16:04 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-20 10:16:04 +0100 |
commit | b28e4e5e080646ec67363cb0a16c9bd97ccffb35 (patch) | |
tree | a1af72cd2b0c7138bcaa4cb5f44e5db6d168e05d /client/src/app/shared/users | |
parent | 28c8e63e55cad24b024fc1d05aa1cfc0257434e5 (diff) | |
download | PeerTube-b28e4e5e080646ec67363cb0a16c9bd97ccffb35.tar.gz PeerTube-b28e4e5e080646ec67363cb0a16c9bd97ccffb35.tar.zst PeerTube-b28e4e5e080646ec67363cb0a16c9bd97ccffb35.zip |
Add user notification animation
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r-- | client/src/app/shared/users/user-notifications.component.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/shared/users/user-notifications.component.ts b/client/src/app/shared/users/user-notifications.component.ts index b5f9fd399..ce43b604a 100644 --- a/client/src/app/shared/users/user-notifications.component.ts +++ b/client/src/app/shared/users/user-notifications.component.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | 1 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
2 | import { UserNotificationService } from '@app/shared/users/user-notification.service' | 2 | import { UserNotificationService } from '@app/shared/users/user-notification.service' |
3 | import { UserNotificationType } from '../../../../../shared' | 3 | import { UserNotificationType } from '../../../../../shared' |
4 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' | 4 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' |
@@ -15,6 +15,8 @@ export class UserNotificationsComponent implements OnInit { | |||
15 | @Input() infiniteScroll = true | 15 | @Input() infiniteScroll = true |
16 | @Input() itemsPerPage = 20 | 16 | @Input() itemsPerPage = 20 |
17 | 17 | ||
18 | @Output() notificationsLoaded = new EventEmitter() | ||
19 | |||
18 | notifications: UserNotification[] = [] | 20 | notifications: UserNotification[] = [] |
19 | 21 | ||
20 | // So we can access it in the template | 22 | // So we can access it in the template |
@@ -43,6 +45,8 @@ export class UserNotificationsComponent implements OnInit { | |||
43 | result => { | 45 | result => { |
44 | this.notifications = this.notifications.concat(result.data) | 46 | this.notifications = this.notifications.concat(result.data) |
45 | this.componentPagination.totalItems = result.total | 47 | this.componentPagination.totalItems = result.total |
48 | |||
49 | this.notificationsLoaded.emit() | ||
46 | }, | 50 | }, |
47 | 51 | ||
48 | err => this.notifier.error(err.message) | 52 | err => this.notifier.error(err.message) |