From 068da847f009b1bf6568df068c591cf1229c7166 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 6 Dec 2022 04:04:32 -0500 Subject: [PATCH] FakeYou premium membership ask --- .../fakeyou.com/src/v2/view/PageContainer.tsx | 1 + .../SessionTtsInferenceResultsListFc.tsx | 25 ++++++++++++++----- .../tts/tts_model_list/TtsModelListPage.tsx | 1 + .../tts/tts_model_view/TtsModelViewPage.tsx | 3 +++ 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/packages/fakeyou.com/src/v2/view/PageContainer.tsx b/packages/fakeyou.com/src/v2/view/PageContainer.tsx index a33cc65763..77f486c43f 100644 --- a/packages/fakeyou.com/src/v2/view/PageContainer.tsx +++ b/packages/fakeyou.com/src/v2/view/PageContainer.tsx @@ -251,6 +251,7 @@ class PageContainer extends React.Component { ; + sessionSubscriptionsWrapper: SessionSubscriptionsWrapper; } function SessionTtsInferenceResultListFc(props: Props) { @@ -122,6 +124,22 @@ function SessionTtsInferenceResultListFc(props: Props) { ); } + let upgradeNotice = <>; + + // Ask non-premium users to upgrade + if (results.length !== 0 && !props.sessionSubscriptionsWrapper.hasPaidFeatures()) { + upgradeNotice = ( +
+ +

+ Don't want to wait? + Step to the front of the line with a FakeYou membership. +

+
+
+ ) + } + // Users have requested reverse chronological results results.reverse(); @@ -130,13 +148,8 @@ function SessionTtsInferenceResultListFc(props: Props) {
{title} + {upgradeNotice} - {/*
- Working on speeding this up -

- Sorry this is slow. I'm scaling the cluster and fixing the caching strategy. -

-
*/}
{results}
diff --git a/packages/fakeyou.com/src/v2/view/tts/tts_model_list/TtsModelListPage.tsx b/packages/fakeyou.com/src/v2/view/tts/tts_model_list/TtsModelListPage.tsx index baef2734e6..7e73dd7b65 100644 --- a/packages/fakeyou.com/src/v2/view/tts/tts_model_list/TtsModelListPage.tsx +++ b/packages/fakeyou.com/src/v2/view/tts/tts_model_list/TtsModelListPage.tsx @@ -405,6 +405,7 @@ function TtsModelListPage(props: Props) { void; ttsInferenceJobs: Array; textBuffer: string; @@ -681,6 +683,7 @@ function TtsModelViewPage(props: Props) { );