补齐泥点余额视图与时间格式化的兜底
resolveProfileMudPointBalanceView 为 dailyFreeResetPoints 补 ?? 0,避免界面显示 NaN formatBeijingDateTime 改用 hourCycle: 'h23',保证午夜稳定输出 00:00 而非 24:00 Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -19,6 +19,7 @@ export function resolveProfileMudPointBalanceView(
|
||||
return {
|
||||
...balance,
|
||||
dailyFreePoints: balance.dailyFreePoints ?? 0,
|
||||
dailyFreeResetPoints: balance.dailyFreeResetPoints ?? 0,
|
||||
monthlyPoints: balance.monthlyPoints ?? 0,
|
||||
permanentPoints: balance.permanentPoints ?? 0,
|
||||
totalPoints:
|
||||
@@ -63,7 +64,7 @@ export function formatMudPointResetAt(
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
hour12: false,
|
||||
hourCycle: 'h23',
|
||||
}).formatToParts(parsed);
|
||||
const lookup = (type: Intl.DateTimeFormatPartTypes) =>
|
||||
parts.find((part) => part.type === type)?.value ?? '00';
|
||||
|
||||
Reference in New Issue
Block a user