aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorJoël Galeran <Jolg42@users.noreply.github.com>2023-04-05 11:12:00 +0200
committerGitHub <noreply@github.com>2023-04-05 11:12:00 +0200
commit9258e9a4a37911fc64b5faada2a7e604bd1ede1f (patch)
treec2e0a78e87597a3c740d0d08785e1e6f71357268 /client
parent907bcfa02c64ffa7f39b272155d36548e05350a7 (diff)
downloadPeerTube-9258e9a4a37911fc64b5faada2a7e604bd1ede1f.tar.gz
PeerTube-9258e9a4a37911fc64b5faada2a7e604bd1ede1f.tar.zst
PeerTube-9258e9a4a37911fc64b5faada2a7e604bd1ede1f.zip
feat(about): render images in markdown (#5732)
* feat(about): render images in markdown Closes https://github.com/Chocobozzz/PeerTube/issues/5710 * Update edit-instance-information.component.html * use `markdownType="enhanced"`
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html16
-rw-r--r--client/src/app/shared/shared-instance/instance.service.ts2
2 files changed, 9 insertions, 9 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html b/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html
index 504afa189..1b0a842d4 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html
@@ -125,7 +125,7 @@
125 <label i18n for="instanceTerms">Terms</label><my-help helpType="markdownText"></my-help> 125 <label i18n for="instanceTerms">Terms</label><my-help helpType="markdownText"></my-help>
126 126
127 <my-markdown-textarea 127 <my-markdown-textarea
128 name="instanceTerms" formControlName="terms" 128 name="instanceTerms" formControlName="terms" markdownType="enhanced"
129 [formError]="formErrors['instance.terms']" 129 [formError]="formErrors['instance.terms']"
130 ></my-markdown-textarea> 130 ></my-markdown-textarea>
131 </div> 131 </div>
@@ -134,7 +134,7 @@
134 <label i18n for="instanceCodeOfConduct">Code of conduct</label><my-help helpType="markdownText"></my-help> 134 <label i18n for="instanceCodeOfConduct">Code of conduct</label><my-help helpType="markdownText"></my-help>
135 135
136 <my-markdown-textarea 136 <my-markdown-textarea
137 name="instanceCodeOfConduct" formControlName="codeOfConduct" 137 name="instanceCodeOfConduct" formControlName="codeOfConduct" markdownType="enhanced"
138 [formError]="formErrors['instance.codeOfConduct']" 138 [formError]="formErrors['instance.codeOfConduct']"
139 ></my-markdown-textarea> 139 ></my-markdown-textarea>
140 </div> 140 </div>
@@ -144,7 +144,7 @@
144 <div i18n class="label-small-info">Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc</div> 144 <div i18n class="label-small-info">Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc</div>
145 145
146 <my-markdown-textarea 146 <my-markdown-textarea
147 name="instanceModerationInformation" formControlName="moderationInformation" 147 name="instanceModerationInformation" formControlName="moderationInformation" markdownType="enhanced"
148 [formError]="formErrors['instance.moderationInformation']" 148 [formError]="formErrors['instance.moderationInformation']"
149 ></my-markdown-textarea> 149 ></my-markdown-textarea>
150 </div> 150 </div>
@@ -164,7 +164,7 @@
164 <div i18n class="label-small-info">A single person? A non-profit? A company?</div> 164 <div i18n class="label-small-info">A single person? A non-profit? A company?</div>
165 165
166 <my-markdown-textarea 166 <my-markdown-textarea
167 name="instanceAdministrator" formControlName="administrator" 167 name="instanceAdministrator" formControlName="administrator" markdownType="enhanced"
168 [formError]="formErrors['instance.administrator']" 168 [formError]="formErrors['instance.administrator']"
169 ></my-markdown-textarea> 169 ></my-markdown-textarea>
170 </div> 170 </div>
@@ -174,7 +174,7 @@
174 <div i18n class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div> 174 <div i18n class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div>
175 175
176 <my-markdown-textarea 176 <my-markdown-textarea
177 name="instanceCreationReason" formControlName="creationReason" 177 name="instanceCreationReason" formControlName="creationReason" markdownType="enhanced"
178 [formError]="formErrors['instance.creationReason']" 178 [formError]="formErrors['instance.creationReason']"
179 ></my-markdown-textarea> 179 ></my-markdown-textarea>
180 </div> 180 </div>
@@ -184,7 +184,7 @@
184 <div i18n class="label-small-info">It's important to know for users who want to register on your instance</div> 184 <div i18n class="label-small-info">It's important to know for users who want to register on your instance</div>
185 185
186 <my-markdown-textarea 186 <my-markdown-textarea
187 name="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" 187 name="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" markdownType="enhanced"
188 [formError]="formErrors['instance.maintenanceLifetime']" 188 [formError]="formErrors['instance.maintenanceLifetime']"
189 ></my-markdown-textarea> 189 ></my-markdown-textarea>
190 </div> 190 </div>
@@ -194,7 +194,7 @@
194 <div i18n class="label-small-info">With your own funds? With user donations? Advertising?</div> 194 <div i18n class="label-small-info">With your own funds? With user donations? Advertising?</div>
195 195
196 <my-markdown-textarea 196 <my-markdown-textarea
197 name="instanceBusinessModel" formControlName="businessModel" 197 name="instanceBusinessModel" formControlName="businessModel" markdownType="enhanced"
198 [formError]="formErrors['instance.businessModel']" 198 [formError]="formErrors['instance.businessModel']"
199 ></my-markdown-textarea> 199 ></my-markdown-textarea>
200 </div> 200 </div>
@@ -214,7 +214,7 @@
214 <div i18n class="label-small-info">i.e. 2vCore 2GB RAM, a direct the link to the server you rent, etc.</div> 214 <div i18n class="label-small-info">i.e. 2vCore 2GB RAM, a direct the link to the server you rent, etc.</div>
215 215
216 <my-markdown-textarea 216 <my-markdown-textarea
217 name="instanceHardwareInformation" formControlName="hardwareInformation" 217 name="instanceHardwareInformation" formControlName="hardwareInformation" markdownType="enhanced"
218 [formError]="formErrors['instance.hardwareInformation']" 218 [formError]="formErrors['instance.hardwareInformation']"
219 ></my-markdown-textarea> 219 ></my-markdown-textarea>
220 </div> 220 </div>
diff --git a/client/src/app/shared/shared-instance/instance.service.ts b/client/src/app/shared/shared-instance/instance.service.ts
index f5b2e05db..2defffbbe 100644
--- a/client/src/app/shared/shared-instance/instance.service.ts
+++ b/client/src/app/shared/shared-instance/instance.service.ts
@@ -56,7 +56,7 @@ export class InstanceService {
56 } 56 }
57 57
58 for (const key of Object.keys(html)) { 58 for (const key of Object.keys(html)) {
59 html[key] = await this.markdownService.textMarkdownToHTML({ markdown: about.instance[key] }) 59 html[key] = await this.markdownService.enhancedMarkdownToHTML({ markdown: about.instance[key] })
60 } 60 }
61 61
62 return html 62 return html