mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-15 05:10:31 +00:00
Compare commits
8 Commits
1.21.6b
...
chore/upst
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7efa809bb | ||
|
|
c7e4217204 | ||
|
|
e837158e4c | ||
|
|
a1a2268f9b | ||
|
|
274b9f9f83 | ||
|
|
fe0cf3601a | ||
|
|
61e0790144 | ||
|
|
03f251ff4a |
@@ -34,7 +34,7 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
|
|||||||
|
|
||||||
### Firefox Versions
|
### Firefox Versions
|
||||||
|
|
||||||
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `152.0.5`! 🚀
|
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `152.0.6`! 🚀
|
||||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 152.0.5`!
|
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 152.0.5`!
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
6bd10168f81fb90f878132d87cf681200afbcd91
|
e7fbb446077536139cdd78b6a0386a97237af20f
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
index 08b5b56e069d038d72c87355920c4ce8a55ed805..e1a3a18081c7a8153f8d12c187bf4dd522944fcb 100644
|
index 08b5b56e069d038d72c87355920c4ce8a55ed805..0e4f57c21d28ccf173d8d1e13e96c2c1f8a79f34 100644
|
||||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
@@ -511,6 +511,7 @@
|
@@ -511,6 +511,7 @@
|
||||||
@@ -692,6 +692,15 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..e1a3a18081c7a8153f8d12c187bf4dd5
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5776,7 +5973,7 @@
|
||||||
|
*/
|
||||||
|
#isLastTabInWindow(tab) {
|
||||||
|
for (const otherTab of this.tabs) {
|
||||||
|
- if (otherTab != tab && otherTab.isOpen && !otherTab.hidden) {
|
||||||
|
+ if (otherTab != tab && otherTab.isOpen && !otherTab.hidden && !otherTab.hasAttribute("zen-empty-tab")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5867,7 +6064,7 @@
|
@@ -5867,7 +6064,7 @@
|
||||||
closeWindowWithLastTab != null
|
closeWindowWithLastTab != null
|
||||||
? closeWindowWithLastTab
|
? closeWindowWithLastTab
|
||||||
|
|||||||
@@ -69,6 +69,7 @@
|
|||||||
#changeSpaceTimer = null;
|
#changeSpaceTimer = null;
|
||||||
#isAnimatingTabMove = false;
|
#isAnimatingTabMove = false;
|
||||||
#firstHapticFeedbackPlayed = false;
|
#firstHapticFeedbackPlayed = false;
|
||||||
|
#lastDragOverTime = 0;
|
||||||
|
|
||||||
#dragOverSplit = {};
|
#dragOverSplit = {};
|
||||||
|
|
||||||
@@ -723,9 +724,11 @@
|
|||||||
const { isNearLeftEdge, isNearRightEdge } =
|
const { isNearLeftEdge, isNearRightEdge } =
|
||||||
this.#shouldSwitchSpace(event);
|
this.#shouldSwitchSpace(event);
|
||||||
if (isNearLeftEdge || isNearRightEdge) {
|
if (isNearLeftEdge || isNearRightEdge) {
|
||||||
if (!this.#changeSpaceTimer && !this.#isOutOfWindow) {
|
this.#lastDragOverTime = Date.now();
|
||||||
|
if (!this.#changeSpaceTimer) {
|
||||||
this.#changeSpaceTimer = setTimeout(() => {
|
this.#changeSpaceTimer = setTimeout(() => {
|
||||||
if (this.#isOutOfWindow) {
|
const timeSinceLastDragOver = Date.now() - this.#lastDragOverTime;
|
||||||
|
if (timeSinceLastDragOver > 250) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.clearDragOverVisuals();
|
this.clearDragOverVisuals();
|
||||||
@@ -1333,7 +1336,8 @@
|
|||||||
// Essentials should be properly handled by ::animateVerticalPinnedGridDragOver
|
// Essentials should be properly handled by ::animateVerticalPinnedGridDragOver
|
||||||
if (!dropElement || dropElement.hasAttribute("zen-essential")) {
|
if (!dropElement || dropElement.hasAttribute("zen-essential")) {
|
||||||
this.clearDragOverVisuals();
|
this.clearDragOverVisuals();
|
||||||
return null;
|
// If dropElement is null or essential, dropElement should be the empty tab
|
||||||
|
return [dropBefore, gZenWorkspaces._emptyTab];
|
||||||
}
|
}
|
||||||
if (dropElement.hasAttribute("zen-empty-tab") && dropElement.group) {
|
if (dropElement.hasAttribute("zen-empty-tab") && dropElement.group) {
|
||||||
let secondTab = dropElement.group.tabs[1];
|
let secondTab = dropElement.group.tabs[1];
|
||||||
|
|||||||
@@ -460,16 +460,19 @@ class nsZenWorkspaces {
|
|||||||
document
|
document
|
||||||
.getElementById("zen-essentials")
|
.getElementById("zen-essentials")
|
||||||
.appendChild(essentialsContainer);
|
.appendChild(essentialsContainer);
|
||||||
|
|
||||||
// Set an initial hidden state if the essentials section is not supposed
|
|
||||||
// to be shown on the current workspace
|
|
||||||
if (
|
|
||||||
this.containerSpecificEssentials &&
|
|
||||||
this.getActiveWorkspaceFromCache()?.containerTabId != container
|
|
||||||
) {
|
|
||||||
essentialsContainer.setAttribute("hidden", "true");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set a hidden state if the essentials section is not supposed
|
||||||
|
// to be shown on the current workspace, else remove the hidden state
|
||||||
|
if (
|
||||||
|
this.containerSpecificEssentials &&
|
||||||
|
this.getActiveWorkspaceFromCache()?.containerTabId != container
|
||||||
|
) {
|
||||||
|
essentialsContainer.setAttribute("hidden", "true");
|
||||||
|
} else {
|
||||||
|
essentialsContainer.removeAttribute("hidden");
|
||||||
|
}
|
||||||
|
|
||||||
return essentialsContainer;
|
return essentialsContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1161,6 +1164,9 @@ class nsZenWorkspaces {
|
|||||||
const item = document.createXULElement("menuitem");
|
const item = document.createXULElement("menuitem");
|
||||||
item.className = "zen-workspace-context-menu-item";
|
item.className = "zen-workspace-context-menu-item";
|
||||||
item.setAttribute("zen-workspace-id", workspace.uuid);
|
item.setAttribute("zen-workspace-id", workspace.uuid);
|
||||||
|
if (AppConstants.platform === "linux") {
|
||||||
|
disableCurrent = true;
|
||||||
|
}
|
||||||
if (!disableCurrent) {
|
if (!disableCurrent) {
|
||||||
item.setAttribute("type", "radio");
|
item.setAttribute("type", "radio");
|
||||||
}
|
}
|
||||||
@@ -1864,11 +1870,6 @@ class nsZenWorkspaces {
|
|||||||
}
|
}
|
||||||
const newTransform = diff * 100;
|
const newTransform = diff * 100;
|
||||||
element.style.transform = `translateX(${newTransform + offsetPixels / 2}%)`;
|
element.style.transform = `translateX(${newTransform + offsetPixels / 2}%)`;
|
||||||
// A special case for two spaces
|
|
||||||
if (spaceLen === 2 && diff !== 0) {
|
|
||||||
const side = offsetPixels > 0 ? -100 : 100;
|
|
||||||
element.style.transform = `translateX(${side + offsetPixels / 2}%)`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Hide other essentials with different containerTabId
|
// Hide other essentials with different containerTabId
|
||||||
for (const container of otherContainersEssentials) {
|
for (const container of otherContainersEssentials) {
|
||||||
@@ -2099,12 +2100,6 @@ class nsZenWorkspaces {
|
|||||||
offset += spaceLen;
|
offset += spaceLen;
|
||||||
}
|
}
|
||||||
offset = offset * 100;
|
offset = offset * 100;
|
||||||
// A special case for two spaces
|
|
||||||
if (spaceLen === 2 && offset !== 0) {
|
|
||||||
const currentTransform =
|
|
||||||
parseFloat(element.style.transform.split("(")[1]) || 0;
|
|
||||||
offset = currentTransform >= 0 ? 100 : -100;
|
|
||||||
}
|
|
||||||
const newTransform = `translateX(${offset}%)`;
|
const newTransform = `translateX(${offset}%)`;
|
||||||
// Only animate the workspace that is coming in, to avoid having multiple workspaces
|
// Only animate the workspace that is coming in, to avoid having multiple workspaces
|
||||||
// animating off-screen at the same time which can cause performance issues. With an off
|
// animating off-screen at the same time which can cause performance issues. With an off
|
||||||
@@ -2181,17 +2176,6 @@ class nsZenWorkspaces {
|
|||||||
existingOffset = currentTransform || (isGoingLeft ? -100 : 100);
|
existingOffset = currentTransform || (isGoingLeft ? -100 : 100);
|
||||||
newOffset = 0;
|
newOffset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spaceLen === 2) {
|
|
||||||
if (containsPrev && !containsNew) {
|
|
||||||
existingOffset = currentTransform;
|
|
||||||
newOffset = currentTransform >= 0 ? 100 : -100;
|
|
||||||
} else {
|
|
||||||
existingOffset = currentTransform >= 0 ? 100 : -100;
|
|
||||||
newOffset = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const newTransform = `translateX(${newOffset}%)`;
|
const newTransform = `translateX(${newOffset}%)`;
|
||||||
let existingTransform = `translateX(${existingOffset}%)`;
|
let existingTransform = `translateX(${existingOffset}%)`;
|
||||||
if (shouldAnimate) {
|
if (shouldAnimate) {
|
||||||
|
|||||||
@@ -33,10 +33,10 @@ const RECORD_TYPE_BY_PREFIX = Object.freeze({
|
|||||||
* Workspaces engine collection.
|
* Workspaces engine collection.
|
||||||
*/
|
*/
|
||||||
export class ZenWorkspacesRecord extends CryptoWrapper {
|
export class ZenWorkspacesRecord extends CryptoWrapper {
|
||||||
_logName = "Sync.Record.ZenWorkspaces";
|
_logName = "Sync.Record.ZenSpaces";
|
||||||
}
|
}
|
||||||
|
|
||||||
ZenWorkspacesRecord.prototype.type = "workspaces";
|
ZenWorkspacesRecord.prototype.type = "spaces";
|
||||||
|
|
||||||
function parseRecordId(id) {
|
function parseRecordId(id) {
|
||||||
const sep = id.indexOf("~");
|
const sep = id.indexOf("~");
|
||||||
@@ -51,7 +51,7 @@ function parseRecordId(id) {
|
|||||||
function createRecordId(type, id) {
|
function createRecordId(type, id) {
|
||||||
const prefix = RECORD_ID_PREFIX_BY_TYPE[type];
|
const prefix = RECORD_ID_PREFIX_BY_TYPE[type];
|
||||||
if (!prefix) {
|
if (!prefix) {
|
||||||
throw new Error(`Unknown Workspaces Sync record type: ${type}`);
|
throw new Error(`Unknown Spaces Sync record type: ${type}`);
|
||||||
}
|
}
|
||||||
return `${prefix}~${id}`;
|
return `${prefix}~${id}`;
|
||||||
}
|
}
|
||||||
@@ -371,11 +371,11 @@ class ZenWorkspacesTracker extends Tracker {
|
|||||||
*/
|
*/
|
||||||
export class ZenWorkspacesEngine extends SyncEngine {
|
export class ZenWorkspacesEngine extends SyncEngine {
|
||||||
static get name() {
|
static get name() {
|
||||||
return "Workspaces";
|
return "Spaces";
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(service) {
|
constructor(service) {
|
||||||
super("Workspaces", service);
|
super("Spaces", service);
|
||||||
}
|
}
|
||||||
|
|
||||||
get _storeObj() {
|
get _storeObj() {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"binaryName": "zen",
|
"binaryName": "zen",
|
||||||
"version": {
|
"version": {
|
||||||
"product": "firefox",
|
"product": "firefox",
|
||||||
"version": "152.0.5",
|
"version": "152.0.6",
|
||||||
"candidate": "152.0.5",
|
"candidate": "152.0.5",
|
||||||
"candidateBuild": 1
|
"candidateBuild": 1
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user