feat(landing): add admin premium modal (#5782)

This commit is contained in:
SFilinsky 2020-10-09 14:44:18 +03:00 committed by GitHub
parent 067f179ed6
commit 39600d9ba5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 246 additions and 179 deletions

View file

@ -5,9 +5,12 @@
*/
import { Component, OnDestroy, Input } from '@angular/core';
import { NbMediaBreakpoint, NbMediaBreakpointsService, NbThemeService } from '@nebular/theme';
import { NbDialogService, NbMediaBreakpoint, NbMediaBreakpointsService, NbThemeService } from '@nebular/theme';
import { takeWhile } from 'rxjs/operators';
import { DownloadFormComponent } from '../../../shared/components/download-form/download-form.component';
import { PremiumFormComponent } from '../../../shared/components/premium-form/premium-form.component';
@Component({
selector: 'ngx-landing-main-info',
templateUrl: './main-info-section.component.html',
@ -15,7 +18,8 @@ import { takeWhile } from 'rxjs/operators';
})
export class MainInfoSectionComponent implements OnDestroy {
constructor(themeService: NbThemeService,
breakpointService: NbMediaBreakpointsService) {
breakpointService: NbMediaBreakpointsService,
private dialogService: NbDialogService) {
this.breakpoints = breakpointService.getBreakpointsMap();
themeService.onMediaQueryChange()
.pipe(takeWhile(() => this.alive))
@ -42,4 +46,12 @@ export class MainInfoSectionComponent implements OnDestroy {
public ngOnDestroy() {
this.alive = false;
}
openDownloadDialog() {
this.dialogService.open(DownloadFormComponent);
}
openDownloadPremiumDialog() {
this.dialogService.open(PremiumFormComponent);
}
}