fix: handle optional user_group_ratio in LogsTable and render helper
Some checks failed
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
Publish Docker image (arm64) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled

This commit is contained in:
CaIon 2025-04-26 15:59:49 +08:00
parent 1ab9892090
commit 9246dd2070
2 changed files with 2 additions and 3 deletions

View File

@ -920,7 +920,6 @@ const LogsTable = () => {
other.completion_ratio,
other.model_price,
other.group_ratio,
other.user_group_ratio,
other.cache_ratio || 1.0,
other.cache_creation_ratio || 1.0,
)
@ -929,7 +928,7 @@ const LogsTable = () => {
other.completion_ratio,
other.model_price,
other.group_ratio,
other.user_group_ratio,
other?.user_group_ratio,
),
});
}

View File

@ -448,8 +448,8 @@ export function renderLogContent(
user_group_ratio,
image = false,
imageRatio = 1.0,
useUserGroupRatio = undefined
) {
const useUserGroupRatio = isValidGroupRatio(user_group_ratio);
const ratioLabel = useUserGroupRatio ? i18next.t('专属倍率') : i18next.t('分组倍率');
const ratio = useUserGroupRatio ? user_group_ratio : groupRatio;