mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Merge branch 'dev' into feature/non-flag-icons
Signed-off-by: mr. m <91018726+mr-cheff@users.noreply.github.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
9
src/browser/base/content/browser-sets-inc.patch
Normal file
9
src/browser/base/content/browser-sets-inc.patch
Normal file
@@ -0,0 +1,9 @@
|
||||
diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc
|
||||
index 493c593d66883082c2a4df87c4706f919ea675f8..aaaa833b64b0fd890aa2a0794eaeb7e41f002f06 100644
|
||||
--- a/browser/base/content/browser-sets.inc
|
||||
+++ b/browser/base/content/browser-sets.inc
|
||||
@@ -393,3 +393,4 @@
|
||||
internal="true"/>
|
||||
#endif
|
||||
</keyset>
|
||||
+ <keyset id="zenKeyset"></keyset>
|
@@ -65,7 +65,7 @@ var gZenCompactModeManager = {
|
||||
},
|
||||
|
||||
flashSidebarIfNecessary(aInstant = false) {
|
||||
if (!aInstant && this.prefefence && lazyCompactMode.COMPACT_MODE_FLASH_ENABLED && !gZenGlanceManager.animatingOpen) {
|
||||
if (!aInstant && this.prefefence && lazyCompactMode.COMPACT_MODE_FLASH_ENABLED && !gZenGlanceManager._animating) {
|
||||
this.flashSidebar();
|
||||
}
|
||||
},
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#currentBrowser = null;
|
||||
#currentTab = null;
|
||||
|
||||
#animating = false;
|
||||
_animating = false;
|
||||
|
||||
init() {
|
||||
document.documentElement.setAttribute('zen-glance-uuid', gZenUIManager.generateUuidv4());
|
||||
@@ -86,6 +86,8 @@
|
||||
const currentTab = gBrowser.selectedTab;
|
||||
|
||||
this.animatingOpen = true;
|
||||
this._animating = true;
|
||||
|
||||
const browserElement = this.createBrowserElement(url, currentTab);
|
||||
|
||||
this.overlay = browserElement.closest('.browserSidebarContainer');
|
||||
@@ -107,18 +109,17 @@
|
||||
|
||||
this.overlay.removeAttribute('fade-out');
|
||||
this.browserWrapper.setAttribute('animate', true);
|
||||
this.#animating = true;
|
||||
setTimeout(() => {
|
||||
this.browserWrapper.setAttribute('animate-end', true);
|
||||
this.browserWrapper.setAttribute('has-finished-animation', true);
|
||||
this.#animating = false;
|
||||
this._animating = false;
|
||||
this.animatingOpen = false;
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
|
||||
closeGlance({ noAnimation = false, onTabClose = false } = {}) {
|
||||
if (this.#animating || !this.#currentBrowser || this.animatingOpen || this._duringOpening) {
|
||||
if (this._animating || !this.#currentBrowser || this.animatingOpen || this._duringOpening) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -130,6 +131,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
this._animating = true;
|
||||
|
||||
gBrowser._insertTabAtIndex(this.#currentTab, {
|
||||
index: this.currentParentTab._tPos + 1,
|
||||
});
|
||||
@@ -195,6 +198,8 @@
|
||||
|
||||
this.lastCurrentTab = null;
|
||||
this._duringOpening = false;
|
||||
|
||||
this._animating = false;
|
||||
}, 400);
|
||||
});
|
||||
});
|
||||
|
@@ -995,11 +995,7 @@ var gZenKeyboardShortcutsManager = {
|
||||
return browser.gZenKeyboardShortcutsManager._zenKeyset;
|
||||
}
|
||||
|
||||
browser.gZenKeyboardShortcutsManager._zenKeyset = browser.document.createXULElement('keyset');
|
||||
browser.gZenKeyboardShortcutsManager._zenKeyset.id = ZEN_KEYSET_ID;
|
||||
|
||||
const mainKeyset = browser.document.getElementById(ZEN_MAIN_KEYSET_ID);
|
||||
mainKeyset.after(browser.gZenKeyboardShortcutsManager._zenKeyset);
|
||||
throw new Error('Zen keyset not found');
|
||||
}
|
||||
return browser.gZenKeyboardShortcutsManager._zenKeyset;
|
||||
},
|
||||
|
@@ -463,10 +463,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
return tab;
|
||||
}
|
||||
|
||||
_kIcons = JSON.parse(Services.prefs.getStringPref('zen.workspaces.icons')).map((icon) =>
|
||||
typeof Intl.Segmenter !== 'undefined' ? new Intl.Segmenter().segment(icon).containing().segment : Array.from(icon)[0]
|
||||
);
|
||||
|
||||
searchIcons(input, icons) {
|
||||
input = input.toLowerCase();
|
||||
|
||||
@@ -543,7 +539,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
let container = document.getElementById('PanelUI-zen-workspaces-icon-picker-wrapper');
|
||||
let searchInput = document.getElementById('PanelUI-zen-workspaces-icon-search-input');
|
||||
searchInput.value = '';
|
||||
for (let icon of this._kIcons) {
|
||||
for (let iconData of this.emojis) {
|
||||
const icon = iconData[0];
|
||||
let button = document.createXULElement('toolbarbutton');
|
||||
button.className = 'toolbarbutton-1 workspace-icon-button';
|
||||
button.setAttribute('label', icon);
|
||||
@@ -621,7 +618,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
let parentPanel = document.getElementById('PanelUI-zen-workspaces-multiview');
|
||||
|
||||
// randomly select an icon
|
||||
let icon = this._kIcons[Math.floor(Math.random() * (this._kIcons.length - 257))];
|
||||
let icon = this.emojis[Math.floor(Math.random() * (this.emojis.length - 257))][0];
|
||||
this._workspaceCreateInput.textContent = '';
|
||||
this._workspaceCreateInput.value = '';
|
||||
this._workspaceCreateInput.setAttribute('data-initial-value', '');
|
||||
@@ -1274,6 +1271,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
await this._performWorkspaceChange(window, onInit);
|
||||
} finally {
|
||||
this._inChangingWorkspace = false;
|
||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1304,6 +1302,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
workspaces.workspaces.findIndex((w) => w.uuid === previousWorkspace.uuid) <
|
||||
workspaces.workspaces.findIndex((w) => w.uuid === window.uuid);
|
||||
gBrowser.tabContainer.setAttribute('zen-workspace-animation', isNextWorkspace ? 'next' : 'previous');
|
||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||
this._animatingChange = true;
|
||||
setTimeout(() => {
|
||||
this._animatingChange = false;
|
||||
@@ -1339,9 +1338,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
gBrowser.hideTab(tab, undefined, true);
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(() => {
|
||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||
});
|
||||
|
||||
return visibleTabs;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
index 3ab07e5864b3bb200608e7f619645f92ade129fe..0f9722f985abca2fdd4ea0265c020fc4228f2565 100644
|
||||
index 3ab07e5864b3bb200608e7f619645f92ade129fe..31085d82271b0259cd69ec9691ea5f33fe29e19e 100644
|
||||
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
@@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
@@ -16,21 +16,19 @@ index 3ab07e5864b3bb200608e7f619645f92ade129fe..0f9722f985abca2fdd4ea0265c020fc4
|
||||
const DEFAULT_FORM_HISTORY_NAME = "searchbar-history";
|
||||
const SEARCH_BUTTON_CLASS = "urlbar-search-button";
|
||||
|
||||
@@ -2152,6 +2159,13 @@ export class UrlbarInput {
|
||||
@@ -2152,6 +2159,11 @@ export class UrlbarInput {
|
||||
|
||||
this.setAttribute("breakout-extend", "true");
|
||||
|
||||
+ if (lazy.ZEN_URLBAR_BEHAVIOR == 'float' || (lazy.ZEN_URLBAR_BEHAVIOR == 'floating-on-type' && !this.focusedViaMousedown)) {
|
||||
+ this.setAttribute("zen-floating-urlbar", "true");
|
||||
+ this.textbox.classList.add("zen-floating-urlbar");
|
||||
+ } else {
|
||||
+ this.removeAttribute("zen-floating-urlbar");
|
||||
+ this.textbox.classList.remove("zen-floating-urlbar");
|
||||
+ }
|
||||
// Enable the animation only after the first extend call to ensure it
|
||||
// doesn't run when opening a new window.
|
||||
if (!this.hasAttribute("breakout-extend-animate")) {
|
||||
@@ -3875,6 +3889,11 @@ export class UrlbarInput {
|
||||
@@ -3875,6 +3887,11 @@ export class UrlbarInput {
|
||||
}
|
||||
|
||||
_on_click(event) {
|
||||
@@ -42,7 +40,7 @@ index 3ab07e5864b3bb200608e7f619645f92ade129fe..0f9722f985abca2fdd4ea0265c020fc4
|
||||
if (
|
||||
event.target == this.inputField ||
|
||||
event.target == this._inputContainer ||
|
||||
@@ -3986,9 +4005,12 @@ export class UrlbarInput {
|
||||
@@ -3986,9 +4003,12 @@ export class UrlbarInput {
|
||||
}
|
||||
|
||||
_on_mousedown(event) {
|
||||
@@ -56,7 +54,7 @@ index 3ab07e5864b3bb200608e7f619645f92ade129fe..0f9722f985abca2fdd4ea0265c020fc4
|
||||
|
||||
if (
|
||||
event.target != this.inputField &&
|
||||
@@ -3998,8 +4020,8 @@ export class UrlbarInput {
|
||||
@@ -3998,8 +4018,8 @@ export class UrlbarInput {
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user