Skip to content

Commit

Permalink
feat: user avatar decoration (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZickZenni committed Sep 6, 2024
1 parent 32bef3e commit 11eef1a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/renderer/pages/Guild/Channel/Channel.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
}

.channel_page__message_author {
position: relative;
display: flex;
height: 54px;
}
Expand All @@ -57,6 +58,12 @@
filter: drop-shadow(0px 3px 1px #00000077);
}

.channel_page__user_decoration {
aspect-ratio: 1/1;
height: 100%;
position: absolute;
}

.channel_page__message_wrapper {
width: 100%;
height: 100%;
Expand Down
9 changes: 9 additions & 0 deletions src/renderer/pages/Guild/Channel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ export default function ChannelPage() {
src={`https://cdn.discordapp.com/avatars/${message.author.id}/${message.author.avatar}.png`}
alt="Avatar Icon"
/>
{message.author.avatar_decoration_data && (
<img
className="channel_page__user_decoration"
src={`https://cdn.discordapp.com/avatar-decoration-presets/${
message.author.avatar_decoration_data.asset
}.png`}
alt="Avatar Decoration"
/>
)}
</div>
<div className="channel_page__message_wrapper">
<div className="channel_page__message_author_info">
Expand Down

0 comments on commit 11eef1a

Please sign in to comment.