Commit Graph

1035 Commits

Author SHA1 Message Date
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
javayhu
aef4ce6296 fix: add account deletion feature and enhance localization messages
- Introduced `DeleteAccountCard` component for users to permanently delete their accounts, including a confirmation dialog to prevent accidental deletions.
- Updated localization files in English and Chinese to include new messages related to account deletion, enhancing user guidance and clarity.
- Improved layout of the account settings page to incorporate the new delete account functionality alongside existing update features.
2025-03-16 01:15:01 +08:00
javayhu
d51a22e030 fix: enhance localization messages and improve account settings UI
- Added new success and failure messages for password updates in English and Chinese localization files.
- Updated `UpdateAvatarCard`, `UpdateNameCard`, and `UpdatePasswordCard` components to improve error handling and user feedback with toast notifications.
- Enhanced styling for the user avatar fallback icon in `UpdateAvatarCard` for better visual consistency.
2025-03-16 00:20:12 +08:00
javayhu
c258cc7d0d fix: add password visibility toggle to reset password form and update localization messages
- Implemented password visibility toggle functionality in the `ResetPasswordForm` component, enhancing user experience during password entry.
- Updated localization files in English and Chinese to include new messages for showing and hiding passwords.
- Ensured accessibility by providing appropriate icons and screen reader support for the password visibility toggle.
2025-03-15 22:20:55 +08:00
javayhu
11a78eccbc fix: enhance login and registration forms with password visibility toggle
- Added password visibility toggle functionality to `LoginForm` and `RegisterForm` components, improving user experience during authentication.
- Updated localization files to include new messages for showing and hiding passwords in both English and Chinese.
- Ensured consistent styling and accessibility for the password input fields with appropriate icons and screen reader support.
2025-03-15 21:54:59 +08:00
javayhu
c0c60f2f2f fix: enhance localization messages and update user interface components
- Added new localization messages for logout failure and success notifications in English and Chinese.
- Updated `SidebarUser` and `UserButton` components to display the username instead of the name for better clarity.
- Improved `UpdateNameCard` to handle username updates with appropriate success and error messages using toast notifications.
- Refactored `MainMobileMenu` to utilize the translation function directly for login and sign-up links, enhancing consistency across the application.
2025-03-15 21:47:33 +08:00
javayhu
c497d71757 fix: update localization messages and improve account settings UI
- Enhanced localization messages in English and Chinese for user name and password fields, adding hints for better user guidance.
- Refactored `UpdateAvatarCard`, `UpdateNameCard`, and `UpdatePasswordCard` components to improve state management and user experience.
- Updated validation hints in the `UpdateNameCard` and `UpdatePasswordCard` for clearer instructions on input requirements.
2025-03-15 21:02:13 +08:00
javayhu
3a41a656ac fix: enhance DashboardHeader and SidebarMain with improved styling
- Added a bottom border to the `DashboardHeader` for better visual separation.
- Updated `SidebarMenuButton` and `SidebarMenuSubButton` components in `SidebarMain` to include padding for improved touch target size and user experience.
- Ensured consistent styling across sidebar items for a more cohesive look.
2025-03-15 20:54:41 +08:00
javayhu
dc36339faa fix: update localization messages and enhance account settings UI
- Revised localization messages in English and Chinese for avatar upload, name input, and password change to improve clarity and consistency.
- Adjusted the layout of `UpdateAvatarCard`, `UpdateNameCard`, and `UpdatePasswordCard` components for better user experience and responsiveness.
- Added `CardFooter` to `UpdateAvatarCard` and `UpdateNameCard` for improved information display.
- Updated validation schema for user name to reflect new minimum and maximum character requirements.
2025-03-15 20:44:52 +08:00
javayhu
a37285b5cf chore: enhance DashboardHeader with theme and locale switchers
- Added `ThemeSwitcher` and `LocaleSwitcher` components to the right side of the `DashboardHeader` for improved user customization options.
- Cleaned up imports and ensured consistent formatting in the `DashboardHeader` component.
- Updated the layout to accommodate new switchers while maintaining responsiveness.
2025-03-15 20:14:42 +08:00
javayhu
3bcb0f10e4 fix: update maxLength validation for name input in localization files
- Adjusted the maximum length for name input validation in both English and Chinese localization files from 32 to 30 characters.
- Refactored `UpdateNameCard` to initialize the form with a fallback for user name and check user existence after hooks initialization.
- Commented out the `TailwindIndicator` in the layout for potential future use.
2025-03-15 20:00:51 +08:00
javayhu
20be1fdfd6 chore: enhance account settings page with avatar, name, and password update features
- Introduce new components: `UpdateAvatarCard`, `UpdateNameCard`, and `UpdatePasswordCard` for managing user account settings.
- Update localization files for English and Chinese to include new fields related to avatar upload, name input, and password change.
- Refactor `SettingsAccountPage` to utilize the new components, improving code organization and user experience.
2025-03-15 19:41:37 +08:00
javayhu
e4710bbabc fix: Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information. 2025-03-15 19:11:40 +08:00
javayhu
673829298b chore: refactor AI feature pages to use DashboardHeader component
- Replace breadcrumb and sidebar trigger implementations in AI feature pages (Audio, Image, Text, Video) with a new `DashboardHeader` component for improved code reuse and consistency.
- Update localization handling for breadcrumbs in each AI feature page to enhance user navigation experience.
- Clean up imports by removing unused components related to breadcrumb and sidebar triggers.
2025-03-15 18:53:30 +08:00
javayhu
03f00c7d37 chore: enhance sidebar navigation and localization features
- Refactor the `SidebarMain` component to improve active link detection and enhance user experience with collapsible menus.
- Introduce `useLocalePathname` for better path management and implement functions to check active states for sidebar items.
- Update `SidebarUser` component layout for improved readability and consistency in locale display.
- Replace `UserIcon` with `User2Icon` in the `UserAvatar` component for a more modern appearance.
2025-03-15 17:59:12 +08:00
javayhu
f7e5297589 chore: refactor settings navigation and localization
- Replace the `General` and `Security` settings pages with a new `Account` settings page, updating the corresponding routes and localization files for both English and Chinese.
- Implement `useTranslations` in the new `SettingsAccountPage` to enhance localization support.
- Clean up sidebar links and remove the obsolete `SettingsGeneralPage` to streamline the settings navigation.
- Update the `SidebarMain` component to reflect the changes in settings structure.
2025-03-15 17:36:49 +08:00
javayhu
06513b3bfe chore: add AI feature pages and update sidebar navigation
- Introduce new pages for AI features: Audio, Image, Text, and Video, enhancing the dashboard's functionality.
- Update the sidebar to replace the `DashboardIcon` with `LayoutDashboardIcon` for improved visual consistency.
- Adjust icon sizes in the sidebar and menu links for uniformity across the application.
- Refactor the `SidebarMain` component to improve the organization of sidebar items and enhance user experience.
2025-03-15 16:36:02 +08:00
javayhu
62198eac33 chore: refactor locale selection functions for consistency
- Update locale selection functions in `SidebarUser`, `LocaleSelector`, and `LocaleSwitcher` components to use arrow function syntax for improved readability.
- Adjust the `SidebarUser` component's layout by adding padding to the `SidebarMenu` for better visual spacing.
- Ensure consistent naming conventions for locale selection functions across components.
2025-03-15 16:18:26 +08:00
javayhu
80b99a65ed fix: Error: Failed to call useTranslations because the context from NextIntlClientProvider was not found. 2025-03-15 15:58:58 +08:00
javayhu
52c30ec9d1 chore: enhance dashboard sidebar localization and add web manifest
- Add new dashboard sidebar item for navigation in both English and Chinese localization files.
- Introduce a new `site.webmanifest` file for improved PWA support.
- Update routing constants to include specific settings routes for better organization.
- Clean up imports in `config.tsx` and adjust sidebar links for clarity.
2025-03-15 15:47:27 +08:00
javayhu
7127a46543 chore: update sidebar icons and enhance theme configuration
- Replace `BadgeCheckIcon` with `BotIcon` and `SettingsIcon` with `Settings2Icon` in the sidebar for improved visual consistency.
- Add `UserCircleIcon` to the settings link for better user representation.
- Update sidebar theme imports in `globals.css` to use `theme-blue.css` and provide manual theming instructions.
- Introduce new sidebar color variables in multiple theme files to enhance customization options.
2025-03-15 15:25:39 +08:00
javayhu
69da9e1936 chore: refactor dashboard sidebar and enhance localization support
- Introduce a new `DashboardSidebar` component to replace the obsolete `AppSidebar`, improving organization and clarity.
- Implement `SidebarMain` and `SidebarUser` components for better separation of concerns within the sidebar.
- Update localization files to include new sidebar items for AI features and settings in both English and Chinese.
- Streamline sidebar navigation by utilizing the `getSidebarMainLinks` function for dynamic link generation.
- Remove unused `NavSecondary` component to reduce complexity and improve maintainability.
2025-03-15 14:58:05 +08:00
javayhu
4cd70b1815 chore: refactor dashboard layout and introduce settings page
- Rename `Page` component to `DashboardPage` for clarity.
- Simplify the dashboard layout by removing unnecessary `SidebarProvider` and `SidebarInset`.
- Add a new `SettingsGeneralPage` component for general settings with a structured layout.
- Update navigation components to utilize `LocaleLink` for improved routing.
- Remove obsolete `NavProjects` component to streamline the sidebar navigation.
2025-03-15 14:22:24 +08:00
javayhu
5e5278aef8 chore: remove WebsiteInfo type and clean up imports in config
- Eliminate the `WebsiteInfo` type from the types definition to simplify the codebase.
- Update `config.tsx` to remove the import of the now obsolete `WebsiteInfo` type, enhancing clarity and maintainability.
2025-03-15 14:09:47 +08:00
javayhu
2b41ef578a chore: refactor website information retrieval and simplify layout components
- Remove the `getWebsiteInfo` function to streamline website information handling.
- Update components to directly use translation functions for site name and tagline.
- Clean up `DashboardLayout`, `Footer`, `Navbar`, and `NavbarMobile` by removing unnecessary imports and improving readability.
- Maintain consistent use of translations across the application for better localization support.
2025-03-15 14:08:31 +08:00
javayhu
e76745e52e chore: enhance NavUser component with locale and theme switching
- Introduce locale and theme selection functionality in the `NavUser` component.
- Implement `DropdownMenuSub` for organizing theme and language options.
- Utilize `useLocaleStore` for managing current locale state and transitions.
- Refactor imports and improve user experience with responsive design elements.
- Update translations for consistency across the dropdown menu items.
2025-03-15 14:02:48 +08:00
javayhu
6fd8defc9a chore: update routing and sidebar navigation structure
- Refactor routes for AI features and settings to improve clarity and organization.
- Update `AppSidebar` navigation items to reflect new route paths.
- Introduce `UserAvatar` component for consistent user representation across the dashboard.
- Adjust avatar sizes in various components for uniformity.
- Enhance `LocaleSwitcher` and `ThemeSwitcher` button styles for better UI consistency.
2025-03-15 13:48:23 +08:00
javayhu
9e04764444 chore: reorganize dashboard components
- Move `AppSidebar` to a new directory for better organization.
- Update imports for `PricingComparator` to reflect its new location within the blocks directory.
- Remove obsolete `fill-remaining-space.tsx` component to clean up the codebase.
- Introduce new `PricingComparator` component for improved pricing comparison functionality.
- Add new dashboard navigation components (`NavMain`, `NavProjects`, `NavSecondary`, `NavUser`) to enhance user experience and organization within the dashboard.
2025-03-15 12:12:34 +08:00
javayhu
cb0c852933 chore: update localization and add divider component for social login
- Add "or" translation to English and Chinese localization files for improved user guidance.
- Introduce `DividerWithText` component to visually separate social login options in the authentication UI.
- Integrate `DividerWithText` in the `SocialLoginButton` component for enhanced layout clarity.
2025-03-15 12:12:03 +08:00
javayhu
0929d93342 chore: enhance MDX component fix copy button and localization updates
- Add __rawString__ property to MDX component for improved code handling.
- Refactor pre element to extract code content dynamically and support copy functionality.
- Update login translation in English to "Log in" for consistency.
2025-03-15 11:27:07 +08:00
javayhu
43010fcb64 chore: update localization and metadata handling in email templates
- Refactor email components (ForgotPassword, SubscribeNewsletter, VerifyEmail) to utilize `defaultMessages` for improved localization.
- Enhance `EmailLayout` to accept locale and messages props, ensuring consistent translation across email templates.
- Update manifest generation to use `defaultMessages` for site name and description, streamlining metadata handling.
- Adjust copyright formatting in translation files for better presentation.
2025-03-15 10:24:50 +08:00
javayhu
234cc5518c chore: simplify website info by removing title and description fields
- Remove `title` and `description` fields from English and Chinese translation files to streamline website metadata.
- Update `getWebsiteInfo` function to exclude removed fields, ensuring consistency in website information retrieval.
- Adjust `WebsiteInfo` type definition to reflect the changes in metadata structure.
2025-03-15 01:03:30 +08:00
javayhu
2ba2eebbaa chore: update database schema and enhance authentication features
- Add `username` column to the `user` table and enforce uniqueness constraint.
- Introduce new SQL migration file for the `username` addition.
- Update `schema.ts` to reflect changes in the `user`, `session`, and `account` tables.
- Enhance authentication client by integrating `usernameClient` plugin for better user management.
- Adjust session management settings for improved caching and freshness.
- Refactor metadata generation in the home page for consistency.
2025-03-15 00:54:13 +08:00
javayhu
0045ecf91e chore: remove obsolete site.webmanifest and update manifest.ts documentation
- Delete the outdated `site.webmanifest` file to clean up the codebase.
- Enhance documentation in `manifest.ts` to clarify the purpose of the generated web app manifest.
2025-03-15 00:51:32 +08:00
javayhu
130880cf87 chore: refactor localization handling in email templates and manifest
- Replace top-level await for default messages with a dedicated `getDefaultMessages` function to improve code organization and readability.
- Update email components (ForgotPassword, SubscribeNewsletter, VerifyEmail) to utilize the new `getDefaultMessages` function for localization.
- Modify the manifest function to fetch default messages asynchronously, enhancing the metadata generation process.
2025-03-14 23:14:14 +08:00
javayhu
2d8f70f09a chore: refactor metadata handling and remove unused files
- Delete obsolete `robots.ts` and `opengraph-image.tsx` files to streamline the codebase.
- Update metadata generation across various pages to utilize `getBaseUrlWithLocale` for improved localization.
- Ensure all pages have consistent canonical URLs for better SEO and accessibility.
- Clean up imports and enhance the organization of metadata-related functions.
2025-03-14 23:09:30 +08:00
javayhu
5d925b65c9 tmp: optimize international metadata 2025-03-14 10:11:46 +08:00
javayhu
30bd8d1cf3 chore: optimize manifest.ts 2025-03-14 10:02:24 +08:00
javayhu
1c4f86c7ef chore: enhance localization and metadata across application
- Update English and Chinese translation files to include descriptions for various pages, improving user experience and clarity.
- Refactor metadata generation in multiple pages to utilize the new `constructMetadata` function for consistency.
- Ensure all pages have appropriate titles and descriptions for better SEO and accessibility.
- Clean up imports and streamline metadata handling in the application.
2025-03-14 01:31:17 +08:00
javayhu
695a4b9ecb chore: add MCP server configuration for console-ninja
- Introduce a new configuration file `.cursor/mcp.json` to define the MCP server settings for console-ninja.
- Specify the command and arguments for the MCP server to streamline setup.
2025-03-14 01:03:16 +08:00
javayhu
dab2bbac0c refactor: update authentication forms to use DEFAULT_LOGIN_REDIRECT
- Replace direct usage of Routes.DefaultLoginRedirect with DEFAULT_LOGIN_REDIRECT in LoginForm, RegisterForm, and SocialLoginButton for consistency.
- Add documentation comment to websiteConfig for clarity.
2025-03-14 00:56:51 +08:00
javayhu
edbec45660 chore: remove author metadata from website configuration 2025-03-14 00:13:18 +08:00
javayhu
bb4169f4bc fix: update team name in email templates for localization
- Change team name to "MkSaaS Team" in English and Chinese email templates.
- Remove unnecessary website info references in email components to streamline localization.
- Ensure consistent usage of the `defaultMessages` for translations in email templates.
2025-03-13 23:50:54 +08:00