Initial open-source release (MIT): image2api AI gateway
Full Go backend + Vue 3 frontend, OpenAI-compatible API, multi-provider account pools, billing/admin, Docker one-command deploy with auto HTTPS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Credit display helpers. Credits and model prices are stored server-side as
|
||||
// integer 积分 (points) — the single unit across the whole app. These helpers
|
||||
// only format for display; they do NOT convert units.
|
||||
/** Round to an integer 积分 value. */
|
||||
export function points(value) {
|
||||
return Math.round(Number(value || 0))
|
||||
}
|
||||
|
||||
/** "<n> 积分" label with thousands separators. */
|
||||
export function pointsLabel(value) {
|
||||
return points(value).toLocaleString('en-US') + ' 积分'
|
||||
}
|
||||
Reference in New Issue
Block a user