route: add Search route and hook up SearchView

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-03-07 10:54:43 -08:00
parent 9edc9bf4a5
commit c2545d17e7
5 changed files with 49 additions and 1 deletions

View File

@@ -461,6 +461,9 @@ impl<'a> NavTitle<'a> {
Route::EditProfile(pubkey) => {
self.show_profile(ui, pubkey, pfp_size);
}
Route::Search => {
ui.add(ui::side_panel::search_button());
}
}
}

View File

@@ -325,6 +325,11 @@ impl<'a> DesktopSidePanel<'a> {
SidePanelAction::Search => {
// TODO
info!("Clicked search button");
if router.top() == &Route::Search {
router.go_back();
} else {
router.route_to(Route::Search);
}
}
SidePanelAction::ExpandSidePanel => {
// TODO