Commit Graph

603 Commits

Author SHA1 Message Date
javayhu
8d0f0a329c feat: add LICENSE 2025-04-06 08:54:10 +08:00
javayhu
36e76ef080 feat: enhance billing management features and localization updates
- Added new localization keys for billing management in English and Chinese message files.
- Updated the sidebar to include a billing link.
- Refactored the billing card component to improve loading state handling and user session management.
- Enhanced subscription fetching logic to include better error handling and logging.
- Adjusted the upgrade card visibility based on user membership status.
2025-04-06 00:48:08 +08:00
javayhu
b639a9e50a chore: optimize loading state when fetch current user 2025-04-05 22:30:05 +08:00
javayhu
df189215eb feat: add config for maxDuration to 60 for vercel 2025-04-05 20:21:57 +08:00
javayhu
05d811aa4e chore: update localization keys and remove schemas for auth pages
- Added new localization keys for email and password requirements in English and Chinese message files.
- Refactored page retrieval logic by replacing `getCustomPage` with `getPage` in cookie, privacy, and terms of service policy pages.
- Removed the unused `schemas.ts` file.
2025-04-05 17:45:54 +08:00
javayhu
ba1c87fc3e refactor: move some shared components to layout folder 2025-04-05 17:30:47 +08:00
javayhu
970ff2145e chore: move motion components 2025-04-05 17:30:22 +08:00
javayhu
fab6590ac7 chore: remove useless theme css files 2025-04-05 17:15:09 +08:00
javayhu
ccd1a2b568 chore: remove useless svg files 2025-04-05 16:59:50 +08:00
javayhu
2b952c5a5f chore: remove outdated issues document and update image paths
- Deleted the `ISSUES.md` file as it contained outdated information.
- Updated image paths in various components to remove the `/images` prefix for consistency.
2025-04-05 16:58:01 +08:00
javayhu
f380ba4484 fix: fix build error for intl messages 2025-04-05 14:47:19 +08:00
javayhu
43d6b2cbf7 fix: fix Logo component 2025-04-05 14:46:59 +08:00
javayhu
aa0aea352b chore: update localization keys for settings and improve message structure
- Removed unnecessary `items` segment path in internationalization messages for settings.
- Updated localization keys in the English and Chinese files for consistency and clarity.
2025-04-05 14:09:53 +08:00
javayhu
8ad6609527 chore: remove items segment path in intl messages for settings 2025-04-05 13:58:06 +08:00
javayhu
2dd6612e45 chore: remove sidebar segment path in intl message 2025-04-05 13:56:01 +08:00
javayhu
ea32f72313 feat: update localization messages and clean up sidebar configuration
- Changed key `authorIntroduction` to `introduction` in English and Chinese localization files for consistency.
- Added email validation message to the newsletter form.
- Restored the `NotFoundPage` section in the Chinese localization file.
- Cleaned up commented-out AI tools section in the sidebar configuration.
- Updated `DashboardSidebar` to use the `Routes` enum for improved routing clarity.
2025-04-05 13:51:32 +08:00
javayhu
5953031bee feat: support configs for light & dark logos 2025-04-05 13:30:19 +08:00
javayhu
f5600631f7 chore: remove locale in mdx files 2025-04-05 10:51:12 +08:00
javayhu
573ae347ed chore: update logo & favicons 2025-04-05 10:46:28 +08:00
javayhu
9dbe79593e refactor: rename navigation function and update sidebar component
- Renamed `getNavMainLinks` to `getSidebarLinks` for improved clarity in the configuration file.
- Updated the `DashboardSidebar` component to utilize the new `getSidebarLinks` function and integrated `useCurrentUser` for user status handling.
- Enhanced the sidebar to conditionally display the upgrade card and user profile based on membership status.
- Updated comments for better understanding of the code functionality.
2025-04-05 08:18:55 +08:00
javayhu
b5699b85f1 fix: fix build error for layout props 2025-04-05 07:54:30 +08:00
javayhu
e8ea6cdd5d refactor: simplify layout components and rename settings pages
- Removed unnecessary parameter handling in `BillingLayout`, `NotificationsLayout`, `ProfileLayout`, and `SecurityLayout` for cleaner code.
- Renamed `SettingsBillingPage` to `BillingPage` and `SettingsNotificationPage` to `NotificationPage` for improved clarity and consistency.
- Added new loading components for marketing legal and pages sections to enhance user experience during data fetching.
- Cleaned up commented-out code in the blog category metadata generation for better maintainability.
2025-04-05 00:23:03 +08:00
javayhu
7d1fcab6b4 feat: implement billing, notifications, profile, and security settings layouts and loading states
- Added new `BillingLayout`, `NotificationsLayout`, `ProfileLayout`, and `SecurityLayout` components to structure the respective settings pages.
- Introduced loading components for each section to enhance user experience during data fetching.
- Refactored `SettingsBillingPage`, `SettingsNotificationPage`, `ProfilePage`, and `SecurityPage` to utilize the new layouts, improving code organization and readability.
- Updated `DashboardHeader` to ensure consistent breadcrumb navigation across settings pages.
2025-04-05 00:13:37 +08:00
javayhu
1a9770d390 feat: refactor authentication forms to include callback URL handling
- Updated `LoginForm`, `RegisterForm`, and `SocialLoginButton` components to accept and utilize a `callbackUrl` prop for improved redirection after authentication.
- Removed the `showSocialLoginButton` prop from `AuthCard` as social login functionality is now integrated directly within the forms.
- Enhanced `LoginWrapper` to append the `callbackUrl` as a query parameter in the routing logic.
- Improved logging for better debugging and user feedback during authentication processes.
2025-04-04 22:42:11 +08:00
javayhu
db7d86851a feat: refactor authentication translations and improve loading indicators
- Moved common authentication messages to a new `common` namespace in English and Chinese translation files for better organization.
- Updated `LoginPage`, `RegisterPage`, and various form components to utilize the new translation keys.
- Enhanced loading indicators in `ForgotPasswordForm`, `LoginForm`, `RegisterForm`, and `ResetPasswordForm` components for improved user feedback.
- Refactored `SocialLoginButton` and `NavbarMobile` components to utilize the current user context for better user experience.
2025-04-04 19:56:43 +08:00
javayhu
043016e08d feat: implement LoginWrapper component for authentication handling
- Introduced a new `LoginWrapper` component to manage user authentication through modal or redirect modes.
- Integrated responsive design using media queries to control modal visibility based on device type.
- Updated routing logic to close the modal on route changes and handle login actions effectively.
- Refactored existing components to utilize the new `LoginWrapper` for improved user experience in authentication flows.
- Replaced instances of `useRouter` with `useLocaleRouter` for consistent locale handling across components.
2025-04-04 19:17:03 +08:00
javayhu
6f95e3c2b7 feat: enhance checkout session and refactor authentication forms
- Added locale parameter to the `createCheckoutAction` for improved localization support during checkout.
- Refactored `ForgotPasswordForm`, `LoginForm`, and `RegisterForm` components to optimize state management and remove redundant code.
- Updated `CheckoutButton` and `CustomerPortalButton` components to improve error logging and user feedback.
- Introduced a new `formatPrice` and `formatDate` utility functions in the `formatter` module for better code reuse.
- Cleaned up the `BillingCard` component by removing inline utility functions and utilizing the new formatter functions.
- Updated `StripeProvider` to handle locale in checkout session creation and improved error handling for better debugging.
2025-04-04 17:27:59 +08:00
javayhu
def0268d6e feat: enhance user metadata in checkout session and update pricing plan types
- Added user email to metadata in the `createCheckoutAction` for improved user tracking during checkout.
- Updated `PricePlan` interface to remove commented-out properties and clarify the `isLifetime` field.
- Refactored payment configuration to ensure `isLifetime` is consistently defined across plans.
- Improved error logging messages in the `StripeProvider` for better debugging and user feedback.
- Renamed the webhook handler method for clarity in the `StripeProvider`.
2025-04-04 16:46:24 +08:00
javayhu
23d4b2b42b refactor: update pricing table styles and remove webhook handler registration
- Adjusted padding and font size in the PricingTable component for improved UI consistency.
- Removed the `registerWebhookHandler` function and related comments from the payment module to streamline the codebase.
- Updated README to reflect changes in webhook functionality, emphasizing the use of the default handler in the Stripe provider.
- Cleaned up unused type definitions related to webhook event handling in the types module.
2025-04-04 16:25:21 +08:00
javayhu
2ab25a402b feat: add subscription_status column to user table and update related schema
- Introduced a new column `subscription_status` to the user table for improved subscription management.
- Updated the user schema in the database to reflect this change.
- Added a new migration file and snapshot for versioning.
- Updated the StripeProvider to handle subscription status updates in webhook events.
2025-04-04 13:58:08 +08:00
javayhu
ab8d85be00 feat: add subscription and membership fields to user schema and update related actions
- Introduced new columns `subscription_id` and `lifetime_member` to the user table for enhanced subscription management.
- Updated the user schema in the database to reflect these changes.
- Refactored actions to utilize the new user fields for better subscription handling.
- Enhanced error handling and logging in relevant actions for improved user feedback.
- Updated translations to include new messages related to subscription status and lifetime access.
2025-04-04 10:07:39 +08:00
javayhu
128748d33e feat: add inferAdditionalFields plugin to auth 2025-04-03 17:08:57 +08:00
javayhu
bc59f9ff3d feat: enhance internationalization and loading states in payment components
- Added loading messages in English and Chinese translations for better user feedback during checkout and customer portal actions.
- Updated `CheckoutButton` and `CustomerPortalButton` components to utilize new translation keys for loading states and error messages.
- Refactored `PricingCard` and `PricingTable` components to incorporate translated text for pricing details and actions, improving localization support.
2025-04-03 15:21:00 +08:00
javayhu
7ddb6bf93b feat: update payment flow and remove deprecated payment pages
- Updated success and cancel URLs in checkout session and customer portal session actions for consistency.
- Removed PaymentCancelPage and PaymentSuccessPage components to streamline the payment process.
- Refactored PricingCard component to improve link handling for free plans.
- Added logging for user customer ID in BillingCard for better debugging.
2025-04-03 13:19:15 +08:00
javayhu
c4f0c9d267 feat: update pricing page translations and enhance layout
- Updated English and Chinese translations for the PricingPage, adding a subtitle for clarity.
- Refactored the PricingPage layout to include a HeaderSection for improved presentation.
- Modified PricingCard component to handle optional interval and payment type parameters.
- Enhanced PricingTable component styling and logic for better user experience.
2025-04-03 10:19:20 +08:00
javayhu
b4ddefb990 feat: enhance checkout session logic and user metadata handling
- Updated `create-checkout-session` to require user login before checkout and added user ID and name to metadata.
- Removed email parameter from checkout actions and components to streamline the process.
- Refactored `CheckoutButton`, `PricingCard`, and `PricingTable` components to eliminate email handling.
- Improved `CreateCheckoutParams` to enforce customer email as a required field.
- Updated payment configuration to utilize enums for payment types and intervals for better maintainability.
2025-04-03 00:35:53 +08:00
javayhu
4c1e60c71d feat: update password management and billing components
- Renamed translation keys for password setup to reset for clarity in English and Chinese.
- Added new `getUserBillingDataAction` for fetching user subscription data.
- Refactored `create-checkout-session` to ensure user authentication during checkout.
- Updated `BillingCard` to utilize the new billing data fetching logic and improved error handling.
- Modularized profile settings components by updating import paths for better organization.
- Enhanced `CheckoutButton` to initiate checkout sessions with improved user feedback.
2025-04-03 00:11:56 +08:00
javayhu
63bf471b63 feat: update security settings UI and intl messages
- Renamed password management keys in translation files for clarity.
- Added new translation keys for saving and cancel actions in both English and Chinese.
- Refactored the DeleteAccountCard component to utilize a new PasswordCardWrapper for better modularity.
- Updated UpdatePasswordCard to enhance user feedback and maintain consistency in translation usage.
- Removed unnecessary client directive from billing page for improved performance.
- Renamed SettingsAccountPage to SettingsProfilePage for better clarity in profile settings.
2025-04-02 16:15:50 +08:00
javayhu
639347806b feat: optimize documentation components
- Introduced a new `DynamicCodeBlock` component for interactive code examples.
- Updated documentation structure by creating a `lazy` module for dynamic imports of components.
- Removed the deprecated `UiOverview` component to streamline the documentation.
- Enhanced image handling in `CustomMDXContent` with a new `ImageZoom` integration for better user experience.
- Added a new `Wrapper` component for consistent styling across documentation elements.
2025-04-02 15:53:34 +08:00
javayhu
6087d8f4dc chore: optimize blog read time intl message 2025-04-02 15:21:51 +08:00
javayhu
efcbff8d62 refactor: update create checkout session logic and improve error handling
- Refactored checkout session creation to enhance error handling and logging.
- Updated payment types and intervals to use enums for better clarity and maintainability.
- Improved pricing card and table components to utilize new payment type constants.
- Adjusted pricing amounts for subscription plans to reflect updated pricing structure.
- Enhanced user feedback for error scenarios during checkout and customer management.
2025-04-02 11:47:57 +08:00
javayhu
22f6bd795e chore: update blog card placeholder image 2025-04-01 21:42:10 +08:00
javayhu
e13a9c8184 fix: fix broken image urls in NSUI blocks 2025-04-01 21:26:34 +08:00
javayhu
dd12afcce0 feat: enhance blog pagination and related posts functionality
- Added pagination size and related posts size configurations to the website config.
- Updated blog components to utilize the new pagination settings.
- Introduced a new feature to display related posts on individual blog pages, improving user engagement.
- Added new translations for "More Posts" in English and Chinese.
2025-04-01 18:17:36 +08:00
javayhu
b1a93a6e49 chore: optimize blog card & add base64 placeholder image 2025-04-01 17:58:00 +08:00
javayhu
afab075808 fix: optimize pricing page UI 2025-04-01 15:52:21 +08:00
javayhu
746f450a89 refactor: update Tabs component usage in documentation files
- Replaced `groupId` prop with `items` prop in `<Tabs>` components across multiple MDX files for consistency.
- Added `<Tab>` components for "Fumadocs MDX" and "Content Collections" in relevant sections to enhance content organization.
- Improved code readability and maintainability by structuring tab content more clearly.
2025-04-01 15:47:08 +08:00
javayhu
7f4265892d feat: add new author and blog content files
- Introduced new author files for "Fox" in both English and Chinese with associated avatar images.
- Updated existing author names.
- Added new blog documentation files covering various topics, including "Fumadocs" and "Search" in both English and Chinese.
- Updated existing blog metadata, including authors and publication dates, to reflect recent changes and improve content organization.
2025-04-01 15:00:28 +08:00
javayhu
a3444c334a chore: optimize content collections remove logs 2025-04-01 01:45:05 +08:00
javayhu
cd73bf8282 feat: add locale extraction helper and new blog documentation
- Introduced `extractLocaleAndBase` function to streamline locale and base name extraction from filenames.
- Added new blog documentation files covering comparisons, internationalization, manual installation, and markdown usage in both English and Chinese.
- Removed outdated author and blog content files to enhance content organization and clarity.
- Updated `content-collections.ts` to utilize the new locale extraction function for improved file handling.
2025-04-01 01:43:51 +08:00