diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2019-12-11 22:13:20 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-12-13 09:13:43 +0100 |
commit | 88a7f93f8e5666f44121a2e3cf9d33d74c472aa7 (patch) | |
tree | 01a5d765f9ffed5cc4cbfc7b8c5fc14eb61548a7 /client/src/app/videos/recommendations/recommended-videos.component.ts | |
parent | 12f18b90ba6395464606052bb1bdfedb6b83df13 (diff) | |
download | PeerTube-88a7f93f8e5666f44121a2e3cf9d33d74c472aa7.tar.gz PeerTube-88a7f93f8e5666f44121a2e3cf9d33d74c472aa7.tar.zst PeerTube-88a7f93f8e5666f44121a2e3cf9d33d74c472aa7.zip |
add loop setting for playlists, and use sessionStorage
Diffstat (limited to 'client/src/app/videos/recommendations/recommended-videos.component.ts')
-rw-r--r-- | client/src/app/videos/recommendations/recommended-videos.component.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/videos/recommendations/recommended-videos.component.ts b/client/src/app/videos/recommendations/recommended-videos.component.ts index 771ae54a2..fdcfb28e3 100644 --- a/client/src/app/videos/recommendations/recommended-videos.component.ts +++ b/client/src/app/videos/recommendations/recommended-videos.component.ts | |||
@@ -7,7 +7,7 @@ import { RecommendedVideosStore } from '@app/videos/recommendations/recommended- | |||
7 | import { User } from '@app/shared' | 7 | import { User } from '@app/shared' |
8 | import { AuthService, Notifier } from '@app/core' | 8 | import { AuthService, Notifier } from '@app/core' |
9 | import { UserService } from '@app/shared/users/user.service' | 9 | import { UserService } from '@app/shared/users/user.service' |
10 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' | 10 | import { peertubeSessionStorage } from '@app/shared/misc/peertube-web-storage' |
11 | 11 | ||
12 | @Component({ | 12 | @Component({ |
13 | selector: 'my-recommended-videos', | 13 | selector: 'my-recommended-videos', |
@@ -15,7 +15,7 @@ import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' | |||
15 | styleUrls: [ './recommended-videos.component.scss' ] | 15 | styleUrls: [ './recommended-videos.component.scss' ] |
16 | }) | 16 | }) |
17 | export class RecommendedVideosComponent implements OnChanges { | 17 | export class RecommendedVideosComponent implements OnChanges { |
18 | static LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO = 'auto_play_next_video' | 18 | static SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO = 'auto_play_next_video' |
19 | 19 | ||
20 | @Input() inputRecommendation: RecommendationInfo | 20 | @Input() inputRecommendation: RecommendationInfo |
21 | @Input() user: User | 21 | @Input() user: User |
@@ -39,7 +39,7 @@ export class RecommendedVideosComponent implements OnChanges { | |||
39 | 39 | ||
40 | this.autoPlayNextVideo = this.authService.isLoggedIn() | 40 | this.autoPlayNextVideo = this.authService.isLoggedIn() |
41 | ? this.authService.getUser().autoPlayNextVideo | 41 | ? this.authService.getUser().autoPlayNextVideo |
42 | : peertubeLocalStorage.getItem(RecommendedVideosComponent.LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' || false | 42 | : peertubeSessionStorage.getItem(RecommendedVideosComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' || false |
43 | } | 43 | } |
44 | 44 | ||
45 | public ngOnChanges (): void { | 45 | public ngOnChanges (): void { |
@@ -53,7 +53,7 @@ export class RecommendedVideosComponent implements OnChanges { | |||
53 | } | 53 | } |
54 | 54 | ||
55 | switchAutoPlayNextVideo () { | 55 | switchAutoPlayNextVideo () { |
56 | peertubeLocalStorage.setItem(RecommendedVideosComponent.LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO, this.autoPlayNextVideo.toString()) | 56 | peertubeSessionStorage.setItem(RecommendedVideosComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO, this.autoPlayNextVideo.toString()) |
57 | 57 | ||
58 | if (this.authService.isLoggedIn()) { | 58 | if (this.authService.isLoggedIn()) { |
59 | const details = { | 59 | const details = { |