Gate pedigree behind a dog id set in settings

The pedigree view is now opt-in and tied to your own dog rather than an
always-present free-text search. Add the dog's SKK chip or registration
number in Settings (it rides the synced profile alongside name and
birthday); the 🌳 button stays hidden until one is set, then opens the
page and loads that dog's ancestry directly.

Make repeat opens cheap: memoise the id->hundid resolution server-side so
a cached tree is served without contacting SKK at all, and mirror the
finished tree in localStorage so the page paints instantly and shows the
last-known tree offline.

Adds config.pedigree_id (with an in-place migration for existing DBs).
This commit is contained in:
Alexander Heldt
2026-07-26 09:36:49 +00:00
parent 26ebe3bd86
commit c2f74e64c8
7 changed files with 147 additions and 88 deletions
+1 -25
View File
@@ -324,6 +324,7 @@ button.danger { background: var(--danger); }
font-weight: normal;
}
.timing-hint { margin: 10px 4px 0; line-height: 1.4; }
.settings-hint { color: var(--muted); font-size: 0.8rem; margin: -4px 0 4px; line-height: 1.4; }
.history-controls {
display: flex;
@@ -1066,31 +1067,6 @@ section.collapsed > :not(h2) { display: none; }
}
.pedigree-header h1 { font-size: 1.4rem; }
.pedigree-form {
display: flex;
gap: 8px;
margin: 8px 0 6px;
}
.pedigree-form input {
flex: 1 1 auto;
min-width: 0;
padding: 10px 12px;
font-size: 1rem;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--surface);
color: var(--text);
}
.pedigree-form button {
flex: 0 0 auto;
padding: 10px 16px;
font-size: 1rem;
border: none;
border-radius: var(--radius);
background: var(--accent);
color: #fff;
cursor: pointer;
}
.pedigree-hint { margin: 4px 0 12px; }
.pedigree-status {