diff --git a/src/pages/index/DutyInfo.tsx b/src/pages/index/DutyInfo.tsx index a564e42..bba7fa5 100644 --- a/src/pages/index/DutyInfo.tsx +++ b/src/pages/index/DutyInfo.tsx @@ -124,7 +124,13 @@ export class DutyInfo extends Component { moment(data.otherDutyEnd).format('H:mm') : id.currentDutyText(data.currentDuty || 'off'), }, - { title: id.inDutyCnt(data.inDutyCnt as number) }, + { + title: id.inDutyCnt( + data.inDutyCnt === 0 + ? pt.get().common.zeroMemberOnDuty + : data.inDutyCnt.toString(), + ), + }, ]} /> diff --git a/src/plain-text/MainPage.ts b/src/plain-text/MainPage.ts index 6b54143..275e182 100644 --- a/src/plain-text/MainPage.ts +++ b/src/plain-text/MainPage.ts @@ -36,7 +36,7 @@ export interface MainPageText { inDuty: { title: string; currentDutyText: (c: 'off' | '0' | '1' | '2' | '3' | 'others') => string; - inDutyCnt: (n: number) => string; + inDutyCnt: (n: string) => string; }; }; } diff --git a/src/plain-text/common.ts b/src/plain-text/common.ts index a3df5be..47fa3ee 100644 --- a/src/plain-text/common.ts +++ b/src/plain-text/common.ts @@ -5,6 +5,7 @@ export interface CommonText { offDutyReason: string; place: string; dutyRecoverTime: string; + zeroMemberOnDuty: string; } export const commonTextZhCn: CommonText = { @@ -14,6 +15,7 @@ export const commonTextZhCn: CommonText = { offDutyReason: '正常值班下班', place: '204', dutyRecoverTime: '明天 13:30', + zeroMemberOnDuty: '待更新', }; export const commonTextEnUs: CommonText = { @@ -23,4 +25,5 @@ export const commonTextEnUs: CommonText = { offDutyReason: 'Normal Shift', place: 'E3-204', dutyRecoverTime: 'Tomorrow 13:30', + zeroMemberOnDuty: 'Wait for update', };