Backend
1. controller/channel.go
• Always hydrate `ChannelInfo` from DB in `UpdateChannel`, keeping `IsMultiKey` true so `MultiKeySize` is recalculated.
2. model/channel.go
• getKeys(): accept both newline-separated keys and JSON array (`[ {...}, {...} ]`).
• Update(): reuse new parser-logic to recalc `MultiKeySize`; prune stale indices in `MultiKeyStatusList`.
Frontend
1. pages/Channel/EditChannel.js
• `handleVertexUploadChange`
– Reset `vertexErroredNames` on every change so the “ignored files” prompt always re-appears.
– In single-key mode keep only the last file; in batch mode keep all valid files.
– Parse files, display “以下文件解析失败,已忽略:…”.
• Batch-toggle checkbox
– When switching from batch→single while multiple files are present, show a confirm dialog and retain only the first file (synchronises state, form and local caches).
• On opening the “new channel” side-sheet, clear `vertexErroredNames` to restore error prompts.
Result
• “已启用 x/x” count updates immediately after editing multi-key channels.
• Vertex-AI key upload works intuitively: proper error feedback, no duplicated files, and safe down-switch from batch to single mode.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| billing.go | Loading commit data... | |
| channel-billing.go | Loading commit data... | |
| channel-test.go | Loading commit data... | |
| channel.go | Loading commit data... | |
| console_migrate.go | Loading commit data... | |
| github.go | Loading commit data... | |
| group.go | Loading commit data... | |
| image.go | Loading commit data... | |
| linuxdo.go | Loading commit data... | |
| log.go | Loading commit data... | |
| midjourney.go | Loading commit data... | |
| misc.go | Loading commit data... | |
| model.go | Loading commit data... | |
| oidc.go | Loading commit data... | |
| option.go | Loading commit data... | |
| playground.go | Loading commit data... | |
| pricing.go | Loading commit data... | |
| ratio_config.go | Loading commit data... | |
| ratio_sync.go | Loading commit data... | |
| redemption.go | Loading commit data... | |
| relay.go | Loading commit data... | |
| setup.go | Loading commit data... | |
| task.go | Loading commit data... | |
| task_video.go | Loading commit data... | |
| telegram.go | Loading commit data... | |
| token.go | Loading commit data... | |
| topup.go | Loading commit data... | |
| uptime_kuma.go | Loading commit data... | |
| usedata.go | Loading commit data... | |
| user.go | Loading commit data... | |
| wechat.go | Loading commit data... |