This commit introduces pinned tab persistence across sessions and integrates it with workspaces.
- **Pinned Tab Storage:**
- Implements a database-based storage system for pinned tabs using PlacesUtils.
- Provides methods for saving, retrieving, deleting, and managing pinned tabs.
- Tracks changes to pinned tabs for efficient updates.
- **Workspace Integration:**
- Allows pinned tabs to be associated with specific workspaces.
- Synchronizes pinned tabs with the active workspace.
- Ensures that pinned tabs are not inadvertently moved between workspaces.
This commit adds support for syncing workspace themes across devices.
The following changes were made:
- Added theme properties to the Zen workspace schema:
- `theme_type` (string): Type of theme (e.g., "gradient", "solid").
- `theme_colors` (JSON string): Array of gradient colors.
- `theme_opacity` (number): Opacity of the theme.
- `theme_rotation` (number): Rotation of the theme.
- `theme_texture` (number): Texture of the theme.
- Updated the `ZenWorkspacesSync` class to handle theme data.
- Added validation for theme properties.
- Updated the `ZenWorkspacesStorage` class to save and load workspace themes.
- Bumped the `ZenWorkspacesEngine` version to 2.
This commit adds the ability to store theme information for workspaces.
- Added `theme_type`, `theme_colors`, `theme_opacity`, `theme_rotation`, and `theme_texture` columns to the `zen_workspaces` table.
- Updated `saveWorkspace` to store the theme information when saving a workspace.
- Removed the unused `zen_workspace_themes` table.
This change allows users to save and restore the theme of their workspaces.
The `getWorkspaceTheme()` method has been removed because it is no longer necessary. The theme information is now retrieved directly from the workspace data in `getWorkspaces()`. This change simplifies the code and improves efficiency.
This commit introduces several improvements related to workspace themes:
- **Theme Persistence:** Workspaces now persist their themes in zen_workspaces table alongside other workspace data.
- **Theme Propagation:** The `_propagateWorkspaceData` function now includes an option to clear the workspace cache, preventing stale data from being used when propagating workspace data.
- **Theme Handling:** The `onWorkspaceChange` function now uses the theme from the workspace object or a passed theme, simplifying theme handling.
- **Theme Data Structure:** The `zen_workspaces` table has been updated to store theme data directly, eliminating the need for a separate `zen_workspace_themes` table.
- **Database Schema Changes:** This commit introduces new columns to the `zen_workspaces` table to store theme information, making the database schema more efficient and less redundant.
This commit adds the ability to move a workspace to the end of the workspace list by dragging it to a designated drop target.
The changes include:
- Creation of a new "last position drop target" element that allows dragging a workspace to the end.
- Event listeners for dragover, dragenter, dragleave, and drop events on the drop target element.
- Implementation of `moveWorkspaceToEnd` function to update the workspace positions in storage when a workspace is moved to the end.
- Reorder mode is exited if the panel is closed.
- Updates to the workspace list to include the last position drop target.
This commit introduces the ability to reorder workspaces in the workspace manager. This adds functionality to move workspaces up and down within the list, allowing users to customize the order in which they appear.
- Added new buttons for moving workspaces up and down.
- Implemented `moveWorkspaceUp` and `moveWorkspaceDown` methods in `ZenWorkspacesStorage` to handle workspace reordering.
- Updated `ZenWorkspaces` to handle the new reorder mode and button events.
- Modified the workspace list UI to display reorder buttons and indicate when reorder mode is active.
These changes provide users with more control over their workspace organization and improve the overall usability of the workspace manager.