mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
navbar: Add button to toggle left sidebar.
This commit is contained in:
@@ -591,6 +591,24 @@ export function initialize(): void {
|
||||
},
|
||||
});
|
||||
|
||||
tippy.delegate("body", {
|
||||
target: ".header-main .column-left .left-sidebar-toggle-button",
|
||||
delay: LONG_HOVER_DELAY,
|
||||
placement: "bottom",
|
||||
appendTo: () => document.body,
|
||||
onShow(instance) {
|
||||
let template = "show-left-sidebar-tooltip-template";
|
||||
if ($("#left-sidebar-container").is(":visible")) {
|
||||
template = "hide-left-sidebar-tooltip-template";
|
||||
}
|
||||
$(instance.reference).attr("data-tooltip-template-id", template);
|
||||
instance.setContent(get_tooltip_content(instance.reference));
|
||||
},
|
||||
onHidden(instance) {
|
||||
instance.destroy();
|
||||
},
|
||||
});
|
||||
|
||||
tippy.delegate("body", {
|
||||
target: "#userlist-toggle",
|
||||
delay: LONG_HOVER_DELAY,
|
||||
|
||||
Reference in New Issue
Block a user