Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Enable FAQ link for self-hoster (#3015)

Thomas Kaulad42c0bf284b
diff --git a/apps/api/src/app/info/info.service.ts b/apps/api/src/app/info/info.service.ts
index 20047fcd0d..de4a870d28 100644
--- a/apps/api/src/app/info/info.service.ts
+++ b/apps/api/src/app/info/info.service.ts
@@ -60,10 +60,6 @@ export class InfoService {
const globalPermissions: string[] = [];
- if (this.configurationService.get('ENABLE_FEATURE_BLOG')) {
- globalPermissions.push(permissions.enableBlog);
- }
-
if (this.configurationService.get('ENABLE_FEATURE_FEAR_AND_GREED_INDEX')) {
if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) {
info.fearAndGreedDataSource = encodeDataSource(
diff --git a/apps/api/src/services/configuration/configuration.service.ts b/apps/api/src/services/configuration/configuration.service.ts
index 83a9825dcd..61a54daa10 100644
--- a/apps/api/src/services/configuration/configuration.service.ts
+++ b/apps/api/src/services/configuration/configuration.service.ts
@@ -27,7 +27,6 @@ export class ConfigurationService {
DATA_SOURCES: json({
default: [DataSource.COINGECKO, DataSource.MANUAL, DataSource.YAHOO]
}),
- ENABLE_FEATURE_BLOG: bool({ default: false }),
ENABLE_FEATURE_FEAR_AND_GREED_INDEX: bool({ default: false }),
ENABLE_FEATURE_READ_ONLY_MODE: bool({ default: false }),
ENABLE_FEATURE_SOCIAL_LOGIN: bool({ default: false }),
diff --git a/apps/api/src/services/interfaces/environment.interface.ts b/apps/api/src/services/interfaces/environment.interface.ts
index d380b31a7d..54abe22bed 100644
--- a/apps/api/src/services/interfaces/environment.interface.ts
+++ b/apps/api/src/services/interfaces/environment.interface.ts
@@ -15,7 +15,6 @@ export interface Environment extends CleanedEnvAccessors {
DATA_SOURCE_EXCHANGE_RATES: string;
DATA_SOURCE_IMPORT: string;
DATA_SOURCES: string[];
- ENABLE_FEATURE_BLOG: boolean;
ENABLE_FEATURE_FEAR_AND_GREED_INDEX: boolean;
ENABLE_FEATURE_READ_ONLY_MODE: boolean;
ENABLE_FEATURE_SOCIAL_LOGIN: boolean;
diff --git a/apps/client/src/app/app.component.html b/apps/client/src/app/app.component.html
index 8d4b65ccc0..713eb1a94b 100644
--- a/apps/client/src/app/app.component.html
+++ b/apps/client/src/app/app.component.html
@@ -64,7 +64,7 @@
<div class="h6 mt-2">Ghostfolio</div>
<ul class="list-unstyled">
<li><a i18n [routerLink]="routerLinkAbout">About</a></li>
- <li *ngIf="hasPermissionForBlog">
+ <li *ngIf="hasPermissionForSubscription">
<a i18n [routerLink]="['/blog']">Blog</a>
</li>
<li>
diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts
index 450e014f87..64b25ed79f 100644
--- a/apps/client/src/app/app.component.ts
+++ b/apps/client/src/app/app.component.ts
@@ -38,7 +38,6 @@ export class AppComponent implements OnDestroy, OnInit {
public currentYear = new Date().getFullYear();
public deviceType: string;
public hasInfoMessage: boolean;
- public hasPermissionForBlog: boolean;
public hasPermissionForStatistics: boolean;
public hasPermissionForSubscription: boolean;
public hasPermissionToAccessFearAndGreedIndex: boolean;
@@ -81,11 +80,6 @@ export class AppComponent implements OnDestroy, OnInit {
this.deviceType = this.deviceService.getDeviceInfo().deviceType;
this.info = this.dataService.fetchInfo();
- this.hasPermissionForBlog = hasPermission(
- this.info?.globalPermissions,
- permissions.enableBlog
- );
-
this.hasPermissionForSubscription = hasPermission(
this.info?.globalPermissions,
permissions.enableSubscription
diff --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.ts
index c64d2307f4..c07db433a4 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
@@ -13,7 +13,6 @@ import { takeUntil } from 'rxjs/operators';
templateUrl: './about-overview-page.html'
})
export class AboutOverviewPageComponent implements OnDestroy, OnInit {
- public hasPermissionForBlog: boolean;
public hasPermissionForStatistics: boolean;
public hasPermissionForSubscription: boolean;
public isLoggedIn: boolean;
@@ -30,11 +29,6 @@ export class AboutOverviewPageComponent implements OnDestroy, OnInit {
) {
const { globalPermissions } = this.dataService.fetchInfo();
- this.hasPermissionForBlog = hasPermission(
- globalPermissions,
- permissions.enableBlog
- );
-
this.hasPermissionForStatistics = hasPermission(
globalPermissions,
permissions.enableStatistics
diff --git a/apps/client/src/app/pages/about/overview/about-overview-page.html b/apps/client/src/app/pages/about/overview/about-overview-page.html
index bc1c32bc6d..5b03acda5b 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
@@ -133,16 +133,21 @@
</div>
<div class="row">
- <div *ngIf="hasPermissionForSubscription" class="col-md-6 col-xs-12 my-2">
+ <div
+ class="col-md-6 col-xs-12 my-2"
+ [ngClass]="{ 'offset-md-3': hasPermissionForSubscription === false }"
+ >
<a
class="py-4 w-100"
color="primary"
+ i18n
mat-flat-button
[routerLink]="routerLinkFaq"
>Frequently Asked Questions (FAQ)</a
>
</div>
- <div *ngIf="hasPermissionForBlog" class="col-md-6 col-xs-12 my-2">
+ @if (hasPermissionForSubscription) {
+ <div class="col-md-6 col-xs-12 my-2">
<a
class="py-4 w-100"
color="primary"
@@ -151,5 +156,6 @@
>Blog</a
>
</div>
+ }
</div>
</div>
diff --git a/apps/client/src/app/pages/faq/overview/faq-overview-page.component.ts b/apps/client/src/app/pages/faq/overview/faq-overview-page.component.ts
index 02c9389c49..f9abb88244 100644
--- a/apps/client/src/app/pages/faq/overview/faq-overview-page.component.ts
+++ b/apps/client/src/app/pages/faq/overview/faq-overview-page.component.ts
@@ -12,7 +12,6 @@ import { Subject, takeUntil } from 'rxjs';
})
export class FaqOverviewPageComponent implements OnDestroy {
public routerLinkFeatures = ['/' + $localize`features`];
- public routerLinkPricing = ['/' + $localize`pricing`];
public user: User;
private unsubscribeSubject = new Subject<void>();
diff --git a/apps/client/src/app/pages/faq/overview/faq-overview-page.html b/apps/client/src/app/pages/faq/overview/faq-overview-page.html
index 5827aac6cd..97c2067d0e 100644
--- a/apps/client/src/app/pages/faq/overview/faq-overview-page.html
+++ b/apps/client/src/app/pages/faq/overview/faq-overview-page.html
@@ -65,9 +65,9 @@
world. The
<a href="https://github.com/ghostfolio/ghostfolio">source code</a> is
fully available as open source software (OSS). Thanks to our generous
- <a [routerLink]="routerLinkPricing">Ghostfolio Premium</a> users and
- <a href="https://www.buymeacoffee.com/ghostfolio">sponsors</a> we have
- the ability to run a free, limited plan for novice
+ <a href="https://ghostfol.io/en/pricing">Ghostfolio Premium</a> users
+ and <a href="https://www.buymeacoffee.com/ghostfolio">sponsors</a> we
+ have the ability to run a free, limited plan for novice
investors.</mat-card-content
>
</mat-card>
@@ -90,7 +90,7 @@
>
<mat-card-content
>By offering
- <a [routerLink]="routerLinkPricing">Ghostfolio Premium</a>, a
+ <a href="https://ghostfol.io/en/pricing">Ghostfolio Premium</a>, a
subscription plan with a managed hosting service and enhanced
features, we fund our business while providing added value to our
users.</mat-card-content
@@ -104,7 +104,7 @@
</mat-card-header>
<mat-card-content
>Any support for Ghostfolio is welcome. Be it with a
- <a [routerLink]="routerLinkPricing">Ghostfolio Premium</a>
+ <a href="https://ghostfol.io/en/pricing">Ghostfolio Premium</a>
subscription to finance the hosting infrastructure, a positive rating
in the
<a