aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r--client/src/app/shared/shared-main/video/video.service.ts34
1 files changed, 15 insertions, 19 deletions
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts
index 49d6fc1c7..04a39be0e 100644
--- a/client/src/app/shared/shared-main/video/video.service.ts
+++ b/client/src/app/shared/shared-main/video/video.service.ts
@@ -379,28 +379,24 @@ export class VideoService implements VideosProvider {
379 } 379 }
380 380
381 explainedPrivacyLabels (serverPrivacies: VideoConstant<VideoPrivacy>[], defaultPrivacyId = VideoPrivacy.PUBLIC) { 381 explainedPrivacyLabels (serverPrivacies: VideoConstant<VideoPrivacy>[], defaultPrivacyId = VideoPrivacy.PUBLIC) {
382 const descriptions = [ 382 const descriptions = {
383 { 383 [VideoPrivacy.PRIVATE]: $localize`Only I can see this video`,
384 id: VideoPrivacy.PRIVATE, 384 [VideoPrivacy.UNLISTED]: $localize`Only shareable via a private link`,
385 description: $localize`Only I can see this video` 385 [VideoPrivacy.PUBLIC]: $localize`Anyone can see this video`,
386 }, 386 [VideoPrivacy.INTERNAL]: $localize`Only users of this instance can see this video`
387 { 387 }
388 id: VideoPrivacy.UNLISTED, 388
389 description: $localize`Only shareable via a private link` 389 const videoPrivacies = serverPrivacies.map(p => {
390 }, 390 return {
391 { 391 ...p,
392 id: VideoPrivacy.PUBLIC, 392
393 description: $localize`Anyone can see this video` 393 description: descriptions[p.id]
394 },
395 {
396 id: VideoPrivacy.INTERNAL,
397 description: $localize`Only users of this instance can see this video`
398 } 394 }
399 ] 395 })
400 396
401 return { 397 return {
402 defaultPrivacyId: serverPrivacies.find(p => p.id === defaultPrivacyId)?.id || serverPrivacies[0].id, 398 videoPrivacies,
403 videoPrivacies: serverPrivacies.map(p => ({ ...p, description: descriptions.find(p => p.id).description })) 399 defaultPrivacyId: serverPrivacies.find(p => p.id === defaultPrivacyId)?.id || serverPrivacies[0].id
404 } 400 }
405 } 401 }
406 402