Commit Graph

350 Commits

Author SHA1 Message Date
1808837298@qq.com
c8a8526ff3 feat: modify channel model_mapping column type to TEXT
- Change `ModelMapping` column type from varchar(1024) to TEXT in channels table
- Add MySQL migration script to alter column type during database initialization
- Improve database schema flexibility for storing complex model mappings
2025-02-06 14:35:14 +08:00
1808837298@qq.com
881be9a3ec feat: add demo site configuration flag
- Introduce `DemoSiteEnabled` variable in operation settings
- Provide a configurable flag to enable/disable demo site functionality
2025-02-04 14:15:01 +08:00
1808837298@qq.com
4470ef97f2 fix: clear channel name in user logs 2025-01-27 13:31:24 +08:00
1808837298@qq.com
1ae20bdd89 refactor: update log queries to explicitly reference 'logs' table for clarity and consistency 2025-01-22 13:37:32 +08:00
Lilo
a335d9e1f4 Add channel name (tooltip / detail) to logs 2025-01-09 17:07:28 +08:00
1808837298@qq.com
aa2ac4766e Enhance user search functionality to support ID and keyword searches. Updated query conditions to allow searching by user ID alongside username, email, and display name. Improved handling of numeric and string keywords in search queries. 2025-01-06 15:20:38 +08:00
1808837298@qq.com
f11148bccf revert cache.go 2025-01-05 22:12:39 +08:00
Calcium-Ion
3dff0d498f 2025-01-05 22:01:36 +08:00
Calcium-Ion
e275229597 Fix channel model length issue
Fixes #691

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Calcium-Ion/new-api/issues/691?shareId=XXXX-XXXX-XXXX-XXXX).
2025-01-05 21:55:25 +08:00
delph1s
7244adada5 fix: try to fix pgsql #685 2025-01-02 00:14:16 +08:00
CalciumIon
97d0e6d2cd feat: implement pagination and total count for redemptions API #386
- Updated GetAllRedemptions and SearchRedemptions functions to return total count along with paginated results.
- Modified API endpoints to accept page size as a parameter, enhancing flexibility in data retrieval.
- Adjusted RedemptionsTable component to support pagination and display total count, improving user experience.
- Ensured consistent handling of pagination across related components, including LogsTable and UsersTable.
2024-12-31 15:28:25 +08:00
CalciumIon
7fec5fa1b3 feat: enhance user search functionality with pagination support
- Updated SearchUsers function to include pagination parameters (startIdx and num) for improved user search results.
- Modified API response structure to return paginated data, including total user count and current page information.
- Adjusted UsersTable component to handle pagination and search parameters, ensuring a seamless user experience.
- Added internationalization support for new search functionality in the UI.
2024-12-31 15:02:59 +08:00
CalciumIon
5a39d2e171 feat: enhance user management and pagination features #518
- Updated GetAllUsers function to return total user count along with paginated results, improving data handling in user retrieval.
- Modified GetAllUsers API endpoint to accept page size as a parameter, allowing for dynamic pagination.
- Enhanced UsersTable component to support customizable page sizes and improved pagination logic.
- Added error handling for empty username and password in AddUser component.
- Updated LogsTable component to display pagination information in a user-friendly format.
2024-12-31 14:52:55 +08:00
CalciumIon
0a845ae69f fix: try to fix pgsql #682 2024-12-31 02:10:19 +08:00
CalciumIon
e0b7300239 fix: try to fix pgsql #682 2024-12-31 02:06:30 +08:00
CalciumIon
2de4de0006 fix redis 2024-12-30 22:05:41 +08:00
CalciumIon
aefd53b683 refactor: token cache logic 2024-12-30 17:10:48 +08:00
CalciumIon
c6ae827385 refactor: remove redundant group column handling in user queries 2024-12-29 17:02:30 +08:00
CalciumIon
966cdc1f7f refactor: user cache logic 2024-12-29 16:50:26 +08:00
CalciumIon
c917ce64db refactor: streamline log processing by introducing formatUserLogs function 2024-12-28 16:40:29 +08:00
CalciumIon
9e25f05930 refactor: enhance log retrieval and user interaction in LogsTable component 2024-12-28 15:34:28 +08:00
CalciumIon
0d1ba65592 refactor: migrate group ratio and user usable groups logic to new setting package
- Replaced references to common.GroupRatio and common.UserUsableGroups with corresponding functions from the new setting package across multiple controllers and services.
- Introduced new setting functions for managing group ratios and user usable groups, enhancing code organization and maintainability.
- Updated related functions to ensure consistent behavior with the new setting package integration.
2024-12-25 19:31:12 +08:00
CalciumIon
fe29ca04d5 feat: Implement batch tagging functionality for channels
- Added a new endpoint to batch set tags for multiple channels, allowing users to update tags efficiently.
- Introduced a new `BatchSetChannelTag` function in the controller to handle incoming requests and validate parameters.
- Updated the `BatchSetChannelTag` method in the model to manage database transactions and ensure data integrity during tag updates.
- Enhanced the ChannelsTable component in the frontend to support batch tag setting, including UI elements for user interaction.
- Updated localization files to include new translation keys related to batch operations and tag settings.
2024-12-25 14:19:00 +08:00
CalciumIon
7e8adb5b34 feat: Enhance logging functionality with group support
- Added a new 'group' parameter to various logging functions, including RecordConsumeLog, GetAllLogs, and GetUserLogs, to allow for more granular log tracking.
- Updated the logs table component to display group information, improving the visibility of log data.
- Refactored related functions to accommodate the new group parameter, ensuring consistent handling across the application.
- Improved the initialization of the group column for PostgreSQL compatibility.
2024-12-24 14:48:11 +08:00
CalciumIon
69c590d439 feat: Introduce settings package and refactor constants
- Added a new `setting` package to replace the `constant` package for configuration management, improving code organization and clarity.
- Moved various configuration variables such as `ServerAddress`, `PayAddress`, and `SensitiveWords` to the new `setting` package.
- Updated references throughout the codebase to use the new `setting` package, ensuring consistent access to configuration values.
- Introduced new files for managing chat settings and midjourney settings, enhancing modularity and maintainability of the code.
2024-12-22 17:24:29 +08:00
borland
ad15c0cb38 Update user.go 2024-12-22 00:03:00 +08:00
borland
57a24bed51 Update user.go 2024-12-22 00:02:28 +08:00
CalciumIon
7569947544 refactor: Improve channel status update logic and clean up code
- Simplified conditional checks in UpdateChannelStatusById function in channel.go to enhance readability.
- Commented out unused image number check in relay-gemini.go for clarity.
- Updated JSON field in en.json for currency consistency, changing "元" from "RMB/CNY" to "CNY" and added a space in "实付金额:" for formatting.
2024-12-17 15:33:16 +08:00
xqx333
8514572452 Update channel.go 2024-12-17 14:30:31 +08:00
xqx333
5664d55702 Update channel.go 2024-12-17 12:11:24 +08:00
xqx333
3339773193 Update cache.go 2024-12-17 12:10:05 +08:00
CalciumIon
0ad03de153 feat: implement channel settings configuration
fix #620
2024-12-15 15:52:41 +08:00
CalciumIon
330dc1a7c6 feat: Enhance quota data handling and CSS styling
- Updated the `increaseQuotaData` function to include `tokenUsed` parameter for better quota tracking.
- Modified the `GetAllQuotaDates` function to sum `token_used` alongside `count` and `quota` for comprehensive data retrieval.
- Improved CSS styles for better layout responsiveness, including padding adjustments for navigation elements and description cards.
2024-12-12 16:18:14 +08:00
CalciumIon
727236e6e7 fix: 渠道标签开启下使用ID排序出错 2024-12-09 20:38:03 +08:00
CalciumIon
c296dfbe0e feat: 兼容渠道搜索下标签聚合功能 2024-12-06 22:03:50 +08:00
CalciumIon
d2fc3fa739 feat: add tag aggregation mode to channels API and UI 2024-12-01 09:24:43 +08:00
CalciumIon
31df701579 feat: 完善标签编辑 2024-11-29 23:58:31 +08:00
CalciumIon
6463ad6976 fix: search channel #442 2024-11-19 01:39:27 +08:00
CalciumIon
325de98738 feat: 渠道标签分组 2024-11-19 01:13:18 +08:00
licoy
80e1dafa28 修复独立日志数据库查询令牌日志时错误问题 2024-11-12 16:22:13 +08:00
seefs001
12de1faca9 feat: integrate Linux DO OAuth authentication 2024-11-10 23:56:22 +08:00
1808837298@qq.com
53ff1547cf feat: 弃用旧的聊天配置 2024-10-12 21:09:59 +08:00
1808837298@qq.com
07fa9205cb feat: playground 2024-09-26 00:59:09 +08:00
1808837298@qq.com
fd2379e807 fix: 第三方登录注销 #500 2024-09-25 17:13:28 +08:00
1808837298@qq.com
05f35fd024 feat: 不自动生成系统访问令牌 2024-09-25 16:31:25 +08:00
1808837298@qq.com
a50d2e6836 fix: error user role 2024-09-24 17:49:57 +08:00
1808837298@qq.com
a3dbf21280 feat: pricing page support multi groups #487 2024-09-22 17:44:57 +08:00
CalciumIon
4a02eb1b7f feat: 令牌分组 2024-09-18 05:19:49 +08:00
CalciumIon
6d2948d684 feat: 添加令牌ip白名单功能 2024-09-17 20:49:51 +08:00
CalciumIon
37cc9c2448 feat: support gpt-4o-gizmo-* (close #436) 2024-08-16 17:25:03 +08:00