From ec10e8ed5b903b0a4d7af5c4a1f03c5f2e89c6b1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Feb 2020 11:47:47 +0100 Subject: Fix playlist cache error --- client/src/app/shared/video-playlist/video-playlist.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'client/src') 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 { return this.authHttp.post<{ videoPlaylist: { id: number } }>(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL, data) .pipe( tap(res => { + if (!this.myAccountPlaylistCache) return + this.myAccountPlaylistCache.total++ this.myAccountPlaylistCache.data.push({ @@ -161,6 +163,8 @@ export class VideoPlaylistService { .pipe( map(this.restExtractor.extractDataBool), tap(() => { + if (!this.myAccountPlaylistCache) return + const playlist = this.myAccountPlaylistCache.data.find(p => p.id === videoPlaylist.id) playlist.displayName = body.displayName @@ -175,6 +179,8 @@ export class VideoPlaylistService { .pipe( map(this.restExtractor.extractDataBool), tap(() => { + if (!this.myAccountPlaylistCache) return + this.myAccountPlaylistCache.total-- this.myAccountPlaylistCache.data = this.myAccountPlaylistCache.data .filter(p => p.id !== videoPlaylist.id) -- cgit v1.2.3 From 017fbe1855a9b3aea601595b10e62c681fbcdb17 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Feb 2020 11:56:28 +0100 Subject: Fix instance get config --- client/src/app/core/server/server.service.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/src') 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 { if (!this.configObservable) { this.configObservable = this.http.get(ServerService.BASE_CONFIG_URL) .pipe( - tap(this.saveConfigLocally), - tap(() => this.configLoaded = true), + tap(config => this.saveConfigLocally(config)), + tap(config => { + this.config = config + this.configLoaded = true + }), tap(() => { if (this.configReset) { this.configReloaded.next() -- cgit v1.2.3 From c06be129506de9ac8d9910fed473c86724ca0e4e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 20 Feb 2020 10:42:57 +0100 Subject: Fix scroll menu on touch devices --- client/src/app/menu/menu.component.scss | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'client/src') diff --git a/client/src/app/menu/menu.component.scss b/client/src/app/menu/menu.component.scss index 2963d4d19..112fdc1ce 100644 --- a/client/src/app/menu/menu.component.scss +++ b/client/src/app/menu/menu.component.scss @@ -260,3 +260,11 @@ menu { width: 100% !important; } } + +@media (hover: none) and (pointer: coarse) { + .menu-wrapper { + menu { + overflow-y: auto; + } + } +} -- cgit v1.2.3 From 133d9c112a19720eccc20def0c01aa0ec009c27a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 26 Feb 2020 15:01:22 +0100 Subject: Fix IOS embed player --- client/src/standalone/videos/embed.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'client/src') 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 { private async buildDock (videoInfo: VideoDetails, configResponse: Response) { if (this.controls) { + // On webtorrent fallback, player may have been disposed + if (!this.player.player_) return + const title = this.title ? videoInfo.name : undefined const config: ServerConfig = await configResponse.json() -- cgit v1.2.3 From c002261381a4dd0b07dd6706942d446b237fd8f4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 26 Feb 2020 15:25:00 +0100 Subject: Correctly fix menu overflow on mobile --- client/src/app/menu/menu.component.scss | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'client/src') diff --git a/client/src/app/menu/menu.component.scss b/client/src/app/menu/menu.component.scss index 112fdc1ce..b05173751 100644 --- a/client/src/app/menu/menu.component.scss +++ b/client/src/app/menu/menu.component.scss @@ -254,17 +254,13 @@ menu { @media screen and (max-width: $mobile-view) { .menu-wrapper { width: 100% !important; - } - - .top-menu, .footer { - width: 100% !important; - } -} -@media (hover: none) and (pointer: coarse) { - .menu-wrapper { menu { overflow-y: auto; } } + + .top-menu, .footer { + width: 100% !important; + } } -- cgit v1.2.3