mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-17 07:16:16 +00:00
chore: Updated l10n packs and fixed opening glance and startup, b=no-bug, c=glance, workspaces
This commit is contained in:
2
l10n
2
l10n
Submodule l10n updated: a98bf79797...1bcb131a45
@@ -228,6 +228,7 @@
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
gBrowser.tabContainer._invalidateCachedTabs();
|
||||||
this.#currentBrowser.removeAttribute('animate-glance-open');
|
this.#currentBrowser.removeAttribute('animate-glance-open');
|
||||||
this.overlay.style.removeProperty('overflow');
|
this.overlay.style.removeProperty('overflow');
|
||||||
this.browserWrapper.removeAttribute('animate');
|
this.browserWrapper.removeAttribute('animate');
|
||||||
@@ -615,6 +616,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
finishOpeningGlance() {
|
finishOpeningGlance() {
|
||||||
|
gBrowser.tabContainer._invalidateCachedTabs();
|
||||||
gZenWorkspaces.updateTabsContainers();
|
gZenWorkspaces.updateTabsContainers();
|
||||||
this.browserWrapper.removeAttribute('animate-full');
|
this.browserWrapper.removeAttribute('animate-full');
|
||||||
this.overlay.classList.remove('zen-glance-overlay');
|
this.overlay.classList.remove('zen-glance-overlay');
|
||||||
|
@@ -381,42 +381,48 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async initializeTabsStripSections() {
|
async initializeTabsStripSections() {
|
||||||
|
await SessionStore.promiseInitialized;
|
||||||
await SessionStore.promiseAllWindowsRestored;
|
await SessionStore.promiseAllWindowsRestored;
|
||||||
const perifery = document.getElementById('tabbrowser-arrowscrollbox-periphery');
|
const perifery = document.getElementById('tabbrowser-arrowscrollbox-periphery');
|
||||||
perifery.setAttribute('hidden', 'true');
|
perifery.setAttribute('hidden', 'true');
|
||||||
const tabs = gBrowser.tabContainer.allTabs;
|
await new Promise((resolve) => {
|
||||||
const workspaces = await this._workspaces();
|
setTimeout(async () => {
|
||||||
for (const workspace of workspaces.workspaces) {
|
const tabs = gBrowser.tabContainer.allTabs;
|
||||||
await this._createWorkspaceTabsSection(workspace, tabs);
|
const workspaces = await this._workspaces();
|
||||||
}
|
for (const workspace of workspaces.workspaces) {
|
||||||
if (tabs.length) {
|
await this._createWorkspaceTabsSection(workspace, tabs);
|
||||||
const defaultSelectedContainer = this.workspaceElement(this.activeWorkspace).querySelector(
|
|
||||||
'.zen-workspace-normal-tabs-section'
|
|
||||||
);
|
|
||||||
const pinnedContainer = this.workspaceElement(this.activeWorkspace).querySelector(
|
|
||||||
'.zen-workspace-pinned-tabs-section'
|
|
||||||
);
|
|
||||||
// New profile with no workspaces does not have a default selected container
|
|
||||||
if (defaultSelectedContainer) {
|
|
||||||
for (const tab of tabs) {
|
|
||||||
if (tab.hasAttribute('zen-essential')) {
|
|
||||||
this.getEssentialsSection(tab).appendChild(tab);
|
|
||||||
continue;
|
|
||||||
} else if (tab.pinned) {
|
|
||||||
pinnedContainer.insertBefore(tab, pinnedContainer.lastChild);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// before to the last child (perifery)
|
|
||||||
defaultSelectedContainer.insertBefore(tab, defaultSelectedContainer.lastChild);
|
|
||||||
}
|
}
|
||||||
}
|
if (tabs.length) {
|
||||||
gBrowser.tabContainer._invalidateCachedTabs();
|
const defaultSelectedContainer = this.workspaceElement(
|
||||||
}
|
this.activeWorkspace
|
||||||
perifery.setAttribute('hidden', 'true');
|
).querySelector('.zen-workspace-normal-tabs-section');
|
||||||
this._hasInitializedTabsStrip = true;
|
const pinnedContainer = this.workspaceElement(this.activeWorkspace).querySelector(
|
||||||
this.registerPinnedResizeObserver();
|
'.zen-workspace-pinned-tabs-section'
|
||||||
this._fixIndicatorsNames(workspaces);
|
);
|
||||||
this._resolveSectionsInitialized();
|
// New profile with no workspaces does not have a default selected container
|
||||||
|
if (defaultSelectedContainer) {
|
||||||
|
for (const tab of tabs) {
|
||||||
|
if (tab.hasAttribute('zen-essential')) {
|
||||||
|
this.getEssentialsSection(tab).appendChild(tab);
|
||||||
|
continue;
|
||||||
|
} else if (tab.pinned) {
|
||||||
|
pinnedContainer.insertBefore(tab, pinnedContainer.lastChild);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// before to the last child (perifery)
|
||||||
|
defaultSelectedContainer.insertBefore(tab, defaultSelectedContainer.lastChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gBrowser.tabContainer._invalidateCachedTabs();
|
||||||
|
}
|
||||||
|
perifery.setAttribute('hidden', 'true');
|
||||||
|
this._hasInitializedTabsStrip = true;
|
||||||
|
this.registerPinnedResizeObserver();
|
||||||
|
this._fixIndicatorsNames(workspaces);
|
||||||
|
this._resolveSectionsInitialized();
|
||||||
|
resolve();
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getEssentialsSection(container = 0) {
|
getEssentialsSection(container = 0) {
|
||||||
@@ -859,9 +865,9 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
}
|
}
|
||||||
this.onWindowResize();
|
this.onWindowResize();
|
||||||
await gZenSessionStore.promiseInitialized;
|
await gZenSessionStore.promiseInitialized;
|
||||||
|
await this.workspaceBookmarks();
|
||||||
await this.initializeTabsStripSections();
|
await this.initializeTabsStripSections();
|
||||||
this._initializeEmptyTab();
|
this._initializeEmptyTab();
|
||||||
await this.workspaceBookmarks();
|
|
||||||
await gZenPinnedTabManager.refreshPinnedTabs({ init: true });
|
await gZenPinnedTabManager.refreshPinnedTabs({ init: true });
|
||||||
await this.changeWorkspace(activeWorkspace, { onInit: true });
|
await this.changeWorkspace(activeWorkspace, { onInit: true });
|
||||||
this._fixTabPositions();
|
this._fixTabPositions();
|
||||||
|
Reference in New Issue
Block a user