Commit Graph

1069 Commits

Author SHA1 Message Date
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
javayhu
3dbf65b62a refactor: streamline email handling and localization
- Introduce a new `send` utility function for sending emails with templates and context.
- Refactor email templates to utilize the updated `defaultMessages` from the i18n module.
- Consolidate email-related types into a new `types.ts` file for better organization.
- Remove deprecated `messages.ts` and `types.ts` files from the mail module.
- Update email components to use the new `BaseEmailProps` type and routing for default locale.
2025-03-13 23:46:24 +08:00
javayhu
7a1991f56c refactor: standardize error handling in authentication forms
- Update error handling in ForgotPasswordForm, LoginForm, RegisterForm, and ResetPasswordForm to use a consistent format for error messages.
- Replace direct error message access with structured error status and statusText for improved clarity.
- Remove commented-out console logs for cleaner code.
2025-03-13 23:46:04 +08:00
javayhu
e549a0546e fix: fix import Locale from next-intl 2025-03-13 10:14:50 +08:00
javayhu
ce28a0e51d feat: update typography by adding DM Sans font weight 500
- Replace GeistSans with fontDMSans in layout component
- Introduce new DM Sans font file for weight 500
- Update fontDMSans to include variable for weight 500
2025-03-13 00:35:47 +08:00
javayhu
8d85680fce
Merge pull request #10 from MkSaaSHQ/next-intl
chore: upgrade next-intl to version 4.0.0 and update type definitions
2025-03-13 00:25:07 +08:00
javayhu
df1c75f56a chore: upgrade next-intl to version 4.0.0 and update type definitions
- Update `next-intl` dependency from version 3.26.5 to 4.0.0
- Modify global type definitions to include new `Locale` and `Messages` types
- Refactor various components and pages to use `Locale` type for params
- Enhance internationalization handling by integrating `hasLocale` checks
- Clean up imports and ensure consistent usage of `next-intl` features
2025-03-13 00:23:37 +08:00
javayhu
d7389eef47 chore: update home page 2025-03-12 23:46:02 +08:00
javayhu
1416cd9d43 refactor: simplify About page by removing unnecessary translations and imports
- Remove `createTranslator` and `getWebsiteInfo` imports
- Eliminate unused translator and website info variables
- Replace `UserCircleIcon` with a simple div for avatar fallback
- Streamline the About page component by removing redundant code
2025-03-11 00:40:47 +08:00
javayhu
805a871146 feat: enhance MDX rendering with code copy functionality
- Add code copy button to code blocks with internationalized label
- Modify MDX component to support raw code string extraction
- Update content collections to inject raw code string into pre elements
- Improve code block styling and add hover-based copy button
- Remove unnecessary prose wrapper from various components
- Enhance code block presentation with better overflow and border handling
2025-03-11 00:33:14 +08:00
javayhu
9a6ce6b7c3 feat: add internationalization for theme and language switchers
- Update `en.json` and `zh.json` with new translations for theme and language switching
- Modify `LocaleSwitcher` and `ThemeSwitcher` components to use internationalized labels
- Replace hardcoded strings with translations from `useTranslations` hook
- Improve accessibility by using translated aria-labels and sr-only text
- Refactor button styling to use `size-9` utility class
2025-03-11 00:08:32 +08:00
javayhu
c96d3952d0 feat: improve locale switching with dedicated LocaleSwitcher component
- Create new `LocaleSwitcher` component with dropdown menu for language selection
- Modify `LocaleSelector` to remove `showLocaleName` prop
- Update `Navbar` to use new `LocaleSwitcher` instead of `LocaleSelector`
- Adjust `ThemeSwitcher` button styling for consistency
- Enhance locale switching user experience with more intuitive UI
2025-03-11 00:01:51 +08:00
javayhu
57166fe250 feat: add DM Sans font to website typography
- Import and configure DM Sans font from local file
- Update layout to include DM Sans font variable
- Add font file for DM Sans regular weight
- Enhance typography configuration with additional font option
2025-03-10 09:53:43 +08:00
javayhu
031a05e549 refactor: enhance website configuration with comprehensive social and metadata options
- Expand `websiteConfig` to include detailed metadata and social media links
- Add optional social media platform URLs to improve website connectivity
- Update type definitions to support more flexible configuration
- Modify social links generation to conditionally render based on configuration
- Update references to website configuration across components and utilities
- Improve metadata generation with optional author information
2025-03-10 01:06:39 +08:00
javayhu
8b4dde9042 refactor: centralize website configuration with dynamic translations
- Replace static `siteConfig` with dynamic `getWebsiteInfo()` function
- Add `Site` section to translation JSON files for multilingual support
- Update types to distinguish between website config and website info
- Remove deprecated `site.ts` configuration file
- Modify components and utilities to use new translation-based configuration
- Ensure consistent website metadata generation across the application
2025-03-10 00:48:12 +08:00
javayhu
c7ab08f01d refactor: consolidate configuration and utility files
- Move menu, footer, and social links to `config.tsx`
- Create `constants.ts` for shared constants like `POSTS_PER_PAGE`
- Extract translation utility to `translator.ts`
- Move table of contents generation to `lib/blog/toc.ts`
- Update import paths across multiple components
- Simplify email configuration using `siteConfig`
2025-03-09 23:40:29 +08:00
javayhu
4f5f216296 refactor: rename marketing.tsx to config.tsx 2025-03-09 23:28:57 +08:00