Commit Graph

277 Commits

Author SHA1 Message Date
javayhu
6fe436665b feat: upgrade tailwind to v4 (9) shadcnui admin components 2025-03-21 01:01:11 +08:00
javayhu
675d4ff780 feat: upgrade tailwind to v4 (8) upgrade shadcn dependencies 2025-03-21 00:47:12 +08:00
javayhu
808699b238 feat: upgrade tailwind to v4 (7) shadcnui admin components 2025-03-21 00:45:13 +08:00
javayhu
01ad90e905 feat: upgrade tailwind to v4 (6) shadcnui components 2025-03-21 00:25:33 +08:00
javayhu
e91e8c02a6 feat: upgrade tailwind to v4 (5) optimize globals.css 2025-03-21 00:21:28 +08:00
javayhu
b2dd3d1694 feat: upgrade tailwind to v4 (4) nsui components 2025-03-21 00:09:58 +08:00
javayhu
6a3be051e4 feat: upgrade tailwind to v4 (3) magicui components 2025-03-21 00:09:42 +08:00
javayhu
62413b37ba feat: upgrade tailwind to v4 (2) template components 2025-03-21 00:09:11 +08:00
javayhu
9a5d3a0067 feat: upgrade tailwind to v4
https://tailwindcss.com/docs/upgrade-guide
2025-03-21 00:07:17 +08:00
javayhu
4d18f6fa5a refactor: remove unused MDX styles and update global CSS
- Deleted the `mdx.css` file as it contained redundant styles.
- Added new MDX styles directly into `globals.css` for improved organization and maintainability.
- Updated legal pages to remove the import of the now-deleted `mdx.css`, streamlining the codebase.
2025-03-20 23:45:38 +08:00
javayhu
56d48078b6 refactor: update typography and styling in layout and MDX components
- Replaced font class in `LocaleLayout` with `fontDMSans` for improved typography consistency.
- Enhanced paragraph, list, and list item components in `mdx-component` to include `text-muted-foreground` for better readability.
- Added a `strong` component to `mdx-component` for semantic emphasis with appropriate styling.
- Updated global CSS import to use `theme.css` for unified theming across the application.
2025-03-20 23:39:01 +08:00
javayhu
c9edd2a906 fix: fix build error for font not found 2025-03-20 11:25:08 +08:00
javayhu
dac717673d refactor: update font configurations in Tailwind and layout
- Replaced existing font imports with new Google Fonts (DM Sans, DM Mono, DM Serif Text) for improved typography.
- Updated Tailwind configuration to reflect the new font variables and added a new heading font style.
- Adjusted layout component to utilize the updated font classes, enhancing overall design consistency.
2025-03-20 10:07:39 +08:00
javayhu
aa0622b940 refactor: streamline user avatar handling across components
- Updated the `UserAvatar` component to require a non-optional `image` prop, enhancing type safety.
- Simplified the usage of `UserAvatar` in `SidebarUser` and `UserButton` components by removing unnecessary nullish coalescing.
- Improved code clarity and consistency in user-related components by ensuring direct access to user properties.
2025-03-19 16:28:15 +08:00
javayhu
50af2e726c
Merge pull request #11 from MkSaaSHQ/payment
support Payment module
2025-03-19 10:14:46 +08:00
javayhu
9c8c54799f refactor: implement newsletter module with Resend provider integration
- Introduced a comprehensive newsletter module for managing subscriptions, including functions to subscribe, unsubscribe, and check subscription status.
- Created a `ResendNewsletterProvider` class to handle interactions with the Resend API, improving modularity and code organization.
- Re-exported relevant types for better accessibility and convenience.
- Added a README file detailing usage, configuration, and advanced features of the newsletter module.
- Implemented automatic configuration using environment variables and provided a programmatic configuration option.
2025-03-19 01:45:40 +08:00
javayhu
9e1c648a7c refactor: enhance storage module with S3 provider integration
- Introduced a new S3Provider class for managing file uploads, deletions, and presigned URL generation with Amazon S3.
- Refactored existing storage functions to utilize the new provider, improving modularity and code organization.
- Re-exported types for better accessibility and convenience.
- Implemented robust error handling for storage operations, ensuring clear error messages for configuration and upload issues.
- Updated the storage configuration to support S3-compatible services, enhancing flexibility.
2025-03-19 01:10:46 +08:00
javayhu
130338b9a5 refactor: refactor mail module & enhance auth email with locale support
- Added locale handling to email sending functions, allowing for localized URLs in reset password and verification emails.
- Introduced a new utility function `addLocaleToUrl` to append locale to callback URLs in authentication flows.
- Refactored the email sending process to utilize a mail provider interface, supporting both templated and raw email sending.
- Created a comprehensive README for the email system, detailing usage, configuration, and available templates.
- Established a default mail configuration for improved email management.
2025-03-19 01:00:14 +08:00
javayhu
6744c52087 feat: enhance billing and payment features
- Updated English and Chinese localization files to include detailed billing and subscription management messages.
- Introduced new payment actions for creating checkout and customer portal sessions.
- Added success and cancel pages for payment processing.
- Implemented a billing card component to manage subscriptions and payment methods.
- Created a pricing table component to display available plans with interval selection.
- Established a Stripe webhook handler for processing payment events.
- Refactored existing components to integrate new payment functionalities and improve user experience.
2025-03-19 00:09:58 +08:00
javayhu
a853c56994 refactor: update navbar and mobile menu styles for improved accessibility
- Replaced primary color references with foreground color for hover and focus states in Navbar and MainMobileMenu components.
- Adjusted padding in the mobile menu's bottom buttons for better layout consistency.
- Switched the global CSS import from theme.css to theme-blue.css for updated styling.
2025-03-18 17:46:14 +08:00
javayhu
41b6d0b63b chore: optimize user button 2025-03-18 17:26:57 +08:00
javayhu
87e956493e fix: fix user button hydration error 2025-03-18 17:16:38 +08:00
javayhu
14e4620c5c refactor: optimize fonts 2025-03-18 17:05:40 +08:00
javayhu
c563c537f4 feat: update shadcn ui components (new-york) 2025-03-18 16:38:19 +08:00
javayhu
bc15dfc679 chore: rename to getSidebarLinks 2025-03-18 13:44:13 +08:00
javayhu
3d380dc88c refactor: streamline translation handling in menu and footer components
- Removed the custom translation function and replaced it with `useTranslations` from `next-intl` for better integration with localization.
- Updated `getMenuLinks`, `getFooterLinks`, `getAvatarLinks`, and `getSidebarMainLinks` functions to eliminate the need for passing a translation function as a parameter.
- Simplified the `SidebarMain`, `Footer`, `Navbar`, and `UserButton` components to directly utilize the updated link retrieval functions, enhancing code clarity and maintainability.
2025-03-18 12:59:29 +08:00
javayhu
e934c7a3ba refactor: streamline legal page structure and improve layout
- Removed unnecessary hostname entry from `next.config.ts`.
- Introduced `LegalLayout` component for consistent layout across legal pages.
- Added `CookiePolicyPage`, `PrivacyPolicyPage`, and `TermsOfServicePage` components to handle respective legal content with metadata generation.
- Updated `PageLayout` component for better naming consistency.
- Simplified `AboutPage`, `ContactPage`, and `WaitlistPage` layouts by removing redundant padding.
- Cleaned up `PricingPage` by removing unused pricing components.
2025-03-18 12:17:46 +08:00
javayhu
35ee109cd3 Merge branch 'main' of https://github.com/MkSaaSHQ/mksaas-template 2025-03-18 11:45:10 +08:00
javayhu
0fa2562129 refactor: enhance localization and component structure in settings
- Updated English and Chinese localization files to improve newsletter subscription labels and team references.
- Renamed route for notifications from `SettingsNotification` to `SettingsNotifications` for consistency.
- Refactored `DashboardPage`, `SettingsBillingPage`, and `SettingsAccountPage` to streamline layout and improve responsiveness.
- Introduced `SettingsNotificationPage` to handle notification settings with a dedicated component.
- Enhanced various settings components to accept `className` props for better styling flexibility.
2025-03-18 11:43:11 +08:00
javayhu
db651f5f1d feat: integrate AWS S3 storage functionality for file uploads and retrieval
- Added new API routes for uploading files, generating pre-signed URLs, and retrieving file URLs using AWS S3.
- Implemented error handling for storage operations, including custom error classes for better clarity.
- Updated localization files to include success and failure messages for avatar updates.
- Enhanced the `UpdateAvatarCard` component to support file uploads directly from the browser, improving user experience.
2025-03-18 10:41:31 +08:00
javayhu
9e958a5f9d refactor: improve error handling in authentication forms
- Updated error message display in `ForgotPasswordForm`, `LoginForm`, `RegisterForm`, and `ResetPasswordForm` to use `ctx.error.message` instead of `ctx.error.statusText`, providing clearer feedback to users on authentication errors.
2025-03-17 09:28:15 +08:00
javayhu
a7f7556a6d refactor: update hero section content and improve user button behavior
- Changed the hero section title and description to better reflect the MkSaaS offering.
- Updated the user button to use `replace` instead of `push` for navigation after sign out, ensuring a smoother user experience.
- Modified the delete account card to also use `replace` for navigation after account deletion, enhancing consistency in routing behavior.
2025-03-17 01:19:05 +08:00
javayhu
bb7e36cc85 refactor: enhance localization and styling in account deletion flow
- Updated Chinese localization file to include a new "cancel" message for improved user experience during account deletion.
- Adjusted `DeleteAccountCard` footer styling for better alignment and spacing of buttons.
- Modified `auth.ts` to disable freshness check for user deletion, ensuring smoother account removal process.
2025-03-17 00:02:44 +08:00
javayhu
1fd3ef7eeb feat: add reset password functionality for users with social login
- Introduced `ResetPasswordCard` component to guide users who signed up with social providers in setting up a password through the forgot password flow.
- Updated `ConditionalUpdatePasswordCard` to conditionally render `ResetPasswordCard` for users without a credential provider but with an email.
- Enhanced localization files to include new messages for the password setup process in both English and Chinese.
- Implemented email pre-filling in the forgot password form based on URL parameters for improved user experience.
2025-03-16 23:45:29 +08:00
javayhu
4f8b6d56c9 refactor: implement conditional rendering for password update when user has account with credential provider
- Replaced `UpdatePasswordCard` with `ConditionalUpdatePasswordCard` in `SettingsAccountPage` to ensure the password update option is only available for users with a credential provider.
- Added `ConditionalUpdatePasswordCard` component to handle the logic for checking user credentials and rendering the password update form accordingly.
- Updated documentation in `UpdatePasswordCard` to clarify its usage and the need for credential providers.
2025-03-16 23:00:25 +08:00
javayhu
8abb393c3e refactor: improve component structure and styling
- Adjusted `AuthCard` to enhance readability by formatting the `CardContent` section.
- Simplified the `DividerWithText` component by removing unnecessary padding.
- Updated `MainMobileMenu` to improve layout consistency with adjusted padding and spacing.
- Replaced `Dialog` with `AlertDialog` in `DeleteAccountCard` for better user experience and consistency in alert handling.
- Enhanced error message display logic in `DeleteAccountCard` for improved clarity.
2025-03-16 15:38:58 +08:00
javayhu
c51a608a28 refactor: update user references from username to name
- Replaced instances of `user.username` with `user.name` in `SidebarUser`, `UserButton`, and `UpdateNameCard` components for consistency and clarity.
- Adjusted the default values in the form handling to reflect the change from username to name.
- Updated comments in `auth.ts` to clarify the implementation status of username support.
2025-03-16 15:20:42 +08:00
javayhu
6569e5c3df refactor: update localization handling in metadata generation
- Replaced `pageTranslations` with `pt` for improved clarity in localization across multiple pages including About, Changelog, Contact, Waitlist, Blog, Pricing, and Auth pages.
- Enhanced maintainability by standardizing the variable naming for translation functions.
2025-03-16 15:06:42 +08:00
javayhu
635346bff6 refactor: restructure waitlist form localization messages
- Updated English and Chinese localization files to nest waitlist form messages under a `form` object for better organization.
- Adjusted `WaitlistFormCard` component to utilize the new message structure, enhancing clarity and maintainability of the code.
2025-03-16 15:05:51 +08:00
javayhu
0ae10c6c42 refactor: optimize intl messages for contact form 2025-03-16 15:03:22 +08:00
javayhu
293ee90c8a feat: implement contact form submission with email notifications
- Added `contactAction` to handle contact form submissions, including validation using Zod.
- Integrated email sending functionality to notify the configured recipient upon form submission.
- Updated `ContactFormCard` to utilize the new action, providing user feedback through toast notifications.
- Enhanced error handling for email sending failures and improved logging for better debugging.
- Updated `websiteConfig` to include the recipient email address for notifications.
2025-03-16 14:56:23 +08:00
javayhu
5607b57bd1 feat: add notification settings and newsletter management features
- Introduced a new `SettingsNotificationPage` component for managing newsletter subscriptions.
- Added `NewsletterFormCard` to handle subscription status with user feedback through toast notifications.
- Implemented `isSubscribedAction` to check user subscription status, enhancing user experience.
- Updated localization files to include new messages for newsletter management in English and Chinese.
- Enhanced sidebar with a new notification settings link for easy access to subscription preferences.
2025-03-16 12:55:26 +08:00
javayhu
6413fcd33c refactor: enhance card components with improved styling and structure
- Updated multiple card components (`ContactFormCard`, `DeleteAccountCard`, `UpdateAvatarCard`, `UpdateNameCard`, `UpdatePasswordCard`, and `WaitlistFormCard`) to include `overflow-hidden` for better layout management.
- Improved the structure of card titles and descriptions for better readability.
- Adjusted card footers to include `rounded-none` for consistent styling across components.
- Enhanced overall UI consistency and maintainability by refining component styles.
2025-03-16 10:55:43 +08:00
javayhu
9ddf1a3c20 feat: implement newsletter subscription and unsubscription actions
- Added `subscribeAction` and `unsubscribeAction` in `newsletter.ts` to handle newsletter subscriptions and unsubscriptions with validation using Zod.
- Introduced new localization messages for email validation in English and Chinese localization files.
- Updated `WaitlistFormCard` to utilize the new subscription action, improving user feedback with toast notifications.
- Replaced the alert icon in `FormError` component for better visual representation of errors.
2025-03-16 10:42:33 +08:00
javayhu
9b221f4583 refactor: reorganize email sending logic and centralize mail functionality
- Updated the `index.ts` file to export the `send` function from the new `mail.ts` file, improving code organization.
- Introduced `mail.ts` to encapsulate the email sending logic, including template rendering and error handling, enhancing modularity and maintainability.
- Implemented a structured approach for sending emails with templates or direct content, streamlining the email functionality.
2025-03-16 10:27:40 +08:00
javayhu
657e5212f4 refactor: remove WaitlistForm component and reorganize email types
- Deleted the `WaitlistForm` component to streamline the codebase and improve modularity.
- Introduced a new `types.ts` file in the `mail` directory to centralize email-related type definitions, enhancing code organization and maintainability.
- Updated imports across email components to reference the new `types.ts`, ensuring consistency and clarity in type usage.
2025-03-16 09:49:51 +08:00
javayhu
0804ac5e96 feat: enhance sidebar theming with new CSS variables
- Added new CSS variables for sidebar theming in `globals.css` to support light and dark modes.
- Removed redundant sidebar variables from individual theme files (`theme-blue.css`, `theme-green.css`, `theme-orange.css`, `theme-red.css`, `theme-rose.css`, `theme-violet.css`, `theme-yellow.css`, `theme-zinc.css`, and `theme.css`) to streamline styling and ensure consistency.
- Improved overall theme management for better maintainability and customization.
2025-03-16 09:05:37 +08:00
javayhu
574add6956 feat: add new UI components and enhance package dependencies
- Introduced several new UI components including `AlertDialog`, `AspectRatio`, `Calendar`, `Carousel`, `Command`, `ContextMenu`, `Dialog`, `DropdownMenu`, `HoverCard`, `InputOTP`, `Menubar`, `Popover`, `Progress`, `RadioGroup`, `Resizable`, `ScrollArea`, `Select`, `Slider`, `Switch`, `Table`, `ToggleGroup`, and `Toggle`.
- Updated `package.json` and `pnpm-lock.yaml` to include new dependencies for Radix UI components and other libraries.
- Improved existing components with better structure and styling, ensuring consistency across the application.
- Enhanced responsiveness and accessibility of UI elements using Tailwind CSS and Shadcn/ui.
2025-03-16 09:05:23 +08:00
javayhu
52738f4783 feat: enhance waitlist and contact forms with improved localization messages
- Added new success and failure messages for waitlist and contact form submissions in English and Chinese localization files.
- Introduced `WaitlistFormCard` component to streamline waitlist form handling and improve user feedback with toast notifications.
- Updated `ContactFormCard` to utilize new localization messages for form submission states, enhancing user experience.
- Improved structure and validation for both forms, ensuring better error handling and user guidance.
2025-03-16 08:43:46 +08:00
javayhu
c53cbb1ce2 refactor: replace contact form with ContactFormCard component
- Removed the old `ContactForm` component and integrated the new `ContactFormCard` for improved structure and validation.
- Updated `ContactPage` to utilize the new `ContactFormCard`, enhancing user experience with better form handling and error management.
- Implemented form validation using Zod and improved user feedback with toast notifications.
2025-03-16 08:00:23 +08:00