mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
901 B
30 lines
901 B
import {
|
|
ChangeDetectionStrategy,
|
|
Component,
|
|
inject,
|
|
input
|
|
} from '@angular/core';
|
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
import { RouterModule } from '@angular/router';
|
|
import { IonIcon } from '@ionic/angular/standalone';
|
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
|
|
import { TabConfiguration } from './interfaces/interfaces';
|
|
|
|
@Component({
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
imports: [IonIcon, MatTabsModule, RouterModule],
|
|
selector: 'gf-page-tabs',
|
|
styleUrls: ['./page-tabs.component.scss'],
|
|
templateUrl: './page-tabs.component.html'
|
|
})
|
|
export class GfPageTabsComponent {
|
|
public deviceType: string;
|
|
public readonly tabs = input.required<TabConfiguration[]>();
|
|
|
|
private readonly deviceService = inject(DeviceDetectorService);
|
|
|
|
public constructor() {
|
|
this.deviceType = this.deviceService.getDeviceInfo().deviceType;
|
|
}
|
|
}
|
|
|