fix: handle optional user_group_ratio in LogsTable and render helper

This commit is contained in:
CaIon
2025-04-26 15:59:49 +08:00
parent a03c615fa4
commit 58101328c5
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;