Browse Source
Feature/harmonize use of permissions on about and landing page (#2084)
* Harmonize use of permissions
* About page
* Landing page
* About changelog
pull/2075/head^2
Thomas Kaul
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
23 additions and
26 deletions
-
CHANGELOG.md
-
apps/client/src/app/app.component.html
-
apps/client/src/app/app.component.ts
-
apps/client/src/app/pages/about/overview/about-overview-page.component.ts
-
apps/client/src/app/pages/about/overview/about-overview-page.html
-
apps/client/src/app/pages/landing/landing-page.html
|
|
@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Harmonized the use of permissions on the about page |
|
|
|
- Harmonized the use of permissions on the landing page |
|
|
|
- Improved the language localization for German (`de`) |
|
|
|
- Improved the language localization for Portuguese (`pt`) |
|
|
|
|
|
|
|
|
|
@ -89,7 +89,7 @@ |
|
|
|
<li> |
|
|
|
<a i18n [routerLink]="['/about', 'license']">License</a> |
|
|
|
</li> |
|
|
|
<li *ngIf="hasPermissionForSubscription"> |
|
|
|
<li *ngIf="hasPermissionForStatistics"> |
|
|
|
<a [routerLink]="['/open']">Open Startup</a> |
|
|
|
</li> |
|
|
|
<li *ngIf="hasPermissionForSubscription"> |
|
|
|
|
|
@ -33,6 +33,7 @@ export class AppComponent implements OnDestroy, OnInit { |
|
|
|
public currentYear = new Date().getFullYear(); |
|
|
|
public deviceType: string; |
|
|
|
public hasPermissionForBlog: boolean; |
|
|
|
public hasPermissionForStatistics: boolean; |
|
|
|
public hasPermissionForSubscription: boolean; |
|
|
|
public hasPermissionToAccessFearAndGreedIndex: boolean; |
|
|
|
public info: InfoItem; |
|
|
@ -70,6 +71,11 @@ export class AppComponent implements OnDestroy, OnInit { |
|
|
|
permissions.enableSubscription |
|
|
|
); |
|
|
|
|
|
|
|
this.hasPermissionForStatistics = hasPermission( |
|
|
|
this.info?.globalPermissions, |
|
|
|
permissions.enableStatistics |
|
|
|
); |
|
|
|
|
|
|
|
this.hasPermissionToAccessFearAndGreedIndex = hasPermission( |
|
|
|
this.info?.globalPermissions, |
|
|
|
permissions.enableFearAndGreedIndex |
|
|
|
|
|
@ -15,6 +15,7 @@ import { takeUntil } from 'rxjs/operators'; |
|
|
|
}) |
|
|
|
export class AboutOverviewPageComponent implements OnDestroy, OnInit { |
|
|
|
public hasPermissionForBlog: boolean; |
|
|
|
public hasPermissionForStatistics: boolean; |
|
|
|
public hasPermissionForSubscription: boolean; |
|
|
|
public isLoggedIn: boolean; |
|
|
|
public user: User; |
|
|
@ -34,6 +35,11 @@ export class AboutOverviewPageComponent implements OnDestroy, OnInit { |
|
|
|
permissions.enableBlog |
|
|
|
); |
|
|
|
|
|
|
|
this.hasPermissionForStatistics = hasPermission( |
|
|
|
globalPermissions, |
|
|
|
permissions.enableStatistics |
|
|
|
); |
|
|
|
|
|
|
|
this.hasPermissionForSubscription = hasPermission( |
|
|
|
globalPermissions, |
|
|
|
permissions.enableSubscription |
|
|
|
|
|
@ -19,9 +19,11 @@ |
|
|
|
title="GNU Affero General Public License" |
|
|
|
>AGPL-3.0 license</a |
|
|
|
> |
|
|
|
and we share aggregated |
|
|
|
<a title="Open Startup" [routerLink]="['/open']">key metrics</a> |
|
|
|
of the platform’s performance. The project has been initiated by |
|
|
|
<ng-container *ngIf="hasPermissionForStatistics"> |
|
|
|
and we share aggregated |
|
|
|
<a title="Open Startup" [routerLink]="['/open']">key metrics</a> |
|
|
|
of the platform’s performance</ng-container |
|
|
|
>. The project has been initiated by |
|
|
|
<a href="https://dotsilver.ch" title="Website of Thomas Kaul" |
|
|
|
>Thomas Kaul</a |
|
|
|
> |
|
|
|
|
|
@ -44,14 +44,13 @@ |
|
|
|
|
|
|
|
<div *ngIf="hasPermissionForStatistics" class="row mb-5"> |
|
|
|
<div |
|
|
|
*ngIf="hasPermissionForSubscription" |
|
|
|
class="col-md-4 d-flex my-1" |
|
|
|
[ngClass]="{ 'justify-content-center': this.deviceType !== 'mobile' }" |
|
|
|
> |
|
|
|
<a |
|
|
|
class="d-block" |
|
|
|
title="Ghostfolio in Numbers: Monthly Active Users (MAU)" |
|
|
|
[routerLink]="['/about']" |
|
|
|
[routerLink]="['/open']" |
|
|
|
> |
|
|
|
<gf-value |
|
|
|
icon="people-outline" |
|
|
@ -61,24 +60,6 @@ |
|
|
|
> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
*ngIf="!hasPermissionForSubscription" |
|
|
|
class="col-md-4 d-flex my-1" |
|
|
|
[ngClass]="{ 'justify-content-center': this.deviceType !== 'mobile' }" |
|
|
|
> |
|
|
|
<a |
|
|
|
class="d-block" |
|
|
|
title="Ghostfolio in Numbers: Contributors on GitHub" |
|
|
|
[routerLink]="['/about']" |
|
|
|
> |
|
|
|
<gf-value |
|
|
|
icon="people-outline" |
|
|
|
size="large" |
|
|
|
[value]="statistics?.gitHubContributors ?? '-'" |
|
|
|
>Contributors on GitHub</gf-value |
|
|
|
> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
class="col-md-4 d-flex my-1" |
|
|
|
[ngClass]="{ 'justify-content-center': this.deviceType !== 'mobile' }" |
|
|
@ -86,7 +67,7 @@ |
|
|
|
<a |
|
|
|
class="d-block" |
|
|
|
title="Ghostfolio in Numbers: Stars on GitHub" |
|
|
|
[routerLink]="['/about']" |
|
|
|
[routerLink]="['/open']" |
|
|
|
> |
|
|
|
<gf-value |
|
|
|
icon="star-outline" |
|
|
@ -103,7 +84,7 @@ |
|
|
|
<a |
|
|
|
class="d-block" |
|
|
|
title="Ghostfolio in Numbers: Pulls on Docker Hub" |
|
|
|
[routerLink]="['/about']" |
|
|
|
[routerLink]="['/open']" |
|
|
|
> |
|
|
|
<gf-value |
|
|
|
icon="cloud-download-outline" |
|
|
|