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:
parent
e359e88b08
commit
c8000975d3
9 changed files with 53 additions and 4 deletions
|
@ -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 />')
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue