chore: Hide introduction panel when current panel is set in ZenSidebarManager

This commit is contained in:
Mauro Balades
2024-07-29 14:51:28 +02:00
parent e3edc10e95
commit 48773b80f4
4 changed files with 39 additions and 5 deletions

View File

@@ -149,10 +149,6 @@ var gZenBrowserManagerSidebar = {
toggle() {
if (!this._currentPanel) {
this._currentPanel = this._lastOpenedPanel;
if (!this._currentPanel) {
let data = this.sidebarData;
this._currentPanel = data.index[0];
}
this.update();
return;
}
@@ -293,14 +289,19 @@ var gZenBrowserManagerSidebar = {
}
},
get introductionPanel() {
return document.getElementById("zen-sidebar-introduction-panel");
},
_updateWebPanel() {
this._updateButtons();
let sidebar = this._openAndGetWebPanelWrapper();
this._hideAllWebPanels();
if (!this._currentPanel) {
sidebar.setAttribute("hidden", "true");
this.introductionPanel.removeAttribute("hidden");
return;
}
this.introductionPanel.setAttribute("hidden", "true");
let existantWebview = this._getCurrentBrowser();
if (existantWebview) {
existantWebview.docShellIsActive = true;

View File

@@ -15,6 +15,10 @@
</hbox>
</toolbar>
<vbox id="zen-sidebar-web-panel-browser-containers">
<vbox id="zen-sidebar-introduction-panel" hidden="true">
<html:h1 data-l10n-id="zen-sidebar-introduction-title"/>
<html:p data-l10n-id="zen-sidebar-introduction-description"/>
</vbox>
</vbox>
<toolbar mode="icons" flex="1" id="zen-sidebar-panels-wrapper">
<toolbar mode="icons" flex="1" id="zen-sidebar-panels-sites">