Update plugins

This commit is contained in:
RobinRMC 2025-02-15 19:56:09 +01:00 committed by GitHub
parent 0a236ba592
commit bc705b0542
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -48,8 +48,8 @@ export default definePlugin({
replace: ",($1||((!$1)&&arguments[0].invite.expires_at)) && $2$self.RenderTip($1, $3, arguments[0].invite.expires_at)"
},
{
match: /(\.jsx\)\(\i.\i.Info,{.+onClick):(\i\?\i:null),/,
replace: "$1:$2 || $self.Lurkable(arguments[0].invite.guild.id, arguments[0].invite.guild.features),"
match: /(\.jsx\)\(\i.\i.Info,{.+onClick:\i\?.{0,5}:null)/,
replace: "$& || $self.Lurkable(arguments[0].invite.guild.id, arguments[0].invite.guild.features)"
},
{
match: /(\.jsx\)\(\i\.\i\.Header,\{)text:(\i)/,
@ -65,6 +65,7 @@ export default definePlugin({
return <div className="vc-bi-header-inner">
{(inviter && (currentUserId !== inviter.id)) ? <>
<img
alt=""
className={classes(AvatarStyles.avatar, AvatarStyles.clickable) + " vc-bi-inviter-avatar"}
onClick={() => openUserProfile(inviter.id)}
src={inviter.avatar ? `https://cdn.discordapp.com/avatars/${inviter.id}/${inviter.avatar}.webp?size=80` : "/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128"}

View file

@ -40,7 +40,7 @@ const settings = definePluginSettings({
function Watching({ userIds, guildId }: WatchingProps): JSX.Element {
// Missing users happen when UserStore.getUser(id) returns null
// The client should automatically cache spectators, so this might not be possible, but it's better to be sure just in case
// The client should automatically cache spectators, so this might not be possible, but it's better to be sure, just in case
let missingUsers = 0;
const users = userIds.map(id => UserStore.getUser(id)).filter(user => Boolean(user) ? true : (missingUsers += 1, false));
return (
@ -51,7 +51,7 @@ function Watching({ userIds, guildId }: WatchingProps): JSX.Element {
<Flex flexDirection="column" style={{ gap: 6 }} >
{users.map(user => (
<Flex key={user.id} flexDirection="row" style={{ gap: 6, alignContent: "center" }} className={cl("user")} >
<img src={user.getAvatarURL(guildId)} style={{ borderRadius: 8, width: 16, height: 16 }} />
<img src={user.getAvatarURL(guildId)} style={{ borderRadius: 8, width: 16, height: 16 }} alt="" />
{getUsername(user)}
</Flex>
))}