diff --git a/CHANGELOG.md b/CHANGELOG.md index 447f5dc7b..088f4f19c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Extended the variations of the interstitials for the subscription - Refactored the markets page to standalone - Refactored the header component to standalone - Refactored the rule component to standalone diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index a84e10c44..10f8d3744 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -184,6 +184,7 @@ export class UserService { userWhereUniqueInput: Prisma.UserWhereUniqueInput ): Promise { const { + _count, accessesGet, accessToken, accounts, @@ -199,6 +200,11 @@ export class UserService { updatedAt } = await this.prismaService.user.findUnique({ include: { + _count: { + select: { + activities: true + } + }, accessesGet: true, accounts: { include: { platform: true } @@ -210,6 +216,8 @@ export class UserService { where: userWhereUniqueInput }); + const activitiesCount = _count?.activities ?? 0; + const user: UserWithSettings = { accessesGet, accessToken, @@ -404,13 +412,13 @@ export class UserService { ); let frequency = 7; - if (daysSinceRegistration > 720) { + if (activitiesCount > 1000 || daysSinceRegistration > 720) { frequency = 1; - } else if (daysSinceRegistration > 360) { + } else if (activitiesCount > 750 || daysSinceRegistration > 360) { frequency = 2; - } else if (daysSinceRegistration > 180) { + } else if (activitiesCount > 500 || daysSinceRegistration > 180) { frequency = 3; - } else if (daysSinceRegistration > 60) { + } else if (activitiesCount > 250 || daysSinceRegistration > 60) { frequency = 4; } else if (daysSinceRegistration > 30) { frequency = 5; diff --git a/apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.component.ts b/apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.component.ts index 48f17b886..146e30eff 100644 --- a/apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.component.ts +++ b/apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.component.ts @@ -26,7 +26,7 @@ import { SubscriptionInterstitialDialogParams } from './interfaces/interfaces'; }) export class SubscriptionInterstitialDialog implements OnInit { private static readonly SKIP_BUTTON_DELAY_IN_SECONDS = 5; - private static readonly VARIANTS_COUNT = 2; + private static readonly VARIANTS_COUNT = 4; public remainingSkipButtonDelay = SubscriptionInterstitialDialog.SKIP_BUTTON_DELAY_IN_SECONDS; diff --git a/apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html b/apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html index 92d9da835..d86ea2816 100644 --- a/apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html +++ b/apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -73,6 +73,89 @@ } @case (1) { +
+
+
+
+
+
+
+
+ Get access to 80’000+ tickers from over 50 exchanges +
+

with

+
+ Ghostfolio Premium + +
+
+
+
+ + + Upgrade Plan + + +
+ } + @case (2) { +
+
+
+
+
+
+
+
+ Ghostfolio Premium + +
+

for

+
+ less than $1 + per week +
+
+
+
+ + + Upgrade Plan + + +
+ } + @case (3) {