mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-13 21:32:18 +00:00
extra length for premium plans
This commit is contained in:
1 parent
84ea65d4e2
commit
9998f77d31
2 files changed
+16
-2
No files matched your search
@@ -25,11 +25,23 @@ export class SessionSubscriptionsWrapper {
|
||||
return new SessionSubscriptionsWrapper();
|
||||
}
|
||||
|
||||
public ttsMaximumLength() : number {
|
||||
if (this.hasActiveEliteSubscription()) {
|
||||
return 4096;
|
||||
} else if (this.hasActiveProSubscription()) {
|
||||
return 3072;
|
||||
} else if (this.hasActivePlusSubscription()) {
|
||||
return 2048;
|
||||
} else if (this.hasLoyaltyProgram()) {
|
||||
return 2048;
|
||||
}
|
||||
return 1024;
|
||||
}
|
||||
|
||||
public hasFreeOrPaidPremiumFeatures() : boolean {
|
||||
return this.hasLoyaltyProgram() || this.hasPaidFeatures();
|
||||
}
|
||||
|
||||
|
||||
public hasLoyaltyProgram() : boolean {
|
||||
return !!this.listActiveSubscriptionResponse?.maybe_loyalty_program;
|
||||
}
|
||||
|
||||
@@ -466,7 +466,9 @@ function TtsModelListPage(props: Props) {
|
||||
}
|
||||
|
||||
// NB: If the text is too long, don't allow submission
|
||||
let remainingCharactersButtonDisabled = props.textBuffer.trim().length > 1024;
|
||||
let remainingCharactersButtonDisabled = props.textBuffer.trim().length >
|
||||
props.sessionSubscriptionsWrapper.ttsMaximumLength();
|
||||
|
||||
let noTextInputButtonDisabled = props.textBuffer.trim() === "";
|
||||
|
||||
const speakButtonClass = loading
|
||||
|
||||
Reference in new issue
Block a user