Commit Graph

47 Commits

Author SHA1 Message Date
Apple\Apple
28c3aef76f 🔒 feat: Add user-configurable IP logging for consume and error logs
- 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.
2025-06-13 01:34:01 +08:00
creamlike1024
13afcd4266 fix: 修复未输入新密码时提示修改成功 2025-05-06 22:28:32 +08:00
skynono
bb596ae8e6 feat: add original password verification when changing password 2025-05-06 14:28:27 +08:00
CaIon
f0925dc105 feat: Enhance user settings and notification options 2025-04-03 17:32:48 +08:00
1808837298@qq.com
7a13f9c99a fix: Ensure correct quota warning threshold type conversion 2025-02-22 15:19:55 +08:00
1808837298@qq.com
1ae0a38485 refactor: Optimize user caching and token retrieval methods 2025-02-19 15:12:26 +08:00
1808837298@qq.com
83e161a1d4 refactor: Simplify root user notification and remove global email variable
- Remove global `RootUserEmail` variable
- Modify channel testing and user notification methods to use `GetRootUser()`
- Update user cache and notification service to use more consistent user base type
- Add new channel test notification type
2025-02-18 15:59:17 +08:00
1808837298@qq.com
0fcd243f56 feat: Add user notification settings with quota warning and multiple notification methods
- Implement user notification settings with email and webhook options
- Add new user settings for quota warning threshold and notification preferences
- Create backend API and database support for user notification configuration
- Enhance frontend personal settings with notification configuration UI
- Support custom notification email and webhook URL
- Add service layer for sending user notifications
2025-02-18 14:54:21 +08:00
1808837298@qq.com
6d021b20b7 fix: replace context-based user ID with session-based retrieval #741
- Update user and wechat controllers to use sessions for user ID
- Modify ID retrieval to use `session.Get("id")` instead of `c.GetInt("id")`
- Cast session ID to int when creating user object
2025-02-10 20:52:33 +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
6093ae6f30 fix: prevent duplicate models in user group retrieval 2024-12-27 21:25:44 +08:00
CalciumIon
e671b0d357 refactor: improve user group handling and add GetUserUsableGroups function
- Introduced a new function `GetUserUsableGroupsCopy` to return a copy of user usable groups.
- Updated `GetUserUsableGroups` to utilize the new function for better encapsulation.
- Changed variable names from `UserUsableGroups` to `userUsableGroups` for consistency.
- Enhanced `GetUserUsableGroups` logic to ensure it returns a copy of the groups, preventing unintended modifications.
2024-12-27 21:19:22 +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
5686e7b7c8 feat: 更新令牌生成算法 2024-09-25 16:31:25 +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
CalciumIon
11c9acd556 fix: 初始令牌 2024-09-17 23:07:16 +08:00
Jin Weihan
a3ad4f528d 增加环境变量GENERATE_DEFAULT_TOKEN 设置之后将生成初始令牌,默认关闭。 2024-08-24 18:44:37 +00:00
GuoRuqiang
2c370c4d96 增加注册自动生成初始令牌。 2024-08-18 15:12:59 +00:00
CalciumIon
0c0d6b4b0f feat: 优化充值订单号 2024-08-03 01:28:18 +08:00
CaIon
03f26006a1 fix: update user 2024-04-24 19:40:29 +08:00
iszcz
e00a468464 用户管理页新增分组查询 2024-04-20 02:13:11 +08:00
CaIon
7b484beb18 fix bug 2024-04-04 19:18:00 +08:00
CaIon
40a6db6797 fix: user update error 2024-04-04 11:10:41 +08:00
CaIon
250031efb9 fix: 删除用户改为软删除 (close #107) 2024-03-11 14:13:45 +08:00
CaIon
61bfde5e00 修复不能删除注销用户的问题 2023-12-27 16:46:18 +08:00
CaIon
b38ba50e3f 用户注销后禁止再次注册 2023-12-27 00:19:11 +08:00
CaIon
3eb7843b2e 完善个人中心 2023-11-21 16:35:51 +08:00
CaIon
57edbac346 feat: 删除无用功能 2023-09-10 01:13:12 +08:00
CaIon
68b24da6a6 add epay 2023-08-14 22:16:32 +08:00
ckt
9412966b2c feat: able to delete account by self (#294)
* feat: support account deletion

* chore: update style

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-07-23 13:37:32 +08:00
JustSong
a6cc0226a7 feat: able to display quota in dollar 2023-06-20 20:09:17 +08:00
JustSong
f1e77d6244 fix: fix wrong field name in SQL 2023-06-18 22:07:40 +08:00
JustSong
f123eaf379 feat: support aff now (close #75) 2023-06-17 18:12:58 +08:00
JustSong
0b237f3642 chore: add more log types 2023-06-10 16:31:40 +08:00
JustSong
d5634ee7e7 feat: able to manage group now 2023-06-08 09:26:54 +08:00
quzard
07feef5a2e fix: update common.RootUserEmail when root's email changed (#132) 2023-05-31 15:51:31 +08:00
JustSong
e07eb017f7 fix: limit the shown text's length (close #80) 2023-05-16 21:33:59 +08:00
JustSong
bcb4862a19 refactor: bind quota to account instead of token (close #64, #31) 2023-05-16 11:26:09 +08:00
JustSong
567ff7359c fix: check user's role when manage user (#30) 2023-04-28 09:47:03 +08:00
JustSong
9667bc86bc fix: root user cannot demote itself now (close #30) 2023-04-27 14:45:12 +08:00
JustSong
5a9fb6238b feat: able to manage system vai access token (close #12) 2023-04-26 20:54:39 +08:00
JustSong
466cdbf1af Token API done without verification 2023-04-23 11:31:00 +08:00
JustSong
483bd64d8f Rename to One API 2023-04-22 21:14:09 +08:00
JustSong
4cbef0780e Initial commit 2023-04-22 20:39:27 +08:00