aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-04 16:21:07 +0200
committerChocobozzz <me@florianbigard.com>2018-09-04 17:31:28 +0200
commit8cd7faaa331f83903f0bbaead288661218e38bdb (patch)
tree82e16eb1f7d4d7d259de9aab74c9865fd2ec7081 /client/src/app/core
parenta94419a604f324305c9dbb607496a5bca9b63d04 (diff)
downloadPeerTube-8cd7faaa331f83903f0bbaead288661218e38bdb.tar.gz
PeerTube-8cd7faaa331f83903f0bbaead288661218e38bdb.tar.zst
PeerTube-8cd7faaa331f83903f0bbaead288661218e38bdb.zip
Better label for video privacies
Diffstat (limited to 'client/src/app/core')
-rw-r--r--client/src/app/core/server/server.service.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts
index e7152efa0..2f1ef1fc2 100644
--- a/client/src/app/core/server/server.service.ts
+++ b/client/src/app/core/server/server.service.ts
@@ -6,7 +6,7 @@ import { Observable, of, ReplaySubject } from 'rxjs'
6import { getCompleteLocale, ServerConfig } from '../../../../../shared' 6import { getCompleteLocale, ServerConfig } from '../../../../../shared'
7import { About } from '../../../../../shared/models/server/about.model' 7import { About } from '../../../../../shared/models/server/about.model'
8import { environment } from '../../../environments/environment' 8import { environment } from '../../../environments/environment'
9import { VideoConstant } from '../../../../../shared/models/videos' 9import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos'
10import { isDefaultLocale, peertubeTranslate } from '../../../../../shared/models/i18n' 10import { isDefaultLocale, peertubeTranslate } from '../../../../../shared/models/i18n'
11import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' 11import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
12import { sortBy } from '@app/shared/misc/utils' 12import { sortBy } from '@app/shared/misc/utils'
@@ -82,10 +82,10 @@ export class ServerService {
82 } 82 }
83 } 83 }
84 } 84 }
85 private videoCategories: Array<VideoConstant<string>> = [] 85 private videoCategories: Array<VideoConstant<number>> = []
86 private videoLicences: Array<VideoConstant<string>> = [] 86 private videoLicences: Array<VideoConstant<number>> = []
87 private videoLanguages: Array<VideoConstant<string>> = [] 87 private videoLanguages: Array<VideoConstant<string>> = []
88 private videoPrivacies: Array<VideoConstant<string>> = [] 88 private videoPrivacies: Array<VideoConstant<VideoPrivacy>> = []
89 89
90 constructor ( 90 constructor (
91 private http: HttpClient, 91 private http: HttpClient,
@@ -147,7 +147,7 @@ export class ServerService {
147 147
148 private loadVideoAttributeEnum ( 148 private loadVideoAttributeEnum (
149 attributeName: 'categories' | 'licences' | 'languages' | 'privacies', 149 attributeName: 'categories' | 'licences' | 'languages' | 'privacies',
150 hashToPopulate: VideoConstant<string>[], 150 hashToPopulate: VideoConstant<string | number>[],
151 notifier: ReplaySubject<boolean>, 151 notifier: ReplaySubject<boolean>,
152 sort = false 152 sort = false
153 ) { 153 ) {
@@ -164,7 +164,7 @@ export class ServerService {
164 const label = data[ dataKey ] 164 const label = data[ dataKey ]
165 165
166 hashToPopulate.push({ 166 hashToPopulate.push({
167 id: dataKey, 167 id: attributeName === 'languages' ? dataKey : parseInt(dataKey, 10),
168 label: peertubeTranslate(label, translations) 168 label: peertubeTranslate(label, translations)
169 }) 169 })
170 }) 170 })