Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript đ€
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Feature/harmonize use of permissions on about and landing page (#2084)
Thomas Kaulb5e2a3aa91f1
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8c7eebdad7..92cd4366b6 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -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`)diff --git a/apps/client/src/app/app.component.html b/apps/client/src/app/app.component.htmlindex b054e8d8c7..3eafe89adc 100644--- a/apps/client/src/app/app.component.html+++ b/apps/client/src/app/app.component.html@@ -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">diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.tsindex 574cf1f014..6a8a3a64dd 100644--- a/apps/client/src/app/app.component.ts+++ b/apps/client/src/app/app.component.ts@@ -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.enableFearAndGreedIndexdiff --git a/apps/client/src/app/pages/about/overview/about-overview-page.component.ts b/apps/client/src/app/pages/about/overview/about-overview-page.component.tsindex 460319afe9..9e33985d0c 100644--- a/apps/client/src/app/pages/about/overview/about-overview-page.component.ts+++ b/apps/client/src/app/pages/about/overview/about-overview-page.component.ts@@ -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.enableSubscriptiondiff --git a/apps/client/src/app/pages/about/overview/about-overview-page.html b/apps/client/src/app/pages/about/overview/about-overview-page.htmlindex 40e0ac036f..870655bccd 100644--- a/apps/client/src/app/pages/about/overview/about-overview-page.html+++ b/apps/client/src/app/pages/about/overview/about-overview-page.html@@ -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>diff --git a/apps/client/src/app/pages/landing/landing-page.html b/apps/client/src/app/pages/landing/landing-page.htmlindex 1a463ccb5e..5228c41b26 100644--- a/apps/client/src/app/pages/landing/landing-page.html+++ b/apps/client/src/app/pages/landing/landing-page.html@@ -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' }"><aclass="d-block"title="Ghostfolio in Numbers: Monthly Active Users (MAU)"- [routerLink]="['/about']"+ [routerLink]="['/open']"><gf-valueicon="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><divclass="col-md-4 d-flex my-1"[ngClass]="{ 'justify-content-center': this.deviceType !== 'mobile' }"@@ -86,7 +67,7 @@<aclass="d-block"title="Ghostfolio in Numbers: Stars on GitHub"- [routerLink]="['/about']"+ [routerLink]="['/open']"><gf-valueicon="star-outline"@@ -103,7 +84,7 @@<aclass="d-block"title="Ghostfolio in Numbers: Pulls on Docker Hub"- [routerLink]="['/about']"+ [routerLink]="['/open']"><gf-valueicon="cloud-download-outline"