- 27 Jul, 2025 2 commits
-
-
t0ng7u committed
-
🗂 Summary • Added role-specific localStorage keys for column visibility in three hooks: - `useUsageLogsData.js` → `logs-table-columns-admin` / `logs-table-columns-user` - `useMjLogsData.js` → `mj-logs-table-columns-admin` / `mj-logs-table-columns-user` - `useTaskLogsData.js` → `task-logs-table-columns-admin` / `task-logs-table-columns-user` Details 1. Each hook now derives a `STORAGE_KEY` based on `isAdminUser`, preventing admin and non-admin sessions from overwriting one another’s column settings. 2. Removed the previous “save but strip admin columns” workaround—settings are persisted unmodified to each role’s key. 3. Kept runtime behaviour: non-admin users still see admin-only columns forcibly hidden. 4. Replaced newly added Chinese comments with clear English equivalents for consistency. Result Switching between admin and non-admin accounts no longer corrupts column visibility preferences, and codebase comments are fully English-localized.
t0ng7u committed
-
- 26 Jul, 2025 13 commits
-
-
t0ng7u committed
-
🔍 Summary • Introduced a unified `selectFilter` helper that matches both `option.value` and `option.label`, ensuring all `<Select>` components support intuitive search (fixes channel “type” dropdown not filtering). • Replaced all usages of the old `modelSelectFilter` with `selectFilter` in: • `EditChannelModal.jsx` • `SettingsPanel.js` • `EditTokenModal.jsx` • `EditTagModal.jsx` • Removed the deprecated `modelSelectFilter` export from `utils.js` (no backward-compat alias). • Updated documentation comments accordingly. Why The old filter only inspected `option.value`, causing searches to fail when `label` carried the meaningful text (e.g., numeric IDs for channel types). The new helper searches both fields, covering all scenarios and unifying the API across the codebase. Notes No functional regressions expected; all components have been migrated.
t0ng7u committed -
✨ This commit introduces a unified, maintainable solution for all model-pricing filter buttons and removes redundant code. Key points • Added `usePricingFilterCounts` hook - Centralises filtering logic and returns: - `quotaTypeModels`, `endpointTypeModels`, `dynamicCategoryCounts`, `groupCountModels` - Keeps internal helpers private (removed public `modelsAfterCategory`). • Updated components to consume the new hook - `PricingSidebar.jsx` - `FilterModalContent.jsx` • Improved button UI/UX - `SelectableButtonGroup.jsx` now respects `item.disabled` and auto-disables when `tagCount === 0`. - `PricingGroups.jsx` counts models per group (after all other filters) and disables groups with zero matches. - `PricingEndpointTypes.jsx` enumerates all endpoint types, computes filtered counts, and disables entries with zero matches. • Removed obsolete / duplicate calculations and comments to keep components lean. The result is consistent, real-time tag counts across all filter groups, automatic disabling of unavailable options, and a single source of truth for filter computations, making future extensions straightforward.t0ng7u committed -
t0ng7u committed
-
💄 Previously, the "Force Format" switch was displayed for every channel type although it only applies to OpenAI (type === 1). This change wraps the switch in a conditional so it renders exclusively when the selected channel type is OpenAI. Why: - Prevents user confusion when configuring non-OpenAI channels - Keeps the UI clean and context-relevant Scope: - web/src/components/table/channels/modals/EditChannelModal.jsx No backend logic affected.
t0ng7u committed -
feat: Claude to gemini (适配claude格式调用gemini渠道模型)
Calcium-Ion committed -
判断兑换码名称长度,改为按字符长度计算
Calcium-Ion committed -
🎨 - Extract channel extra settings into a dedicated Card component for better visual hierarchy - Replace custom gray background container with consistent Form component styling - Simplify layout structure by removing complex Row/Col grid layout in favor of native Form component layout - Unify help text styling by using extraText prop consistently across all form fields - Move "Settings Documentation" link to card header subtitle for better accessibility - Improve visual consistency with other setting cards by using matching design patterns The channel extra settings (force format, thinking content conversion, pass-through body, proxy address, and system prompt) now follow the same design language as other configuration sections, providing a more cohesive user experience. Affected settings: - Force Format (OpenAI channels only) - Thinking Content Conversion - Pass-through Body - Proxy Address - System Prompt
t0ng7u committed -
CaIon committed
-
feat: 支持渠道级透传选项,支持设置渠道系统提示词
Calcium-Ion committed -
CaIon committed
-
CaIon committed
-
CaIon committed
-
- 25 Jul, 2025 6 commits
-
-
✨ - **Fix SideSheet double-click issue**: Remove early return for null modelData to prevent rendering blockage during async state updates - **Component modularization**: - Split ModelDetailSideSheet into focused sub-components (ModelHeader, ModelBasicInfo, ModelEndpoints, ModelPricingTable) - Refactor PricingFilterModal with FilterModalContent and FilterModalFooter components - Remove unnecessary FilterSection wrapper for cleaner interface - **Improve visual consistency**: - Unify avatar/icon logic between ModelHeader and PricingCardView components - Standardize tag colors across all pricing components (violet/teal for billing types) - Apply consistent dashed border styling using Semi UI theme colors - **Enhance data accuracy**: - Display raw endpoint type names (e.g., "openai", "anthropic") instead of translated descriptions - Remove text alignment classes for better responsive layout - Add proper null checks to prevent runtime errors - **Code quality improvements**: - Reduce component complexity by 52-74% through modularization - Improve maintainability with single responsibility principle - Add comprehensive error handling for edge cases This refactoring improves component reusability, reduces bundle size, and provides a more consistent user experience across the model pricing interface.
t0ng7u committed -
Raymond committed
-
t0ng7u committed
-
🔒 Ensure non-admin users cannot enable columns reserved for administrators across the following hooks: * web/src/hooks/usage-logs/useUsageLogsData.js - Force-hide CHANNEL, USERNAME and RETRY columns for non-admins. * web/src/hooks/mj-logs/useMjLogsData.js - Force-hide CHANNEL and SUBMIT_RESULT columns for non-admins. * web/src/hooks/task-logs/useTaskLogsData.js - Force-hide CHANNEL column for non-admins. The checks run when loading column preferences from localStorage, overriding any tampered settings to keep sensitive information hidden from unauthorized users.
t0ng7u committed -
-
CaIon committed
-
- 24 Jul, 2025 9 commits
-
-
🍭 t0ng7u committed -
t0ng7u committed
-
📱 Optimize grid column breakpoints to account for 460px sidebar width: - Change from sm:grid-cols-2 lg:grid-cols-3 to xl:grid-cols-2 2xl:grid-cols-3 - Ensures adequate space for card display after subtracting sidebar width - Improves layout on medium-sized screens where previous breakpoints caused cramped display Breakpoint calculation: - 1280px screen - 460px sidebar = 820px → 2 columns - 1536px screen - 460px sidebar = 1076px → 3 columns
t0ng7u committed -
♻ - Extract default values to DEFAULT_PRICING_FILTERS constant for centralized configuration - Replace verbose type checks with optional chaining operator (?.) for cleaner code - Eliminate redundant function type validations and comments - Reduce code lines by ~50% (from 60 to 25 lines) while maintaining full functionality - Improve code readability and follow modern JavaScript best practices This refactoring enhances code quality without changing the function's behavior, making it easier to maintain and modify default filter values in the future.
t0ng7u committed -
♻ - Extract default values to DEFAULT_PRICING_FILTERS constant for centralized configuration - Replace verbose type checks with optional chaining operator (?.) for cleaner code - Eliminate redundant function type validations and comments - Reduce code lines by ~50% (from 60 to 25 lines) while maintaining full functionality - Improve code readability and follow modern JavaScript best practices This refactoring enhances code quality without changing the function's behavior, making it easier to maintain and modify default filter values in the future.
t0ng7u committed -
♻ - Remove K/M switch from model price column header in pricing table - Add "Display in K units" option to pricing display settings panel - Update parameter passing for tokenUnit and setTokenUnit across components: - PricingDisplaySettings: Add tokenUnit toggle functionality - PricingSidebar: Pass tokenUnit props to display settings - PricingFilterModal: Include tokenUnit in mobile filter modal - Enhance resetPricingFilters utility to reset token unit to default 'M' - Clean up PricingTableColumns by removing unused setTokenUnit parameter - Add English translation for "按K显示单位" as "Display in K units" This change improves UX by consolidating all display-related controls in the filter settings panel, making the interface more organized and the token unit setting more discoverable alongside other display options. Affected components: - PricingTableColumns.js - PricingDisplaySettings.jsx - PricingSidebar.jsx - PricingFilterModal.jsx - PricingTable.jsx - utils.js (resetPricingFilters) - en.json (translations)
t0ng7u committed -
feat: add vidu video channel
IcedTangerine committed -
feitianbubu committed
-
feitianbubu committed
-
- 23 Jul, 2025 10 commits
-
-
🖼 t0ng7u committed -
✨ - Create PricingEndpointTypes.jsx component for endpoint type filtering - Add filterEndpointType state management in useModelPricingData hook - Integrate endpoint type filtering logic in filteredModels computation - Update PricingSidebar.jsx to include endpoint type filter component - Update PricingFilterModal.jsx to support endpoint type filtering on mobile - Extend resetPricingFilters utility function to include endpoint type reset - Support filtering models by endpoint types (OpenAI, Anthropic, Gemini, etc.) - Display model count for each endpoint type with localized labels - Ensure filter state resets to first page when endpoint type changes This enhancement allows users to filter models by their supported endpoint types, providing more granular control over model selection in the pricing interface.
t0ng7u committed -
💄 - Increase skeleton card count from 6 to 10 for better visual coverage - Extend minimum skeleton display duration from 500ms to 1000ms for smoother UX - Add circle shape to all pricing tags for consistent rounded design - Apply circle styling to billing type, popularity, endpoint, and context tags This commit improves the visual consistency and user experience of the pricing card view by standardizing tag appearance and optimizing skeleton loading timing.
t0ng7u committed -
t0ng7u committed
-
CaIon committed
-
CaIon committed
-
CaIon committed
-
CaIon committed
-
CaIon committed
-
CaIon committed
-