From c8000975d361fae166a6ebecac5005238e14d4c9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 21 Feb 2019 15:44:12 +0100 Subject: Add NSFW info in about page --- .../app/shared/instance/instance-features-table.component.html | 6 ++++++ .../app/shared/instance/instance-features-table.component.ts | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/instance/instance-features-table.component.html b/client/src/app/shared/instance/instance-features-table.component.html index 90046f409..2885f97e3 100644 --- a/client/src/app/shared/instance/instance-features-table.component.html +++ b/client/src/app/shared/instance/instance-features-table.component.html @@ -1,6 +1,12 @@
+ + + + + +
Default NSFW/sensitive videos policy (can be redefined by the users){{ buildNSFWLabel() }}
{{ feature.label }} 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 @@ 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('
') } - } -- cgit v1.2.3