1. 12 Jun, 2025 3 commits
    • 🐛 fix: correct loading state for search button in TokensTable · 3f67ef2d
      Fix the search button loading state to be consistent with other table components.
      The search button now properly shows loading animation when the table data is
      being fetched.
      
      Changes:
      - Update search button loading prop from `loading={searching}` to
        `loading={loading || searching}` in TokensTable.js
      - This ensures loading state is shown both when searching with keywords
        (searching=true) and when loading default data (loading=true)
      - Aligns with the behavior of other table components like ChannelsTable,
        UsersTable, and RedemptionsTable
      
      Before: Search button only showed loading when searching with keywords
      After: Search button shows loading for all table data fetch operations
      Apple\Apple committed
    • 🎨style: Standardize pagination text format in Dashboard components · f7b870c1
      - Replace `showTotal` with `formatPageText` in Dashboard table components
      - Unify pagination text format to match table components pattern
      - Update SettingsAnnouncements.js, SettingsAPIInfo.js, and SettingsFAQ.js
      - Change from "共 X 条记录,显示第 Y-Z 条" to "第 Y - Z 条,共 X 条" format
      - Ensure consistent user experience across all table components
      
      This change improves UI consistency by standardizing the pagination
      text format across Dashboard and table components.
      Apple\Apple committed
    • 🚀 feat(pagination): unify backend-driven pagination & improve channel tag aggregation · a5060129
      SUMMARY
      • Migrated Token, Task, Midjourney, Channel, Redemption tables to true server-side pagination.
      • Added total / page / page_size metadata in API responses; switched all affected React tables to consume new structure.
      • Implemented counting helpers:
        – model/token.go CountUserTokens
        – model/task.go TaskCountAllTasks / TaskCountAllUserTask
        – model/midjourney.go CountAllTasks / CountAllUserTask
        – model/channel.go CountAllChannels / CountAllTags
      • Refactored controllers (token, task, midjourney, channel) for 1-based paging & aggregated returns.
      • Redesigned `ChannelsTable.js`:
        – `loadChannels`, `syncPageData`, `enrichChannels` for tag-mode grouping without recursion.
        – Fixed runtime white-screen (maximum call-stack) by removing child duplication.
        – Pagination, search, tag-mode, idSort all hot-reload correctly.
      • Removed unused `log` import in controller/midjourney.go.
      
      BREAKING CHANGES
      Front-end consumers must now expect data.items / total / page / page_size from list endpoints (`/api/channel`, `/api/task`, `/api/mj`, `/api/token`, etc.).
      Apple\Apple committed
  2. 11 Jun, 2025 3 commits
  3. 10 Jun, 2025 23 commits
  4. 09 Jun, 2025 11 commits
    • feat: implement GET request deduplication in API layer · 624fdecc
      Add request deduplication mechanism to prevent duplicate GET requests
      to the same endpoint within the same timeframe, significantly reducing
      unnecessary network overhead.
      
      **Changes:**
      - Add `patchAPIInstance()` function to intercept and deduplicate GET requests
      - Implement in-flight request tracking using Map with URL+params as unique keys
      - Apply deduplication patch to both initial API instance and `updateAPI()` recreated instances
      - Add `disableDuplicate: true` config option to bypass deduplication when needed
      
      **Benefits:**
      - Eliminates redundant API calls caused by component re-renders or rapid user interactions
      - Reduces server load and improves application performance
      - Provides automatic protection against accidental duplicate requests
      - Maintains backward compatibility with existing code
      
      **Technical Details:**
      - Uses Promise sharing for identical concurrent requests
      - Automatically cleans up completed requests from tracking map
      - Preserves original axios functionality with minimal overhead
      - Zero breaking changes to existing API usage
      
      Addresses the issue observed in EditChannel.js where multiple calls
      were made to the same endpoints during component lifecycle.
      Apple\Apple committed
    • 🎨 style(LogsTable): replace IconForward with Route icon for model redirection · df00c5c6
      - Remove IconForward import from @douyinfe/semi-icons
      - Add Route icon import from lucide-react
      - Update model redirection indicator in LogsTable component
      
      The Route icon better represents the concept of model redirection
      compared to the generic forward arrow, providing clearer visual
      context for users when models are mapped to different upstream models.
      Apple\Apple committed
    • 🎨 style: disable y-axis scrolling for semi-layout components · 000c7c7b
      - Hide scrollbars for .semi-layout, .semi-layout-content, and .semi-sider
      - Set scrollbar width and height to 0 for webkit browsers
      - Add cross-browser scrollbar hiding support (webkit, firefox, IE/Edge)
      - Change Content container overflow from 'auto' to 'hidden' on desktop
      - Remove redundant scrollbar styling (thumb, hover, track styles)
      
      This ensures that all semi-layout related components have no visible
      scrollbars and prevents vertical scrolling functionality entirely.
      
      Files modified:
      - web/src/index.css
      - web/src/components/layout/PageLayout.js
      Apple\Apple committed
    • 🎨 feat(home): redesign homepage hero section with improved layout and multilingual support · 94df6885
      - Remove system name display from homepage title
      - Replace with unified gateway branding: "统一的大模型接口网关"
      - Add subtitle highlighting key benefits: price, stability, no subscription
      - Implement language-specific title rendering:
        - English: Two-line layout ("The Unified" / "LLMs API Gateway")
        - Chinese: Single-line layout for better readability
      - Increase title font sizes for better visual hierarchy
      - Adjust vertical padding for improved centering
      - Enhance overall visual appeal and user experience
      
      This update modernizes the homepage presentation and provides better
      localization support for different language preferences.
      Apple\Apple committed
    • 📱 feat(TopUp): enhance mobile UX with responsive layout and bottom fixed payment panel · 64fe8a7f
      - Convert copy button to Input suffix for cleaner UI design
      - Add responsive grid layout for balance cards and preset amounts
        - Mobile (< md): single column layout for better readability
        - Desktop (>= md): multi-column layout for space efficiency
      - Implement bottom fixed payment panel on mobile devices
        - Fixed positioning for easy access to payment options
        - Includes custom amount input and payment method buttons
        - Auto-hide on desktop to maintain original layout
      - Improve mobile payment flow with sticky bottom controls
      - Add proper spacing to prevent content overlap with fixed elements
      - Maintain consistent functionality across all breakpoints
      
      This update significantly improves the mobile user experience by making
      payment controls easily accessible without scrolling, while preserving
      the desktop layout and functionality.
      Apple\Apple committed
    • 🐛 fix(theme): sync theme state between global context and local components · 3fd16678
      - Replace local isDarkMode state with global useTheme hook in TopUp component
      - Replace local isDarkMode state with global useTheme hook in PersonalSetting component
      - Remove redundant theme detection useEffect hooks that caused state inconsistency
      - Update theme condition checks from isDarkMode to theme === 'dark'
      - Fix issue where components showed dark gradients in light mode due to theme state mismatch
      - Clean up trailing commas in import statements
      
      This ensures all components stay synchronized with the global theme system managed by HeaderBar's theme toggle button.
      Apple\Apple committed