Commit Graph

42 Commits

Author SHA1 Message Date
javayhu
f649db26ae feat: add CreditsBalanceButton and CreditsBalanceMenu components 2025-07-10 15:41:11 +08:00
javayhu
1740c826c7 feat: add CreditsBalance component and integrate into dashboard and navbar
- Introduced a new CreditsBalance component to display user credits.
- Integrated CreditsBalance into DashboardHeader, Navbar, and NavbarMobile for improved visibility of user credits.
- Enhanced user interaction by allowing navigation to the credits settings page.
2025-07-06 00:41:57 +08:00
javayhu
00dcd7ce61 chore: optimize navbar menu link active status 2025-06-07 23:36:18 +08:00
javayhu
d66306f890 fix: fix hydration caused by navbar mobile 2025-04-25 20:57:10 +08:00
javayhu
27bc59354f refator: biome lint part 2 2025-04-18 21:53:21 +08:00
javayhu
23cd59bbac refactor: biome lint part 1 2025-04-18 21:47:14 +08:00
javayhu
78d5d9977b refactor: replace UserButton with UserButtonMobile in NavbarMobile & fix hydration error caused by UserButton
- Updated NavbarMobile to use UserButtonMobile for mobile user interactions.
- Introduced UserButtonMobile component to handle user actions in a mobile-friendly manner, including sign-out functionality and user avatar display.
- Removed unused drawer-related imports from UserButton component to streamline the codebase.
2025-04-12 14:08:50 +08:00
javayhu
b5de0fb940 refactor: optimize website configs
- Updated sidebar, footer, navbar, and user button components to use new naming conventions for configuration retrieval functions, enhancing code clarity and consistency.
- Renamed functions from getSidebarConfig, getFooterConfig, getNavbarConfig, and getAvatarConfig to getSidebarLinks, getFooterLinks, getNavbarLinks, and getAvatarLinks respectively.
- Adjusted the website configuration structure to include metadata for logos and social links, improving maintainability and organization of configuration data.
2025-04-12 10:46:58 +08:00
javayhu
710dbe00b6 refactor: modularize configuration files and update imports
- Introduced new configuration files for navbar, footer, avatar, sidebar, social links, and payment plans to enhance modularity and maintainability.
- Updated import paths across the codebase to reference the new configuration files.
- Removed deprecated functions and streamlined the config.tsx file for better organization.
2025-04-10 00:58:14 +08:00
javayhu
b639a9e50a chore: optimize loading state when fetch current user 2025-04-05 22:30:05 +08:00
javayhu
ba1c87fc3e refactor: move some shared components to layout folder 2025-04-05 17:30:47 +08:00
javayhu
5953031bee feat: support configs for light & dark logos 2025-04-05 13:30:19 +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
08aa6abcc8 fix: fix ui bugs in navbar mobile 2025-03-31 23:23:29 +08:00
javayhu
34ffcc989e feat: implement theme switcher & intl and support theme config
- Added new mode switcher components for both horizontal and dropdown layouts to facilitate theme toggling.
- Updated translation files to include new theme-related entries in English and Chinese.
- Refactored existing components to replace ThemeSwitcher with ModeSwitcher for consistency.
- Introduced new themes in the configuration and updated the theme selector to utilize translations for theme names.
- Enhanced global styles to support new themes and ensure proper application across the project.
2025-03-29 22:15:00 +08:00
javayhu
23aa0f179e refactor: streamline locale handling in components
- Removed unnecessary checks in locale handling functions across NavUser, LocaleSelector, and LocaleSwitcher components to simplify the code.
- Adjusted padding in NavbarMobile component for improved layout consistency and user experience.
2025-03-26 21:45:06 +08:00
javayhu
7211e6981c refactor: update page structure and enhance layout consistency
- Changed import path for Pricing component in HomePage to utilize the new preview structure.
- Adjusted layout in ContactPage and WaitlistPage by adding bottom padding for improved spacing.
- Modified HeroSection component to enhance layout with consistent padding.
- Cleaned up commented-out code in BlockPreview and Navbar components for better readability and maintainability.
2025-03-26 10:00:31 +08:00
javayhu
a6e2ee698a refactor: update site metadata and translations
- Renamed "Site" to "Metadata" in translation files for clarity.
- Updated the title, tagline, and description in both English and Chinese translations to reflect the new branding.
- Adjusted references in various components to use the updated metadata structure.
- Removed the obsolete site.webmanifest file and updated the manifest path in the metadata construction.
2025-03-23 15:37:38 +08:00
javayhu
db054ccdcc feat: enhance dashboard and settings UI with new icons and improved layout
- Added new icons (CircleUserRoundIcon and LockKeyholeIcon) to the main navigation links for better visual representation.
- Introduced a new data.json file to centralize dashboard data management, improving organization and modularity.
- Updated the dashboard page to correctly import the new data source.
- Enhanced the billing settings page layout with additional spacing and descriptions for better user guidance.
- Improved mobile navbar styles for a more consistent user experience.
- Refactored billing card component to streamline the display of subscription plans and billing history.
2025-03-22 13:54:20 +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
73ac2ba2cb refactor: update component styles and structure for consistency (upgrade tailwindv4)
- Adjusted layout and styling in AuthCard, LoginForm, RegisterForm, and SocialLoginButton for improved alignment and responsiveness.
- Updated icon sizes in various components to maintain uniformity.
- Enhanced Card components in ContactFormCard, DeleteAccountCard, ResetPasswordCard, UpdateAvatarCard, UpdateNameCard, UpdatePasswordCard, and NewsletterFormCard with consistent padding and margin.
- Refined Navbar and BackButtonSmall for better user interaction with cursor styles.
- Removed unused CSS variables from globals.css to streamline styles.
2025-03-21 10:13:31 +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
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
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
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
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
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
javayhu
34006556c8 refactor: run biome format to src folder 2025-03-09 22:13:59 +08:00
javayhu
35836cdc56 refactor: improve navigation styling and active state handling
- Update navbar mobile and desktop components with consistent styling
- Enhance active and hover states for navigation menu items
- Remove dark mode specific text color variants
- Add active state detection for sub-menu items
- Simplify background and text color transitions
- Remove testimonials component
- Switch to default theme CSS import
2025-03-09 09:49:43 +08:00
javayhu
6160622ccd refactor: update mobile navbar and localization
- Modify mobile navbar to conditionally render login/signup buttons based on user authentication
- Update English locale translations with minor text refinements
- Add `userLoggedIn` prop to `MainMobileMenu` component for dynamic rendering
- Improve mobile menu layout and user experience
2025-03-09 00:05:14 +08:00
javayhu
12b33b29ce refactor: reorganize marketing menu and update mobile navbar
- Move AI menu section to the top of the marketing menu configuration
- Remove duplicate AI menu section in marketing links
- Add TODO comment for mobile menu scrollbar layout issue
- Remove scrollbar from mobile menu using RemoveScroll component
- Improve mobile menu accessibility and scrolling behavior
2025-03-08 23:21:58 +08:00
javayhu
b9a5c4927e refactor: improve UI consistency and enhance component interactions
- Update blog post page with refined category link styling
- Modify blog table of contents to add hover state for links
- Enhance locale selector with optional locale name display
- Refactor navbar mobile and desktop components with improved layout and styling
- Reorganize marketing menu links and update icon usage
- Adjust font weights and hover states across navigation components
2025-03-08 22:43:36 +08:00
javayhu
92d7513e3d refactor: enhance navigation and link rendering with active state and dynamic imports
- Update footer, navbar, and mobile navbar to use dynamic social and menu links
- Implement active state highlighting for navigation items using locale pathname
- Replace static social links with a dynamic function in marketing configuration
- Improve icon and styling consistency across navigation components
- Add null checks for menu and social links to prevent rendering errors
- Update icon for About page in menu links
2025-03-08 21:45:07 +08:00
javayhu
13810236d4 feat: add logout translations and update mobile/desktop navbar components
- Add "logout" translation key to English and Chinese locale files
- Update `UserButton` component to use translated logout text
- Modify mobile and desktop navbar to conditionally render user button based on session
- Adjust styling for blog category list mobile and navbar components
- Improve internationalization and user authentication UI
2025-03-08 18:31:35 +08:00
javayhu
8d8b66a7fe feat: internationalize marketing configuration and components
- Add translation support for menu links, footer links, and avatar links
- Create `createTranslator` utility function for dynamic translations
- Update marketing configuration to use translation-based menu and link generation
- Modify navbar, footer, and user button components to use translated content
- Add new "Common" translation keys for login and signup buttons
- Refactor marketing configuration to dynamically generate links with translations
- Improve internationalization across marketing-related components
2025-03-08 18:08:13 +08:00
javayhu
f4e51757e5 refactor: update marketing types, links, and component rendering
- Add new `MenuItem` and `NestedMenuItem` types for improved type safety
- Update marketing configuration to use new types with `title` instead of `name`
- Modify footer, navbar, and user button components to handle optional icons
- Enhance media query hook with server-side rendering support
- Update Chinese translation with minor punctuation adjustments
- Improve component rendering with null checks for icons
2025-03-08 17:23:37 +08:00
javayhu
f7714eeda4 refactor: update routes, marketing links, and component icons
- Modify `routes.ts` to add AI feature routes and remove deprecated routes
- Update `marketing.tsx` with new AI feature menu links and more descriptive icons
- Refactor navbar mobile and locale selector components with improved icon imports
- Adjust theme switcher button styling for better visual consistency
- Enhance menu link descriptions and icons for improved user experience
2025-03-08 16:34:18 +08:00
javayhu
111e537ea2 refactor: consolidate marketing configuration and update component imports
- Merge marketing-related configuration files into a single `marketing.tsx`
- Remove deprecated configuration files: `marketing.ts`, `marketing-links.tsx`, `footer.ts`, `hero.ts`, `landing.ts`, and `user-button.ts`
- Update navbar, footer, and user button components to use new centralized configuration
- Add comprehensive social links, footer links, menu links, and avatar links
- Simplify site configuration by removing unnecessary links
- Improve code organization and reduce configuration complexity
2025-03-08 15:10:35 +08:00
javayhu
431e61d2a5 refactor: consolidate blog components and improve file structure
- Move MDX component from marketing to shared folder
- Remove deprecated blog post and blog posts components
- Update blog page imports to use new MDX component location
- Add reading time estimation utility function
- Reorganize navbar and mobile navbar components
- Update marketing links configuration
- Improve component modularity and code organization
2025-03-08 13:50:08 +08:00