diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts index 0af1dca9c..e2c448501 100644 --- a/client/src/app/+about/about-instance/about-instance.component.ts +++ b/client/src/app/+about/about-instance/about-instance.component.ts @@ -6,7 +6,6 @@ import { InstanceService } from '@app/shared/instance/instance.service' import { MarkdownService } from '@app/shared/renderer' import { forkJoin } from 'rxjs' import { first } from 'rxjs/operators' -import { peertubeTranslate } from '@shared/models' @Component({ selector: 'my-about-instance', @@ -59,32 +58,16 @@ export class AboutInstanceComponent implements OnInit { this.serverService.videoLanguagesLoaded.pipe(first()), this.serverService.videoCategoriesLoaded.pipe(first()) ]).subscribe( - async ([ res, translations ]) => { - this.shortDescription = res.instance.shortDescription + async ([ about, translations ]) => { + this.shortDescription = about.instance.shortDescription - this.maintenanceLifetime = res.instance.maintenanceLifetime - this.businessModel = res.instance.businessModel + this.maintenanceLifetime = about.instance.maintenanceLifetime + this.businessModel = about.instance.businessModel - for (const key of [ 'description', 'terms', 'codeOfConduct', 'moderationInformation', 'administrator' ]) { - this.html[ key ] = await this.markdownService.textMarkdownToHTML(res.instance[ key ]) - } + this.html = await this.instanceService.buildHtml(about) - const languagesArray = this.serverService.getVideoLanguages() - const categoriesArray = this.serverService.getVideoCategories() - - this.languages = res.instance.languages - .map(l => { - const languageObj = languagesArray.find(la => la.id === l) - - return peertubeTranslate(languageObj.label, translations) - }) - - this.categories = res.instance.categories - .map(c => { - const categoryObj = categoriesArray.find(ca => ca.id === c) - - return peertubeTranslate(categoryObj.label, translations) - }) + this.languages = this.instanceService.buildTranslatedLanguages(about, translations) + this.categories = this.instanceService.buildTranslatedCategories(about, translations) }, () => this.notifier.error(this.i18n('Cannot get about information from server')) diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index 50df8a8ac..5aa6fda3c 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html @@ -63,20 +63,30 @@
Moderation & NSFW
- + + + This instance is dedicated to sensitive or NSFW content + + + + + Enabling it will allow other administrators to know that you are mainly federating sensitive content.

+ Moreover, the NSFW checkbox on video upload will be automatically checked by default. +
+
+
- + + + + + With Do not list or Blur thumbnails, a confirmation will be requested to watch the video. + + +
- + + + Instance whitelisted by Twitter + + + + + If your instance is whitelisted by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.
+ If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.

+ Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on + https://cards-dev.twitter.com/validator + to see if you instance is whitelisted. +
+
+
@@ -408,11 +429,15 @@
- + + + Transcoding enabled + + + + If you disable transcoding, many videos from your users will not work! + +
@@ -421,16 +446,22 @@ + > + + Allow your users to upload .mkv, .mov, .avi, .flv videos + +
+ > + + Allow your users to upload audio files that will be merged with the preview file on upload + +
@@ -460,10 +491,11 @@
Cache - + + + Some files are not federated (previews, captions). We fetch them directly from the origin instance and cache them. + +
@@ -492,38 +524,45 @@
- + + + + Write directly JavaScript code.
Example:
console.log('my instance is amazing');
+
+
+
+ +
{{ formErrors.instance.customizations.javascript }}
- + Write directly CSS code. Example:

-
-  #custom-css {{ '{' }}
-    color: red;
-  {{ '}' }}
-                    
+
+#custom-css {{ '{' }}
+  color: red;
+{{ '}' }}
+
Prepend with #custom-css to override styles. Example:

-
-  #custom-css .logged-in-email {{ '{' }}
-    color: red;
-  {{ '}' }}
-                    
- " - >
+
+#custom-css .logged-in-email {{ '{' }}
+  color: red;
+{{ '}' }}
+
+ + + +