mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-01-01 08:26:14 +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),
|
rotate: getDecorationAngle(decoration),
|
||||||
scale: getDecorationScale(decoration),
|
scale: getDecorationScale(decoration),
|
||||||
translate: getDecorationOffset(decoration),
|
translate: getDecorationOffset(decoration),
|
||||||
|
zIndex: getDecorationZIndex(decoration),
|
||||||
}"
|
}"
|
||||||
alt=""
|
alt=""
|
||||||
>
|
>
|
||||||
|
@ -86,6 +87,10 @@ function getDecorationOffset(decoration: Omit<Misskey.entities.UserDetailed['ava
|
||||||
const offsetY = decoration.offsetY ?? 0;
|
const offsetY = decoration.offsetY ?? 0;
|
||||||
return offsetX === 0 && offsetY === 0 ? undefined : `${offsetX * 100}% ${offsetY * 100}%`;
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
|
|
Loading…
Reference in a new issue