diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/package.json | 2 | ||||
-rw-r--r-- | client/src/app/core/server/server.service.ts | 7 | ||||
-rw-r--r-- | client/src/app/menu/menu.component.scss | 4 | ||||
-rw-r--r-- | client/src/app/shared/video-playlist/video-playlist.service.ts | 6 | ||||
-rw-r--r-- | client/src/standalone/videos/embed.ts | 3 |
5 files changed, 19 insertions, 3 deletions
diff --git a/client/package.json b/client/package.json index b9ddf7042..024e0b1d9 100644 --- a/client/package.json +++ b/client/package.json | |||
@@ -1,6 +1,6 @@ | |||
1 | { | 1 | { |
2 | "name": "peertube-client", | 2 | "name": "peertube-client", |
3 | "version": "2.1.0", | 3 | "version": "2.1.1", |
4 | "private": true, | 4 | "private": true, |
5 | "license": "AGPL-3.0", | 5 | "license": "AGPL-3.0", |
6 | "author": { | 6 | "author": { |
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index cdcbcb528..3997ce6db 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -159,8 +159,11 @@ export class ServerService { | |||
159 | if (!this.configObservable) { | 159 | if (!this.configObservable) { |
160 | this.configObservable = this.http.get<ServerConfig>(ServerService.BASE_CONFIG_URL) | 160 | this.configObservable = this.http.get<ServerConfig>(ServerService.BASE_CONFIG_URL) |
161 | .pipe( | 161 | .pipe( |
162 | tap(this.saveConfigLocally), | 162 | tap(config => this.saveConfigLocally(config)), |
163 | tap(() => this.configLoaded = true), | 163 | tap(config => { |
164 | this.config = config | ||
165 | this.configLoaded = true | ||
166 | }), | ||
164 | tap(() => { | 167 | tap(() => { |
165 | if (this.configReset) { | 168 | if (this.configReset) { |
166 | this.configReloaded.next() | 169 | this.configReloaded.next() |
diff --git a/client/src/app/menu/menu.component.scss b/client/src/app/menu/menu.component.scss index 2963d4d19..b05173751 100644 --- a/client/src/app/menu/menu.component.scss +++ b/client/src/app/menu/menu.component.scss | |||
@@ -254,6 +254,10 @@ menu { | |||
254 | @media screen and (max-width: $mobile-view) { | 254 | @media screen and (max-width: $mobile-view) { |
255 | .menu-wrapper { | 255 | .menu-wrapper { |
256 | width: 100% !important; | 256 | width: 100% !important; |
257 | |||
258 | menu { | ||
259 | overflow-y: auto; | ||
260 | } | ||
257 | } | 261 | } |
258 | 262 | ||
259 | .top-menu, .footer { | 263 | .top-menu, .footer { |
diff --git a/client/src/app/shared/video-playlist/video-playlist.service.ts b/client/src/app/shared/video-playlist/video-playlist.service.ts index bae6f9e04..38d915c6b 100644 --- a/client/src/app/shared/video-playlist/video-playlist.service.ts +++ b/client/src/app/shared/video-playlist/video-playlist.service.ts | |||
@@ -141,6 +141,8 @@ export class VideoPlaylistService { | |||
141 | return this.authHttp.post<{ videoPlaylist: { id: number } }>(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL, data) | 141 | return this.authHttp.post<{ videoPlaylist: { id: number } }>(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL, data) |
142 | .pipe( | 142 | .pipe( |
143 | tap(res => { | 143 | tap(res => { |
144 | if (!this.myAccountPlaylistCache) return | ||
145 | |||
144 | this.myAccountPlaylistCache.total++ | 146 | this.myAccountPlaylistCache.total++ |
145 | 147 | ||
146 | this.myAccountPlaylistCache.data.push({ | 148 | this.myAccountPlaylistCache.data.push({ |
@@ -161,6 +163,8 @@ export class VideoPlaylistService { | |||
161 | .pipe( | 163 | .pipe( |
162 | map(this.restExtractor.extractDataBool), | 164 | map(this.restExtractor.extractDataBool), |
163 | tap(() => { | 165 | tap(() => { |
166 | if (!this.myAccountPlaylistCache) return | ||
167 | |||
164 | const playlist = this.myAccountPlaylistCache.data.find(p => p.id === videoPlaylist.id) | 168 | const playlist = this.myAccountPlaylistCache.data.find(p => p.id === videoPlaylist.id) |
165 | playlist.displayName = body.displayName | 169 | playlist.displayName = body.displayName |
166 | 170 | ||
@@ -175,6 +179,8 @@ export class VideoPlaylistService { | |||
175 | .pipe( | 179 | .pipe( |
176 | map(this.restExtractor.extractDataBool), | 180 | map(this.restExtractor.extractDataBool), |
177 | tap(() => { | 181 | tap(() => { |
182 | if (!this.myAccountPlaylistCache) return | ||
183 | |||
178 | this.myAccountPlaylistCache.total-- | 184 | this.myAccountPlaylistCache.total-- |
179 | this.myAccountPlaylistCache.data = this.myAccountPlaylistCache.data | 185 | this.myAccountPlaylistCache.data = this.myAccountPlaylistCache.data |
180 | .filter(p => p.id !== videoPlaylist.id) | 186 | .filter(p => p.id !== videoPlaylist.id) |
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index c91ae08b9..5213443fc 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -262,6 +262,9 @@ export class PeerTubeEmbed { | |||
262 | 262 | ||
263 | private async buildDock (videoInfo: VideoDetails, configResponse: Response) { | 263 | private async buildDock (videoInfo: VideoDetails, configResponse: Response) { |
264 | if (this.controls) { | 264 | if (this.controls) { |
265 | // On webtorrent fallback, player may have been disposed | ||
266 | if (!this.player.player_) return | ||
267 | |||
265 | const title = this.title ? videoInfo.name : undefined | 268 | const title = this.title ? videoInfo.name : undefined |
266 | 269 | ||
267 | const config: ServerConfig = await configResponse.json() | 270 | const config: ServerConfig = await configResponse.json() |