chore: rename enableForFreePlan to enablePackagesForFreePlan for clarity in credits configuration

This commit is contained in:
javayhu 2025-08-23 10:20:30 +08:00
parent 01f5734dd5
commit d319bd8af2
3 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ export function CreditPackages() {
const isFreePlan = currentPlan?.isFree === true;
// Check if user is on free plan and enableForFreePlan is false
if (isFreePlan && !websiteConfig.credits.enableForFreePlan) {
if (isFreePlan && !websiteConfig.credits.enablePackagesForFreePlan) {
return null;
}

View File

@ -155,7 +155,7 @@ export const websiteConfig: WebsiteConfig = {
},
credits: {
enableCredits: process.env.NEXT_PUBLIC_DEMO_WEBSITE === 'true',
enableForFreePlan: false,
enablePackagesForFreePlan: false,
registerGiftCredits: {
enable: true,
credits: 50,

View File

@ -169,7 +169,7 @@ export interface PriceConfig {
*/
export interface CreditsConfig {
enableCredits: boolean; // Whether to enable credits
enableForFreePlan: boolean; // Whether to enable purchase credits for free plan users
enablePackagesForFreePlan: boolean;// Whether to enable purchase credits for free plan users
registerGiftCredits: {
enable: boolean; // Whether to enable register gift credits
credits: number; // The number of credits to give to the user