mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-29 13:59:26 +01:00
Fix avatar decoration Z index for embeds
This commit is contained in:
parent
495a19540b
commit
83c010453d
1 changed files with 5 additions and 0 deletions
|
@ -30,6 +30,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
rotate: getDecorationAngle(decoration),
|
||||
scale: getDecorationScale(decoration),
|
||||
translate: getDecorationOffset(decoration),
|
||||
zIndex: getDecorationZIndex(decoration),
|
||||
}"
|
||||
alt=""
|
||||
>
|
||||
|
@ -86,6 +87,10 @@ function getDecorationOffset(decoration: Omit<Misskey.entities.UserDetailed['ava
|
|||
const offsetY = decoration.offsetY ?? 0;
|
||||
return offsetX === 0 && offsetY === 0 ? undefined : `${offsetX * 100}% ${offsetY * 100}%`;
|
||||
}
|
||||
|
||||
function getDecorationZIndex(decoration: Omit<Misskey.entities.UserDetailed['avatarDecorations'][number], 'id'>) {
|
||||
return decoration.showBelow ? '-1' : undefined;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
|
Loading…
Reference in a new issue