1 import { Component, OnInit, ViewChild } from '@angular/core';
3 import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
5 import { Icons } from '../../../shared/enum/icons.enum';
6 import { AuthStorageService } from '../../../shared/services/auth-storage.service';
7 import { DocService } from '../../../shared/services/doc.service';
8 import { AboutComponent } from '../about/about.component';
11 selector: 'cd-dashboard-help',
12 templateUrl: './dashboard-help.component.html',
13 styleUrls: ['./dashboard-help.component.scss']
15 export class DashboardHelpComponent implements OnInit {
16 @ViewChild('docsForm', { static: true })
23 private modalService: BsModalService,
24 private authStorageService: AuthStorageService,
25 private docService: DocService
29 this.docService.subscribeOnce('dashboard', (url: string) => {
35 this.modalRef = this.modalService.show(AboutComponent);
36 this.modalRef.setClass('modal-lg');
40 const tokenInput = this.docsFormElement.nativeElement.children[0];
41 tokenInput.value = this.authStorageService.getToken();
42 this.docsFormElement.nativeElement.submit();