mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-17 15:21:53 +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) {
|
_prepareNewWorkspace(window) {
|
||||||
document.documentElement.setAttribute("zen-workspace-id", window.uuid);
|
document.documentElement.setAttribute("zen-workspace-id", window.uuid);
|
||||||
for (let tab of gBrowser.tabs) {
|
this._createNewTabForWorkspace(window);
|
||||||
if (!tab.getAttribute("zen-workspace-id")) {
|
|
||||||
tab.setAttribute("zen-workspace-id", window.uuid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_createNewTabForWorkspace(window) {
|
_createNewTabForWorkspace(window) {
|
||||||
|
@@ -79,7 +79,12 @@
|
|||||||
<panel id="PanelUI-zen-workspaces" position="bottomright topright" mainview="true" side="left">
|
<panel id="PanelUI-zen-workspaces" position="bottomright topright" mainview="true" side="left">
|
||||||
<vbox>
|
<vbox>
|
||||||
<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 id="PanelUI-zen-workspaces-current-info">
|
||||||
</html:div>
|
</html:div>
|
||||||
</vbox>
|
</vbox>
|
||||||
@@ -88,6 +93,8 @@
|
|||||||
<html:div id="PanelUI-zen-workspaces-list">
|
<html:div id="PanelUI-zen-workspaces-list">
|
||||||
</html:div>
|
</html:div>
|
||||||
</vbox>
|
</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>
|
</vbox>
|
||||||
</panel>
|
</panel>
|
@@ -2,7 +2,3 @@
|
|||||||
zen-panel-ui-current-window-text = Current Window
|
zen-panel-ui-current-window-text = Current Window
|
||||||
|
|
||||||
zen-panel-ui-workspaces-text = Other Workspaces
|
zen-panel-ui-workspaces-text = Other Workspaces
|
||||||
|
|
||||||
zen-panel-ui-workspaces-new
|
|
||||||
.label = New Workspace
|
|
||||||
.accesskey = N
|
|
||||||
|
@@ -154,7 +154,7 @@
|
|||||||
#appMenu-zoomEnlarge-button2,
|
#appMenu-zoomEnlarge-button2,
|
||||||
#PanelUI-zen-profiles-newProfile,
|
#PanelUI-zen-profiles-newProfile,
|
||||||
#zen-sidebar-add-panel-button,
|
#zen-sidebar-add-panel-button,
|
||||||
#PanelUI-zen-workspaces-new {
|
#PanelUI-zen-workspaces-new image {
|
||||||
list-style-image: url("plus.svg") !important;
|
list-style-image: url("plus.svg") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -310,6 +310,7 @@
|
|||||||
#PanelUI-zen-workspaces-new {
|
#PanelUI-zen-workspaces-new {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
|
min-height: 1px !important;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
Reference in New Issue
Block a user