mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-29 02:34:18 +00:00
chore: Bump version and fix some small quality issues, b=no-bug, c=common, folders, tabs, workspaces
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
static get markup() {
|
||||
return `
|
||||
<vbox class="zen-workspace-tabs-section zen-current-workspace-indicator" flex="1" context="zenWorkspaceMoreActions">
|
||||
<hbox class="zen-current-workspace-indicator-icon"></hbox>
|
||||
<hbox class="zen-current-workspace-indicator-name" flex="1"></hbox>
|
||||
<toolbarbutton class="toolbarbutton-1 chromeclass-toolbar-additional zen-workspaces-actions" context="zenWorkspaceMoreActions"></toolbarbutton>
|
||||
<hbox class="zen-current-workspace-indicator-icon" />
|
||||
<label class="zen-current-workspace-indicator-name" flex="1" />
|
||||
<toolbarbutton class="toolbarbutton-1 chromeclass-toolbar-additional zen-workspaces-actions" context="zenWorkspaceMoreActions" />
|
||||
</vbox>
|
||||
<arrowscrollbox orient="vertical" class="workspace-arrowscrollbox">
|
||||
<vbox class="zen-workspace-tabs-section zen-workspace-pinned-tabs-section" hide-separator="true">
|
||||
|
||||
@@ -1286,7 +1286,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
await this.changeWorkspace(
|
||||
workspacesData.workspaces.find((workspace) => workspace.uuid !== windowID)
|
||||
);
|
||||
this._deleteAllTabsInWorkspace(windowID);
|
||||
await this.#deleteAllTabsInWorkspace(windowID);
|
||||
delete this._lastSelectedWorkspaceTabs[windowID];
|
||||
await ZenWorkspacesStorage.removeWorkspace(windowID);
|
||||
// Remove the workspace from the cache
|
||||
@@ -1440,20 +1440,23 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
|
||||
// Workspaces management
|
||||
|
||||
_deleteAllTabsInWorkspace(workspaceID) {
|
||||
gBrowser.removeTabs(
|
||||
Array.from(this.allStoredTabs).filter(
|
||||
(tab) =>
|
||||
tab.getAttribute('zen-workspace-id') === workspaceID &&
|
||||
!tab.hasAttribute('zen-empty-tab') &&
|
||||
!tab.hasAttribute('zen-essential')
|
||||
),
|
||||
{
|
||||
animate: false,
|
||||
skipSessionStore: true,
|
||||
closeWindowWithLastTab: false,
|
||||
}
|
||||
async #deleteAllTabsInWorkspace(workspaceID) {
|
||||
const tabs = Array.from(this.allStoredTabs).filter(
|
||||
(tab) =>
|
||||
tab.getAttribute('zen-workspace-id') === workspaceID &&
|
||||
!tab.hasAttribute('zen-empty-tab') &&
|
||||
!tab.hasAttribute('zen-essential')
|
||||
);
|
||||
for (const tab of tabs) {
|
||||
if (tab.pinned) {
|
||||
await ZenPinnedTabsStorage.removePin(tab.getAttribute('zen-pin-id'));
|
||||
}
|
||||
}
|
||||
gBrowser.removeTabs(tabs, {
|
||||
animate: false,
|
||||
skipSessionStore: true,
|
||||
closeWindowWithLastTab: false,
|
||||
});
|
||||
}
|
||||
|
||||
moveTabToWorkspace(tab, workspaceID) {
|
||||
|
||||
@@ -207,12 +207,14 @@
|
||||
}
|
||||
|
||||
.zen-current-workspace-indicator-name {
|
||||
display: block;
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
cursor: auto;
|
||||
font-weight: 600;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.zen-workspaces-actions {
|
||||
|
||||
Reference in New Issue
Block a user