- Added Server Configuration settings page (backend + frontend) - Added .env config download/import API - Runtime config updates via UI - Support for all 3 themes (default, air, berry) - i18n support (zh/en)
15 lines
292 B
Go
15 lines
292 B
Go
package common
|
||
|
||
import (
|
||
"fmt"
|
||
"github.com/songquanpeng/one-api/common/config"
|
||
)
|
||
|
||
func LogQuota(quota int64) string {
|
||
if config.DisplayInCurrencyEnabled {
|
||
return fmt.Sprintf("$%.6f 额度", float64(quota)/config.QuotaPerUnit)
|
||
} else {
|
||
return fmt.Sprintf("%d 点额度", quota)
|
||
}
|
||
}
|