aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/misc/help.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/misc/help.component.ts')
-rw-r--r--client/src/app/shared/misc/help.component.ts46
1 files changed, 46 insertions, 0 deletions
diff --git a/client/src/app/shared/misc/help.component.ts b/client/src/app/shared/misc/help.component.ts
new file mode 100644
index 000000000..b8530e1d4
--- /dev/null
+++ b/client/src/app/shared/misc/help.component.ts
@@ -0,0 +1,46 @@
1import { Component, Input, OnInit } from '@angular/core'
2
3@Component({
4 selector: 'my-help',
5 styleUrls: [ './help.component.scss' ],
6 templateUrl: './help.component.html'
7})
8
9export class HelpComponent implements OnInit {
10 @Input() preHtml = ''
11 @Input() postHtml = ''
12 @Input() customHtml = ''
13 @Input() helpType: 'custom' | 'markdownText' | 'markdownEnhanced' = 'custom'
14
15 mainHtml = ''
16
17 ngOnInit () {
18 if (this.helpType === 'custom') {
19 this.mainHtml = this.customHtml
20 return
21 }
22
23 if (this.helpType === 'markdownText') {
24 this.mainHtml = 'Markdown compatible.<br /><br />' +
25 'Supports:' +
26 '<ul>' +
27 '<li>Links</li>' +
28 '<li>Lists</li>' +
29 '<li>Emphasis</li>' +
30 '</ul>'
31 return
32 }
33
34 if (this.helpType === 'markdownEnhanced') {
35 this.mainHtml = 'Markdown compatible.<br /><br />' +
36 'Supports:' +
37 '<ul>' +
38 '<li>Links</li>' +
39 '<li>Lists</li>' +
40 '<li>Emphasis</li>' +
41 '<li>Images</li>' +
42 '</ul>'
43 return
44 }
45 }
46}