-import { Component, OnInit, ViewChild } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
-import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
+import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { Icons } from '../../../shared/enum/icons.enum';
-import { DocService } from '../../../shared/services/doc.service';
+import { FeedbackComponent } from '~/app/ceph/shared/feedback/feedback.component';
+import { Icons } from '~/app/shared/enum/icons.enum';
+import { DocService } from '~/app/shared/services/doc.service';
+import { ModalService } from '~/app/shared/services/modal.service';
import { AboutComponent } from '../about/about.component';
@Component({
styleUrls: ['./dashboard-help.component.scss']
})
export class DashboardHelpComponent implements OnInit {
- @ViewChild('docsForm', { static: true })
- docsFormElement: any;
docsUrl: string;
- modalRef: BsModalRef;
+ modalRef: NgbModalRef;
icons = Icons;
+ bsModalRef: NgbModalRef;
- constructor(private modalService: BsModalService, private docService: DocService) {}
+ constructor(private modalService: ModalService, private docService: DocService) {}
ngOnInit() {
this.docService.subscribeOnce('dashboard', (url: string) => {
}
openAboutModal() {
- this.modalRef = this.modalService.show(AboutComponent);
- this.modalRef.setClass('modal-lg');
+ this.modalRef = this.modalService.show(AboutComponent, null, { size: 'lg' });
}
- goToApiDocs() {
- this.docsFormElement.nativeElement.submit();
+ openFeedbackModal() {
+ this.bsModalRef = this.modalService.show(FeedbackComponent, null, { size: 'lg' });
}
}