Refactor CSS styles for zen components and update tab icon handling in ZenPinnedTabManager

This commit is contained in:
mr. M
2025-03-04 20:46:57 +01:00
parent 1c49cffc66
commit c78cafe605
5 changed files with 7 additions and 4 deletions

View File

@@ -84,7 +84,10 @@
onTabIconChanged(tab, url = null) {
const iconUrl = url ?? tab.iconImage.src;
if (tab.hasAttribute('zen-essential')) {
tab.querySelector('.tab-background').style.setProperty('--zen-tab-icon', `url(${iconUrl})`);
const pin = this._pinsCache.find((pin) => pin.uuid === tab.getAttribute('zen-pin-id'));
if (pin) {
tab.querySelector('.tab-background').style.setProperty('--zen-tab-icon', `url(${pin.iconUrl})`);
}
}
// TODO: work on this
//if (tab.hasAttribute('zen-pinned-changed') || !this._pinsCache) {