group_settings: Empty right panel based on the url hash.

This commit adds code to empty the right panel if hash is
changed to "#groups/your" or "#groups/all".
This commit is contained in:
Sahil Batra 2024-01-18 16:35:04 +05:30 committed by Tim Abbott
parent a87de19aa7
commit 866a610664
1 changed files with 8 additions and 1 deletions

View File

@ -379,9 +379,13 @@ export const show_user_group_settings_pane = {
},
};
function open_right_panel_empty() {
function empty_right_panel() {
$(".group-row.active").removeClass("active");
show_user_group_settings_pane.nothing_selected();
}
function open_right_panel_empty() {
empty_right_panel();
const tab_key = $(".user-groups-container")
.find("div.ind-tab.selected")
.first()
@ -566,11 +570,13 @@ export function change_state(section) {
if (section === "all") {
group_list_toggler.goto("all-groups");
empty_right_panel();
return;
}
if (section === "your") {
group_list_toggler.goto("your-groups");
empty_right_panel();
return;
}
@ -595,6 +601,7 @@ export function change_state(section) {
blueslip.info("invalid section for groups: " + section);
group_list_toggler.goto("your-groups");
empty_right_panel();
}
function compare_by_name(a, b) {