web: further refinements to the sidebar

This commit restores the onHashChange functionality, using an
on-demand reverse map (there really aren't that many objects in the
nav tree) to make sure all of the parent entities are also listed
in the "expanded" listing to make sure the target object is still
visible.  Along the way, several type lever errors were corrected.
Two major pieces of functionality were extracted from the Sidebar
function as they're mostly consumers/filters of the information
provided, and don't need to be in the Sidebar itself.
This commit is contained in:
Ken Sternberg
2023-11-17 14:47:47 -08:00
parent a0dfe7ce78
commit a9886b047e
14 changed files with 166 additions and 87 deletions

View File

@ -45,7 +45,7 @@ export const eventActionLabels: Pair<EventActions>[] = [
[EventActions.ModelDeleted, msg("Model deleted")],
[EventActions.EmailSent, msg("Email sent")],
[EventActions.UpdateAvailable, msg("Update available")],
]
];
export const eventActionToLabel = new Map<EventActions | undefined, string>(eventActionLabels);