fix(ui): keep mobile onboarding and login usable
Independent Staging Quality Gate / validate (push) Failing after 12m37s
Independent Staging Quality Gate / publish (push) Has been skipped

Hide the dead composer during birth-time intake, replace internal
copy with user-facing hints, and keep short-screen login, location
search, and session history reachable on phones.
This commit is contained in:
Jesse_Chen
2026-08-17 11:41:35 +08:00
parent 7050f7ee17
commit bced1b9d57
9 changed files with 132 additions and 30 deletions
+11 -2
View File
@@ -83,8 +83,8 @@ export function formatBirthDate(value: Date): string {
}
export const birthTimeSourceOptions = [
{ value: "family_exact", label: "我知道准确出生时间", hint: "保存为初始化填报时间,不会自动标记为引擎确认" },
{ value: "period_only", label: "我不确定准确时间", hint: "告诉我们大致时段;完全不清楚也可以直接跳过" },
{ value: "family_exact", label: "我知道准确出生时间", hint: "按医院记录或家人记得的时间填写,精确到分钟" },
{ value: "period_only", label: "我不确定准确时间", hint: "只知道大概几点、上午下午,或完全不清楚" },
] as const;
export const birthTimeSourceDefaults = {
@@ -223,6 +223,15 @@ export function isBirthTimeDraftReady(draft: BirthTimeDraft) {
}
}
export function birthTimeDraftReadyHint(draft: BirthTimeDraft) {
if (!parseBirthDate(draft.date)) return "请先选择出生日期";
if (!draft.birthTimeSource) return "请选择你对出生时间了解多少";
if (isBirthTimeDraftReady(draft)) return "";
if (draft.birthTimeSource === "period_only") return "请选择一个大致时段";
if (draft.birthTimeSource === "unknown") return "";
return "请填写时和分";
}
/**
* Whether the user has finished declaring what they actually know about birth time.
* This is an onboarding condition, not a claim that an exact chart minute is ready.