Commit Graph

14 Commits

Author SHA1 Message Date
shaw
86c243e1a4 fix: 修复loading动画错误 2025-09-02 11:51:38 +08:00
Feng Yue
71ce1e33b7 fix: API key limit now only counts active keys and uses config value
- Modified API key limit to count only active (non-deleted) keys instead of all keys
- Fixed frontend to use MAX_API_KEYS_PER_USER environment variable instead of hardcoded value
- Added activeApiKeysCount computed property to filter deleted keys
- Updated user profile endpoint to include maxApiKeysPerUser config
- Enhanced user store to persist and retrieve config values

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-15 13:36:05 +08:00
Feng Yue
6b4ce99237 fix: usage stats issue 2025-08-14 16:16:27 +08:00
Feng Yue
c80446ae98 fix: include deletion metadata in user API keys response
- Add isDeleted, deletedAt, deletedBy, deletedByType fields to getUserApiKeys service method
- Include deletion fields in user routes API keys response
- Add debug logging to dashboard component to troubleshoot deleted keys count
- Ensure frontend can properly identify and count deleted API keys

This fixes the issue where deleted API keys count was always showing 0
instead of the actual number of deleted keys.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 16:02:11 +08:00
Feng Yue
4509f303e6 feat: enhance user API keys view and fix admin cost display
- Add deleted API keys display to user's My API Keys view
- Show deleted status with gray indicator and "Deleted" badge
- Display deletion date and hide delete button for deleted keys
- Fix cost calculation in admin deleted API keys tab
- Add getCostStats call to properly populate cost data
- Support includeDeleted parameter in user API keys endpoint

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 15:25:22 +08:00
Feng Yue
aff9966ed1 feat: management of deleted keys 2025-08-14 12:42:39 +08:00
Feng Yue
5d850a7c1c chore: remove regenerate api key functionality 2025-08-14 11:59:42 +08:00
Feng Yue
70e87de639 fix: user stats in admin panel again 2025-08-14 11:38:57 +08:00
Feng Yue
9efe429912 fix: user stats in admin panel 2025-08-14 11:38:51 +08:00
Feng Yue
8ea150a975 feat: enhance user API key management and implement soft delete
- Redirect users to API Keys tab after login instead of overview
- Remove Token Limit and Daily Cost Limit from user API key details modal
- Implement soft delete for API keys to preserve usage statistics
- Add admin endpoint to view deleted API keys with metadata
- Track deletion metadata (deletedBy, deletedAt, deletedByType)
- Ensure deleted API keys cannot be restored
- Include deleted key stats in user totals while excluding from active count

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 11:38:46 +08:00
Feng Yue
c413fddec0 fix: user stats again x4 2025-08-14 11:38:41 +08:00
Feng Yue
2756671117 fix: user stats 2025-08-14 11:38:23 +08:00
Feng Yue
aa86e062f1 fix: user apiKey creation issue 2025-08-14 11:38:04 +08:00
Feng Yue
eb150b4937 feat: 实现完整用户管理系统和LDAP认证集成
- 新增LDAP认证服务支持用户登录验证
- 实现用户服务包含会话管理和权限控制
- 添加用户专用路由和API端点
- 扩展认证中间件支持用户和管理员双重身份
- 新增用户仪表板、API密钥管理和使用统计界面
- 完善前端用户管理组件和路由配置
- 支持用户自助API密钥创建和管理
- 添加管理员用户管理功能包含角色权限控制

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 11:36:45 +08:00