X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-instance%2Finstance.service.ts;h=2defffbbedbfcd9c940c2590034cbafd043ce04b;hb=9258e9a4a37911fc64b5faada2a7e604bd1ede1f;hp=ba9797bb5cd1ad4ec4422b43dda7c6733400b89e;hpb=67ed6552b831df66713bac9e672738796128d33f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-instance/instance.service.ts b/client/src/app/shared/shared-instance/instance.service.ts index ba9797bb5..2defffbbe 100644 --- a/client/src/app/shared/shared-instance/instance.service.ts +++ b/client/src/app/shared/shared-instance/instance.service.ts @@ -3,9 +3,15 @@ import { catchError, map } from 'rxjs/operators' import { HttpClient } from '@angular/common/http' import { Injectable } from '@angular/core' import { MarkdownService, RestExtractor, ServerService } from '@app/core' -import { About, peertubeTranslate } from '@shared/models' +import { peertubeTranslate } from '@shared/core-utils/i18n' +import { About } from '@shared/models' import { environment } from '../../../environments/environment' +export type AboutHTML = Pick + @Injectable() export class InstanceService { private static BASE_CONFIG_URL = environment.apiUrl + '/api/v1/config' @@ -38,17 +44,19 @@ export class InstanceService { } async buildHtml (about: About) { - const html = { - description: '', + const html: AboutHTML = { terms: '', codeOfConduct: '', moderationInformation: '', administrator: '', + creationReason: '', + maintenanceLifetime: '', + businessModel: '', hardwareInformation: '' } for (const key of Object.keys(html)) { - html[ key ] = await this.markdownService.textMarkdownToHTML(about.instance[ key ]) + html[key] = await this.markdownService.enhancedMarkdownToHTML({ markdown: about.instance[key] }) } return html