aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/notification
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-19 11:12:01 +0100
committerChocobozzz <me@florianbigard.com>2020-11-19 15:25:41 +0100
commit4f926722ea6784ea389013378fd233f59077ec8a (patch)
tree36e92da1d8fc9394e1e36144f206e0427b7c02c3 /client/src/app/core/notification
parentfce7fe04eed39e23e76717085e92118e963def81 (diff)
downloadPeerTube-4f926722ea6784ea389013378fd233f59077ec8a.tar.gz
PeerTube-4f926722ea6784ea389013378fd233f59077ec8a.tar.zst
PeerTube-4f926722ea6784ea389013378fd233f59077ec8a.zip
Upgrade client dependencies
Migrate removed primeng theme to custom CSS
Diffstat (limited to 'client/src/app/core/notification')
-rw-r--r--client/src/app/core/notification/peertube-socket.service.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/src/app/core/notification/peertube-socket.service.ts b/client/src/app/core/notification/peertube-socket.service.ts
index 8668c44a8..2f17fd709 100644
--- a/client/src/app/core/notification/peertube-socket.service.ts
+++ b/client/src/app/core/notification/peertube-socket.service.ts
@@ -3,18 +3,19 @@ import { Injectable, NgZone } from '@angular/core'
3import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models' 3import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models'
4import { environment } from '../../../environments/environment' 4import { environment } from '../../../environments/environment'
5import { AuthService } from '../auth' 5import { AuthService } from '../auth'
6import { io, Socket } from 'socket.io-client'
6 7
7export type NotificationEvent = 'new' | 'read' | 'read-all' 8export type NotificationEvent = 'new' | 'read' | 'read-all'
8 9
9@Injectable() 10@Injectable()
10export class PeerTubeSocket { 11export class PeerTubeSocket {
11 private io: typeof import ('socket.io-client') 12 private io: typeof io
12 13
13 private notificationSubject = new Subject<{ type: NotificationEvent, notification?: UserNotificationServer }>() 14 private notificationSubject = new Subject<{ type: NotificationEvent, notification?: UserNotificationServer }>()
14 private liveVideosSubject = new Subject<{ type: LiveVideoEventType, payload: LiveVideoEventPayload }>() 15 private liveVideosSubject = new Subject<{ type: LiveVideoEventType, payload: LiveVideoEventPayload }>()
15 16
16 private notificationSocket: SocketIOClient.Socket 17 private notificationSocket: Socket
17 private liveVideosSocket: SocketIOClient.Socket 18 private liveVideosSocket: Socket
18 19
19 constructor ( 20 constructor (
20 private auth: AuthService, 21 private auth: AuthService,
@@ -77,7 +78,7 @@ export class PeerTubeSocket {
77 private async importIOIfNeeded () { 78 private async importIOIfNeeded () {
78 if (this.io) return 79 if (this.io) return
79 80
80 this.io = (await import('socket.io-client') as any).default 81 this.io = (await import('socket.io-client')).io
81 } 82 }
82 83
83 private dispatchLiveVideoEvent (type: LiveVideoEventType, payload: LiveVideoEventPayload) { 84 private dispatchLiveVideoEvent (type: LiveVideoEventType, payload: LiveVideoEventPayload) {