mirror of
https://github.com/zen-browser/desktop.git
synced 2026-05-05 13:35:10 +00:00
chore: Refactor ZenWorkspaces to use _createNewTabForWorkspace method for preparing new workspace
This commit is contained in:
@@ -166,11 +166,7 @@ var ZenWorkspaces = {
|
||||
|
||||
_prepareNewWorkspace(window) {
|
||||
document.documentElement.setAttribute("zen-workspace-id", window.uuid);
|
||||
for (let tab of gBrowser.tabs) {
|
||||
if (!tab.getAttribute("zen-workspace-id")) {
|
||||
tab.setAttribute("zen-workspace-id", window.uuid);
|
||||
}
|
||||
}
|
||||
this._createNewTabForWorkspace(window);
|
||||
},
|
||||
|
||||
_createNewTabForWorkspace(window) {
|
||||
|
||||
@@ -79,7 +79,12 @@
|
||||
<panel id="PanelUI-zen-workspaces" position="bottomright topright" mainview="true" side="left">
|
||||
<vbox>
|
||||
<vbox>
|
||||
<h3 data-l10n-id="zen-panel-ui-current-window-text"></h3>
|
||||
<hbox>
|
||||
<h3 data-l10n-id="zen-panel-ui-current-window-text"></h3>
|
||||
<hbox class="translations-panel-beta" role="image" aria-label="Beta">
|
||||
<image class="translations-panel-beta-icon"></image>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<html:div id="PanelUI-zen-workspaces-current-info">
|
||||
</html:div>
|
||||
</vbox>
|
||||
@@ -88,6 +93,8 @@
|
||||
<html:div id="PanelUI-zen-workspaces-list">
|
||||
</html:div>
|
||||
</vbox>
|
||||
<toolbarbutton id="PanelUI-zen-workspaces-new" oncommand="ZenWorkspaces.createAndSaveWorkspace();" class="subviewbutton" data-l10n-id="zen-panel-ui-workspaces-new"></toolbarbutton>
|
||||
<toolbarbutton id="PanelUI-zen-workspaces-new" oncommand="ZenWorkspaces.createAndSaveWorkspace();" class="subviewbutton">
|
||||
<image></image>
|
||||
</toolbarbutton>
|
||||
</vbox>
|
||||
</panel>
|
||||
Reference in New Issue
Block a user