aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/instance/instance-features-table.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/instance/instance-features-table.component.ts')
-rw-r--r--client/src/app/shared/instance/instance-features-table.component.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/shared/instance/instance-features-table.component.ts b/client/src/app/shared/instance/instance-features-table.component.ts
index aaf0a6960..a4924a0d5 100644
--- a/client/src/app/shared/instance/instance-features-table.component.ts
+++ b/client/src/app/shared/instance/instance-features-table.component.ts
@@ -1,6 +1,7 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { ServerService } from '@app/core' 2import { ServerService } from '@app/core'
3import { I18n } from '@ngx-translate/i18n-polyfill' 3import { I18n } from '@ngx-translate/i18n-polyfill'
4import { ServerConfig } from '../../../../../shared'
4 5
5@Component({ 6@Component({
6 selector: 'my-instance-features-table', 7 selector: 'my-instance-features-table',
@@ -33,6 +34,14 @@ export class InstanceFeaturesTableComponent implements OnInit {
33 }) 34 })
34 } 35 }
35 36
37 buildNSFWLabel () {
38 const policy = this.serverService.getConfig().instance.defaultNSFWPolicy
39
40 if (policy === 'do_not_list') return this.i18n('Hidden')
41 if (policy === 'blur') return this.i18n('Blurred with confirmation request')
42 if (policy === 'display') return this.i18n('Displayed')
43 }
44
36 private buildFeatures () { 45 private buildFeatures () {
37 const config = this.serverService.getConfig() 46 const config = this.serverService.getConfig()
38 47
@@ -87,5 +96,4 @@ export class InstanceFeaturesTableComponent implements OnInit {
87 96
88 this.quotaHelpIndication = lines.join('<br />') 97 this.quotaHelpIndication = lines.join('<br />')
89 } 98 }
90
91} 99}