Backend: - own birth data: three corrections within an hour of the first save, then one change per 24 hours (birth_data_changes); 429 birth_data_change_limit with the user-facing message; /v1/me birth_change shows the notice; admins are not limited - admins get detailed analyses free (no unit spent) - POST /v1/payments/mock (MOCK_PAYMENTS): stand-in payment that adds a unit, until Stripe is connected; on in the compose files for now Frontend: - detailed analysis offer: admin starts it free, users with units confirm, others go through the (stand-in) payment step - turning wheel with elapsed time while the summary or the analysis is being written - no "adatok javítása" on the chart page (only in the profile), limit notice there; wheel hover highlighting removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
31 lines
963 B
TypeScript
31 lines
963 B
TypeScript
"use client";
|
|
|
|
import { useEffect, useState } from "react";
|
|
|
|
import { ZodiacWheel } from "./ZodiacWheel";
|
|
|
|
/** Slowly turning wheel with the elapsed time, while the LLM writes. */
|
|
export function AnalysisLoading({ title, text, compact = false }: { title?: string; text: string; compact?: boolean }) {
|
|
const [seconds, setSeconds] = useState(0);
|
|
useEffect(() => {
|
|
const t = setInterval(() => setSeconds((s) => s + 1), 1000);
|
|
return () => clearInterval(t);
|
|
}, []);
|
|
const elapsed = `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, "0")}`;
|
|
|
|
return (
|
|
<div className={compact ? "loading loading-compact" : "loading"}>
|
|
<ZodiacWheel className="loading-wheel" />
|
|
<div className="loading-text">
|
|
{title && <strong>{title}</strong>}
|
|
<p className="muted" role="status">
|
|
{text}
|
|
</p>
|
|
<p className="hint" aria-hidden="true">
|
|
{elapsed}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|