From b725e6e2ec35daea976c1fae948035530ffa7062 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 11 Jun 2024 19:46:16 +0200 Subject: [PATCH] Feature/migrate client to control flow (#3475) * Migrate to control flow * Update changelog --- CHANGELOG.md | 1 + apps/client/src/app/app.component.html | 331 +++++++++-------- .../access-table/access-table.component.html | 21 +- .../accounts-table.component.html | 92 ++--- .../app/components/admin-jobs/admin-jobs.html | 81 ++-- .../admin-market-data-detail.component.html | 63 ++-- .../admin-market-data/admin-market-data.html | 37 +- .../asset-profile-dialog.html | 20 +- .../create-asset-profile-dialog.html | 33 +- .../admin-overview/admin-overview.html | 313 ++++++++-------- .../admin-platform.component.html | 13 +- .../create-or-update-platform-dialog.html | 7 +- .../create-or-update-tag-dialog.html | 7 +- .../components/admin-users/admin-users.html | 171 +++++---- .../benchmark-comparator.component.html | 51 ++- .../dialog-footer.component.html | 12 +- .../dialog-header.component.html | 13 +- .../fear-and-greed-index.component.html | 17 +- .../components/header/header.component.html | 348 +++++++++--------- .../holding-detail-dialog.html | 6 +- .../components/home-market/home-market.html | 67 ++-- .../home-overview/home-overview.html | 29 +- .../investment-chart.component.html | 17 +- .../login-with-access-token-dialog.html | 4 +- .../portfolio-performance.component.html | 72 ++-- .../app/components/rule/rule.component.html | 86 +++-- .../app/components/rules/rules.component.html | 28 +- .../components/toggle/toggle.component.html | 17 +- .../user-account-access.html | 31 +- .../user-account-membership.html | 99 +++-- .../user-account-settings.html | 75 ++-- .../world-map-chart.component.html | 17 +- .../src/app/pages/about/about-page.html | 37 +- .../about/overview/about-overview-page.html | 86 ++--- .../src/app/pages/accounts/accounts-page.html | 35 +- .../transfer-balance-dialog.html | 48 ++- .../src/app/pages/admin/admin-page.html | 37 +- .../src/app/pages/demo/demo-page.component.ts | 2 - apps/client/src/app/pages/faq/faq-page.html | 37 +- .../pages/faq/overview/faq-overview-page.html | 18 +- .../src/app/pages/faq/saas/saas-page.html | 41 +-- .../pages/features/features-page.component.ts | 2 - apps/client/src/app/pages/home/home-page.html | 37 +- .../src/app/pages/i18n/i18n-page.component.ts | 2 - .../src/app/pages/landing/landing-page.html | 312 ++++++++-------- .../create-or-update-activity-dialog.html | 244 ++++++------ .../import-activities-dialog.html | 142 ++++--- .../portfolio/analysis/analysis-page.html | 205 ++++++----- .../app/pages/portfolio/fire/fire-page.html | 162 ++++---- .../app/pages/portfolio/portfolio-page.html | 37 +- .../src/app/pages/pricing/pricing-page.html | 155 ++++---- .../src/app/pages/public/public-page.html | 209 ++++++----- .../src/app/pages/register/register-page.html | 73 ++-- .../show-access-token-dialog.html | 8 +- .../personal-finance-tools/product-page.html | 130 +++---- .../pages/user-account/user-account-page.html | 37 +- .../pages/webauthn/webauthn-page.component.ts | 8 +- apps/client/src/app/pages/zen/zen-page.html | 37 +- 58 files changed, 2209 insertions(+), 2111 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a8aa8608..5e15175b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Migrated the `@ghostfolio/client` components to control flow - Improved the language localization for German (`de`) - Upgraded `angular` from version `17.3.10` to `18.0.2` - Upgraded `Nx` from version `19.0.5` to `19.2.2` diff --git a/apps/client/src/app/app.component.html b/apps/client/src/app/app.component.html index fd5ae16f0..2c745692a 100644 --- a/apps/client/src/app/app.component.html +++ b/apps/client/src/app/app.component.html @@ -1,33 +1,31 @@
-
-
-
- -
- You are using the Live Demo. - Create Account -
-
- {{ user.systemMessage.message }} + @if (canCreateAccount || user?.systemMessage) { +
+
+
+ @if (canCreateAccount) { + +
+ You are using the Live Demo. + Create Account +
+ } + @if (!canCreateAccount && user?.systemMessage) { +
+ {{ user.systemMessage.message }} +
+ }
-
+ } - + +} diff --git a/apps/client/src/app/components/access-table/access-table.component.html b/apps/client/src/app/components/access-table/access-table.component.html index a8386d5d2..b1befc8c9 100644 --- a/apps/client/src/app/components/access-table/access-table.component.html +++ b/apps/client/src/app/components/access-table/access-table.component.html @@ -32,17 +32,16 @@ Details - + @if (element.type === 'PUBLIC') { + + } diff --git a/apps/client/src/app/components/accounts-table/accounts-table.component.html b/apps/client/src/app/components/accounts-table/accounts-table.component.html index af3ba6787..f5039395b 100644 --- a/apps/client/src/app/components/accounts-table/accounts-table.component.html +++ b/apps/client/src/app/components/accounts-table/accounts-table.component.html @@ -1,14 +1,16 @@ -
- -
+@if (showActions) { +
+ +
+}
@@ -24,7 +26,9 @@ mat-cell >
- + @if (element.isExcluded) { + + }
@@ -86,12 +91,13 @@ mat-cell >
- + @if (element.Platform?.url) { + + } {{ element.Platform?.name }}
@@ -236,15 +242,16 @@ class="d-none d-lg-table-cell px-1" mat-cell > - + @if (element.comment) { + + } @@ -109,37 +108,29 @@ Status diff --git a/apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html b/apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html index 00551bc99..617dd6962 100644 --- a/apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html +++ b/apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html @@ -9,35 +9,38 @@ [showYAxis]="true" [symbol]="symbol" /> -
-
{{ itemByMonth.key }}
-
-
+ @for (itemByMonth of marketDataByMonth | keyvalue; track itemByMonth) { +
+
{{ itemByMonth.key }}
+
+ @for (dayItem of days; track dayItem; let i = $index) { +
+ } +
-
+ }
diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.html b/apps/client/src/app/components/admin-market-data/admin-market-data.html index 8cc8b65c6..e3a16dd62 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.html +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.html @@ -39,9 +39,13 @@ @@ -121,11 +125,9 @@ @@ -222,15 +224,16 @@ (page)="onChangePage($event)" /> - + @if (isLoading && totalItems === 0) { + + } diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html index 487794f66..af71477b4 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html @@ -243,11 +243,11 @@ Asset Class - {{ assetClass.label }} + @for (assetClass of assetClasses; track assetClass) { + {{ + assetClass.label + }} + } @@ -256,11 +256,11 @@ Asset Sub Class - {{ assetSubClass.label }} + @for (assetSubClass of assetSubClasses; track assetSubClass) { + {{ + assetSubClass.label + }} + } diff --git a/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.html b/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.html index 0f4901c31..7c228941e 100644 --- a/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.html +++ b/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.html @@ -20,21 +20,24 @@ -
- - Name, symbol or ISIN - - -
-
- - Symbol - - -
+ @if (mode === 'auto') { +
+ + Name, symbol or ISIN + + +
+ } @else if (mode === 'manual') { +
+ + Symbol + + +
+ }
diff --git a/apps/client/src/app/components/admin-overview/admin-overview.html b/apps/client/src/app/components/admin-overview/admin-overview.html index d23210b54..5c052f21f 100644 --- a/apps/client/src/app/components/admin-overview/admin-overview.html +++ b/apps/client/src/app/components/admin-overview/admin-overview.html @@ -27,72 +27,77 @@ [precision]="0" [value]="transactionCount" /> -
- {{ transactionCount / userCount | number: '1.2-2' }} - per User -
+ @if (transactionCount && userCount) { +
+ {{ transactionCount / userCount | number: '1.2-2' }} + per User +
+ }
Exchange Rates
Name - + @if (element.Platform?.url) { + + } {{ element.name }} Total - +@if (isLoading) { + +} diff --git a/apps/client/src/app/components/admin-jobs/admin-jobs.html b/apps/client/src/app/components/admin-jobs/admin-jobs.html index 5da929fe1..9ea2097e2 100644 --- a/apps/client/src/app/components/admin-jobs/admin-jobs.html +++ b/apps/client/src/app/components/admin-jobs/admin-jobs.html @@ -5,11 +5,14 @@ - {{ statusFilterOption }} + @for ( + statusFilterOption of statusFilterOptions; + track statusFilterOption + ) { + {{ + statusFilterOption + }} + } @@ -28,15 +31,11 @@ Type - - Asset Profile - - - Historical Market Data - + @if (element.name === 'GATHER_ASSET_PROFILE') { + Asset Profile + } @else if (element.name === 'GATHER_HISTORICAL_MARKET_DATA') { + Historical Market Data + } - - - - - - + @if (element.state === 'active') { + + } @else if (element.state === 'completed') { + + } @else if (element.state === 'delayed') { + + } @else if (element.state === 'failed') { + + } @else if (element.state === 'paused') { + + } @else if (element.state === 'waiting') { + + }
{{ element.name }}
-
- {{ element.symbol | gfSymbol }} -
+ @if (!isUUID(element.symbol)) { +
+ {{ + element.symbol | gfSymbol + }} +
+ }
- + @if (element.comment) { + + }
- - - - - - - + + + + + + - + + + + + Edit + + + @if (customCurrencies.includes(exchangeRate.label2)) { + + } + + + + }
- - {{ exchangeRate.label1 }}= - - {{ exchangeRate.label2 }} - - - - - - Edit - - + @for (exchangeRate of exchangeRates; track exchangeRate) { +
+ + {{ exchangeRate.label1 }}= + + {{ exchangeRate.label2 }} - -
-
-
Read-only Mode
-
- + @if (hasPermissionToToggleReadOnlyMode) { +
+
Read-only Mode
+
+ +
-
+ }
Data Gathering
@@ -141,99 +148,105 @@ />
-
-
System Message
-
-
-
{{ systemMessage | json }}
- -
- -
-
-
-
Coupons
-
- - - - - - -
{{ coupon.code }}{{ coupon.duration }} + @if (hasPermissionForSystemMessage) { +
+
System Message
+
+ @if (systemMessage) { +
+
{{ systemMessage | json }}
- - - -
-
-
- - - 7 Days - 14 Days - 30 Days - 90 Days - 180 Days - 1 Year - - +
+ } + @if (!info?.systemMessage) { - + }
-
+ } + @if (hasPermissionForSubscription) { +
+
Coupons
+
+ + @for (coupon of coupons; track coupon) { + + + + + + } +
{{ coupon.code }}{{ coupon.duration }} + + + + +
+
+
+ + + 7 Days + 14 Days + 30 Days + 90 Days + 180 Days + 1 Year + + + +
+
+
+
+ }
Housekeeping
diff --git a/apps/client/src/app/components/admin-platform/admin-platform.component.html b/apps/client/src/app/components/admin-platform/admin-platform.component.html index dc51f86cc..f5f766838 100644 --- a/apps/client/src/app/components/admin-platform/admin-platform.component.html +++ b/apps/client/src/app/components/admin-platform/admin-platform.component.html @@ -30,12 +30,13 @@ Name - + @if (element.url) { + + } {{ element.name }} diff --git a/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html b/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html index 0e85cff2c..bb99ae3a8 100644 --- a/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html +++ b/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html @@ -4,8 +4,11 @@ (keyup.enter)="platformForm.valid && onSubmit()" (ngSubmit)="onSubmit()" > -

Update platform

-

Add platform

+ @if (data.platform.id) { +

Update platform

+ } @else { +

Add platform

+ }
diff --git a/apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.html b/apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.html index 46ab1a39e..0efb9d307 100644 --- a/apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.html +++ b/apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.html @@ -4,8 +4,11 @@ (keyup.enter)="tagForm.valid && onSubmit()" (ngSubmit)="onSubmit()" > -

Update tag

-

Add tag

+ @if (data.tag.id) { +

Update tag

+ } @else { +

Add tag

+ }
diff --git a/apps/client/src/app/components/admin-users/admin-users.html b/apps/client/src/app/components/admin-users/admin-users.html index ae0deae92..25ab9053d 100644 --- a/apps/client/src/app/components/admin-users/admin-users.html +++ b/apps/client/src/app/components/admin-users/admin-users.html @@ -49,43 +49,44 @@ }" >{{ (element.id | slice: 0 : 5) + '...' }} - + @if (element?.subscription?.type === 'Premium') { + + }
- - - Country - - - {{ - getEmojiFlag(element.country) - }} - - + @if (hasPermissionForSubscription) { + + + Country + + + {{ + getEmojiFlag(element.country) + }} + + + } - - - Engagement per Day - - - - - + @if (hasPermissionForSubscription) { + + + Engagement per Day + + + + + + } - - - Last Request - - - {{ formatDistanceToNow(element.lastActivity) }} - - + @if (hasPermissionForSubscription) { + + + Last Request + + + {{ formatDistanceToNow(element.lastActivity) }} + + + } - + @if (hasPermissionToImpersonateAllUsers) { + + }
@@ -24,33 +23,33 @@ (selectionChange)="onChangeBenchmark($event.value)" > - {{ symbolProfile.name }} - -
- - Manage Benchmarks -
-
+ @for (symbolProfile of benchmarks; track symbolProfile) { + {{ + symbolProfile.name + }} + } + @if (hasPermissionToAccessAdminControl) { + +
+ + Manage Benchmarks +
+
+ }
- + @if (isLoading) { + + } - - +@if (deviceType === 'mobile') { + +} diff --git a/apps/client/src/app/components/dialog-header/dialog-header.component.html b/apps/client/src/app/components/dialog-header/dialog-header.component.html index 7ad9e1db6..dcf487cf7 100644 --- a/apps/client/src/app/components/dialog-header/dialog-header.component.html +++ b/apps/client/src/app/components/dialog-header/dialog-header.component.html @@ -3,11 +3,8 @@ [ngClass]="{ 'text-center': position === 'center' }" >{{ title }} - +@if (deviceType !== 'mobile') { + +} diff --git a/apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.component.html b/apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.component.html index de6781b7e..67274ae38 100644 --- a/apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.component.html +++ b/apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.component.html @@ -12,12 +12,13 @@ Current Market Mood
- + @if (!fearAndGreedIndex) { + + }
diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html index c30161030..369f711fd 100644 --- a/apps/client/src/app/components/header/header.component.html +++ b/apps/client/src/app/components/header/header.component.html @@ -1,5 +1,5 @@ - + @if (user) {
Accounts -
  • - Admin Control -
  • + @if (hasPermissionToAccessAdminControl) { +
  • + Admin Control +
  • + }
  • Resources
  • -
  • - Pricing -
  • + @if ( + hasPermissionForSubscription && user?.subscription?.type === 'Basic' + ) { +
  • + Pricing +
  • + }
  • About
  • -
  • - - - +
  • + [matMenuTriggerRestoreFocus]="false" + (menuOpened)="onOpenAssistant()" + > + + + + + + + }
  • - + @if ( + hasPermissionForSubscription && user?.subscription?.type === 'Basic' + ) { Upgrade Plan - Renew Plan + > + @if (user.subscription.offer === 'default') { + Upgrade Plan + } @else if ( + user.subscription.offer === 'renewal' || + user.subscription.offer === 'renewal-early-bird' + ) { + Renew Plan + } +
    -
    - + } + @if (user?.access?.length > 0) { + @for (accessItem of user?.access; track accessItem) { + + }
    -
    + } My Ghostfolio - Admin Control + @if (hasPermissionToAccessAdminControl) { + Admin Control + }
    Resources - Pricing + @if ( + hasPermissionForSubscription && user?.subscription?.type === 'Basic' + ) { + Pricing + }
  • - - + } + @if (user === null) {
    About -
  • - Pricing -
  • -
  • - Markets -
  • + @if (hasPermissionForSubscription) { +
  • + Pricing +
  • + } + @if (hasPermissionToAccessFearAndGreedIndex) { +
  • + Markets +
  • + }
  • Sign in
  • -
  • - Get started - -
  • + @if (currentRoute !== 'register' && hasPermissionToCreateUser) { +
  • + Get started + +
  • + } - + } diff --git a/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html b/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html index 19d916920..843901e5a 100644 --- a/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html +++ b/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -376,9 +376,9 @@
    Tags
    - {{ - tag.name - }} + @for (tag of tags; track tag) { + {{ tag.name }} + }
    diff --git a/apps/client/src/app/components/home-market/home-market.html b/apps/client/src/app/components/home-market/home-market.html index 0e9d51336..8406cd2ff 100644 --- a/apps/client/src/app/components/home-market/home-market.html +++ b/apps/client/src/app/components/home-market/home-market.html @@ -1,30 +1,32 @@

    Markets

    -
    -
    -
    - Last {{ numberOfDays }} Days + @if (hasPermissionToAccessFearAndGreedIndex) { +
    +
    +
    + Last {{ numberOfDays }} Days +
    + +
    - -
    -
    + }
    @@ -33,15 +35,16 @@ [locale]="user?.settings?.locale || undefined" [user]="user" /> - + @if (isLoading) { + + }
    diff --git a/apps/client/src/app/components/home-overview/home-overview.html b/apps/client/src/app/components/home-overview/home-overview.html index e84b46809..671e73ef2 100644 --- a/apps/client/src/app/components/home-overview/home-overview.html +++ b/apps/client/src/app/components/home-overview/home-overview.html @@ -39,22 +39,19 @@
    - - Setup accounts - - - Add activity - + @if (user?.accounts?.length === 1) { + + Setup accounts + + } @else if (user?.accounts?.length > 1) { + + Add activity + + }
    diff --git a/apps/client/src/app/components/investment-chart/investment-chart.component.html b/apps/client/src/app/components/investment-chart/investment-chart.component.html index 697ba5007..6f7b083e5 100644 --- a/apps/client/src/app/components/investment-chart/investment-chart.component.html +++ b/apps/client/src/app/components/investment-chart/investment-chart.component.html @@ -1,11 +1,12 @@ - +@if (isLoading) { + +} - + @if (data.hasPermissionToUseSocialLogin) {
    or
    -
    + }
    diff --git a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html index 3ef55f800..a2c5c17eb 100644 --- a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html +++ b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html @@ -10,16 +10,18 @@ /> }
    -
    - -
    + @if (isLoading) { +
    + +
    + }
    -
    -
    - -
    -
    - + @if (showDetails) { +
    +
    + +
    +
    + +
    -
    + }
    diff --git a/apps/client/src/app/components/rule/rule.component.html b/apps/client/src/app/components/rule/rule.component.html index f237ed890..c2f76a321 100644 --- a/apps/client/src/app/components/rule/rule.component.html +++ b/apps/client/src/app/components/rule/rule.component.html @@ -1,43 +1,51 @@
    -
    - -
    -
    - - -
    -
    - - -
    -
    -
    {{ rule?.name }}
    -
    {{ rule?.evaluation }}
    -
    + @if (isLoading) { +
    + +
    + } @else { +
    + @if (rule?.value === true) { + + } @else { + + } +
    + } + @if (isLoading) { +
    + + +
    + } @else { +
    +
    {{ rule?.name }}
    +
    {{ rule?.evaluation }}
    +
    + }
    diff --git a/apps/client/src/app/components/rules/rules.component.html b/apps/client/src/app/components/rules/rules.component.html index b3840a79b..5ef182329 100644 --- a/apps/client/src/app/components/rules/rules.component.html +++ b/apps/client/src/app/components/rules/rules.component.html @@ -1,20 +1,22 @@
    - - - - - + @if (hasPermissionToCreateOrder && rules === null) { + + + + + + } - - - - + @if (rules?.length === 0) { + + } + @if (rules !== null && rules !== undefined) { + @for (rule of rules; track rule) { + + } + }
    diff --git a/apps/client/src/app/components/toggle/toggle.component.html b/apps/client/src/app/components/toggle/toggle.component.html index 88713760a..4a6e0fc3d 100644 --- a/apps/client/src/app/components/toggle/toggle.component.html +++ b/apps/client/src/app/components/toggle/toggle.component.html @@ -3,12 +3,13 @@ [formControl]="optionFormControl" (change)="onValueChange()" > - {{ option.label }} + @for (option of options; track option) { + {{ option.label }} + } diff --git a/apps/client/src/app/components/user-account-access/user-account-access.html b/apps/client/src/app/components/user-account-access/user-account-access.html index 89aadd524..f651b0419 100644 --- a/apps/client/src/app/components/user-account-access/user-account-access.html +++ b/apps/client/src/app/components/user-account-access/user-account-access.html @@ -3,25 +3,26 @@ class="align-items-center d-none d-sm-flex h3 justify-content-center mb-3 text-center" > Granted Access - + @if (user?.subscription?.type === 'Basic') { + + } -
    - - - -
    + @if (hasPermissionToCreateAccess) { +
    + + + +
    + }
    diff --git a/apps/client/src/app/components/user-account-membership/user-account-membership.html b/apps/client/src/app/components/user-account-membership/user-account-membership.html index 369a5949b..030f5488e 100644 --- a/apps/client/src/app/components/user-account-membership/user-account-membership.html +++ b/apps/client/src/app/components/user-account-membership/user-account-membership.html @@ -6,64 +6,57 @@ [expiresAt]="user?.subscription?.expiresAt | date: defaultDateFormat" [name]="user?.subscription?.type" /> -
    - + @if ( hasPermissionForSubscription && hasPermissionToUpdateUserSettings - " - > - -
    - {{ baseCurrency }} {{ price }} {{ baseCurrency }} {{ - price - coupon - }} - {{ baseCurrency }} {{ price }} per year + ) { + Renew Plan + } + + @if (price) { +
    + @if (coupon) { + {{ baseCurrency }} {{ price }} {{ baseCurrency }} {{ price - coupon }} + } @else { + {{ baseCurrency }} {{ price }} + } +  per year +
    + } + } +
    + @if (!user?.subscription?.expiresAt) { + Try Premium + + + } + @if (hasPermissionToUpdateUserSettings) { + Redeem Coupon + }
    - - -
    + }
    diff --git a/apps/client/src/app/components/user-account-settings/user-account-settings.html b/apps/client/src/app/components/user-account-settings/user-account-settings.html index fff38a588..0dd8ac47e 100644 --- a/apps/client/src/app/components/user-account-settings/user-account-settings.html +++ b/apps/client/src/app/components/user-account-settings/user-account-settings.html @@ -36,11 +36,9 @@ onChangeUserSetting('baseCurrency', $event.value) " > - {{ currency }} + @for (currency of currencies; track currency) { + {{ currency }} + } @@ -48,20 +46,18 @@
    Language
    -
    - If a translation is missing, kindly support us in extending it - here. -
    + @if (isCommunityLanguage()) { +
    + If a translation is missing, kindly support us in extending it + here. +
    + }
    @@ -134,9 +130,9 @@ " > - {{ - locale - }} + @for (locale of locales; track locale) { + {{ locale }} + }
    @@ -198,26 +194,25 @@ />
    -
    -
    -
    Experimental Features
    -
    - Sneak peek at upcoming functionality + @if (hasPermissionToUpdateUserSettings) { +
    +
    +
    Experimental Features
    +
    + Sneak peek at upcoming functionality +
    +
    +
    +
    -
    - -
    -
    + }
    Ghostfolio User ID diff --git a/apps/client/src/app/components/world-map-chart/world-map-chart.component.html b/apps/client/src/app/components/world-map-chart/world-map-chart.component.html index 8cd8f0a60..5de7ea9d0 100644 --- a/apps/client/src/app/components/world-map-chart/world-map-chart.component.html +++ b/apps/client/src/app/components/world-map-chart/world-map-chart.component.html @@ -1,10 +1,11 @@ - +@if (isLoading) { + +}
    diff --git a/apps/client/src/app/pages/about/about-page.html b/apps/client/src/app/pages/about/about-page.html index 360cbd463..a9dbee450 100644 --- a/apps/client/src/app/pages/about/about-page.html +++ b/apps/client/src/app/pages/about/about-page.html @@ -8,22 +8,23 @@ [disablePagination]="true" [tabPanel]="tabPanel" > - - - -
    {{ tab.label }}
    -
    -
    + @for (tab of tabs; track tab) { + @if (tab.showCondition !== false) { + + +
    {{ tab.label }}
    +
    + } + } 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 f196b95ba..e60c7cc06 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 @@ -21,11 +21,12 @@ title="GNU Affero General Public License" >AGPL-3.0 license - + @if (hasPermissionForStatistics) { and we share aggregated key metrics - of the platform’s performance. The project has been initiated by + of the platform’s performance + } + . The project has been initiated by Thomas Kaul @@ -35,12 +36,12 @@ title="Contributors to Ghostfolio" >contributors. - Check the system status at + @if (hasPermissionForSubscription) { + Check the system status at status.ghostfol.io. + >. + }

    If you encounter a bug or would like to suggest an improvement or a @@ -57,12 +58,13 @@ href="https://twitter.com/ghostfolio_" title="Post to Ghostfolio on X (formerly Twitter)" >@ghostfolio_, send an e-mail to + > + @if (user?.subscription?.type === 'Premium') { + , send an e-mail to hi@ghostfol.io + > + } or start a discussion at - - - + @if (user?.subscription?.type === 'Premium') { + + + + }

    -
    - -
    -
    - -
    + @if (hasPermissionForSubscription) { +
    + +
    + } @else { +
    + +
    + }
    diff --git a/apps/client/src/app/pages/accounts/accounts-page.html b/apps/client/src/app/pages/accounts/accounts-page.html index d94dc4292..6f29a4f7c 100644 --- a/apps/client/src/app/pages/accounts/accounts-page.html +++ b/apps/client/src/app/pages/accounts/accounts-page.html @@ -22,22 +22,21 @@
    -
    - - - -
    + @if ( + !hasImpersonationId && + hasPermissionToCreateAccount && + !user.settings.isRestrictedView + ) { +
    + + + +
    + } diff --git a/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.html b/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.html index 9ff69fdb7..69734b8f9 100644 --- a/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.html +++ b/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.html @@ -10,16 +10,20 @@ From - -
    - {{ account.name }} -
    -
    + @for (account of accounts; track account) { + +
    + @if (account.Platform?.url) { + + } + {{ account.name }} +
    +
    + }
    @@ -27,16 +31,20 @@ To - -
    - {{ account.name }} -
    -
    + @for (account of accounts; track account) { + +
    + @if (account.Platform?.url) { + + } + {{ account.name }} +
    +
    + }
    diff --git a/apps/client/src/app/pages/admin/admin-page.html b/apps/client/src/app/pages/admin/admin-page.html index 360cbd463..a9dbee450 100644 --- a/apps/client/src/app/pages/admin/admin-page.html +++ b/apps/client/src/app/pages/admin/admin-page.html @@ -8,22 +8,23 @@ [disablePagination]="true" [tabPanel]="tabPanel" > - - - -
    {{ tab.label }}
    -
    -
    + @for (tab of tabs; track tab) { + @if (tab.showCondition !== false) { + + +
    {{ tab.label }}
    +
    + } + } diff --git a/apps/client/src/app/pages/demo/demo-page.component.ts b/apps/client/src/app/pages/demo/demo-page.component.ts index cf09d77aa..23f13b1ca 100644 --- a/apps/client/src/app/pages/demo/demo-page.component.ts +++ b/apps/client/src/app/pages/demo/demo-page.component.ts @@ -2,14 +2,12 @@ import { DataService } from '@ghostfolio/client/services/data.service'; import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { InfoItem } from '@ghostfolio/common/interfaces'; -import { CommonModule } from '@angular/common'; import { Component, OnDestroy } from '@angular/core'; import { Router } from '@angular/router'; import { Subject } from 'rxjs'; @Component({ host: { class: 'page' }, - imports: [CommonModule], selector: 'gf-demo-page', standalone: true, templateUrl: './demo-page.html' diff --git a/apps/client/src/app/pages/faq/faq-page.html b/apps/client/src/app/pages/faq/faq-page.html index 360cbd463..a9dbee450 100644 --- a/apps/client/src/app/pages/faq/faq-page.html +++ b/apps/client/src/app/pages/faq/faq-page.html @@ -8,22 +8,23 @@ [disablePagination]="true" [tabPanel]="tabPanel" > - - - -
    {{ tab.label }}
    -
    -
    + @for (tab of tabs; track tab) { + @if (tab.showCondition !== false) { + + +
    {{ tab.label }}
    +
    + } + } 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 925871a60..1885952a7 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 @@ -125,12 +125,13 @@ href="https://twitter.com/ghostfolio_" title="Post to Ghostfolio on X (formerly Twitter)" >@ghostfolio_, + > + @if (user?.subscription?.type === 'Premium') { + , hi@ghostfol.io + > + } or @ghostfolio_, send an e-mail to + > + @if (user?.subscription?.type === 'Premium') { + , send an e-mail to hi@ghostfol.io + > + } or start a discussion at - - - I cannot find my broker in the list of platforms. What can I - do? - - - Please send an e-mail with the web address of your broker to - hi@ghostfol.io and we are - happy to add it. - - + @if (user?.subscription?.type === 'Premium') { + + + I cannot find my broker in the list of platforms. What can I + do? + + + Please send an e-mail with the web address of your broker to + hi@ghostfol.io and we are + happy to add it. + + + } Which devices are supported? @@ -156,12 +154,13 @@ href="https://twitter.com/ghostfolio_" title="Post to Ghostfolio on X (formerly Twitter)" >@ghostfolio_, send an e-mail to + > + @if (user?.subscription?.type === 'Premium') { + , send an e-mail to hi@ghostfol.io + > + } or start a discussion at - - - -
    {{ tab.label }}
    -
    - + @for (tab of tabs; track tab) { + @if (tab.showCondition !== false) { + + +
    {{ tab.label }}
    +
    + } + } diff --git a/apps/client/src/app/pages/i18n/i18n-page.component.ts b/apps/client/src/app/pages/i18n/i18n-page.component.ts index 2bcac9d88..9718ac328 100644 --- a/apps/client/src/app/pages/i18n/i18n-page.component.ts +++ b/apps/client/src/app/pages/i18n/i18n-page.component.ts @@ -1,10 +1,8 @@ -import { CommonModule } from '@angular/common'; import { Component, OnInit } from '@angular/core'; import { Subject } from 'rxjs'; @Component({ host: { class: 'page' }, - imports: [CommonModule], selector: 'gf-i18n-page', standalone: true, styleUrls: ['./i18n-page.scss'], diff --git a/apps/client/src/app/pages/landing/landing-page.html b/apps/client/src/app/pages/landing/landing-page.html index 331defae4..7555f3540 100644 --- a/apps/client/src/app/pages/landing/landing-page.html +++ b/apps/client/src/app/pages/landing/landing-page.html @@ -32,7 +32,7 @@
    - + @if (hasPermissionToCreateUser) { Get Started - - -
    - or -
    + } + @if (hasPermissionForDemo) { + @if (hasPermissionToCreateUser) { +
    or
    + } Live Demo -
    + }
    -
    -
    - + - +
    - Stars on GitHub - -
    - +
    - Pulls on Docker Hub - + Pulls on Docker Hub + +
    -
    + }
    @@ -320,112 +322,130 @@
    -
    -
    - -
    -
    {{ testimonial.quote }}
    -
    - — - {{ testimonial.author }} - {{ testimonial.author }}, - {{ testimonial.country }} + @for (testimonial of testimonials; track testimonial) { +
    +
    + +
    +
    {{ testimonial.quote }}
    +
    + — + @if (testimonial.url) { + {{ + testimonial.author + }} + } @else { + {{ testimonial.author }} + } + , + {{ testimonial.country }} +
    -
    + }
    -
    -
    -

    - Members from around the globe are using - Ghostfolio Premium -

    -
    -
    - + @if (hasPermissionForSubscription) { +
    +
    +

    + Members from around the globe are using + Ghostfolio Premium +

    +
    +
    + +
    -
    + } -
    -
    -

    - How does Ghostfolio work? -

    -

    Get started in only 3 steps

    -
    -
    - - -
    -
    Sign up anonymously*
    -
    - * no e-mail address nor credit card required + @if (hasPermissionForSubscription) { +
    +
    +

    + How does Ghostfolio work? +

    +

    Get started in only 3 steps

    +
    +
    + + +
    +
    Sign up anonymously*
    +
    + * no e-mail address nor credit card required +
    -
    -
    1
    - - -
    -
    - - -
    -
    - Add any of your historical transactions +
    1
    + + +
    +
    + + +
    +
    + Add any of your historical transactions +
    -
    -
    2
    - - -
    -
    - - -
    -
    - Get valuable insights of your portfolio composition +
    2
    + + +
    +
    + + +
    +
    + Get valuable insights of your portfolio composition +
    -
    -
    3
    - - +
    3
    + + +
    -
    + } -
    -
    -

    Are you ready?

    -

    - Join now - or check out the example account -

    -
    - - Get Started - - -
    or
    - Live Demo -
    + @if (hasPermissionToCreateUser) { +
    +
    +

    + Are you ready? +

    +

    + Join now + @if (hasPermissionForDemo) { + or check out the example account + } +

    +
    + + Get Started + + @if (hasPermissionForDemo) { +
    or
    + Live Demo + } +
    -
    + }
    diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html index 65ba637db..f57d63559 100644 --- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html +++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html @@ -4,8 +4,11 @@ (keyup.enter)="activityForm.valid && onSubmit()" (ngSubmit)="onSubmit()" > -

    Update activity

    -

    Add activity

    + @if (data.activity.id) { +

    Update activity

    + } @else { +

    Add activity

    + }
    @@ -81,25 +84,25 @@ > Account - - -
    - {{ account.name }} -
    -
    + @if ( + !activityForm.get('accountId').hasValidator(Validators.required) + ) { + + } + @for (account of data.accounts; track account) { + +
    + @if (account.Platform?.url) { + + } + {{ account.name }} +
    +
    + }
    @@ -139,9 +142,9 @@ Currency - {{ - currency - }} + @for (currency of currencies; track currency) { + {{ currency }} + }
    @@ -186,18 +189,24 @@ >
    - - Dividend - Value - Value - Value - Unit Price - + + @switch (activityForm.get('type')?.value) { + @case ('DIVIDEND') { + Dividend + } + @case ('INTEREST') { + Value + } + @case ('ITEM') { + Value + } + @case ('LIABILITY') { + Value + } + @default { + Unit Price + } + } - - {{ currency }} - + @for (currency of currencies; track currency) { + + {{ currency }} + + }
    - Oops! Could not get the historical exchange rate - fromOops! Could not get the historical exchange rate + from + {{ + activityForm.get('date')?.value | date: defaultDateFormat + }} - {{ - activityForm.get('date')?.value | date: defaultDateFormat - }} + } - + @if ( + currentMarketPrice && + (data.activity.type === 'BUY' || data.activity.type === 'SELL') && + isToday(activityForm.get('date')?.value) + ) { + + }
    - - Dividend - Value - Value - Value - Value - Unit Price - + + @switch (activityForm.get('type')?.value) { + @case ('DIVIDEND') { + Dividend + } + @case ('FEE') { + Value + } + @case ('INTEREST') { + Value + } + @case ('ITEM') { + Value + } + @case ('LIABILITY') { + Value + } + @default { + Unit Price + } + } {{ @@ -286,15 +306,17 @@ > {{ activityForm.get('currencyOfUnitPrice').value }}
    - Oops! Could not get the historical exchange rate fromOops! Could not get the historical exchange rate + from + {{ + activityForm.get('date')?.value | date: defaultDateFormat + }} - {{ - activityForm.get('date')?.value | date: defaultDateFormat - }} + }
    @@ -326,11 +348,11 @@ Asset Class - {{ assetClass.label }} + @for (assetClass of assetClasses; track assetClass) { + {{ + assetClass.label + }} + }
    @@ -342,11 +364,11 @@ Asset Sub Class - {{ assetSubClass.label }} + @for (assetSubClass of assetSubClasses; track assetSubClass) { + {{ + assetSubClass.label + }} + }
    @@ -354,15 +376,16 @@ Tags - - {{ tag.name }} - - + @for (tag of activityForm.get('tags')?.value; track tag) { + + {{ tag.name }} + + + } - - {{ tag.name }} - + @for (tag of filteredTagsObservable | async; track tag) { + + {{ tag.name }} + + }
    diff --git a/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html b/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html index 99c3fe99c..d8c2201f9 100644 --- a/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html +++ b/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html @@ -16,12 +16,11 @@ > - Select Holding - Select File + @if (mode === 'DIVIDEND') { + Select Holding + } @else { + Select File + }
    @if (mode === 'DIVIDEND') { @@ -35,30 +34,29 @@ {{ uniqueAssetForm.get('uniqueAsset')?.value?.name }} - - {{ holding.name }} -
    - {{ holding.symbol | gfSymbol }} · - {{ holding.currency }} -
    + {{ holding.name }} +
    + {{ holding.symbol | gfSymbol }} · + {{ holding.currency }} + + } - + @if (isLoading) { + + }
    } @else { - - - -
    -
    - + @for (message of errorMessages; track message; let i = $index) { + + + +
    +
    + +
    +
    {{ message }}
    -
    {{ message }}
    -
    - - -
    {{ details[i] | json }}
    - + + + @if (details[i]) { +
    {{ details[i] | json }}
    + } + + }
    Absolute Currency Performance - + @if (user?.subscription?.type === 'Basic') { + + }
      -
    1. - -
      {{ holding.name }}
      -
      - -
      -
      -
    2. + @for (holding of top3; track holding) { +
    3. + +
      {{ holding.name }}
      +
      + +
      +
      +
    4. + }
    - + @if (!top3) { + + }
    @@ -216,39 +217,42 @@
      -
    1. - -
      {{ holding.name }}
      -
      - -
      -
      -
    2. + @for (holding of bottom3; track holding) { +
    3. + +
      {{ holding.name }}
      +
      + +
      +
      +
    4. + }
    - + @if (!bottom3) { + + }
    @@ -262,10 +266,9 @@ class="align-items-center d-flex flex-grow-1 h5 mb-0 text-truncate" > Portfolio Evolution - + @if (user?.subscription?.type === 'Basic') { + + }
    @@ -292,10 +295,9 @@ class="align-items-center d-flex flex-grow-1 h5 mb-0 text-truncate" > Investment Timeline - + @if (user?.subscription?.type === 'Basic') { + + }
    -
    -
    - Current Streak -
    -
    - Longest Streak + @if (streaks) { +
    +
    + Current Streak +
    +
    + Longest Streak +
    -
    + }
    Dividend Timeline - + @if (user?.subscription?.type === 'Basic') { + + }
    FIRE

    - Calculator + Calculator + @if (user?.subscription?.type === 'Basic') { + + }

    - 4% Rule + 4% Rule + @if (user?.subscription?.type === 'Basic') { + + }

    -
    - - -
    -
    - If you retire today, you would be able to withdraw - - per year - or - + - per month, based on your total assets of - - - and a withdrawal rate of 4%. -
    +
    + } @else { +
    + If you retire today, you would be able to withdraw + + per year + or + + per month, based on your total assets of + + + and a withdrawal rate of 4%. +
    + }
    @@ -119,11 +119,10 @@

    - Emergency Fund + Emergency Fund + @if (user?.subscription?.type === 'Basic') { + + }

    - Currency Cluster Risks + Currency Cluster Risks + @if (user?.subscription?.type === 'Basic') { + + }

    - Account Cluster Risks + Account Cluster Risks + @if (user?.subscription?.type === 'Basic') { + + }

    - Fees + Fees + @if (user?.subscription?.type === 'Basic') { + + }

    - - - -
    {{ tab.label }}
    -
    -
    + @for (tab of tabs; track tab) { + @if (tab.showCondition !== false) { + + +
    {{ tab.label }}
    +
    + } + } diff --git a/apps/client/src/app/pages/pricing/pricing-page.html b/apps/client/src/app/pages/pricing/pricing-page.html index e4537ebb1..03fbf533f 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.html +++ b/apps/client/src/app/pages/pricing/pricing-page.html @@ -9,18 +9,20 @@ for most people. Revenue is used to cover the costs of the hosting infrastructure and to fund ongoing development.

    -

    - If you plan to open an account at DEGIRO, finpension, - frankly, Interactive Brokers, Swissquote, - VIAC, or Zak, please - contact us - to use our referral link and get a Ghostfolio Premium membership for - one year. Looking for a student discount? Request it - here with - your university e-mail address. -

    + @if (user?.subscription?.type === 'Basic') { +

    + If you plan to open an account at DEGIRO, finpension, + frankly, Interactive Brokers, Swissquote, + VIAC, or Zak, please + contact us + to use our referral link and get a Ghostfolio Premium membership for + one year. Looking for a student discount? Request it + here + with your university e-mail address. +

    + }

    If you prefer to run Ghostfolio on your own infrastructure, please find the source code and further instructions on @@ -91,15 +93,14 @@

    Self-hosted, update manually.

    Free

    - + @if (user?.subscription?.type === 'Basic') { + + }
    @@ -113,9 +114,11 @@

    Basic

    -
    - -
    + @if (user?.subscription?.type === 'Basic') { +
    + +
    + }

    For new investors who are just getting started with trading. @@ -148,15 +151,14 @@

    Fully managed Ghostfolio cloud offering.

    Free

    - + @if (user?.subscription?.type === 'Basic') { + + }
    @@ -173,9 +175,11 @@ Premium -
    - -
    + @if (user?.subscription?.type === 'Premium') { +
    + +
    + }

    For ambitious investors who need the full picture of their @@ -240,58 +244,61 @@

    Fully managed Ghostfolio cloud offering.

    - {{ baseCurrency }} {{ price }} {{ baseCurrency }} {{ price - coupon }} - - {{ baseCurrency }} {{ - price - }} per year{{ price }} + } +  per year

    -
    - -

    - One-time payment, no auto-renewal. -

    -
    + ) { + Renew Plan + } + +

    + One-time payment, no auto-renewal. +

    +
    + }
    -
    -
    - - Get Started - -

    It’s free.

    + @if (!user) { +
    +
    + + Get Started + +

    It’s free.

    +
    -
    + }
    diff --git a/apps/client/src/app/pages/public/public-page.html b/apps/client/src/app/pages/public/public-page.html index bac3189be..8824c8d19 100644 --- a/apps/client/src/app/pages/public/public-page.html +++ b/apps/client/src/app/pages/public/public-page.html @@ -24,110 +24,121 @@
    -
    - - - Currencies - - - - - -
    -
    - - - Sectors - - - - - -
    -
    - - - Continents - - - - - -
    - -
    -
    - - - Regions - - -
    - + + + Currencies + + + -
    -
    -
    - Developed Markets -
    -
    - Emerging Markets -
    -
    - Other Markets -
    -
    + +
    + } + @if (portfolioPublicDetails?.hasDetails) { +
    + + + Sectors + + + + + +
    + } + @if (portfolioPublicDetails?.hasDetails) { +
    + + + Continents - No data available + + + + + +
    + } +
    + @if (portfolioPublicDetails?.hasDetails) { +
    +
    + + + Regions + + +
    +
    -
    - - +
    +
    + Developed Markets +
    +
    + Emerging Markets +
    +
    + Other Markets +
    + @if (markets?.[UNKNOWN_KEY]?.value > 0) { +
    + No data available +
    + } +
    + + +
    -
    + }
    -
    -
    -
    - - -
    or
    + @if (hasPermissionToCreateUser) { +
    +
    +
    - Continue with Google - + @if (hasPermissionForSocialLogin) { +
    or
    + @if (false) { + + } + Continue with Google + } +
    -
    + }
    diff --git a/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html b/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html index 8b2dca836..0a6a2e5e3 100644 --- a/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html +++ b/apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html @@ -1,8 +1,8 @@

    - Create Account{{ - data.role - }} + Create Account + @if (data.role === 'ADMIN') { + {{ data.role }} + }

    diff --git a/apps/client/src/app/pages/resources/personal-finance-tools/product-page.html b/apps/client/src/app/pages/resources/personal-finance-tools/product-page.html index e6fb04d8d..a8bc1d197 100644 --- a/apps/client/src/app/pages/resources/personal-finance-tools/product-page.html +++ b/apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -88,16 +88,22 @@ Available in - {{ language }}{{ isLast ? '' : ', ' }} + @for ( + language of product1.languages; + track language; + let isLast = $last + ) { + {{ language }}{{ isLast ? '' : ', ' }} + } - {{ language }}{{ isLast ? '' : ', ' }} + @for ( + language of product2.languages; + track language; + let isLast = $last + ) { + {{ language }}{{ isLast ? '' : ', ' }} + } @@ -105,18 +111,18 @@ Open Source Software - ✅ Yes❌ No + @if (product1.isOpenSource) { + ✅ Yes + } @else { + ❌ No + } - ✅ Yes❌ No - + @if (product2.isOpenSource) { + ✅ Yes + } @else { + ❌ No + } @@ -124,26 +130,18 @@ Self-Hosting - ✅ Yes❌ No + @if (product1.hasSelfHostingAbility === true) { + ✅ Yes + } @else if (product1.hasSelfHostingAbility === false) { + ❌ No + } - ✅ Yes❌ No + @if (product2.hasSelfHostingAbility === true) { + ✅ Yes + } @else if (product2.hasSelfHostingAbility === false) { + ❌ No + } @@ -151,18 +149,18 @@ Use anonymously - ✅ Yes❌ No + @if (product1.useAnonymously === true) { + ✅ Yes + } @else if (product1.useAnonymously === false) { + ❌ No + } - ✅ Yes❌ No + @if (product2.useAnonymously === true) { + ✅ Yes + } @else if (product2.useAnonymously === false) { + ❌ No + } @@ -170,18 +168,18 @@ Free Plan - ✅ Yes❌ No + @if (product1.hasFreePlan === true) { + ✅ Yes + } @else if (product1.hasFreePlan === false) { + ❌ No + } - ✅ Yes❌ No + @if (product2.hasFreePlan === true) { + ✅ Yes + } @else if (product2.hasFreePlan === false) { + ❌ No + } @@ -191,18 +189,20 @@ year - Starting from + @if (product2.pricingPerYear) { + Starting from {{ product2.pricingPerYear }} / - year + year + } - - Notes - {{ product1.note }} - {{ product2.note }} - + @if (product1.note || product2.note) { + + Notes + {{ product1.note }} + {{ product2.note }} + + } diff --git a/apps/client/src/app/pages/user-account/user-account-page.html b/apps/client/src/app/pages/user-account/user-account-page.html index 360cbd463..a9dbee450 100644 --- a/apps/client/src/app/pages/user-account/user-account-page.html +++ b/apps/client/src/app/pages/user-account/user-account-page.html @@ -8,22 +8,23 @@ [disablePagination]="true" [tabPanel]="tabPanel" > - - - -
    {{ tab.label }}
    -
    -
    + @for (tab of tabs; track tab) { + @if (tab.showCondition !== false) { + + +
    {{ tab.label }}
    +
    + } + } diff --git a/apps/client/src/app/pages/webauthn/webauthn-page.component.ts b/apps/client/src/app/pages/webauthn/webauthn-page.component.ts index 5e5ce5d19..41860014a 100644 --- a/apps/client/src/app/pages/webauthn/webauthn-page.component.ts +++ b/apps/client/src/app/pages/webauthn/webauthn-page.component.ts @@ -2,7 +2,6 @@ import { TokenStorageService } from '@ghostfolio/client/services/token-storage.s import { WebAuthnService } from '@ghostfolio/client/services/web-authn.service'; import { GfLogoComponent } from '@ghostfolio/ui/logo'; -import { CommonModule } from '@angular/common'; import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; @@ -12,12 +11,7 @@ import { takeUntil } from 'rxjs/operators'; @Component({ host: { class: 'page' }, - imports: [ - CommonModule, - GfLogoComponent, - MatButtonModule, - MatProgressSpinnerModule - ], + imports: [GfLogoComponent, MatButtonModule, MatProgressSpinnerModule], selector: 'gf-webauthn-page', standalone: true, styleUrls: ['./webauthn-page.scss'], diff --git a/apps/client/src/app/pages/zen/zen-page.html b/apps/client/src/app/pages/zen/zen-page.html index 360cbd463..a9dbee450 100644 --- a/apps/client/src/app/pages/zen/zen-page.html +++ b/apps/client/src/app/pages/zen/zen-page.html @@ -8,22 +8,23 @@ [disablePagination]="true" [tabPanel]="tabPanel" > - - - -
    {{ tab.label }}
    -
    -
    + @for (tab of tabs; track tab) { + @if (tab.showCondition !== false) { + + +
    {{ tab.label }}
    +
    + } + }