Thomas Kaul
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
16 additions and
3 deletions
-
apps/client/src/app/pages/resources/resources-page.component.ts
-
apps/client/src/app/pages/resources/resources-page.html
|
|
@ -1,4 +1,7 @@ |
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
import { DataService } from '@ghostfolio/client/services/data.service'; |
|
|
|
import { InfoItem } from '@ghostfolio/common/interfaces'; |
|
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
|
import { Subject } from 'rxjs'; |
|
|
|
|
|
|
|
@Component({ |
|
|
@ -8,11 +11,21 @@ import { Subject } from 'rxjs'; |
|
|
|
templateUrl: './resources-page.html' |
|
|
|
}) |
|
|
|
export class ResourcesPageComponent implements OnInit { |
|
|
|
public hasPermissionForSubscription: boolean; |
|
|
|
public info: InfoItem; |
|
|
|
|
|
|
|
private unsubscribeSubject = new Subject<void>(); |
|
|
|
|
|
|
|
public constructor() {} |
|
|
|
public constructor(private dataService: DataService) { |
|
|
|
this.info = this.dataService.fetchInfo(); |
|
|
|
} |
|
|
|
|
|
|
|
public ngOnInit() {} |
|
|
|
public ngOnInit() { |
|
|
|
this.hasPermissionForSubscription = hasPermission( |
|
|
|
this.info?.globalPermissions, |
|
|
|
permissions.enableSubscription |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
public ngOnDestroy() { |
|
|
|
this.unsubscribeSubject.next(); |
|
|
|
|
|
@ -170,7 +170,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="mb-4 media"> |
|
|
|
<div *ngIf="hasPermissionForSubscription" class="mb-4 media"> |
|
|
|
<div class="media-body"> |
|
|
|
<h3 class="h5 mt-0">Personal Finance Tools</h3> |
|
|
|
<div class="mb-1"> |
|
|
|