fix(rectification): show natal houses and lagna changes in a live right rail
The board was live data sitting under chat, so each new event looked like nothing changed. Keep candidate cards in the transcript and group 换升 by minute for the side panel. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,13 +4,21 @@ import type { RectificationHouseTable } from "@/lib/rectification-candidate-resu
|
||||
|
||||
export function RectificationHouseTableView({
|
||||
table,
|
||||
}: Readonly<{ table: RectificationHouseTable }>) {
|
||||
changedHouses,
|
||||
lagnaChanged,
|
||||
}: Readonly<{
|
||||
table: RectificationHouseTable;
|
||||
changedHouses?: ReadonlySet<number>;
|
||||
lagnaChanged?: boolean;
|
||||
}>) {
|
||||
const changed = changedHouses ?? new Set<number>();
|
||||
return (
|
||||
<section className="rectification-house-table" aria-label="当前本命宫位" aria-live="polite">
|
||||
<section className="rectification-house-table" aria-label="当前本命宫位">
|
||||
<div className="rectification-house-table__heading">
|
||||
<strong>当前本命宫位</strong>
|
||||
<span>
|
||||
按 {table.time} 排出,上升{table.lagna}。补充经历后会按新线索重算。
|
||||
按 {table.time} 排出,上升{table.lagna}
|
||||
{lagnaChanged ? "(已更新)" : ""}。补充经历后会按新线索重算。
|
||||
</span>
|
||||
<span>这是当前代表性时间下的盘面,不是已确认出生盘。</span>
|
||||
</div>
|
||||
@@ -24,13 +32,19 @@ export function RectificationHouseTableView({
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{table.houses.map((house) => (
|
||||
<tr key={house.house}>
|
||||
<th scope="row">第{house.house}宫</th>
|
||||
<td>{house.sign}</td>
|
||||
<td>{house.occupants.length > 0 ? house.occupants.join("、") : "—"}</td>
|
||||
</tr>
|
||||
))}
|
||||
{table.houses.map((house) => {
|
||||
const houseChanged = changed.has(house.house);
|
||||
return (
|
||||
<tr key={house.house} data-changed={houseChanged ? "true" : undefined}>
|
||||
<th scope="row">第{house.house}宫</th>
|
||||
<td>
|
||||
{house.sign}
|
||||
{houseChanged ? <span className="rectification-house-table__changed">已更新</span> : null}
|
||||
</td>
|
||||
<td>{house.occupants.length > 0 ? house.occupants.join("、") : "—"}</td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user