diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-26 15:18:46 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-26 15:18:46 +0200 |
commit | ac27887774e63d99f4e227fbe18846f143cc4b3c (patch) | |
tree | 697a9132412d57809ce63271714b7051a9cc525a /client/src/app/shared/shared-main | |
parent | 15a7eafb892441957ba7dd6fcbf556086fe5b2b3 (diff) | |
parent | 84c6eadc33484358dd962056609df16e8eb1c3d0 (diff) | |
download | PeerTube-ac27887774e63d99f4e227fbe18846f143cc4b3c.tar.gz PeerTube-ac27887774e63d99f4e227fbe18846f143cc4b3c.tar.zst PeerTube-ac27887774e63d99f4e227fbe18846f143cc4b3c.zip |
Merge branch 'release/3.3.0' into develop
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/video/video.service.ts | 34 |
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 | ||