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/shared-main.module.ts7
-rw-r--r--client/src/app/shared/shared-main/video/video.service.ts12
2 files changed, 13 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-main/shared-main.module.ts b/client/src/app/shared/shared-main/shared-main.module.ts
index 22a207e51..a4d18d562 100644
--- a/client/src/app/shared/shared-main/shared-main.module.ts
+++ b/client/src/app/shared/shared-main/shared-main.module.ts
@@ -17,6 +17,7 @@ import {
17 NgbPopoverModule, 17 NgbPopoverModule,
18 NgbTooltipModule 18 NgbTooltipModule
19} from '@ng-bootstrap/ng-bootstrap' 19} from '@ng-bootstrap/ng-bootstrap'
20import { NgSelectModule } from '@ng-select/ng-select'
20import { I18n } from '@ngx-translate/i18n-polyfill' 21import { I18n } from '@ngx-translate/i18n-polyfill'
21import { SharedGlobalIconModule } from '../shared-icons' 22import { SharedGlobalIconModule } from '../shared-icons'
22import { AccountService, ActorAvatarInfoComponent, AvatarComponent } from './account' 23import { AccountService, ActorAvatarInfoComponent, AvatarComponent } from './account'
@@ -55,6 +56,8 @@ import { AUTH_INTERCEPTOR_PROVIDER } from './auth'
55 MultiSelectModule, 56 MultiSelectModule,
56 InputSwitchModule, 57 InputSwitchModule,
57 58
59 NgSelectModule,
60
58 SharedGlobalIconModule 61 SharedGlobalIconModule
59 ], 62 ],
60 63
@@ -134,7 +137,9 @@ import { AUTH_INTERCEPTOR_PROVIDER } from './auth'
134 TopMenuDropdownComponent, 137 TopMenuDropdownComponent,
135 138
136 UserQuotaComponent, 139 UserQuotaComponent,
137 UserNotificationsComponent 140 UserNotificationsComponent,
141
142 NgSelectModule
138 ], 143 ],
139 144
140 providers: [ 145 providers: [
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 edaefa9f2..978f775bf 100644
--- a/client/src/app/shared/shared-main/video/video.service.ts
+++ b/client/src/app/shared/shared-main/video/video.service.ts
@@ -339,23 +339,25 @@ export class VideoService implements VideosProvider {
339 const base = [ 339 const base = [
340 { 340 {
341 id: VideoPrivacy.PRIVATE, 341 id: VideoPrivacy.PRIVATE,
342 label: this.i18n('Only I can see this video') 342 description: this.i18n('Only I can see this video')
343 }, 343 },
344 { 344 {
345 id: VideoPrivacy.UNLISTED, 345 id: VideoPrivacy.UNLISTED,
346 label: this.i18n('Only people with the private link can see this video') 346 description: this.i18n('Only shareable via a private link')
347 }, 347 },
348 { 348 {
349 id: VideoPrivacy.PUBLIC, 349 id: VideoPrivacy.PUBLIC,
350 label: this.i18n('Anyone can see this video') 350 description: this.i18n('Anyone can see this video')
351 }, 351 },
352 { 352 {
353 id: VideoPrivacy.INTERNAL, 353 id: VideoPrivacy.INTERNAL,
354 label: this.i18n('Only users of this instance can see this video') 354 description: this.i18n('Only users of this instance can see this video')
355 } 355 }
356 ] 356 ]
357 357
358 return base.filter(o => !!privacies.find(p => p.id === o.id)) 358 return base
359 .filter(o => !!privacies.find(p => p.id === o.id)) // filter down to privacies that where in the input
360 .map(o => ({ ...privacies[o.id - 1], ...o })) // merge the input privacies that contain a label, and extend them with a description
359 } 361 }
360 362
361 nsfwPolicyToParam (nsfwPolicy: NSFWPolicyType) { 363 nsfwPolicyToParam (nsfwPolicy: NSFWPolicyType) {