Commit Graph

16 Commits

Author SHA1 Message Date
javayhu
ac8d4dee4b refactor: replace usePayment hook and store with useCurrentPlan for improved payment state management 2025-08-21 00:50:12 +08:00
javayhu
23cd59bbac refactor: biome lint part 1 2025-04-18 21:47:14 +08:00
javayhu
4b1d888845 chore: refactor website configuration structure and update related components 2025-04-17 01:18:57 +08:00
javayhu
743ef4aef7 chore: disable locale switch if only one locale defined 2025-04-17 00:24:30 +08:00
javayhu
961163305a refactor: integrate website configuration for localization
- Replaced hardcoded locale data with a centralized website configuration structure, enhancing maintainability and consistency across components.
- Updated various components to utilize the new websiteConfig for locale flags and names, improving code clarity and reducing redundancy.
- Removed obsolete LOCALE_LIST and streamlined routing logic to align with the new configuration approach.
2025-04-12 11:54:45 +08:00
javayhu
dd6fb4df85 chore: rename dashboard components prefix with sidebar-
- Added descriptive comments for the DashboardPage, DashboardHeader, DashboardSidebar, SidebarMain, and SidebarUser components to improve code readability and maintainability.
- Enhanced understanding of component purposes and functionalities through clear documentation.
2025-04-12 08:35:05 +08:00
javayhu
dbffd6ff66 refactor: enhance dashboard layout and sidebar navigation
- Updated AI section titles in English and Chinese translations for clarity.
- Refactored sidebar components to improve navigation structure, replacing SidebarMain with NavMain and NavUser for better modularity.
- Introduced SidebarUpgradeCard to promote upgrade options within the sidebar.
- Adjusted DashboardLayout and DashboardHeader for improved styling and responsiveness.
- Removed deprecated SidebarMain component to streamline the codebase.
2025-03-22 00:05:55 +08:00
javayhu
3102dab50d refactor: update routes and enhance component styles for better usability
- Changed the Dashboard route to '/dashboardv4' for versioning clarity.
- Improved styling in BlogCategoryListDesktop and BlogCategoryListMobile for better user interaction with cursor styles.
- Added cursor pointer to various components including SidebarUser, LocaleSelector, and ThemeSwitcher for enhanced usability.
- Updated global CSS variables for improved color consistency across the application.
2025-03-21 21:58:19 +08:00
javayhu
62413b37ba feat: upgrade tailwind to v4 (2) template components 2025-03-21 00:09:11 +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
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
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
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
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
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