feat: Improved update animation rendering, b=no-bug, c=common, folders

This commit is contained in:
mr. m
2025-08-25 00:02:48 +02:00
parent 7cbfad9369
commit 1ea533da24
2 changed files with 21 additions and 16 deletions

View File

@@ -173,26 +173,30 @@
return;
}
Services.prefs.setStringPref('zen.updates.last-build-id', appID);
if (gReduceMotion) return;
await gZenWorkspaces.promiseInitialized;
const appWrapper = document.getElementById('zen-main-app-wrapper');
const element = document.createElement('div');
element.id = 'zen-update-animation';
appWrapper.appendChild(element);
gZenUIManager.motion
.animate(
'#zen-update-animation',
{
top: ['100%', '-50%'],
opacity: [0.5, 1],
},
{
duration: 0.35,
}
)
.then(() => {
element.remove();
});
requestIdleCallback(() => {
if (gReduceMotion) {
return;
}
appWrapper.appendChild(element);
gZenUIManager.motion
.animate(
'#zen-update-animation',
{
top: ['100%', '-50%'],
opacity: [0.5, 1],
},
{
duration: 0.35,
}
)
.then(() => {
element.remove();
});
});
}
})();

View File

@@ -685,6 +685,7 @@
}
const canInsertBefore =
!isFromToolbar &&
!triggerTab.hasAttribute('zen-essential') &&
!triggerTab?.group?.hasAttribute('split-view-group') &&
this.canDropElement({ isZenFolder: true }, triggerTab);