IanShaw027
d08757ce9e
refactor(admin): remove auth migration reports
2026-04-21 17:34:18 +08:00
IanShaw027
030da8c2f6
fix: close admin settings review gaps
2026-04-21 00:41:29 +08:00
knowsky404
58c0f57647
fix(sidebar): prevent version dropdown clipping in expanded brand
2026-04-14 09:27:02 +08:00
qingyuzhang
c520de11de
Merge branch 'main' of github.com:Wei-Shaw/sub2api into qingyu/fix-smooth-sidebar-collapse
...
# Conflicts:
# frontend/src/components/layout/AppSidebar.vue
2026-04-12 06:04:34 +08:00
erio
fa833f7684
Merge remote-tracking branch 'upstream/main' into feat/payment-system-v2
...
# Conflicts:
# frontend/src/api/admin/settings.ts
# frontend/src/stores/app.ts
# frontend/src/types/index.ts
# frontend/src/views/admin/SettingsView.vue
2026-04-11 18:25:06 +08:00
erio
e1547d7835
fix(payment): resolve PR audit issues
...
- Add payment navigation to AppSidebar (user orders + admin payment menu group with collapse)
- Add 5 missing nav i18n keys (myOrders, orderManagement, paymentDashboard, paymentConfig, paymentPlans)
- Renumber payment migrations 090-100 → 092-102 to avoid conflict with upstream 090/091
- Remove non-payment sora_client_enabled change, restore upstream purchase_subscription fields
- Remove extra 'data' from SettingsTab type union
2026-04-11 13:16:35 +08:00
IanShaw027
f480e57344
fix: align table defaults and preserve sidebar svg colors
2026-04-10 18:27:53 +08:00
qingyuzhang
07d2add674
fix(sidebar): smooth collapse transitions
2026-04-10 05:16:20 +08:00
shaw
a07296770c
fix: remove remaining Sora references from frontend
...
The previous Sora removal missed several frontend references, causing
TypeScript build errors for sora_client_enabled and a missing SoraView.vue
import. Clean up all remaining Sora code from types, router, sidebar,
settings, store, and accounts API.
2026-04-05 21:26:47 +08:00
erio
91c9b8d062
feat(channel): 渠道管理系统 — 多模式定价 + 统一计费解析
...
Cherry-picked from release/custom-0.1.106: a9117600
2026-04-04 11:00:55 +08:00
shaw
616930f9d3
refactor(frontend): 将备份和数据管理页面合并为设置页的标签页
...
将独立的 /admin/backup 和 /admin/data-management 页面整合到设置页,
作为「备份」和「Sora 存储」标签页,减少侧边栏条目,集中管理配置。
- 移除 BackupView 和 DataManagementView 的 AppLayout 包装
- 在 SettingsView 中以子组件形式嵌入,使用 v-show 切换标签
- 删除独立路由和侧边栏菜单入口
- 备份/数据标签页下隐藏主保存按钮(各自有独立保存)
- 优化标签栏样式适配7个标签,PC端支持细滚动条
- 清理未使用的图标组件和 i18n 键
2026-03-14 20:22:39 +08:00
Wesley Liddick
aa4e37d085
Merge pull request #966 from GuangYiDing/feat/db-backup-restore
...
feat: 数据库定时备份与恢复(S3 兼容存储,支持 Cloudflare R2)
2026-03-14 18:58:56 +08:00
Rose Ding
53ad1645cf
feat: 数据库定时备份与恢复(S3 兼容存储,支持 Cloudflare R2)
...
新增管理员专属的数据库备份与恢复功能:
- 全量 PostgreSQL 备份(pg_dump),gzip 压缩后上传到 S3 兼容存储
- 支持手动备份和 cron 定时备份
- 支持从备份恢复(psql --single-transaction)
- 备份文件自动过期清理(默认 14 天)
- 前端完整管理页面(S3 配置、定时配置、备份列表、恢复/下载/删除)
- 内置 Cloudflare R2 配置教程弹窗
- Dockerfile 从 postgres 镜像多阶段复制 pg_dump/psql,确保版本一致
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-13 10:38:19 +08:00
John Doe
6826149a8f
feat: add Backend Mode toggle to disable user self-service
...
Add a system-wide "Backend Mode" that disables user self-registration
and self-service while keeping admin panel and API gateway fully
functional. When enabled, only admin can log in; all user-facing
routes return 403.
Backend:
- New setting key `backend_mode_enabled` with atomic cached reads (60s TTL)
- BackendModeUserGuard middleware blocks non-admin authenticated routes
- BackendModeAuthGuard middleware blocks registration/password-reset auth routes
- Login/Login2FA/RefreshToken handlers reject non-admin when enabled
- TokenPairWithUser struct for role-aware token refresh
- 20 unit tests (middleware + service layer)
Frontend:
- Router guards redirect unauthenticated users to /login
- Admin toggle in Settings page
- Login page hides register link and footer in backend mode
- 9 unit tests for router guard logic
- i18n support (en/zh)
27 files changed, 833 insertions(+), 17 deletions(-)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 02:42:57 +03:00
shaw
742e73c9c2
fix: 优化充值/订阅菜单的icon
2026-03-04 17:24:09 +08:00
shaw
46ea9170cb
fix: 修复自定义菜单页面管理员视角菜单不生效问题
2026-03-04 10:44:28 +08:00
erio
bf6fe5e962
fix: custom menu security hardening and code quality improvements
...
- Add admin menu permission check in CustomPageView (visibility + role)
- Sanitize SVG content with DOMPurify before v-html rendering (XSS prevention)
- Decouple router.go from dto package using anonymous struct
- Consolidate duplicate parseCustomMenuItems into dto.ParseCustomMenuItems
- Enhance menu item validation (count, length, ID uniqueness limits)
- Add audit logging for purchase_subscription and custom_menu_items changes
- Update API contract test to include custom_menu_items field
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 06:23:56 +08:00
erio
1f95524996
feat: ImageUpload component, custom page title, sidebar menu order
2026-03-03 06:20:10 +08:00
erio
067810fa98
feat: custom menu pages with iframe embedding and CSP injection
...
Add configurable custom menu items that appear in sidebar, each rendering
an iframe-embedded external page. Includes shared URL builder with
src_host/src_url tracking, CSP frame-src multi-origin deduplication,
admin settings UI, and i18n support.
chore: bump version to 0.1.87.19
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 06:18:20 +08:00
erio
997cd1e332
docs+ui: add bilingual payment integration doc and rename purchase entry to recharge/subscription
2026-03-01 01:53:14 +08:00
yangjianbo
bb664d9bbf
feat(sync): full code sync from release
2026-02-28 15:01:20 +08:00
wucm667
d1cd5c0a73
Update frontend/src/components/layout/AppSidebar.vue
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-13 10:29:26 +08:00
wucm667
5429c74c10
fix: 修复侧边栏 Logo 加载时的闪烁问题
...
- 添加 settingsLoaded 条件判断,确保公共设置加载完成后再显示 Logo
- 避免在设置未加载时显示默认 Logo 造成的闪烁效果
2026-02-13 10:21:17 +08:00
shaw
bbdc8663d3
feat: 重新设计公告系统为Header铃铛通知
...
- 新增 AnnouncementBell 组件,支持 Modal 弹窗和 Markdown 渲染
- 移除 Dashboard 横幅和独立公告页面
- 铃铛位置在 Header 文档按钮左侧,显示未读红点
- 支持点击查看详情、标记已读、全部已读等操作
- 完善国际化,移除所有硬编码中文
- 修复 AnnouncementTargetingEditor watch 循环问题
2026-02-02 15:15:39 +08:00
ducky
b7f69844e1
feat(announcements): add admin/user announcement system
...
Implements announcements end-to-end (admin CRUD + read status, user list + mark read) with OR-of-AND targeting. Also breaks the ent<->service import cycle by moving schema-facing constants/targeting into a new domain package.
2026-01-30 16:45:04 +08:00
ducky
04a509d45e
feat(purchase): 增加购买订阅 iframe 页面与配置
...
- 新增 /purchase 页面(iframe + 新窗口兜底)
- 管理员系统设置可配置开关与URL
- 非 simple mode 才在侧边栏展示入口
2026-01-28 13:54:32 +08:00
IanShaw027
645609d441
merge: 正确合并 main 分支改动
...
合并 origin/main 最新改动,正确保留所有配置:
- Ops 运维监控配置和功能
- LinuxDo Connect OAuth 配置
- Update 在线更新配置
- 优惠码功能
- 其他 main 分支新功能
修复之前合并时错误删除 LinuxDo 和 Update 配置的问题。
2026-01-11 11:41:10 +08:00
long
d2fc14fb97
feat: 实现注册优惠码功能
...
- 支持创建/编辑/删除优惠码,设置赠送金额和使用限制
- 注册页面实时验证优惠码并显示赠送金额
- 支持 URL 参数自动填充 (?promo=CODE)
- 添加优惠码验证接口速率限制
- 使用数据库行锁防止并发超限
- 新增后台优惠码管理页面,支持复制注册链接
2026-01-10 13:14:35 +08:00
IanShaw027
8ae75e7f6e
feat(前端UI): 实现运维监控前端界面
...
- 新增帮助提示组件(HelpTooltip.vue)
- 更新侧边栏添加 ops 监控菜单项
- 扩展设置视图集成 ops 配置面板
- 新增 ops 监控视图目录(dashboard, alerts, realtime, settings 等)
2026-01-09 21:00:04 +08:00
IanShaw027
dd247e55e9
feat(frontend): 实现新手引导功能
...
- 添加 Guide 组件和引导步骤配置
- 实现 useOnboardingTour 和 useTourStepDescription composables
- 添加 onboarding store 管理引导状态
- 更新多个视图和组件以支持引导功能
- 添加国际化支持(中英文)
- 删除旧的实现指南文档
2025-12-29 15:43:24 +08:00
shaw
1f5ced7069
fix(frontend): resolve TypeScript errors in simple mode implementation
...
- Remove unused simpleMode variable in AppSidebar.vue
- Add run_mode to AuthResponse.user type definition
2025-12-29 08:51:57 +08:00
IanShaw027
2a70870469
fix(简易模式): 统一前端状态管理,修复路由守卫失效问题
...
**问题**:
1. login/register 未处理 run_mode,导致 authStore.runMode 不更新
2. 侧边栏使用 simpleMode.value,与路由守卫的 authStore.isSimpleMode 不一致
**修复**:
1. 在 login() 和 register() 中提取并设置 run_mode
2. 统一侧边栏使用 authStore.isSimpleMode
**影响**:
- 路由守卫现在可以正确工作
- 前端UI状态与后端配置保持一致
- 登录/注册后立即生效,无需刷新
2025-12-29 03:46:47 +08:00
IanShaw027
ecfad788d9
feat(全栈): 实现简易模式核心功能
...
**功能概述**:
实现简易模式(Simple Mode),为个人用户和小团队提供简化的使用体验,隐藏复杂的分组、订阅、配额等概念。
**后端改动**:
1. 配置系统
- 新增 run_mode 配置项(standard/simple)
- 支持环境变量 RUN_MODE
- 默认值为 standard
2. 数据库初始化
- 自动创建3个默认分组:anthropic-default、openai-default、gemini-default
- 默认分组配置:无并发限制、active状态、非独占
- 幂等性保证:重复启动不会重复创建
3. 账号管理
- 创建账号时自动绑定对应平台的默认分组
- 如果未指定分组,自动查找并绑定默认分组
**前端改动**:
1. 状态管理
- authStore 新增 isSimpleMode 计算属性
- 从后端API获取并同步运行模式
2. UI隐藏
- 侧边栏:隐藏分组管理、订阅管理、兑换码菜单
- 账号管理页面:隐藏分组列
- 创建/编辑账号对话框:隐藏分组选择器
3. 路由守卫
- 限制访问分组、订阅、兑换码相关页面
- 访问受限页面时自动重定向到仪表板
**配置示例**:
```yaml
run_mode: simple
run_mode: standard
```
**影响范围**:
- 后端:配置、数据库迁移、账号服务
- 前端:认证状态、路由、UI组件
- 部署:配置文件示例
**兼容性**:
- 简易模式和标准模式可无缝切换
- 不需要数据迁移
- 现有数据不受影响
2025-12-29 03:24:15 +08:00
shaw
7d4b7deea9
feat: 添加简单模式功能
...
新增简单模式设置,适合个人使用场景:
- 隐藏多用户管理相关菜单(用户管理、兑换码等)
- 自动关闭用户注册功能
- 管理员并发数自动设为无限制(99999)
- 侧边栏根据模式动态调整菜单项
同时优化分组页面的"专属分组"功能,添加帮助提示说明使用场景
2025-12-28 22:19:18 +08:00
ianshaw
5deef27e1d
style(frontend): 优化 Components 代码风格和结构
...
- 统一移除语句末尾分号,规范代码格式
- 优化组件类型定义和 props 声明
- 改进组件文档和示例代码
- 提升代码可读性和一致性
2025-12-26 00:10:01 -08:00
shaw
22414326cc
fix: 修复前端切换页面时logo跟标题闪烁的问题
2025-12-19 22:33:36 +08:00
dexcoder6
406d3f3cab
fix(frontend): 修复移动端菜单栏和使用记录页面 UI 问题
...
- 修复移动端无法打开菜单栏的问题
- 在 app.ts 中添加 mobileOpen 状态管理
- 修复 AppHeader.vue 中移动端菜单按钮调用错误的方法
- 修复 AppSidebar.vue 使用本地 ref 而非全局状态的问题
- 添加移动端菜单自动关闭功能
- 点击菜单项后自动关闭侧边栏
- 添加 150ms 延迟以显示关闭动画
- 修复使用记录页面总消费卡片溢出问题
- 调整总消费卡片布局,将删除线价格移至说明行
- 添加 min-w-0 flex-1 防止内容溢出
- 保持与其他卡片高度一致
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-19 15:55:42 +08:00
shaw
642842c29e
First commit
2025-12-18 13:50:39 +08:00