Commit Graph

1205 Commits

Author SHA1 Message Date
javayhu
0500617803 style: adjust padding in dashboard header actions 2025-07-10 19:21:09 +08:00
javayhu
3872a9d422 refactor: remove session_id from URL parameters in CreditPackages component 2025-07-10 19:20:11 +08:00
javayhu
2e0a195a2a refactor: update URL handling in CreditPackages component 2025-07-10 16:48:29 +08:00
javayhu
95bd256bc7 chore: remove onPaymentIntentSucceeded in stripe 2025-07-10 16:31:57 +08:00
javayhu
6c1a4685cd refactor: add disabled to credits config 2025-07-10 16:30:56 +08:00
javayhu
bbae584c88 fix: update DashboardHeaderand update credits label in CreditsBalanceMenu to use translations 2025-07-10 15:56:15 +08:00
javayhu
f649db26ae feat: add CreditsBalanceButton and CreditsBalanceMenu components 2025-07-10 15:41:11 +08:00
javayhu
1c7848f6b0 refactor: change getAllCreditPackagesInServer to getAllCreditPackages 2025-07-10 15:06:58 +08:00
javayhu
5c213d014a refactor: 'popular' instead of 'recommended' for price plan 2025-07-10 14:54:07 +08:00
javayhu
861502c28f feat: implement credit distribution for all users based on subscription status 2025-07-10 14:52:23 +08:00
javayhu
737bd7f80f feat: enhance credits management with subscription renewal and lifetime monthly credits 2025-07-10 14:42:36 +08:00
javayhu
74d7cf44a1 Merge branch 'dev/credits-v2' of https://github.com/MkSaaSHQ/mksaas-template into dev/credits-v2 2025-07-10 10:54:10 +08:00
javayhu
e011d09803 feat: enhance CreditPackages component with loading indicator 2025-07-10 10:54:07 +08:00
javayhu
50c500deb5 refactor: streamline credit handling in StripeProvider
- Updated StripeProvider to retrieve priceId from session metadata instead of line items.
- Introduced credit package retrieval to include expiration information when adding credits.
- Enhanced logging to reflect credit expiration details during credit addition.
- Removed obsolete code related to priceId retrieval for improved clarity and maintainability.
2025-07-10 10:15:42 +08:00
javayhu
cd710bb9ed feat: support register gift credits 2025-07-10 09:58:48 +08:00
javayhu
04f7f891a4 feat: update credit expiration handling and configuration
- Added expireDays property to credit packages and related configurations in website.tsx for better management of credit expiration.
- Modified addCredits function to handle expireDays more flexibly, allowing for undefined values.
- Updated functions for adding register gift and monthly free credits to utilize the new expireDays configuration.
- Enhanced type definitions for credits to include optional expireDays for improved clarity.
- Removed obsolete creditExpireDays from the credits configuration to streamline the codebase.
2025-07-10 01:12:11 +08:00
javayhu
c67b804f4f Merge branch 'cloudflare' of https://github.com/MkSaaSHQ/mksaas-template into cloudflare 2025-07-10 00:48:21 +08:00
javayhu
a44e4a669c Merge remote-tracking branch 'origin/main' into cloudflare 2025-07-10 00:48:17 +08:00
javayhu
5af1182a58 chore: enhance .gitattributes for consistent line endings across various file types 2025-07-09 23:07:00 +08:00
javayhu
24c0334911 chore: add .gitattributes file and update VSCode extensions 2025-07-09 22:51:50 +08:00
javayhu
3e0861f883 fix: update sidebar rendering logic and enhance credit package success toast
- Updated DashboardSidebar to conditionally render SidebarMain based on loading state.
- Modified CreditPackages to trigger a refresh of credits data and show success toast with a delay to avoid React lifecycle conflicts.
2025-07-09 21:58:35 +08:00
javayhu
da4b018e8d Merge remote-tracking branch 'origin/main' into cloudflare 2025-07-09 19:14:30 +08:00
javayhu
a7738f0cbf feat: implement credit checkout session and enhance credit package management
- Added new credit checkout session functionality to facilitate credit purchases.
- Introduced credit package configurations in env.example for better management.
- Updated English and Chinese JSON files with new messages for checkout processes.
- Refactored existing components to utilize the new credit checkout session and streamline the credit purchasing workflow.
- Removed obsolete payment intent handling to simplify the codebase.
2025-07-09 00:22:07 +08:00
javayhu
adb9b80572 fix: update default expireDays assignment in addCredits function 2025-07-08 00:51:04 +08:00
javayhu
2e8f70dc76 feat: enhance credits management with new configurations
- Added credit expiration days, register gift credits, and free monthly credits options in website configuration.
- Updated credits handling functions to utilize the new configuration settings for improved flexibility and maintainability.
- Removed obsolete constants related to credits from constants.ts to streamline the codebase.
- Enhanced type definitions for credits configuration in index.d.ts for better clarity.
2025-07-08 00:48:17 +08:00
javayhu
b94fd34be5 Merge remote-tracking branch 'origin/main' into dev/credits 2025-07-08 00:32:08 +08:00
javayhu
0d4e8fe899 docs: add CLAUDE.md for project guidance 2025-07-08 00:30:40 +08:00
javayhu
73ce18f564 refactor: update credit package descriptions and improve component structure
- Revised credit package descriptions in the English JSON file for clarity and consistency.
- Refactored CreditPackages component to utilize a more efficient method for retrieving credit packages.
- Removed obsolete functions and streamlined the code for better maintainability and performance.
2025-07-07 01:10:06 +08:00
javayhu
e430a0c319 feat: implement credit packages management with translations and server integration
- Added new credit packages structure in English and Chinese JSON files for better localization.
- Introduced server-side functions to retrieve credit packages and package details.
- Updated client-side components to utilize new credit package retrieval methods.
- Refactored existing code to enhance modularity and maintainability by separating client and server logic.
- Removed obsolete credit package retrieval functions to streamline the codebase.
2025-07-07 00:47:43 +08:00
javayhu
f7f7be2ef0 feat: add credits config in website config
- Added a new credits management system with configurable credit packages in website.tsx.
- Replaced hardcoded credit package definitions with a dynamic retrieval system using getCreditPackages and getCreditPackageById functions.
- Updated CreditPackages and StripePaymentForm components to utilize the new credit package structure.
- Removed obsolete CREDIT_PACKAGES constant from constants.ts to streamline the codebase.
- Enhanced type definitions for credit packages in types.ts for better clarity and maintainability.
- Updated README.md to reflect changes in credit packages configuration.
2025-07-07 00:04:45 +08:00
javayhu
eafb3775e8 Merge remote-tracking branch 'origin/main' into dev/credits 2025-07-06 23:28:31 +08:00
javayhu
0af0aa3b09 refactor: reorganize credit transaction types and update imports
- Moved CREDIT_TRANSACTION_TYPE from constants to a new types.ts file for better modularity.
- Updated import paths in credit-related components to reflect the new structure.
- Removed the old CREDIT_TRANSACTION_TYPE definition from constants.ts to streamline the codebase.
2025-07-06 23:25:38 +08:00
javayhu
04c2b2d7ee refactor: update translations and improve table component structure
- Removed unused translation keys from English and Chinese JSON files.
- Updated UsersTable and CreditTransactionsTable components to utilize a centralized translation function for table-related messages.
- Initialized sorting state in both table components for consistent default behavior.
2025-07-06 18:20:31 +08:00
javayhu
d9cda3e122 feat: enhance credits settings with tabbed interface and improved translations
- Implemented a tabbed interface in the CreditsPage component to separate balance and transactions views.
- Updated CreditPackages and CreditTransactionsPageClient components to utilize the new tab structure.
- Enhanced translation support for credits-related messages in both English and Chinese.
- Improved error handling and user feedback in credit-related components.
- Refactored CreditTransactionsTable to utilize translations for table headers and pagination controls.
2025-07-06 17:17:24 +08:00
javayhu
d8a12343c8 refactor: adjust spacing in layout components for consistency
- Updated spacing from `space-y-10` to `space-y-8` in layout components for Billing, Credits, Notifications, Profile, and Security to ensure uniformity across the settings pages.
2025-07-06 11:30:10 +08:00
javayhu
40af0f6922 feat: add credit transactions table
- Introduced a new CreditTransactionsPageClient component to display credit transactions.
- Implemented getCreditTransactions action for fetching transaction data.
- Added CreditTransactionsTable component for rendering transaction details with pagination and sorting.
- Updated English and Chinese translation files to include credit transaction messages.
- Integrated the credit transactions page into the existing credits settings layout.
2025-07-06 10:44:13 +08:00
javayhu
1740c826c7 feat: add CreditsBalance component and integrate into dashboard and navbar
- Introduced a new CreditsBalance component to display user credits.
- Integrated CreditsBalance into DashboardHeader, Navbar, and NavbarMobile for improved visibility of user credits.
- Enhanced user interaction by allowing navigation to the credits settings page.
2025-07-06 00:41:57 +08:00
javayhu
75083b32e4 refactor: reorganize credit-related imports and enhance user feedback
- Updated import paths for credit-related actions and functions to improve module organization.
- Removed redundant refresh trigger declaration in CreditPackages component.
- Simplified success toast message in CreditPackages and PaymentForm components for clarity.
- Introduced a new credits.ts file to centralize credit management logic and improve maintainability.
2025-07-06 00:15:07 +08:00
javayhu
e933844479 feat: enhance credit management with transaction store and UI updates
- Added a new transaction store to manage refresh triggers for credit-related components.
- Updated CreditPackages and StripePaymentForm components to utilize the transaction store for refreshing UI after credit purchases.
- Modified .gitignore to include certificates.
- Introduced a new script in package.json for running the development server with HTTPS support.
2025-07-05 23:59:30 +08:00
javayhu
13bee49f90 feat: add credits section to avatar configuration and update translations
- Added "Credits" entry to the avatar configuration for navigation.
- Updated English and Chinese translation files to include "Credits" label.
- Refactored error messages in credit payment actions for clarity.
- Enhanced loading state management in CreditPackages component.
- Replaced icons in CreditPackages component for improved UI consistency.
2025-07-05 23:25:37 +08:00
javayhu
fe2b1bbe39 feat: add credit purchase functionality with Stripe integration
- Introduced credit purchase payment intent actions in credits.action.ts.
- Created new components for credit packages and Stripe payment form.
- Added routes and layout for credits settings page.
- Updated sidebar configuration to include credits settings.
- Enhanced constants for credit packages with detailed pricing and descriptions.
- Implemented loading and layout components for credits page.
- Integrated payment confirmation handling in Stripe provider.
2025-07-05 22:30:22 +08:00
javayhu
8a9c76c628 fix: add missing newline at end of index.zh.mdx file 2025-07-05 17:11:07 +08:00
javayhu
98421afab8 Merge remote-tracking branch 'origin/main' into dev/credits 2025-07-05 15:52:40 +08:00
javayhu
6980507c43 chore: update dashboard and setting pages layout 2025-07-05 15:51:36 +08:00
javayhu
8657bf4e84 chore: show theme selector in demo website only 2025-07-05 10:10:39 +08:00
javayhu
bab58e6420 chore: add @stripe/react-stripe-js 2025-07-05 00:25:11 +08:00
javayhu
8d17bd80c5 feat: implement admin access control in UsersLayout 2025-07-04 23:23:25 +08:00
javayhu
c7e3de816c chore: update credit related functions 2025-07-04 01:02:56 +08:00
javayhu
da26c2cf5d Merge branch 'main' of https://github.com/MkSaaSHQ/mksaas-template into dev/credits 2025-07-02 23:46:20 +08:00
javayhu
b838ddc293 Merge remote-tracking branch 'origin/main' into cloudflare 2025-07-02 22:53:01 +08:00