1. 13 Jun, 2025 1 commit
    • 🐛 fix(setup): enforce username length ≤ 12 during initial system setup · bbeaa6a2
      The User model applies `validate:"max=12"` to the `Username` field, but the
      initial setup flow did not validate this constraint. This allowed creation
      of a root user with an overly long username (e.g. "Uselessly1344"), which
      later caused every update request to fail with:
      
        Field validation for 'Username' failed on the 'max' tag
      
      This patch adds an explicit length check in `controller/setup.go` to reject
      usernames longer than 12 characters during setup, keeping validation rules
      consistent across the entire application.
      
      Refs: #1214
      Apple\Apple committed
  2. 12 Jun, 2025 11 commits
    • 💬 fix(PersonalSetting): improve notification message accuracy for settings save operation · ee2679b9
      - Change success message from "通知设置已更新" to "设置保存成功"
      - Change error message from "更新通知设置失败" to "设置保存失败"
      - Makes messages more generic since the function saves multiple types of settings (notification, pricing, IP logging) not just notification settings
      Apple\Apple committed
    • 🔒 feat: Add user-configurable IP logging for consume and error logs · 28c3aef7
      - Add IP field to Log model with database index and default empty value
      - Implement conditional IP recording based on user setting in RecordConsumeLog and RecordErrorLog
      - Add UserSettingRecordIpLog constant and update user settings API to handle record_ip_log field
      - Create dedicated "IP记录" tab in personal settings under "其他设置" section
      - Add IP column to logs table with help tooltip explaining recording conditions
      - Make IP column visible to all users (not admin-only) with proper filtering for consume/error log types
      - Restrict display of use_time and retry columns to consume and error log types only
      - Update personal settings UI structure: rename "通知设置" to "其他设置" to accommodate new functionality
      - Add proper translation support and maintain consistent styling across components
      
      The IP logging feature is disabled by default and only records client IP addresses
      for consume (type 2) and error (type 5) logs when explicitly enabled by users
      in their personal settings.
      Apple\Apple committed
    • Merge pull request #1207 from QuantumNous/user_group_ratio · 158d621f
      feat: 分组特殊倍率
      Calcium-Ion committed
    • 🔧 refactor(LogsTable, render): remove undefined parameters for improved clarity… · 0e974418
      🔧 refactor(LogsTable, render): remove undefined parameters for improved clarity and consistency in function signatures
      CaIon committed
    • 🔧 fix(token hooks): adapt token key fetcher to new paginated API · b1176d02
      Changes
      1. web/src/helpers/token.js
         • `fetchTokenKeys` now calls `/api/token/?p=1&size=10` (1-based paging).
         • Supports new response shape `{ items, total, page, page_size }`; falls back gracefully if array is returned.
         • Filters active tokens from `tokenItems`, not `data` directly.
      
      `useTokenKeys` remains unchanged—its consumer code receives the same list of active keys.
      Apple\Apple committed
    • 🐛 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
  3. 11 Jun, 2025 4 commits
  4. 10 Jun, 2025 23 commits
  5. 09 Jun, 2025 1 commit