Commit Graph

122 Commits

Author SHA1 Message Date
Xyfacai
416a357c34 Merge pull request #1291 from feitianbubu/pr/add-origin-kling-api
feat: add origin kling api
2025-06-27 16:08:03 +08:00
CaIon
04d525e317 🚀 feat(auth): support new model API paths in authentication and routing
- Updated TokenAuth middleware to handle requests for both `/v1beta/models/` and `/v1/models/`.
- Adjusted distributor middleware to recognize the new model path.
- Enhanced relay mode determination to include the new model path.
- Added route for handling POST requests to `/models/*path`.

These changes ensure compatibility with the new model API structure, improving the overall routing and authentication flow.
2025-06-25 00:19:38 +08:00
skynono
34693e338f feat: add origin kling api 2025-06-23 22:36:23 +08:00
t0ng7u
1ad9c97d7c 🗑️ feat(token): implement batch token deletion API & front-end integration
• Back-end
  • model/token.go
    • Add `BatchDeleteTokens(ids []int, userId int)` – transactional DB removal + async Redis cache cleanup.
  • controller/token.go
    • Introduce `TokenBatch` DTO and `DeleteTokenBatch` handler calling the model layer; returns amount deleted.
  • router/api-router.go
    • Register `POST /api/token/batch` route (user-scoped).

• Front-end (TokensTable.js)
  • Replace per-token deletion loops with single request to `/api/token/batch`.
  • Display dynamic i18n message: “Deleted {{count}} tokens!”.
  • Add modal confirmation:
    • Title “Batch delete token”.
    • Content “Are you sure you want to delete the selected {{count}} tokens?”.
  • UI/UX tweaks
    • Responsive button group (flex-wrap, mobile line-break).
    • Clear `selectedKeys` after refresh / successful deletion to avoid ghost selections.

• i18n
  • Ensure placeholder style matches translation keys (`{{count}}`).

This commit delivers efficient, scalable token management and an improved user experience across devices.
2025-06-22 16:35:30 +08:00
Calcium-Ion
c74a86d14d Merge pull request #1267 from t0ng7u/feature/upstream-ratio-sync
🔄 feat(ratio-sync): introduce upstream ratio synchronisation feature #1220
2025-06-20 16:22:00 +08:00
skynono
d7ed0214ad feat: add video channel kling 2025-06-19 11:53:42 +08:00
Apple\Apple
8748425aa2 🚀 feat(ratio-sync): major refactor & UX overhaul for Upstream Ratio Sync 2025-06-19 08:57:34 +08:00
Apple\Apple
bccb87fef3 feat: Add controller/console_migrate.go providing /api/option/migrate_console_setting endpoint for one-off data migration. 2025-06-14 01:05:09 +08:00
Apple\Apple
f5e3617cf7 🎫 feat: Enhance redemption code expiry handling & improve UI responsiveness
Backend
• Introduced `validateExpiredTime` helper in `controller/redemption.go`; reused in both Add & Update endpoints to enforce “expiry time must not be earlier than now”, eliminating duplicated checks
• Removed `RedemptionCodeStatusExpired` constant and all related references – expiry is now determined exclusively by the `expired_time` field for simpler, safer state management
• Simplified `DeleteInvalidRedemptions`: deletes codes that are `used` / `disabled` or `enabled` but already expired, without relying on extra status codes
• Controller no longer mutates `status` when listing or fetching redemption codes; clients derive expiry status from timestamp

Frontend
• Added reusable `isExpired` helper in `RedemptionsTable.js`; leveraged for:
  – status rendering (orange “Expired” tag)
  – action-menu enable/disable logic
  – row styling
• Removed duplicated inline expiry logic, improving readability and performance
• Adjusted toolbar layout: on small screens the “Clear invalid codes” button now wraps onto its own line, while “Add” & “Copy” remain grouped

Result
The codebase is now more maintainable, secure, and performant with no redundant constants, centralized validation, and cleaner UI behaviour across devices.
2025-06-13 20:51:20 +08:00
Apple\Apple
5f4d6648f7 ⏱️ feat: implement uptime monitoring
Introduce application uptime monitoring to improve observability and reliability.

• Add UptimeService to track process start time and expose uptime in seconds
• Create /health/uptime endpoint returning the current uptime in JSON format
• Integrate uptime metric into existing health-check middleware
• Update README with instructions for consuming the new endpoint
• Add unit tests covering UptimeService and new health route

This change enables operations teams and dashboards to programmatically
determine how long the service has been running, facilitating automated
alerts and trend analysis.
2025-06-11 02:28:36 +08:00
CaIon
ad4d3efd2e feat(middleware): add HTTP statistics middleware 2025-06-10 19:29:32 +08:00
RedwindA
c4f664f376 🎨 feat(channel): add endpoint to retrieve models by tag 2025-06-08 01:16:27 +08:00
creamlike1024
75d859dce2 gemini text generation 2025-05-26 13:34:41 +08:00
creamlike1024
8ea4c76f2b feat: support /v1/responses API 2025-05-02 13:59:46 +08:00
xyfacai
873ebcf0c7 feat: support /images/edit
(cherry picked from commit 1c0a1238787d490f02dd9269b616580a16604180)
2025-04-26 15:44:56 +08:00
CaIon
f33ebc8e2c feat: Implement system setup functionality 2025-04-03 18:57:15 +08:00
1808837298@qq.com
78fc3a191c feat: claude relay 2025-03-12 21:31:46 +08:00
wzxjohn
bdb1a2fcb9 feat: add oidc support 2025-03-11 15:52:03 +08:00
1808837298@qq.com
0aa30ed3f6 feat: Add new model management features
- Implement `/api/channel/models_enabled` endpoint to retrieve enabled models
- Add `EnabledListModels` handler in controller
- Create new `ModelRatioNotSetEditor` component for managing unset model ratios
- Update router to include new models_enabled route
- Add internationalization support for new model management UI
- Include GPT-4.5 preview model in OpenAI model list
2025-02-28 21:13:30 +08:00
1808837298@qq.com
1763145fea feat: Add model request rate limiting functionality 2025-02-24 16:20:55 +08:00
1808837298@qq.com
0fcd243f56 feat: Add user notification settings with quota warning and multiple notification methods
- Implement user notification settings with email and webhook options
- Add new user settings for quota warning threshold and notification preferences
- Create backend API and database support for user notification configuration
- Enhance frontend personal settings with notification configuration UI
- Support custom notification email and webhook URL
- Add service layer for sending user notifications
2025-02-18 14:54:21 +08:00
CalciumIon
fe944b3c8d fix: oauth bind 2024-12-27 18:32:11 +08:00
CalciumIon
fe29ca04d5 feat: Implement batch tagging functionality for channels
- Added a new endpoint to batch set tags for multiple channels, allowing users to update tags efficiently.
- Introduced a new `BatchSetChannelTag` function in the controller to handle incoming requests and validate parameters.
- Updated the `BatchSetChannelTag` method in the model to manage database transactions and ensure data integrity during tag updates.
- Enhanced the ChannelsTable component in the frontend to support batch tag setting, including UI elements for user interaction.
- Updated localization files to include new translation keys related to batch operations and tag settings.
2024-12-25 14:19:00 +08:00
CalciumIon
b46efdc8c2 feat: Add FetchModels endpoint and refactor FetchUpstreamModels
- Introduced a new `FetchModels` endpoint to retrieve model IDs from a specified base URL and API key, enhancing flexibility for different channel types.
- Refactored `FetchUpstreamModels` to simplify base URL handling and improve error messages during response parsing.
- Updated API routes to include the new endpoint and adjusted the frontend to utilize the new fetch mechanism for model lists.
- Removed outdated checks for channel type in the frontend, streamlining the model fetching process.
2024-12-24 18:02:08 +08:00
CalciumIon
270857e370 feat: support br 2024-12-04 23:53:02 +08:00
CalciumIon
407d03a0ba feat: support gzip 2024-12-04 23:24:46 +08:00
CalciumIon
325de98738 feat: 渠道标签分组 2024-11-19 01:13:18 +08:00
seefs001
12de1faca9 feat: integrate Linux DO OAuth authentication 2024-11-10 23:56:22 +08:00
1808837298@qq.com
698b6ed7d7 Update dto
(cherry picked from commit 030187ff75c64c40017cda2fa98ef2b3c01f0bd5)
2024-11-05 19:23:56 +08:00
1808837298@qq.com
347cbf63bb fix: 修复用户可选分组不能选择用户分组 (close #528) 2024-10-14 16:22:22 +08:00
1808837298@qq.com
07fa9205cb feat: playground 2024-09-26 00:59:09 +08:00
CalciumIon
4a02eb1b7f feat: 令牌分组 2024-09-18 05:19:49 +08:00
kakingone
442a2f0f4d addupload 2024-07-31 15:48:51 +08:00
CalciumIon
c7ba4a245b feat: support cohere rerank 2024-07-06 17:09:22 +08:00
Xiangyuan Liu
05a4646b44 feat: suno api 支持
feat: 调试 suno

feat: 补充suno 文档
2024-06-13 10:35:48 +08:00
1808837298@qq.com
f723ff9ba0 feat: 增加重置模型倍率功能 (close #62) 2024-05-24 15:28:16 +08:00
bubu
35349a8f9a 添加同步上游模型列表按钮:添加提示以及支持已有渠道获取 2024-05-21 22:16:20 +08:00
CaIon
191fe6ea64 feat: 完善模型价格获取逻辑 2024-05-15 23:56:26 +08:00
CaIon
97acc9e5c4 feat: add pricing page 2024-05-13 23:02:35 +08:00
CaIon
e355c24725 feat: 填入相关模型 2024-05-12 19:07:33 +08:00
Xiangyuan Liu
d30187e24f feat: 支持 /mj-{mode} 路径 2024-03-29 16:48:50 +08:00
CaIon
da872880c1 fix: embed 2024-03-23 19:27:18 +08:00
CaIon
80695f3c05 feat: vite 2024-03-23 19:09:09 +08:00
CaIon
afa1748591 feat: support InsightFace (close #60) 2024-03-14 18:09:57 +08:00
CaIon
8a632b7825 feat: 兼容自定义变焦,完善modal操作 2024-03-14 16:42:37 +08:00
CaIon
62bca310e3 feat: support shorten 2024-03-13 17:46:34 +08:00
CaIon
259c7fcdb0 feat: 初步兼容midjourney-proxy-plus 2024-03-13 15:37:01 +08:00
1808837298@qq.com
5ddb37c12f feat: add "/api/status/test" 2024-03-04 19:32:59 +08:00
Ehco
9a97408b29 Merge branch 'main' into telegram-login 2024-03-03 19:42:06 +08:00
1808837298@qq.com
ad47a3376f fix: 修复添加和编辑渠道无可选择模型 2024-03-03 15:53:48 +08:00