Feature/harmonize use of permissions on about and landing page (#2084)
* Harmonize use of permissions * About page * Landing page * About changelog
This commit is contained in:
parent
f47883fb0b
commit
b5e2a3aa91
@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Changed
|
### 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 German (`de`)
|
||||||
- Improved the language localization for Portuguese (`pt`)
|
- Improved the language localization for Portuguese (`pt`)
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<a i18n [routerLink]="['/about', 'license']">License</a>
|
<a i18n [routerLink]="['/about', 'license']">License</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="hasPermissionForSubscription">
|
<li *ngIf="hasPermissionForStatistics">
|
||||||
<a [routerLink]="['/open']">Open Startup</a>
|
<a [routerLink]="['/open']">Open Startup</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="hasPermissionForSubscription">
|
<li *ngIf="hasPermissionForSubscription">
|
||||||
|
@ -33,6 +33,7 @@ export class AppComponent implements OnDestroy, OnInit {
|
|||||||
public currentYear = new Date().getFullYear();
|
public currentYear = new Date().getFullYear();
|
||||||
public deviceType: string;
|
public deviceType: string;
|
||||||
public hasPermissionForBlog: boolean;
|
public hasPermissionForBlog: boolean;
|
||||||
|
public hasPermissionForStatistics: boolean;
|
||||||
public hasPermissionForSubscription: boolean;
|
public hasPermissionForSubscription: boolean;
|
||||||
public hasPermissionToAccessFearAndGreedIndex: boolean;
|
public hasPermissionToAccessFearAndGreedIndex: boolean;
|
||||||
public info: InfoItem;
|
public info: InfoItem;
|
||||||
@ -70,6 +71,11 @@ export class AppComponent implements OnDestroy, OnInit {
|
|||||||
permissions.enableSubscription
|
permissions.enableSubscription
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.hasPermissionForStatistics = hasPermission(
|
||||||
|
this.info?.globalPermissions,
|
||||||
|
permissions.enableStatistics
|
||||||
|
);
|
||||||
|
|
||||||
this.hasPermissionToAccessFearAndGreedIndex = hasPermission(
|
this.hasPermissionToAccessFearAndGreedIndex = hasPermission(
|
||||||
this.info?.globalPermissions,
|
this.info?.globalPermissions,
|
||||||
permissions.enableFearAndGreedIndex
|
permissions.enableFearAndGreedIndex
|
||||||
|
@ -15,6 +15,7 @@ import { takeUntil } from 'rxjs/operators';
|
|||||||
})
|
})
|
||||||
export class AboutOverviewPageComponent implements OnDestroy, OnInit {
|
export class AboutOverviewPageComponent implements OnDestroy, OnInit {
|
||||||
public hasPermissionForBlog: boolean;
|
public hasPermissionForBlog: boolean;
|
||||||
|
public hasPermissionForStatistics: boolean;
|
||||||
public hasPermissionForSubscription: boolean;
|
public hasPermissionForSubscription: boolean;
|
||||||
public isLoggedIn: boolean;
|
public isLoggedIn: boolean;
|
||||||
public user: User;
|
public user: User;
|
||||||
@ -34,6 +35,11 @@ export class AboutOverviewPageComponent implements OnDestroy, OnInit {
|
|||||||
permissions.enableBlog
|
permissions.enableBlog
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.hasPermissionForStatistics = hasPermission(
|
||||||
|
globalPermissions,
|
||||||
|
permissions.enableStatistics
|
||||||
|
);
|
||||||
|
|
||||||
this.hasPermissionForSubscription = hasPermission(
|
this.hasPermissionForSubscription = hasPermission(
|
||||||
globalPermissions,
|
globalPermissions,
|
||||||
permissions.enableSubscription
|
permissions.enableSubscription
|
||||||
|
@ -19,9 +19,11 @@
|
|||||||
title="GNU Affero General Public License"
|
title="GNU Affero General Public License"
|
||||||
>AGPL-3.0 license</a
|
>AGPL-3.0 license</a
|
||||||
>
|
>
|
||||||
and we share aggregated
|
<ng-container *ngIf="hasPermissionForStatistics">
|
||||||
<a title="Open Startup" [routerLink]="['/open']">key metrics</a>
|
and we share aggregated
|
||||||
of the platform’s performance. The project has been initiated by
|
<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"
|
<a href="https://dotsilver.ch" title="Website of Thomas Kaul"
|
||||||
>Thomas Kaul</a
|
>Thomas Kaul</a
|
||||||
>
|
>
|
||||||
|
@ -44,14 +44,13 @@
|
|||||||
|
|
||||||
<div *ngIf="hasPermissionForStatistics" class="row mb-5">
|
<div *ngIf="hasPermissionForStatistics" class="row mb-5">
|
||||||
<div
|
<div
|
||||||
*ngIf="hasPermissionForSubscription"
|
|
||||||
class="col-md-4 d-flex my-1"
|
class="col-md-4 d-flex my-1"
|
||||||
[ngClass]="{ 'justify-content-center': this.deviceType !== 'mobile' }"
|
[ngClass]="{ 'justify-content-center': this.deviceType !== 'mobile' }"
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
class="d-block"
|
class="d-block"
|
||||||
title="Ghostfolio in Numbers: Monthly Active Users (MAU)"
|
title="Ghostfolio in Numbers: Monthly Active Users (MAU)"
|
||||||
[routerLink]="['/about']"
|
[routerLink]="['/open']"
|
||||||
>
|
>
|
||||||
<gf-value
|
<gf-value
|
||||||
icon="people-outline"
|
icon="people-outline"
|
||||||
@ -61,24 +60,6 @@
|
|||||||
>
|
>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</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
|
<div
|
||||||
class="col-md-4 d-flex my-1"
|
class="col-md-4 d-flex my-1"
|
||||||
[ngClass]="{ 'justify-content-center': this.deviceType !== 'mobile' }"
|
[ngClass]="{ 'justify-content-center': this.deviceType !== 'mobile' }"
|
||||||
@ -86,7 +67,7 @@
|
|||||||
<a
|
<a
|
||||||
class="d-block"
|
class="d-block"
|
||||||
title="Ghostfolio in Numbers: Stars on GitHub"
|
title="Ghostfolio in Numbers: Stars on GitHub"
|
||||||
[routerLink]="['/about']"
|
[routerLink]="['/open']"
|
||||||
>
|
>
|
||||||
<gf-value
|
<gf-value
|
||||||
icon="star-outline"
|
icon="star-outline"
|
||||||
@ -103,7 +84,7 @@
|
|||||||
<a
|
<a
|
||||||
class="d-block"
|
class="d-block"
|
||||||
title="Ghostfolio in Numbers: Pulls on Docker Hub"
|
title="Ghostfolio in Numbers: Pulls on Docker Hub"
|
||||||
[routerLink]="['/about']"
|
[routerLink]="['/open']"
|
||||||
>
|
>
|
||||||
<gf-value
|
<gf-value
|
||||||
icon="cloud-download-outline"
|
icon="cloud-download-outline"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user