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:
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user