Commit graph

4 commits

Author SHA1 Message Date
Kristijan Ribarić
2e37d6ce0b Updated zen pinned tab manager to use lazy prefs getter, added methods for setting Pinned Tab State and updating pinned tab for session restore 2024-10-08 14:14:43 +02:00
Kristijan Ribarić
dab9e1edcc fix(pinned-tabs): Always update pinned tab data with latest information
This commit ensures that pinned tab data is always updated with the latest information, and previous tab entries are cleaned up.
2024-10-07 22:56:37 +02:00
Kristijan Ribarić
89f6a07353 feat: Improve pinned tab management
This commit introduces several improvements to the pinned tab manager:

- **Adds icon support for pinned tabs**: Pinned tabs now store and restore their icon in addition to URL and title.
- **Adds "Replace with Current" context menu option**: A new option in the tab context menu allows replacing the URL of a pinned tab with the current page.
- **Refactors code for better readability**: Renames methods and variables for clarity, and improves code structure.
- **Fixes issues with resetting pinned tabs**: Ensures that pinned tabs are correctly reset when closed using the Ctrl+W shortcut or by using the "Reset Pinned Tab" context menu option.
- **Adds missing menu item**: Adds the missing menu item for resetting the pinned tab in the tab context menu.

These changes enhance the functionality and user experience of the pinned tab manager, making it more robust and user-friendly.
2024-10-07 21:02:01 +02:00
Kristijan Ribarić
1963de08e9 feat: Implement pinned tab manager
This commit introduces a new feature: a pinned tab manager.

- Adds `ZenPinnedTabsObserver` to listen for pinned/unpinned tab events.
- Implements `ZenPinnedTabManager` to handle the logic of managing pinned tabs:
    - Stores pinned tab URLs and titles.
    - Resets the pinned tab to its saved state when closed.
    - Adds a new context menu option to manually reset a pinned tab.
    - Implements a shortcut to close a pinned tab and optionally reset its state.

This feature enhances pinned tab functionality by providing a better user experience for managing and resetting them.
2024-10-07 21:02:01 +02:00