]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/misc/help.component.ts
Merge branch 'release/3.1.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / misc / help.component.ts
index ebc965a889787a127c6ba214984c360a0afb950c..76e255d9943eef584d979699e54a42275249c55b 100644 (file)
@@ -1,5 +1,6 @@
 import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core'
-import { MarkdownService } from '@app/core'
+import { GlobalIconName } from '@app/shared/shared-icons'
+import { ENHANCED_RULES, TEXT_RULES } from '@shared/core-utils/renderer/markdown'
 import { PeerTubeTemplateDirective } from '../angular'
 
 @Component({
@@ -11,6 +12,9 @@ import { PeerTubeTemplateDirective } from '../angular'
 export class HelpComponent implements OnInit, OnChanges, AfterContentInit {
   @Input() helpType: 'custom' | 'markdownText' | 'markdownEnhanced' = 'custom'
   @Input() tooltipPlacement = 'right auto'
+  @Input() iconName: GlobalIconName = 'help'
+  @Input() title = $localize`Get help`
+  @Input() autoClose = 'outside'
 
   @ContentChildren(PeerTubeTemplateDirective) templates: QueryList<PeerTubeTemplateDirective<'preHtml' | 'customHtml' | 'postHtml'>>
 
@@ -56,12 +60,12 @@ export class HelpComponent implements OnInit, OnChanges, AfterContentInit {
 
   private init () {
     if (this.helpType === 'markdownText') {
-      this.mainHtml = this.formatMarkdownSupport(MarkdownService.TEXT_RULES)
+      this.mainHtml = this.formatMarkdownSupport(TEXT_RULES)
       return
     }
 
     if (this.helpType === 'markdownEnhanced') {
-      this.mainHtml = this.formatMarkdownSupport(MarkdownService.ENHANCED_RULES)
+      this.mainHtml = this.formatMarkdownSupport(ENHANCED_RULES)
       return
     }
   }