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.
41 lines
1.3 KiB
41 lines
1.3 KiB
import { DataService } from '@ghostfolio/client/services/data.service';
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
|
|
|
|
import { Component, CUSTOM_ELEMENTS_SCHEMA, OnDestroy } from '@angular/core';
|
|
import { MatCardModule } from '@angular/material/card';
|
|
import { RouterModule } from '@angular/router';
|
|
import { IonIcon } from '@ionic/angular/standalone';
|
|
import { addIcons } from 'ionicons';
|
|
import { chevronForwardOutline } from 'ionicons/icons';
|
|
import { Subject } from 'rxjs';
|
|
|
|
@Component({
|
|
host: { class: 'page' },
|
|
imports: [IonIcon, MatCardModule, RouterModule],
|
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
selector: 'gf-blog-page',
|
|
styleUrls: ['./blog-page.scss'],
|
|
templateUrl: './blog-page.html',
|
|
standalone: true
|
|
})
|
|
export class GfBlogPageComponent implements OnDestroy {
|
|
public hasPermissionForSubscription: boolean;
|
|
|
|
private unsubscribeSubject = new Subject<void>();
|
|
|
|
public constructor(private dataService: DataService) {
|
|
const info = this.dataService.fetchInfo();
|
|
|
|
this.hasPermissionForSubscription = hasPermission(
|
|
info?.globalPermissions,
|
|
permissions.enableSubscription
|
|
);
|
|
|
|
addIcons({ chevronForwardOutline });
|
|
}
|
|
|
|
public ngOnDestroy() {
|
|
this.unsubscribeSubject.next();
|
|
this.unsubscribeSubject.complete();
|
|
}
|
|
}
|
|
|