Fade in the header banner too

Prevent the abruptness
This commit is contained in:
Lim Chee Aun 2023-06-14 21:42:28 +08:00
parent a4db692ea8
commit 28acd9720e
2 changed files with 6 additions and 0 deletions

View file

@ -38,6 +38,11 @@
margin-bottom: -44px; margin-bottom: -44px;
user-select: none; user-select: none;
-webkit-user-drag: none; -webkit-user-drag: none;
opacity: 0;
transition: opacity 0.3s ease-out;
}
.account-container .header-banner.loaded {
opacity: 1;
} }
.sheet .account-container .header-banner { .sheet .account-container .header-banner {
border-top-left-radius: 16px; border-top-left-radius: 16px;

View file

@ -186,6 +186,7 @@ function AccountInfo({
}} }}
crossOrigin="anonymous" crossOrigin="anonymous"
onLoad={(e) => { onLoad={(e) => {
e.target.classList.add('loaded');
try { try {
// Get color from four corners of image // Get color from four corners of image
const canvas = document.createElement('canvas'); const canvas = document.createElement('canvas');