Commit Graph

1168 Commits

Author SHA1 Message Date
CaIon
c87deaa7d9 feat(token): add cross-group retry option for token processing 2025-12-12 17:59:21 +08:00
Seefs
10543789d7 Merge pull request #2314 from seefs001/fix/i18n-missing
fix(i18n): fill missing translations in i18n.
2025-11-30 16:31:52 +08:00
Calcium-Ion
d5777de96b fix: edit vertex key type (#2311) 2025-11-30 16:21:49 +08:00
Calcium-Ion
21a0b5b021 Merge pull request #2312 from ImogeneOctaviap794/feat/enhance-playground-debugging
feat(playground): enhance SSE debugging and add image paste support with i18n
2025-11-30 16:20:39 +08:00
feitianbubu
e898e6aff3 feat: all video preview use videos/:id/content 2025-11-28 13:11:31 +08:00
ImogeneOctaviap794
c2053a7f43 feat(playground): enhance SSE debugging and add image paste support with i18n
- Add SSEViewer component for interactive SSE message inspection
  * Display SSE data stream with collapsible panels
  * Show parsed JSON with syntax highlighting
  * Display key information badges (content, tokens, finish reason)
  * Support copy individual or all SSE messages
  * Show error messages with detailed information

- Support Ctrl+V to paste images in chat input
  * Enable image paste in CustomInputRender component
  * Auto-detect and add pasted images to image list
  * Show toast notifications for paste results

- Add complete i18n support for 6 languages
  * Chinese (zh): Complete translations
  * English (en): Complete translations
  * Japanese (ja): Add 28 new translations
  * French (fr): Add 28 new translations
  * Russian (ru): Add 28 new translations
  * Vietnamese (vi): Add 32 new translations

- Update .gitignore to exclude data directory
2025-11-26 20:40:32 +08:00
Seefs
a3796b90d1 fix: edit vertex key type 2025-11-26 18:12:36 +08:00
Calcium-Ion
6a1cb9ebd5 Merge pull request #2277 from seefs001/feature/model_list_fetch
feat: 二次确认添加重定向前模型 && 重定向后模式视为已有模型
2025-11-23 23:51:11 +08:00
Seefs
e39ee1342f Merge pull request #1706 from StageDog/feat/discord_oauth
feat: 关联 discord 账号
2025-11-23 18:54:55 +08:00
Seefs
3fc9182dd4 feat: 重定向后的模型视为已有的模型,附带特殊提示 2025-11-22 19:34:36 +08:00
Seefs
d6939d2f64 feat: 二次确认添加重定向前模型 2025-11-22 19:23:27 +08:00
StageDog
cf8d4e874d feat: 针对 discord 登录配置使用新版设置方案 2025-11-22 19:06:53 +08:00
StageDog
352801cd35 feat: 关联 discord 账号 2025-11-22 18:38:24 +08:00
Chokiproai
eef08e5b3e add Vietnamese language support 2025-11-21 10:40:14 +07:00
Seefs
b0f8ef5764 fix: optimized the GitHub login copy and timeout. 2025-11-19 14:34:30 +08:00
Seefs
1381666586 Merge pull request #2238 from seefs001/feature/doubao-coding-plan
feat: support doubao coding plan
2025-11-16 23:49:35 +08:00
Seefs
fd55ba7f2c feat: ShouldPreserveThinkingSuffix (#2189) 2025-11-07 17:43:33 +08:00
Seefs
6198b0eae8 Merge pull request #2156 from feitianbubu/pr/fix-tag-whitespace
fix: tag splitting by whitespace
2025-11-07 17:40:02 +08:00
Seefs
c390734cef feat: EditTagModal header && param (#2159) 2025-11-06 20:18:45 +08:00
zhaolion
2beda32a05 feat: EditTokenModal 中针对用户创建的 token 默认无限额度 2025-11-06 19:36:23 +08:00
Seefs
e1b9317531 feat: claude 1h cache (#2155)
* feat: claude 1h cache

* feat: claude 1h cache

* fix price
2025-11-04 00:20:50 +08:00
feitianbubu
a1f9a1c872 fix: tag splitting by whitespace 2025-11-03 18:48:49 +08:00
Calcium-Ion
1ab86bc9ab feat(language): add Japanese language support to LanguageSelector and i18n configuration (#2131) 2025-10-29 23:58:10 +08:00
Seefs
b26333b2cd Merge pull request #2121 from QuantumNous/feat/special_group
feat: add special user usable group setting
2025-10-29 18:54:51 +09:00
CaIon
6aec088693 feat: add special user usable group setting 2025-10-28 23:25:43 +08:00
Seefs
4ed5f1abb3 Merge pull request #1823 from littlewrite/feat_subscribe_sp1
新增 creem 支付
2025-10-28 18:37:32 +09:00
feitianbubu
0fafcdca69 feat: topUp show correct symbol 2025-10-27 17:45:53 +08:00
Little Write
dca9bac4a4 Merge branch 'main' into feat_subscribe_sp1 2025-10-20 22:36:33 +08:00
feitianbubu
4a6676ccd5 feat: add doubao audio token input prompt 2025-10-17 22:06:46 +08:00
CaIon
5bee54a11d refactor: update AWS key format in EditChannelModal for consistency 2025-10-15 17:38:21 +08:00
CaIon
59caea8f34 feat: support aws bedrock api-keys-use 2025-10-15 17:29:10 +08:00
CaIon
d43751f262 feat: support free model setting 2025-10-12 13:31:03 +08:00
Dmitriy Safonov
087248c2f9 feat: add French translation glossary for consistent terminology
Add comprehensive French translation glossary document to standardize key project terminology. The glossary includes translations for core concepts, model-related terms, user management, recharge & redemption, channel management, and security terms. This ensures consistency and accuracy in French translations across the project, with specific guidance on technical terms and contextual usage.
2025-10-11 08:16:13 +03:00
CaIon
b8f8329989 feat: add informational banner to proxy settings in SystemSetting.jsx 2025-10-10 16:44:41 +08:00
Calcium-Ion
2b39ae557c Merge pull request #1998 from seefs001/feature/pplx-channel
feat: pplx channel
2025-10-10 16:33:27 +08:00
Seefs
1d32327d04 feat: pplx channel 2025-10-10 16:12:15 +08:00
Seefs
56ffbd57b9 fix: legal setting 2025-10-10 13:18:26 +08:00
キュビビイ
b7725d7ae1 feat: add user agreement and privacy policy to login page 2025-10-09 22:21:56 +08:00
キュビビイ
0992f834da feat: componentize User Agreement and Privacy Policy display
Extracted the User Agreement and Privacy Policy presentation into a
reusable DocumentRenderer component (web/src/components/common/DocumentRenderer).
Unified rendering logic and i18n source for these documents, removed the
legacy contentDetector utility, and updated the related pages to use the
new component. Adjusted controller/backend (controller/misc.go) and locale
files to support the new rendering approach.

This improves reuse, maintainability, and future extensibility.
2025-10-08 11:12:49 +08:00
キュビビイ
00603520e9 feat(web): add settings & pages of privacy policy & user agreement 2025-10-08 10:43:47 +08:00
Apple\Apple
33aeaf7b4d ❤ fix(topup): prevent nil-pointer in Epay callback; reset page on search
Add early return when Epay client is missing in controller/topup.go to avoid panic
Introduce handleKeywordChange in TopupHistoryModal.jsx to reset page to 1 when keyword updates
Wire input onChange to new handler; minor UX improvement to avoid empty results on pagination mismatch
2025-10-07 14:13:14 +08:00
Apple\Apple
c7ab5c9a67 🔎 feat(topup): add order number search for billing history (admin and user)
Enable searching topup records by trade_no across both admin-wide and user-only views.

Frontend
- TopupHistoryModal.jsx:
  - Add search input with prefix icon (IconSearch) to filter by order number
  - Send `keyword` query param to backend; works with both endpoints:
    - Admin: GET /api/user/topup?p=1&page_size=10&keyword=...
    - User:  GET /api/user/topup/self?p=1&page_size=10&keyword=...
  - Keep endpoint auto-switching based on role (isAdmin)
  - Minor UI polish: outlined admin action button; keep Coins icon for amount

Backend
- model/topup.go:
  - Add SearchUserTopUps(userId, keyword, pageInfo)
  - Add SearchAllTopUps(keyword, pageInfo)
  - Both support pagination and `trade_no LIKE %keyword%` filtering (ordered by id desc)
- controller/topup.go:
  - GetUserTopUps / GetAllTopUps accept optional `keyword` and route to search functions when present

Routes
- No new endpoints; search is enabled via `keyword` on existing:
  - GET /api/user/topup
  - GET /api/user/topup/self

Affected files
- model/topup.go
- controller/topup.go
- web/src/components/topup/modals/TopupHistoryModal.jsx
2025-10-07 00:55:01 +08:00
Apple\Apple
01d18dcba8 feat(topup): Admin-wide topup listing and route reorganization
Allow administrators to view all platform topup orders and streamline admin-only routes.

Frontend
- TopupHistoryModal: dynamically switch endpoint by role
  - Admin → GET /api/user/topup (all orders)
  - Non-admin → GET /api/user/topup/self (own orders)
- Use shared utils `isAdmin()`; keep logic centralized and DRY
- Minor UI: set admin action button theme to outline for clarity

Backend
- model/topup.go: add GetAllTopUps(pageInfo) with pagination (ordered by id desc)
- controller/topup.go: add GetAllTopUps handler returning PageInfo response
- router/api-router.go:
  - Add admin route GET /api/user/topup (AdminAuth)
  - Move POST /api/user/topup/complete to adminRoute (keeps path stable, consolidates admin endpoints)

Security/Behavior
- Admin-only endpoints now reside under the admin route group with AdminAuth
- No behavior change for regular users; no schema changes

Affected files
- model/topup.go
- controller/topup.go
- router/api-router.go
- web/src/components/topup/modals/TopupHistoryModal.jsx
2025-10-07 00:46:47 +08:00
Apple\Apple
dec3a32397 feat: Add topup billing history with admin manual completion
Implement comprehensive topup billing system with user history viewing and admin management capabilities.

## Features Added

### Frontend
- Add topup history modal with paginated billing records
- Display order details: trade number, payment method, amount, money, status, create time
- Implement empty state with proper illustrations
- Add payment method column with localized display (Stripe, Alipay, WeChat)
- Add admin manual completion feature for pending orders
- Add Coins icon for recharge amount display
- Integrate "Bills" button in RechargeCard header
- Optimize code quality by using shared utility functions (isAdmin)
- Extract constants for status and payment method mappings
- Use React.useMemo for performance optimization

### Backend
- Create GET `/api/user/topup/self` endpoint for user topup history with pagination
- Create POST `/api/user/topup/complete` endpoint for admin manual order completion
- Add `payment_method` field to TopUp model for tracking payment types
- Implement `GetUserTopUps` method with proper pagination and ordering
- Implement `ManualCompleteTopUp` with transaction safety and row-level locking
- Add application-level mutex locks to prevent concurrent order processing
- Record payment method in Epay and Stripe payment flows
- Ensure idempotency and data consistency with proper error handling

### Internationalization
- Add i18n keys for Chinese (zh), English (en), and French (fr)
- Support for billing-related UI text and status messages

## Technical Improvements
- Use database transactions with FOR UPDATE row-level locking
- Implement sync.Map-based mutex for order-level concurrency control
- Proper error handling and user-friendly toast notifications
- Follow existing codebase patterns for empty states and modals
- Maintain code quality with extracted render functions and constants

## Files Changed
- Backend: controller/topup.go, controller/topup_stripe.go, model/topup.go, router/api-router.go
- Frontend: web/src/components/topup/modals/TopupHistoryModal.jsx (new), web/src/components/topup/RechargeCard.jsx, web/src/components/topup/index.jsx
- i18n: web/src/i18n/locales/{zh,en,fr}.json
2025-10-07 00:22:45 +08:00
Calcium-Ion
7f274f69e9 Merge pull request #1964 from bubblepipe/electron
feat: Add Electron wrapper for desktop app
2025-10-05 17:20:23 +08:00
CaIon
02c0cbcc6a feat: enhance Electron environment detection and improve database warnings 2025-10-05 16:45:29 +08:00
CaIon
9aaa0f4830 💱 feat: implement currency configuration helper and update currency display logic in RechargeCard and render functions 2025-10-03 21:49:24 +08:00
CaIon
3a7f42e5a1 💱 feat(RechargeCard): enhance currency display logic for top-up amounts based on user settings 2025-10-03 21:39:28 +08:00
Seefs
b65e271971 Merge branch 'main-upstream' into pr/custom-currency-1923
# Conflicts:
#	web/src/components/settings/personal/cards/AccountManagement.jsx
#	web/src/components/table/channels/modals/EditChannelModal.jsx
#	web/src/hooks/channels/useChannelsData.jsx
#	web/src/hooks/common/useSidebar.js
#	web/src/i18n/locales/fr.json
#	web/src/pages/Setting/Operation/SettingsGeneral.jsx
2025-10-02 20:30:48 +08:00
CaIon
48d649056c feat(api): add header override processing with variable support 2025-10-02 19:29:57 +08:00