Public birth chart: keep it across pages for the tab, login for the summary
The typed birth data and the calculated chart stay in sessionStorage (no cookie, gone with the tab), so they are back after visiting another page; 'Adatok törlése' forgets them. User-input storage for the session needs no consent; the privacy pages say so. Signing up in the same tab fills the profile with them. The offer next to the chart now says the short summary needs a login. Logged-in users get 'Csillagjegyek' in the menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -69,7 +69,7 @@ export function BirthForm({
|
||||
if (initial || person) return;
|
||||
let draft: BirthDraft | null = null;
|
||||
try {
|
||||
draft = JSON.parse(localStorage.getItem(BIRTH_DRAFT_KEY) ?? "null");
|
||||
draft = JSON.parse(sessionStorage.getItem(BIRTH_DRAFT_KEY) ?? "null");
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ export function BirthForm({
|
||||
: { label: "Saját képlet", is_primary: true, birth },
|
||||
});
|
||||
try {
|
||||
localStorage.removeItem(BIRTH_DRAFT_KEY);
|
||||
sessionStorage.removeItem(BIRTH_DRAFT_KEY);
|
||||
} catch {
|
||||
// storage blocked
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user