From 83c010453d4ff7d9b770ef1d0b57e2bf2eb82a48 Mon Sep 17 00:00:00 2001
From: CenTdemeern1 <timo.herngreen@gmail.com>
Date: Sun, 8 Dec 2024 16:56:18 +0100
Subject: [PATCH] Fix avatar decoration Z index for embeds

---
 packages/frontend-embed/src/components/EmAvatar.vue | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/packages/frontend-embed/src/components/EmAvatar.vue b/packages/frontend-embed/src/components/EmAvatar.vue
index 58c35c8ef0..50d46781d9 100644
--- a/packages/frontend-embed/src/components/EmAvatar.vue
+++ b/packages/frontend-embed/src/components/EmAvatar.vue
@@ -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>
-- 
GitLab