mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add hardware information in instance config
This commit is contained in:
@@ -73,11 +73,21 @@
|
||||
<div [innerHTML]="html.codeOfConduct"></div>
|
||||
</div>
|
||||
|
||||
<div class="block terms" id="terms-section">
|
||||
<div class="block terms">
|
||||
<div i18n class="section-title">Terms</div>
|
||||
|
||||
<div [innerHTML]="html.terms"></div>
|
||||
</div>
|
||||
|
||||
<div class="middle-title" *ngIf="html.hardwareInformation">
|
||||
Other information
|
||||
</div>
|
||||
|
||||
<div class="block hardware-information">
|
||||
<div i18n class="section-title">Hardware information</div>
|
||||
|
||||
<div [innerHTML]="html.hardwareInformation"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-6">
|
||||
|
||||
@@ -22,7 +22,8 @@ export class AboutInstanceComponent implements OnInit {
|
||||
terms: '',
|
||||
codeOfConduct: '',
|
||||
moderationInformation: '',
|
||||
administrator: ''
|
||||
administrator: '',
|
||||
hardwareInformation: ''
|
||||
}
|
||||
|
||||
creationReason = ''
|
||||
|
||||
@@ -174,6 +174,20 @@
|
||||
<div *ngIf="formErrors.instance.businessModel" class="form-error">{{ formErrors.instance.businessModel }}</div>
|
||||
</div>
|
||||
|
||||
<div i18n class="inner-form-title">Other information</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label i18n for="instanceHardwareInformation">On what server/hardware the instance runs?</label>
|
||||
<div class="label-small-info">2vCore 2GB RAM/or directly the link to the server you rent etc</div>
|
||||
|
||||
<my-markdown-textarea
|
||||
id="instanceHardwareInformation" formControlName="hardwareInformation" textareaWidth="500px" textareaHeight="75px" [previewColumn]="true"
|
||||
[classes]="{ 'input-error': formErrors['instance.hardwareInformation'] }"
|
||||
></my-markdown-textarea>
|
||||
|
||||
<div *ngIf="formErrors.instance.hardwareInformation" class="form-error">{{ formErrors.instance.hardwareInformation }}</div>
|
||||
</div>
|
||||
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
</ngb-tab>
|
||||
|
||||
@@ -107,6 +107,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
|
||||
maintenanceLifetime: null,
|
||||
businessModel: null,
|
||||
|
||||
hardwareInformation: null,
|
||||
|
||||
categories: null,
|
||||
languages: null,
|
||||
|
||||
|
||||
@@ -46,10 +46,11 @@ export class InstanceService {
|
||||
terms: '',
|
||||
codeOfConduct: '',
|
||||
moderationInformation: '',
|
||||
administrator: ''
|
||||
administrator: '',
|
||||
hardwareInformation: ''
|
||||
}
|
||||
|
||||
for (const key of [ 'description', 'terms', 'codeOfConduct', 'moderationInformation', 'administrator' ]) {
|
||||
for (const key of Object.keys(html)) {
|
||||
html[ key ] = await this.markdownService.textMarkdownToHTML(about.instance[ key ])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user