1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Add NSFW info in about page

This commit is contained in:
Chocobozzz 2019-02-21 15:44:12 +01:00
parent e359e88b08
commit c8000975d3
No known key found for this signature in database
GPG key ID: 583A612D890159BE
9 changed files with 53 additions and 4 deletions

View file

@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core'
import { ServerService } from '@app/core'
import { I18n } from '@ngx-translate/i18n-polyfill'
import { ServerConfig } from '../../../../../shared'
@Component({
selector: 'my-instance-features-table',
@ -33,6 +34,14 @@ export class InstanceFeaturesTableComponent implements OnInit {
})
}
buildNSFWLabel () {
const policy = this.serverService.getConfig().instance.defaultNSFWPolicy
if (policy === 'do_not_list') return this.i18n('Hidden')
if (policy === 'blur') return this.i18n('Blurred with confirmation request')
if (policy === 'display') return this.i18n('Displayed')
}
private buildFeatures () {
const config = this.serverService.getConfig()
@ -87,5 +96,4 @@ export class InstanceFeaturesTableComponent implements OnInit {
this.quotaHelpIndication = lines.join('<br />')
}
}