shaw
9648c4323f
fix(frontend): resolve TS2352 type assertion error in API client
2026-04-12 18:06:40 +08:00
shaw
a1a283688c
chore: update sponsors
2026-04-12 17:19:44 +08:00
Wesley Liddick
82b840c16e
Merge pull request #1587 from tkpdx01/fix/anthropic-credit-balance-400
...
fix: handle Anthropic credit balance exhausted (400) as account error
2026-04-12 16:42:02 +08:00
Wesley Liddick
16126a2c9c
Merge pull request #1545 from Zqysl/qingyu/fix-smooth-sidebar-collapse
...
fix(sidebar): smooth sidebar collapse behavior
2026-04-12 16:36:00 +08:00
Wesley Liddick
9b7b3755fe
Merge pull request #1543 from IanShaw027/fix/messages-dispatch-i18n
...
fix(frontend): 补全 messages 调度国际化文案
2026-04-12 16:35:34 +08:00
Wesley Liddick
54490cf65e
Merge pull request #1576 from touwaeriol/feat/payment-docs
...
docs(payment): add built-in payment configuration guide and settings links
2026-04-12 16:34:53 +08:00
bot
cb016ad861
fix: handle Anthropic credit balance exhausted (400) as account error
...
When an Anthropic API key's credit balance is depleted, the upstream
returns HTTP 400 with message containing "credit balance". Previously,
the 400 handler only checked for "organization has been disabled",
so credit-exhausted accounts kept being scheduled — every request
returned the same error.
Treat this case identically to 402 (Payment Required): call
handleAuthError → SetError to stop scheduling the account until
an admin manually recovers it after topping up credits.
Closes #1586
2026-04-12 13:30:15 +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
1def627443
feat(settings): add EasyPay provider recommendation link below enabled providers
2026-04-11 21:13:46 +08:00
erio
64cee0b633
feat(settings): add payment config guide link in payment settings header
2026-04-11 21:13:28 +08:00
erio
24f95767b4
docs: align English ZPay referral description with Chinese version
2026-04-11 21:13:08 +08:00
erio
ed001d94da
docs: clarify ZPay referral code belongs to Sub2ApiPay author @touwaeriol
2026-04-11 21:13:07 +08:00
erio
f3e8e5e057
docs: show ZPay URL explicitly in parentheses
2026-04-11 21:13:07 +08:00
erio
3b0dc92952
docs: move ZPay recommendation to overview section
2026-04-11 21:12:47 +08:00
erio
1a686239ed
fix(docs): correct webhook paths and provider config in payment guide
...
- Fix webhook URLs: /payment/webhook/<provider> not /payment/<provider>/notify
- Remove notifyUrl/returnUrl from provider config tables (auto-generated by UI)
- Adjust wxpay publicKeyId/certSerial to match frontend optional marking
2026-04-11 21:11:19 +08:00
erio
c777fe5471
docs: add built-in payment configuration guide and update README
...
- Add docs/PAYMENT.md and docs/PAYMENT_CN.md with full payment setup guide
- Mark Sub2ApiPay as deprecated in ecosystem tables (payment is now built-in)
- Add built-in payment system to features list in all 3 READMEs
2026-04-11 21:10:55 +08:00
Wesley Liddick
97f14b7a08
Merge pull request #1572 from touwaeriol/feat/payment-system-v2
...
feat(payment): add complete payment system with multi-provider support
2026-04-11 19:07:31 +08:00
erio
6793503ed0
chore: remove sora_client_enabled residuals from frontend types and store
2026-04-11 19:02:25 +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
d67ecf893d
chore: remove all sora dead code and fork-specific sora_client_enabled
...
Upstream removed sora feature (090_drop_sora.sql) but left i18n keys
and wire.go references. Clean up:
- Remove entire sora i18n block from en.ts and zh.ts (~190 lines)
- Remove sora nav key and unused 'data' settings tab key
- Remove sora_client_enabled from settings (fork-specific)
- Remove SoraMediaCleanupService from wire.go
2026-04-11 18:15:24 +08:00
erio
faee59ee15
fix(payment): propagate reason/metadata in API error responses
...
The API client's error interceptor was dropping the reason and metadata
fields from backend error responses. This caused PaymentView to miss
specific error codes (TOO_MANY_PENDING, CANCEL_RATE_LIMITED) and fall
back to generic error messages.
2026-04-11 17:51:06 +08:00
erio
217b7ea68c
fix(deps): upgrade axios to 1.15.0 to fix GHSA-fvcv-3m26-pcqx
2026-04-11 16:46:46 +08:00
erio
a020fc52c9
fix(payment): pass expires_at for Stripe countdown timer
...
Stripe payment path was setting expiresAt to empty string, causing
PaymentStatusPanel to fall back to hardcoded 30-minute default when
the popup redirect switches to the waiting view.
2026-04-11 16:30:34 +08:00
Wesley Liddick
1ef3782dd4
Merge pull request #1538 from IanShaw027/fix/bug-cleanup-main
...
fix: 修复多个 UI 和功能问题 - 表格排序搜索、导出逻辑、分页配置和状态筛选
2026-04-11 16:29:55 +08:00
erio
7515590324
feat(payment): add H5/mobile payment support
...
Backend:
- Parse EasyPay `payurl2` field, prefer H5 link on mobile
- Add `device=mobile` to EasyPay submit.php (popup) mode
- Expand isMobile detection keywords (add ipad/ipod)
Frontend:
- Add `isMobileDevice()` utility (userAgentData + UA regex)
- Mobile + pay_url: direct redirect instead of QR/popup
- Popup blocked fallback: auto-redirect when window.open fails
- Stripe WeChat Pay: dynamic client param (mobile_web vs web)
2026-04-11 13:16:35 +08:00
erio
e3a000e0d4
refactor(payment): code standards fixes and regression repairs
...
Backend:
- Split payment_order.go (546→314 lines) into payment_order_lifecycle.go
- Replace magic strings with constants in factory, easypay, webhook handler
- Add rate limit/validity unit constants in payment_order_lifecycle, payment_service
- Fix critical regression: add PaymentEnabled to GetPublicSettings response
- Add missing migration 099_fix_migrated_purchase_menu_label_icon.sql
Frontend:
- Fix StripePopupView.vue: replace `as any` with typed interface, use extractApiErrorMessage
- Fix AdminOrderTable.vue: replace hardcoded column labels with i18n t() calls
- Fix SubscriptionsView.vue: replace hardcoded Today/Tomorrow with i18n
- Extract duplicate statusBadgeClass/canRefund/formatOrderDateTime to orderUtils.ts
- Add missing i18n keys: common.today, common.tomorrow, payment.orders.orderType/actions
- Remove dead PurchaseSubscriptionView.vue (replaced by PaymentView)
2026-04-11 13:16:35 +08:00
erio
27cd2f8e96
fix(payment): remove purchase_subscription fields replaced by payment system
...
The built-in payment system replaces the old external purchase subscription
iframe approach. Remove purchase_subscription_enabled/url from admin settings
interface and form defaults, as the Payment tab now handles this functionality.
Kept in stores/app.ts fallback to match backend DTO response structure.
2026-04-11 13:16:35 +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
erio
63d1860dc0
feat(payment): add complete payment system with multi-provider support
...
Add a full payment and subscription system supporting EasyPay (Alipay/WeChat),
Stripe, and direct Alipay/WeChat Pay providers with multi-instance load balancing.
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
IanShaw027
7dc7ff22d2
fix: preserve messages dispatch config in repository hydration
2026-04-10 18:13:18 +08:00
IanShaw027
67a05dfccd
fix: honor table defaults and preserve dispatch mappings
2026-04-10 17:55:37 +08:00
IanShaw027
b6bc042302
fix(frontend): 升级 axios 修复审计高危漏洞
2026-04-10 09:28:32 +08:00
IanShaw027
1312405966
fix(settings): 补齐公开设置中的表格分页字段返回
2026-04-10 09:18:48 +08:00
qingyuzhang
07d2add674
fix(sidebar): smooth collapse transitions
2026-04-10 05:16:20 +08:00
IanShaw027
57d0f9794f
fix(frontend): 补全 messages 调度国际化文案
2026-04-10 00:56:23 +08:00
IanShaw027
269c7a065c
fix(test): restore integration expectations
2026-04-09 22:08:42 +08:00
IanShaw027
b6946e78a2
fix(lint): restore repository sort helpers
2026-04-09 21:49:10 +08:00
IanShaw027
2b70d1d332
merge upstream main into fix/bug-cleanup-main
2026-04-09 21:35:48 +08:00
IanShaw027
b37afd68ec
fix(lint): format setting service
2026-04-09 21:31:48 +08:00
Wesley Liddick
00c08c574e
Merge pull request #1539 from warksu/fix/loadfactor-not-synced-to-scheduler-cache
...
fix: 同步 LoadFactor 到调度快照缓存
2026-04-09 21:15:40 +08:00
Wesley Liddick
bbc79796dc
Merge pull request #1529 from IanShaw027/feat/group-messages-dispatch-redo
...
feat: 为openai分组增加messages调度模型映射并支持instructions模板注入
2026-04-09 21:14:38 +08:00
Wesley Liddick
760cc7d6be
Merge pull request #1481 from alfadb/fix/increase-error-log-body-limit
...
fix(ops): 将错误日志请求体存储限制从 10KB 提升至 256KB
2026-04-09 21:14:13 +08:00
Wesley Liddick
9a72025afb
Merge pull request #1523 from octo-patch/fix/issue-1519-home-content-csp-frame-src
...
fix: include home_content URL in CSP frame-src origins
2026-04-09 21:13:46 +08:00
Wesley Liddick
74302f60ab
Merge pull request #1010 from Glorhop/pr/oidc-login
...
feat(auth): support OIDC login and prefer IdP real email on sign-in
2026-04-09 21:13:22 +08:00
IanShaw027
62962c05f1
fix(lint): 修复 CI 中的 ineffassign 和 unused 代码告警,修正 group 排序集成测试兼容性
2026-04-09 19:25:08 +08:00
swark2006
118ff85fbf
fix: 同步 LoadFactor 到调度快照缓存
...
LoadFactor 字段在构建调度快照缓存时缺失,导致调度算法
EffectiveLoadFactor() 无法使用配置的负载因子,回退到 Concurrency。
这会影响账号的负载率计算,进而影响调度优先级。
修复:在 buildSchedulerMetadataAccount 中添加 LoadFactor 字段。
2026-04-09 18:50:11 +08:00
IanShaw027
5f8e60a1b7
feat(table): 表格排序与搜索改为后端处理
2026-04-09 18:14:28 +08:00
IanShaw027
66e15a54a4
fix(export): 导出逻辑与当前筛选条件对齐
2026-04-09 18:14:28 +08:00
IanShaw027
ad80606a44
feat(settings): 增加全局表格分页配置,支持自定义
2026-04-09 18:14:28 +08:00