BetterInvites: Allow seeing if you made the invite

This commit is contained in:
thororen1234 2026-05-01 10:28:20 -04:00
parent 0a859c7330
commit eb1fa5ddbd
No known key found for this signature in database
2 changed files with 15 additions and 10 deletions

View file

@ -86,8 +86,11 @@ export default definePlugin({
);
},
Header(inviter: User | undefined, guildName: string) {
if (!inviter) return null;
const userId = UserStore.getCurrentUser().id;
if (!inviter || userId === inviter.id) return null;
const isSelf = userId === inviter.id;
return (
<div className="vc-bi-header-inner">
<img
@ -99,7 +102,9 @@ export default definePlugin({
: "/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128"}
/>
<div className="vc-bi-header-text">
{inviter.global_name || inviter.username} invited you to {guildName}
{isSelf
? `You sent an invite to join ${guildName}`
: `${inviter.global_name || inviter.username} invited you to ${guildName}`}
</div>
</div>
);

View file

@ -1,7 +1,7 @@
.vc-bi-inviter-avatar {
margin: 0;
height: 14px;
width: 14px;
height: 18px;
width: 18px;
position: static;
flex-shrink: 0;
}
@ -10,10 +10,10 @@
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
gap: 4px;
margin: 0;
margin-bottom: 5px;
font-size: 12px;
font-size: 14px;
}
.vc-bi-header-text {
@ -24,7 +24,7 @@
.vc-bi-tooltip-icon {
color: var(--text-muted);
width: 16px;
height: 16px;
margin-top: 1px;
}
width: 18px;
height: 18px;
margin-top: 1.5px;
}