mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-12 08:42:38 +02:00
Add trial days remaining to billing card, 5-min polling, and wire upgrade button
- Add trialDaysRemaining to IPC schema, useBilling hook, and BillingInfo interface - Show trial countdown in sidebar billing card (e.g. "7 days left on trial") - Add 5-minute polling interval for billing data refresh - Wire Upgrade button to open web billing page in system browser Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
290dc54d1e
commit
7fe3f211a8
4 changed files with 51 additions and 7 deletions
|
|
@ -6,6 +6,7 @@ export interface BillingInfo {
|
|||
userId: string | null;
|
||||
subscriptionPlan: string | null;
|
||||
subscriptionStatus: string | null;
|
||||
trialDaysRemaining: number | null;
|
||||
sanctionedCredits: number;
|
||||
availableCredits: number;
|
||||
}
|
||||
|
|
@ -26,6 +27,7 @@ export async function getBillingInfo(): Promise<BillingInfo> {
|
|||
billing: {
|
||||
plan: string | null;
|
||||
status: string | null;
|
||||
trialDaysRemaining: number | null;
|
||||
usage: {
|
||||
sanctionedCredits: number;
|
||||
availableCredits: number;
|
||||
|
|
@ -37,6 +39,7 @@ export async function getBillingInfo(): Promise<BillingInfo> {
|
|||
userId: body.user.id ?? null,
|
||||
subscriptionPlan: body.billing.plan,
|
||||
subscriptionStatus: body.billing.status,
|
||||
trialDaysRemaining: body.billing.trialDaysRemaining ?? null,
|
||||
sanctionedCredits: body.billing.usage.sanctionedCredits,
|
||||
availableCredits: body.billing.usage.availableCredits,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue