From fd294d4d2b621754b124b86d2b977dd69dfd150b Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sun, 11 Feb 2024 20:47:24 +0100
Subject: [PATCH] Migrate to control flow (#2992)
---
.../about/oss-friends/oss-friends-page.html | 7 ++--
.../create-or-update-account-dialog.html | 19 +++++++----
apps/client/src/app/pages/blog/blog-page.html | 16 ++++------
.../src/app/pages/features/features-page.html | 32 +++++++++----------
.../portfolio/activities/activities-page.html | 8 ++---
.../portfolio/holdings/holdings-page.html | 7 ++--
.../personal-finance-tools-page.html | 8 ++---
.../app/pages/resources/resources-page.html | 4 ++-
.../src/app/pages/webauthn/webauthn-page.html | 6 ++--
9 files changed, 53 insertions(+), 54 deletions(-)
diff --git a/apps/client/src/app/pages/about/oss-friends/oss-friends-page.html b/apps/client/src/app/pages/about/oss-friends/oss-friends-page.html
index 24704446c..f230679a7 100644
--- a/apps/client/src/app/pages/about/oss-friends/oss-friends-page.html
+++ b/apps/client/src/app/pages/about/oss-friends/oss-friends-page.html
@@ -10,10 +10,8 @@
>
@@ -52,10 +55,9 @@
(keydown.enter)="$event.stopPropagation()"
/>
-
+ @for (platformEntry of filteredPlatforms | async; track platformEntry)
+ {
+
{{ platformEntry.name }}
+ }
@@ -85,12 +88,14 @@
>Exclude from Analysis
-
diff --git a/apps/client/src/app/pages/blog/blog-page.html b/apps/client/src/app/pages/blog/blog-page.html
index ff83afd0f..afde112d5 100644
--- a/apps/client/src/app/pages/blog/blog-page.html
+++ b/apps/client/src/app/pages/blog/blog-page.html
@@ -8,11 +8,8 @@
finance
-
+ @if (hasPermissionForSubscription) {
+
@@ -36,6 +33,7 @@
+ }
@@ -295,11 +293,8 @@
-
+ @if (hasPermissionForSubscription) {
+
@@ -323,6 +318,7 @@
+ }
diff --git a/apps/client/src/app/pages/features/features-page.html b/apps/client/src/app/pages/features/features-page.html
index c7636ce08..8eed72289 100644
--- a/apps/client/src/app/pages/features/features-page.html
+++ b/apps/client/src/app/pages/features/features-page.html
@@ -139,10 +139,9 @@
Portfolio Calculations
-
+ @if (hasPermissionForSubscription) {
+
+ }
Check the rate of return of your portfolio for
@@ -159,10 +158,9 @@
Portfolio Allocations
-
+ @if (hasPermissionForSubscription) {
+
+ }
Check the allocations of your portfolio by account, asset
@@ -198,10 +196,8 @@
-
+ @if (hasPermissionForSubscription) {
+
@@ -219,16 +215,16 @@
+ }
Static Analysis
-
+ @if (hasPermissionForSubscription) {
+
+ }
Identify potential risks in your portfolio with Ghostfolio
@@ -293,11 +289,13 @@
-
diff --git a/apps/client/src/app/pages/portfolio/activities/activities-page.html b/apps/client/src/app/pages/portfolio/activities/activities-page.html
index 284893c49..2e41b1a92 100644
--- a/apps/client/src/app/pages/portfolio/activities/activities-page.html
+++ b/apps/client/src/app/pages/portfolio/activities/activities-page.html
@@ -29,10 +29,9 @@
-
+ @if (!hasImpersonationId && hasPermissionToCreateActivity &&
+ !user.settings.isRestrictedView) {
+
+ }
diff --git a/apps/client/src/app/pages/portfolio/holdings/holdings-page.html b/apps/client/src/app/pages/portfolio/holdings/holdings-page.html
index a7c6ed0e7..4aadf4a0b 100644
--- a/apps/client/src/app/pages/portfolio/holdings/holdings-page.html
+++ b/apps/client/src/app/pages/portfolio/holdings/holdings-page.html
@@ -13,10 +13,8 @@
[holdings]="holdings"
[locale]="user?.settings?.locale"
/>
-
0"
- class="text-center"
- >
+ @if (hasPermissionToCreateOrder && holdings?.length > 0) {
+
+ }
diff --git a/apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.html b/apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.html
index b55d69cd0..38a91a246 100644
--- a/apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.html
+++ b/apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.html
@@ -18,11 +18,8 @@
with Ghostfolio.
-
+ @for (product of products; track product) {
+
diff --git a/apps/client/src/app/pages/resources/resources-page.html b/apps/client/src/app/pages/resources/resources-page.html
index f9f183960..494021534 100644
--- a/apps/client/src/app/pages/resources/resources-page.html
+++ b/apps/client/src/app/pages/resources/resources-page.html
@@ -170,7 +170,8 @@
-