route: add Search route and hook up SearchView
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user