diff options
Diffstat (limited to 'client/src/app')
4 files changed, 20 insertions, 7 deletions
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index b0c5d1130..3a8a535fd 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -105,6 +105,9 @@ export class ServerService { | |||
105 | enabled: false | 105 | enabled: false |
106 | } | 106 | } |
107 | } | 107 | } |
108 | }, | ||
109 | tracker: { | ||
110 | enabled: true | ||
108 | } | 111 | } |
109 | } | 112 | } |
110 | private videoCategories: Array<VideoConstant<number>> = [] | 113 | private videoCategories: Array<VideoConstant<number>> = [] |
diff --git a/client/src/app/shared/instance/instance-features-table.component.ts b/client/src/app/shared/instance/instance-features-table.component.ts index c0257fd59..72e7c2730 100644 --- a/client/src/app/shared/instance/instance-features-table.component.ts +++ b/client/src/app/shared/instance/instance-features-table.component.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { ServerService } from '@app/core' | 2 | import { ServerService } from '@app/core' |
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | 3 | import { I18n } from '@ngx-translate/i18n-polyfill' |
4 | import { ServerConfig } from '../../../../../shared' | ||
5 | 4 | ||
6 | @Component({ | 5 | @Component({ |
7 | selector: 'my-instance-features-table', | 6 | selector: 'my-instance-features-table', |
@@ -65,6 +64,10 @@ export class InstanceFeaturesTableComponent implements OnInit { | |||
65 | { | 64 | { |
66 | label: this.i18n('Torrent import'), | 65 | label: this.i18n('Torrent import'), |
67 | value: config.import.videos.torrent.enabled | 66 | value: config.import.videos.torrent.enabled |
67 | }, | ||
68 | { | ||
69 | label: this.i18n('P2P enabled'), | ||
70 | value: config.tracker.enabled | ||
68 | } | 71 | } |
69 | ] | 72 | ] |
70 | } | 73 | } |
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index d61a0bc3e..84b9aed39 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss | |||
@@ -427,6 +427,7 @@ my-video-comments { | |||
427 | // If the view is not expanded, take into account the menu | 427 | // If the view is not expanded, take into account the menu |
428 | .privacy-concerns { | 428 | .privacy-concerns { |
429 | width: calc(100% - #{$menu-width}); | 429 | width: calc(100% - #{$menu-width}); |
430 | margin-left: -15px; | ||
430 | } | 431 | } |
431 | 432 | ||
432 | @media screen and (max-width: $small-view) { | 433 | @media screen and (max-width: $small-view) { |
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index edc546b28..bce652210 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -29,6 +29,7 @@ import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' | |||
29 | import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' | 29 | import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' |
30 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | 30 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' |
31 | import { Video } from '@app/shared/video/video.model' | 31 | import { Video } from '@app/shared/video/video.model' |
32 | import { isWebRTCDisabled } from '../../../assets/player/utils' | ||
32 | 33 | ||
33 | @Component({ | 34 | @Component({ |
34 | selector: 'my-video-watch', | 35 | selector: 'my-video-watch', |
@@ -71,6 +72,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
71 | private currentTime: number | 72 | private currentTime: number |
72 | private paramsSub: Subscription | 73 | private paramsSub: Subscription |
73 | private queryParamsSub: Subscription | 74 | private queryParamsSub: Subscription |
75 | private configSub: Subscription | ||
74 | 76 | ||
75 | constructor ( | 77 | constructor ( |
76 | private elementRef: ElementRef, | 78 | private elementRef: ElementRef, |
@@ -100,12 +102,16 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
100 | } | 102 | } |
101 | 103 | ||
102 | ngOnInit () { | 104 | ngOnInit () { |
103 | if ( | 105 | this.configSub = this.serverService.configLoaded |
104 | !!((window as any).RTCPeerConnection || (window as any).mozRTCPeerConnection || (window as any).webkitRTCPeerConnection) === false || | 106 | .subscribe(() => { |
105 | peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY) === 'true' | 107 | if ( |
106 | ) { | 108 | isWebRTCDisabled() || |
107 | this.hasAlreadyAcceptedPrivacyConcern = true | 109 | this.serverService.getConfig().tracker.enabled === false || |
108 | } | 110 | peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY) === 'true' |
111 | ) { | ||
112 | this.hasAlreadyAcceptedPrivacyConcern = true | ||
113 | } | ||
114 | }) | ||
109 | 115 | ||
110 | this.paramsSub = this.route.params.subscribe(routeParams => { | 116 | this.paramsSub = this.route.params.subscribe(routeParams => { |
111 | const videoId = routeParams[ 'videoId' ] | 117 | const videoId = routeParams[ 'videoId' ] |