Commit Graph

13 Commits

Author SHA1 Message Date
千羽
8a74bf5afe refactor: standardize code formatting and linting configuration
- Replace .eslintrc.js with .eslintrc.cjs for better ES module compatibility
- Add .prettierrc configuration for consistent code formatting
- Update package.json with new lint and format scripts
- Add nodemon.json for development hot reloading configuration
- Standardize code formatting across all JavaScript and Vue files
- Update web admin SPA with improved linting rules and formatting
- Add prettier configuration to web admin SPA

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-07 18:19:31 +09:00
shaw
414856f152 feat: 全新的Vue3管理后台(admin-spa)和路由重构
🎨 新增功能:
- 使用Vue3 + Vite构建的全新管理后台界面
- 支持Tab切换的API统计页面(统计查询/使用教程)
- 优雅的胶囊式Tab切换设计
- 同步了PR #106的会话窗口管理功能
- 完整的响应式设计和骨架屏加载状态

🔧 路由调整:
- 新版管理后台部署在 /admin-next/ 路径
- 将根路径 / 重定向到 /admin-next/api-stats
- 将 /web 页面路由重定向到新版,保留 /web/auth/* 认证路由
- 将 /apiStats 页面路由重定向到新版,保留API端点

🗑️ 清理工作:
- 删除旧版 web/admin/ 静态文件
- 删除旧版 web/apiStats/ 静态文件
- 清理相关的文件服务代码

🐛 修复问题:
- 修复重定向循环问题
- 修复环境变量配置
- 修复路由404错误
- 优化构建配置

🚀 生成方式:使用 Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 12:40:51 +08:00
KevinLiao
bdf125e001 fix: APIKey查询页面数据不正确的情况 2025-07-27 19:51:37 +08:00
KevinLiao
85a8cae5ab feat: 新增用户统计页面,并作为默认路由 2025-07-27 18:12:50 +08:00
KevinLiao
a04dd06be9 feat: 新增ApiKey查询页面 2025-07-27 17:38:12 +08:00
shaw
3eba158387 fix: 修复管理员登录在Redis缓存失效后无法登录的问题
- 在登录时如果Redis中没有管理员凭据,自动从init.json重新加载
- 重新加载时不设置过期时间,避免24小时后再次失效
- 保持init.json作为唯一真实数据源的设计原则

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 15:30:50 +08:00
shaw
11318c22b0 feat: 优化 Gemini OAuth 授权流程,使用固定的 localhost 回调地址
- 将 Gemini OAuth 回调地址固定为 http://localhost:45462
- 更新前端提示文字为"复制oauth后的链接"
- 实现自动提取 localhost:45462 链接中的 code 参数功能
- 删除不再需要的 web/auth_gemini 路由
- 添加详细的用户操作说明和错误处理提示
- 支持两种输入方式:完整链接或仅授权码

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 11:42:54 +08:00
shaw
38c1fc4785 feat: 添加多模型支持和OpenAI兼容接口
- 新增 Gemini 模型支持和账户管理功能
- 实现 OpenAI 格式到 Claude/Gemini 的请求转换
- 添加自动 token 刷新服务,支持提前刷新策略
- 增强 Web 管理界面,支持 Gemini 账户管理
- 优化 token 显示,添加掩码功能
- 完善日志记录和错误处理

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 10:17:39 +08:00
shaw
f5968e518e feat: 改进管理界面弹窗体验和滚动条美化
- 修复API Key创建/编辑弹窗和账户信息修改弹窗在低高度屏幕上被遮挡的问题
- 为所有弹窗添加自适应高度支持,最大高度限制为90vh
- 美化Claude账户弹窗的滚动条样式,使用紫蓝渐变色与主题保持一致
- 添加响应式适配,移动设备上弹窗高度调整为85vh
- 优化滚动条交互体验,支持悬停和激活状态

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 23:49:55 +08:00
shaw
11873ed78b fix: 统一管理员密码管理机制,以init.json为唯一数据源
- app.js: 每次启动强制从init.json加载管理员凭据到Redis,确保数据一致性
- web.js: 修改密码时先更新init.json,成功后再更新Redis缓存
- cli/index.js: CLI创建管理员时同时更新init.json和Redis
- setup.js: 优化提示信息,明确重置密码需要重启服务
- admin.js: 修复Claude账户专属绑定功能的验证逻辑

解决了之前存在的双重存储同步问题,现在init.json是唯一真实数据源。

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-17 20:57:31 +08:00
shaw
c16c6b63cf fix: 修复用户菜单显示问题和真实用户名显示
- 修复登录接口返回真实用户名而非输入用户名
- 新增获取当前用户信息的API接口(/web/auth/user)
- 修复前端用户名显示逻辑,页面初始化时获取真实用户名
- 提高下拉菜单z-index确保正确显示
- 解决用户名显示为Admin而非data/init.json中真实用户名的问题

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 17:26:02 +08:00
shaw
156bfa9b58 feat: 添加管理员账户信息修改功能
- 新增右上角用户菜单,包含修改账户信息和退出登录选项
- 实现修改用户名和密码功能,支持独立修改或同时修改
- 添加密码强度验证(最少8位)和确认密码验证
- 修改后自动退出登录,确保安全性
- 同步更新Redis和data/init.json文件,保持数据一致性
- 优化用户体验,提供实时反馈和错误提示

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 17:16:29 +08:00
shaw
b1ca3f307e first commit 2025-07-14 18:14:13 +08:00