diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-19 11:12:01 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-11-19 15:25:41 +0100 |
commit | 4f926722ea6784ea389013378fd233f59077ec8a (patch) | |
tree | 36e92da1d8fc9394e1e36144f206e0427b7c02c3 /client/src/app/core | |
parent | fce7fe04eed39e23e76717085e92118e963def81 (diff) | |
download | PeerTube-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')
-rw-r--r-- | client/src/app/core/notification/peertube-socket.service.ts | 9 |
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' | |||
3 | import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models' | 3 | import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models' |
4 | import { environment } from '../../../environments/environment' | 4 | import { environment } from '../../../environments/environment' |
5 | import { AuthService } from '../auth' | 5 | import { AuthService } from '../auth' |
6 | import { io, Socket } from 'socket.io-client' | ||
6 | 7 | ||
7 | export type NotificationEvent = 'new' | 'read' | 'read-all' | 8 | export type NotificationEvent = 'new' | 'read' | 'read-all' |
8 | 9 | ||
9 | @Injectable() | 10 | @Injectable() |
10 | export class PeerTubeSocket { | 11 | export 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) { |