mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-05 21:07:57 +00:00
fix: Fixed glance button cancelation not working, b=no-bug, c=glance, workspaces
This commit is contained in:
@@ -259,11 +259,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
const browserSidebarContainer = this.#currentParentTab?.linkedBrowser?.closest(
|
||||
'.browserSidebarContainer'
|
||||
);
|
||||
if (onTabClose && hasFocused && !this.#confirmationTimeout && browserSidebarContainer) {
|
||||
const cancelButton = browserSidebarContainer?.querySelector('.zen-glance-sidebar-close');
|
||||
const sidebarButtons = this.browserWrapper.querySelector('.zen-glance-sidebar-container');
|
||||
if (onTabClose && hasFocused && !this.#confirmationTimeout && sidebarButtons) {
|
||||
const cancelButton = sidebarButtons?.querySelector('.zen-glance-sidebar-close');
|
||||
cancelButton.setAttribute('waitconfirmation', true);
|
||||
this.#confirmationTimeout = setTimeout(() => {
|
||||
cancelButton.removeAttribute('waitconfirmation');
|
||||
@@ -274,7 +272,9 @@
|
||||
|
||||
this.browserWrapper.removeAttribute('has-finished-animation');
|
||||
if (noAnimation) {
|
||||
this._clearContainerStyles(browserSidebarContainer);
|
||||
this._clearContainerStyles(
|
||||
this.#currentParentTab?.linkedBrowser?.closest('.browserSidebarContainer')
|
||||
);
|
||||
this.quickCloseGlance({ closeCurrentTab: false });
|
||||
return;
|
||||
}
|
||||
@@ -299,7 +299,6 @@
|
||||
this.overlay.style.pointerEvents = 'none';
|
||||
this.quickCloseGlance({ justAnimateParent: true, clearID: false });
|
||||
const originalPosition = this.#glances.get(this.#currentGlanceID).originalPosition;
|
||||
const sidebarButtons = this.browserWrapper.querySelector('.zen-glance-sidebar-container');
|
||||
if (sidebarButtons) {
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
|
||||
@@ -1268,7 +1268,8 @@
|
||||
getMostDominantColor(allColors) {
|
||||
const color = this.getPrimaryColor(allColors);
|
||||
if (typeof color === 'string') {
|
||||
return this.hexToRgb(color);
|
||||
// We found a custom color, we should rather return the native accent color
|
||||
return this.getNativeAccentColor();
|
||||
}
|
||||
return color;
|
||||
}
|
||||
@@ -1448,15 +1449,14 @@
|
||||
browser.document.documentElement.style.setProperty('--zen-primary-color', primaryColor);
|
||||
browser.gZenThemePicker.isLegacyVersion = this.isLegacyVersion;
|
||||
let isDarkMode = isDarkModeWindow;
|
||||
const isUsingCustomColors = workspaceTheme.gradientColors.some((color) => color.isCustom);
|
||||
if (!isDefaultTheme && !this.isLegacyVersion && !isUsingCustomColors) {
|
||||
if (!isDefaultTheme && !this.isLegacyVersion) {
|
||||
// Check for the primary color
|
||||
isDarkMode = browser.gZenThemePicker.shouldBeDarkMode(dominantColor);
|
||||
browser.document.documentElement.setAttribute('zen-should-be-dark-mode', isDarkMode);
|
||||
browser.gZenThemePicker.panel.removeAttribute('invalidate-controls');
|
||||
} else {
|
||||
browser.document.documentElement.removeAttribute('zen-should-be-dark-mode');
|
||||
if (!this.isLegacyVersion && !isUsingCustomColors) {
|
||||
if (!this.isLegacyVersion) {
|
||||
browser.gZenThemePicker.panel.setAttribute('invalidate-controls', 'true');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.14.7b",
|
||||
"displayVersion": "1.14.8b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user