mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-20 23:51:07 +00:00
chore: Hide introduction panel when current panel is set in ZenSidebarManager
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user