mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-17 16:00:14 +01:00
feat: update npm packages
This commit is contained in:
parent
f6d9ec88ad
commit
7a22737611
321 changed files with 19716 additions and 84 deletions
|
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
import { Component, OnDestroy, Input } from '@angular/core';
|
||||
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',
|
||||
styleUrls: ['./main-info-section.component.scss'],
|
||||
})
|
||||
export class MainInfoSectionComponent implements OnDestroy {
|
||||
constructor(themeService: NbThemeService,
|
||||
breakpointService: NbMediaBreakpointsService,
|
||||
private dialogService: NbDialogService) {
|
||||
this.breakpoints = breakpointService.getBreakpointsMap();
|
||||
themeService.onMediaQueryChange()
|
||||
.pipe(takeWhile(() => this.alive))
|
||||
.subscribe(([oldValue, newValue]) => {
|
||||
this.breakpoint = newValue;
|
||||
});
|
||||
}
|
||||
|
||||
private alive = true;
|
||||
public forMaterialTheme: boolean = false;
|
||||
public readonly breakpoints: any;
|
||||
public breakpoint: NbMediaBreakpoint;
|
||||
|
||||
@Input() public set material(value: any) {
|
||||
this.forMaterialTheme = (value);
|
||||
}
|
||||
|
||||
public get imageUrl(): string {
|
||||
return this.forMaterialTheme !== false
|
||||
? 'assets/img/ngx-admin-material.jpg'
|
||||
: 'assets/img/ngx-admin.png';
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
this.alive = false;
|
||||
}
|
||||
|
||||
openDownloadDialog() {
|
||||
this.dialogService.open(DownloadFormComponent);
|
||||
}
|
||||
|
||||
openDownloadPremiumDialog() {
|
||||
this.dialogService.open(PremiumFormComponent);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue