From ad42c0bf284b4a5db94cbe8b6d5f5033133381cd Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sun, 18 Feb 2024 08:53:01 +0100
Subject: [PATCH] Enable FAQ link for self-hoster (#3015)
---
apps/api/src/app/info/info.service.ts | 4 ----
.../services/configuration/configuration.service.ts | 1 -
.../src/services/interfaces/environment.interface.ts | 1 -
apps/client/src/app/app.component.html | 2 +-
apps/client/src/app/app.component.ts | 6 ------
.../about/overview/about-overview-page.component.ts | 6 ------
.../app/pages/about/overview/about-overview-page.html | 10 ++++++++--
.../pages/faq/overview/faq-overview-page.component.ts | 1 -
.../src/app/pages/faq/overview/faq-overview-page.html | 10 +++++-----
9 files changed, 14 insertions(+), 27 deletions(-)
diff --git a/apps/api/src/app/info/info.service.ts b/apps/api/src/app/info/info.service.ts
index 20047fcd0..de4a870d2 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 83a9825dc..61a54daa1 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 d380b31a7..54abe22be 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 8d4b65ccc..713eb1a94 100644
--- a/apps/client/src/app/app.component.html
+++ b/apps/client/src/app/app.component.html
@@ -64,7 +64,7 @@
Ghostfolio
- About
- -
+
-
Blog
-
diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts
index 450e014f8..64b25ed79 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 c64d2307f..c07db433a 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 bc1c32bc6..5b03acda5 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 @@
-
+
-
+ @if (hasPermissionForSubscription) {
+
+ }
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 02c9389c4..f9abb8824 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
();
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 5827aac6c..97c2067d0 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
source code is
fully available as open source software (OSS). Thanks to our generous
- Ghostfolio Premium users and
- sponsors we have
- the ability to run a free, limited plan for novice
+ Ghostfolio Premium users
+ and sponsors we
+ have the ability to run a free, limited plan for novice
investors.
@@ -90,7 +90,7 @@
>
By offering
- Ghostfolio Premium, a
+ Ghostfolio Premium, a
subscription plan with a managed hosting service and enhanced
features, we fund our business while providing added value to our
users.
Any support for Ghostfolio is welcome. Be it with a
- Ghostfolio Premium
+ Ghostfolio Premium
subscription to finance the hosting infrastructure, a positive rating
in the