diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx
index dd0e5d4c9..d75130eea 100644
--- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx
+++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx
@@ -97,6 +97,7 @@ const SubscriptionSettings = () => {
const [subscription, mutateSubscription] = useUserSubscription();
const [openCancelModal, setOpenCancelModal] = useState(false);
const {
+ isFree: isFreeAI,
actionType: aiActionType,
Action: AIAction,
billingTip,
@@ -187,7 +188,11 @@ const SubscriptionSettings = () => {
- {aiPriceReadable} + {isFreeAI ? '$0' : aiPriceReadable} /{aiPriceFrequency}
diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/use-affine-ai-subscription.ts b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/use-affine-ai-subscription.ts index 6895db843..d2764f889 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/use-affine-ai-subscription.ts +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/use-affine-ai-subscription.ts @@ -32,6 +32,8 @@ export const useAffineAISubscription = () => { cancel: AICancel, }[actionType]; + const isFree = !subscription; + const billingTip = subscription?.nextBillAt ? t['com.affine.payment.ai.billing-tip.next-bill-at']({ due: timestampToLocalDate(subscription.nextBillAt), @@ -42,5 +44,5 @@ export const useAffineAISubscription = () => { }) : null; - return { actionType, Action, billingTip }; + return { actionType, Action, billingTip, isFree }; }; diff --git a/packages/frontend/i18n/src/resources/en.json b/packages/frontend/i18n/src/resources/en.json index 4bd4a2f96..0e6e658db 100644 --- a/packages/frontend/i18n/src/resources/en.json +++ b/packages/frontend/i18n/src/resources/en.json @@ -909,6 +909,8 @@ "com.affine.payment.billing-setting.upgrade": "Upgrade", "com.affine.payment.billing-setting.view-invoice": "View Invoice", "com.affine.payment.billing-setting.year": "year", + "com.affine.payment.billing-setting.ai.free-desc": "Yue are current on the Free plan.", + "com.affine.payment.billing-setting.ai.purchase": "Purchase", "com.affine.payment.blob-limit.description.local": "The maximum file upload size for local workspaces is {{quota}}.", "com.affine.payment.blob-limit.description.member": "The maximum file upload size for this joined workspace is {{quota}}. You can contact the owner of this workspace.", "com.affine.payment.blob-limit.description.owner.free": "{{planName}} users can upload files with a maximum size of {{currentQuota}}. You can upgrade your account to unlock a maximum file size of {{upgradeQuota}}.",