aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/users/user-notifications.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-20 10:16:04 +0100
committerChocobozzz <me@florianbigard.com>2019-02-20 10:16:04 +0100
commitb28e4e5e080646ec67363cb0a16c9bd97ccffb35 (patch)
treea1af72cd2b0c7138bcaa4cb5f44e5db6d168e05d /client/src/app/shared/users/user-notifications.component.ts
parent28c8e63e55cad24b024fc1d05aa1cfc0257434e5 (diff)
downloadPeerTube-b28e4e5e080646ec67363cb0a16c9bd97ccffb35.tar.gz
PeerTube-b28e4e5e080646ec67363cb0a16c9bd97ccffb35.tar.zst
PeerTube-b28e4e5e080646ec67363cb0a16c9bd97ccffb35.zip
Add user notification animation
Diffstat (limited to 'client/src/app/shared/users/user-notifications.component.ts')
-rw-r--r--client/src/app/shared/users/user-notifications.component.ts6
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 @@
1import { Component, Input, OnInit } from '@angular/core' 1import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
2import { UserNotificationService } from '@app/shared/users/user-notification.service' 2import { UserNotificationService } from '@app/shared/users/user-notification.service'
3import { UserNotificationType } from '../../../../../shared' 3import { UserNotificationType } from '../../../../../shared'
4import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' 4import { 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)