familytree

A self-hosted family tree builder.
Log | Files | Refs | README

commit faf6508eeaa13508d68741d30f36adb6ee98df6f
parent 345ea6317369fff896e757d675d346073423cf03
Author: Julian Piribauer <julian.piribauer@gmail.com>
Date:   Sun,  3 May 2026 07:23:55 +0000

Auto-select tree on load: restore from localStorage or pick sole tree

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Diffstat:
Mstatic/app.js | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/static/app.js b/static/app.js @@ -64,6 +64,7 @@ async function loadTrees() { const saved = parseInt(localStorage.getItem('activeTreeId')); const match = saved && state.trees.find(t => t.id === saved); if (match) await selectTree(match.id); + else if (state.trees.length === 1) await selectTree(state.trees[0].id); } }