1. 23 Aug, 2025 7 commits
  2. 22 Aug, 2025 12 commits
    • 🐛 fix(header): prevent NotificationButton from shrinking when unread badge appears · 54e03c42
      - Remove `size='small'` when the button is wrapped by `Badge`
      - Keep button dimensions consistent with/without badge
      - Preserve 18px icon size and existing styles/accessibility
      - Lint check passed with no issues
      
      Files: web/src/components/layout/HeaderBar/NotificationButton.jsx
      t0ng7u committed
    • 📱 fix(ui/topup): make stats numbers responsive on mobile · 82e87b84
      Reduce KPI font size on small screens to prevent overlapping of large
      numbers while preserving the desktop layout.
      
      Changes:
      - InvitationCard.jsx: use `text-base sm:text-2xl` for
        pending earnings, total earnings, and invite count.
      - RechargeCard.jsx: use `text-base sm:text-2xl` for
        current balance, historical usage, and request count.
      
      Impact:
      - Visual-only; no behavioral changes.
      - Desktop/tablet unchanged.
      - Lint passes.
      
      Files:
      - web/src/components/topup/InvitationCard.jsx
      - web/src/components/topup/RechargeCard.jsx
      t0ng7u committed
    • 🎨 refactor(ui): harden iframe messaging · 1dff565b
      - useHeaderBar.js
        - Wrap handlers with useCallback (logout, language/theme toggle, mobile menu)
        - Add null checks and try/catch around iframe postMessage (theme & language)
        - Keep minimal effect deps; remove unused StatusContext dispatch
        - Logo preload effect safe and scoped to `logo`
      
      - index.jsx
        - No functional changes; locale memoization remains stable
      
      Chore:
      - Lint clean; no runtime warnings
      - Verified no render loops or performance regressions
      t0ng7u committed
    • 🌓 feat(ui): add auto theme mode, refactor ThemeToggle, optimize header theme handling · 30fc4d30
      - Feature: Introduce 'auto' theme mode
        - Detect system preference via matchMedia('(prefers-color-scheme: dark)')
        - Add useActualTheme context to expose the effective theme ('light'|'dark')
        - Persist selected mode in localStorage ('theme-mode') with 'auto' as default
        - Apply/remove `dark` class on <html> and sync `theme-mode` on <body>
        - Broadcast effective theme to iframes
      
      - UI: Redesign ThemeToggle with Dropdown items and custom highlight
        - Replace non-existent IconMonitor with IconRefresh
        - Use Dropdown.Menu + Dropdown.Item with built-in icon prop
        - Selected state uses custom background highlight; hover state preserved
        - Remove checkmark; selection relies on background styling
        - Current button icon reflects selected mode
      
      - Performance: reduce re-renders and unnecessary effects
        - Memoize theme options and current button icon (useMemo)
        - Simplify handleThemeToggle to accept only explicit modes ('light'|'dark'|'auto')
        - Minimize useEffect dependencies; remove unrelated deps
      
      - Header: streamline useHeaderBar
        - Use useActualTheme for iframe theme messaging
        - Remove unused statusDispatch
        - Remove isNewYear from theme effect dependencies
      
      - Home: send effective theme (useActualTheme) to external content iframes
      
      - i18n: add/enhance theme-related copy in locales (en/zh)
      
      - Chore: minor code cleanup and consistency
        - Improve readability and maintainability
        - Lint clean; no functional regressions
      t0ng7u committed
    • 💄 style(ui): enhance table scroll card scrollbar visibility and appearance · 96740654
      - Make Y-axis scrollbar visible for .table-scroll-card .semi-card-body
      - Reduce scrollbar width from 6px to 4px for a more subtle appearance
      - Decrease scrollbar opacity from 0.3 to 0.2 for lighter color
      - Adjust hover opacity from 0.5 to 0.35 for consistent lighter theme
      - Remove previous scrollbar hiding styles to improve user experience
      
      This change improves the usability of table scroll cards by providing
      visual feedback for scrollable content while maintaining a clean,
      unobtrusive design aesthetic.
      t0ng7u committed
    • 🚀 perf(vite): remove visactor manual chunk to avoid preloading on Home · d9024452
      Home was unexpectedly loading the `visactor-*.js` bundle on first paint. This
      happened because the Vite manualChunks entry created a standalone vendor
      chunk for VisActor, which Vite then preloaded on the initial route.
      
      What’s changed
      - Removed `visactor` from `build.rollupOptions.output.manualChunks` in `web/vite.config.js`.
      
      Why
      - Prevents VisActor from being preloaded on the Home page.
      - Restores the intended behavior: VisActor loads only when the Dashboard (data
        analytics) is visited.
      
      Impact
      - Smaller initial payload and fewer network requests on Home.
      - No functional changes to charts; loading behavior is now route-driven.
      
      Test plan
      - Build the app: `cd web && npm run build`.
      - Open the preview and visit `/`: ensure no `visactor-*.js` is requested.
      - Navigate to `/console` (Dashboard): ensure `visactor-*.js` loads as expected.
      t0ng7u committed
    • ️ refactor(home): build serverAddress using `${window.location.origin}` · b43ecc25
      Replace the fallback assignment of serverAddress in `web/src/pages/Home/index.jsx`
      to use a template literal for `window.location.origin`.
      
      - Aligns with the preferred style for constructing base URLs
      - Keeps formatting consistent across the app
      - No functional changes; behavior remains the same
      - Lint passes with no new warnings or errors
      
      Files affected:
      - web/src/pages/Home/index.jsx
      t0ng7u committed
    • refactor: unify layout, adopt Semi UI Forms, dynamic presets, and fix duplicate requests · 2ab2edec
      - Unify TopUp into a single-page layout and remove tabs
      - Replace custom inputs with Semi UI Form components (Form.Input, Form.InputNumber, Form.Slot)
      - Move online recharge form into the stats Card content for tighter, consistent layout
      - Add account stats Card with blue theme (consistent with InvitationCard style)
      - Remove RightStatsCard and inline the stats UI directly in RechargeCard
      - Change preset amount UI to horizontal quick-action Buttons; swap order with payment methods
      - Replace payment method Cards with Semi UI Buttons
        - Use Button icon prop for Alipay/WeChat/Stripe with brand colors
        - Use built-in Button loading; remove custom “processing...” text
      - Replace custom spinners with Semi UI Spin and keep Skeleton for amount loading
      - Wrap Redeem Code in a Card; use Typography for “Looking for a code? Buy Redeem Code” link
      - Show info Banner when online recharge is disabled (instead of warning)
      
      TopUp data flow and logic
      - Generate preset amounts from min_topup using multipliers [1,5,10,30,50,100,300,500]
      - Deduplicate /api/user/aff using a ref guard; fetch only once on mount
      - Simplify user self fetch: update context only; remove unused local states and helpers
      - Normalize payment method keys to alipay/wxpay/stripe and assign default colors
      
      Cleanup
      - Delete web/src/components/topup/RightStatsCard.jsx
      - Remove unused helpers and local states in index.jsx (userQuota, userDataLoading, getUsername)
      
      Dev notes
      - No API changes; UI/UX refactor only
      - Lint clean (no new linter errors)
      
      Files
      - web/src/components/topup/RechargeCard.jsx
      - web/src/components/topup/index.jsx
      - web/src/components/topup/InvitationCard.jsx (visual parity reference)
      - web/src/components/topup/RightStatsCard.jsx (removed)
      t0ng7u committed
    • 🧹 refactor(settings): remove models API usage from Personal Settings · ada604db
      Personal Settings no longer needs to fetch `/api/user/models` since models are now displayed directly. This change removes the unused data flow to simplify the component and avoid unnecessary requests.
      
      Changes:
      - Removed `models` and `modelsLoading` state from `web/src/components/settings/PersonalSetting.jsx`
      - Removed `loadModels` function and its invocation in the initial effect
      - Kept UI behavior unchanged; no functional differences on the Personal Settings page
      
      Notes:
      - Lint passes with no new issues
      - Other parts of the app still using `/api/user/models` (e.g., Tokens pages) are intentionally left intact
      
      Rationale:
      - Models are already displayed; the API call in Personal Settings became redundant
      t0ng7u committed
    • Merge pull request #1606 from funnycups/patch-1 · d09b99c1
      fix: prompt calculation
      Calcium-Ion committed
    • fix: channel type nil point · 184cdb5c
      feitianbubu committed
  3. 21 Aug, 2025 1 commit
  4. 18 Aug, 2025 15 commits
  5. 17 Aug, 2025 5 commits
    • ️ refactor(web): migrate React modules from .js to .jsx and align entrypoint · ba6ed31a
      - Rename React components/pages/utilities that contain JSX to `.jsx` across `web/src`
      - Update import paths and re-exports to match new `.jsx` extensions
      - Fix Vite entry by switching `web/index.html` from `/src/index.js` to `/src/index.jsx`
      - Verified remaining `.js` files are plain JS (hooks/helpers/constants) and do not require JSX
      - No runtime behavior changes; extension and reference alignment only
      
      Context: Resolves the Vite pre-transform error caused by the stale `/src/index.js` entry after migrating to `.jsx`.
      t0ng7u committed
    • feat(ui): add hover scale animation to header logo · 4f22ab64
      Add smooth scale-up animation effect when hovering over the header logo to enhance user interaction experience.
      
      Changes:
      - Add `group` class to Link element to enable Tailwind group hover functionality
      - Update transition from `transition-opacity` to `transition-all` for smooth scaling
      - Increase hover scale from `scale-105` to `scale-110` (10% enlargement)
      - Maintain 200ms transition duration for optimal user experience
      
      The logo now smoothly scales to 110% size on hover and returns to original size when mouse leaves, providing better visual feedback for user interactions.
      t0ng7u committed
    • 🎛️ refactor: HeaderBar into modular components, add shared skeletons, and primary-colored nav hover · 24fbd0bf
      Summary
      - Split HeaderBar into maintainable components and hooks
      - Centralized skeleton loading UI via a reusable SkeletonWrapper
      - Improved navigation UX with primary-colored hover indication
      - Preserved API surface and passed linters
      
      Why
      - Improve readability, reusability, and testability of the header
      - Remove duplicated skeleton logic across files
      - Provide clearer hover feedback consistent with the theme
      
      What’s changed
      - Components (web/src/components/layout/HeaderBar/)
        - New container: index.js
        - New UI components: HeaderLogo.js, Navigation.js, ActionButtons.js, UserArea.js, MobileMenuButton.js, NewYearButton.js, NotificationButton.js, ThemeToggle.js, LanguageSelector.js
        - New shared skeleton: SkeletonWrapper.js
        - Updated entry: HeaderBar.js now re-exports ./HeaderBar/index.js
      - Hooks (web/src/hooks/common/)
        - New: useHeaderBar.js (state and actions for header)
        - New: useNotifications.js (announcements state, unread calc, open/close)
        - New: useNavigation.js (main nav link config)
      - Skeleton refactor
        - Navigation.js: replaced inline skeletons with <SkeletonWrapper type="navigation" .../>
        - UserArea.js: replaced inline skeletons with <SkeletonWrapper type="userArea" .../>
        - HeaderLogo.js: replaced image/title skeletons with <SkeletonWrapper type="image"/>, <SkeletonWrapper type="title"/>
      - Navigation hover UX
        - Added primary-colored hover to nav items for clearer pointer feedback
        - Final hover style: hover:text-semi-color-primary (kept rounded + transition classes)
      
      Non-functional
      - No breaking API changes; HeaderBar usage stays the same
      - All modified files pass lint checks
      
      Notes for future work
      - SkeletonWrapper is extensible: add new cases (e.g., card) in one place
      - Components are small and test-friendly; unit tests can be added per component
      
      Affected files (key)
      - web/src/components/layout/HeaderBar.js
      - web/src/components/layout/HeaderBar/index.js
      - web/src/components/layout/HeaderBar/Navigation.js
      - web/src/components/layout/HeaderBar/UserArea.js
      - web/src/components/layout/HeaderBar/HeaderLogo.js
      - web/src/components/layout/HeaderBar/ActionButtons.js
      - web/src/components/layout/HeaderBar/MobileMenuButton.js
      - web/src/components/layout/HeaderBar/NewYearButton.js
      - web/src/components/layout/HeaderBar/NotificationButton.js
      - web/src/components/layout/HeaderBar/ThemeToggle.js
      - web/src/components/layout/HeaderBar/LanguageSelector.js
      - web/src/components/layout/HeaderBar/SkeletonWrapper.js
      - web/src/hooks/common/useHeaderBar.js
      - web/src/hooks/common/useNotifications.js
      - web/src/hooks/common/useNavigation.js
      t0ng7u committed