fix: remove sidebar minapp animation to stop gpu high load
This commit is contained in:
parent
6891068ca1
commit
da49c3ddd3
@ -288,7 +288,7 @@ const PinnedApps: FC = () => {
|
|||||||
<Icon
|
<Icon
|
||||||
theme={theme}
|
theme={theme}
|
||||||
onClick={() => openMinappKeepAlive(app)}
|
onClick={() => openMinappKeepAlive(app)}
|
||||||
className={`${isActive ? 'active' : ''} ${openedKeepAliveMinapps.some((item) => item.id === app.id) ? 'opened-animation' : ''}`}>
|
className={`${isActive ? 'active' : ''} ${openedKeepAliveMinapps.some((item) => item.id === app.id) ? 'opened-minapp' : ''}`}>
|
||||||
<MinAppIcon size={20} app={app} style={{ borderRadius: 6 }} />
|
<MinAppIcon size={20} app={app} style={{ borderRadius: 6 }} />
|
||||||
</Icon>
|
</Icon>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
@ -403,11 +403,10 @@ const Icon = styled.div<{ theme: string }>`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.opened-animation {
|
&.opened-minapp {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
&.opened-minapp::after {
|
||||||
&.opened-animation::after {
|
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -415,13 +414,8 @@ const Icon = styled.div<{ theme: string }>`
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
border-radius: inherit;
|
border-radius: inherit;
|
||||||
opacity: 0;
|
opacity: 0.3;
|
||||||
will-change: opacity;
|
|
||||||
border: 0.5px solid var(--color-primary);
|
border: 0.5px solid var(--color-primary);
|
||||||
/* NOTICE: although we have optimized for the performance,
|
|
||||||
* the infinite animation will still consume a little GPU resources,
|
|
||||||
* it's a trade-off balance between performance and animation smoothness*/
|
|
||||||
animation: borderBreath 4s ease-in-out infinite;
|
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user