feat: enhance dashboard and canvas components with credit management features
- Integrated CreditOverview and RecentTransactions components into the dashboard for better credit visibility. - Updated canvas toolbar to display current credit balance using CreditDisplay. - Improved AI image and prompt nodes to show credit costs and handle credit availability checks during image generation. - Added new queries for fetching recent transactions and monthly usage statistics to support dashboard features. - Refactored existing code to streamline credit-related functionalities across components.
This commit is contained in:
@@ -7,6 +7,8 @@ export interface AiModel {
|
||||
tier: "budget" | "standard" | "premium";
|
||||
description: string;
|
||||
estimatedCost: string; // human-readable, e.g. "~€0.04"
|
||||
/** Credits pro Generierung — gleiche Einheit wie Convex reserve/commit (Euro-Cent). */
|
||||
creditCost: number;
|
||||
minTier: "free" | "starter" | "pro" | "business"; // minimum subscription tier
|
||||
}
|
||||
|
||||
@@ -17,6 +19,7 @@ export const IMAGE_MODELS: AiModel[] = [
|
||||
tier: "standard",
|
||||
description: "Fast, high-quality generation",
|
||||
estimatedCost: "~€0.04",
|
||||
creditCost: 4,
|
||||
minTier: "free",
|
||||
},
|
||||
// Phase 2 — uncomment when model selector UI is ready:
|
||||
|
||||
Reference in New Issue
Block a user