mirror of
https://github.com/zen-browser/components.git
synced 2025-07-09 19:55:30 +02:00
feat: Add workspace ordering and changes tracking
This commit introduces workspace ordering and a new mechanism for tracking changes to workspaces. **Changes:** - **Workspace Ordering:** Workspaces can now be ordered using a `position` field. This allows for user-defined ordering of workspaces, improving usability. - **Changes Tracking:** A new `zen_workspaces_changes` table is added to track changes to workspaces. This allows for more efficient sync operations and improved error handling. **Benefits:** - **Improved Workspace Management:** Users can now customize the order of their workspaces. - **More Efficient Sync:** Changes tracking enables faster and more accurate synchronization of workspaces across devices. - **Enhanced Error Handling:** Changes tracking helps to identify and resolve conflicts during sync. **Notes:** - This change requires deleting the zen_workspaces table in places db
This commit is contained in:
parent
1c7bc5c501
commit
0d161326ef
3 changed files with 535 additions and 211 deletions
|
@ -84,6 +84,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
// Set the active workspace ID to the first one if active workspace doesn't exist
|
||||
Services.prefs.setStringPref('zen.workspaces.active', this._workspaceCache.workspaces[0]?.uuid);
|
||||
}
|
||||
// sort by position
|
||||
this._workspaceCache.workspaces.sort((a, b) => (a.position ?? Infinity) - (b.position ?? Infinity));
|
||||
}
|
||||
return this._workspaceCache;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue