feat(voiceChannelLog): display username on profile picture hover

This commit is contained in:
verticalsync 2024-10-21 20:18:22 +03:00
parent 40ba524206
commit 5585d4cd94
No known key found for this signature in database
GPG key ID: C2BC9F32343245E1
4 changed files with 18 additions and 7 deletions

View file

@ -32,7 +32,8 @@
text-align: center;
margin-top: 10px;
padding-left: 10px;
padding-right: 10px
padding-right: 10px;
cursor: pointer;
}
.vc-voice-channel-log-icon {

View file

@ -7,7 +7,7 @@
import "./VoiceChannelLogEntryComponent.css";
import { classes } from "@utils/misc";
import { React, Timestamp, UserStore } from "@webpack/common";
import { React, Timestamp, Tooltip, UserStore } from "@webpack/common";
import { Channel } from "discord-types/general";
import { Util } from "Vencord";
@ -20,11 +20,16 @@ export function VoiceChannelLogEntryComponent({ logEntry, channel }: { logEntry:
return <li className="vc-voice-channel-log">
<Timestamp className={cl("timestamp")} timestamp={new Date(logEntry.timestamp)} compact isInline={false} cozyAlt></Timestamp>
<Icon logEntry={logEntry} channel={channel} className={cl("icon")} />
<img
className={classes(cl("avatar"))}
onClick={() => Util.openUserProfile(logEntry.userId)}
src={user.getAvatarURL(channel.getGuildId())}
/>
<Tooltip text={logEntry.username}>
{(tooltipProps: any) => (
<img
{...tooltipProps}
className={classes(cl("avatar"))}
onClick={() => Util.openUserProfile(logEntry.userId)}
src={user.getAvatarURL(channel.getGuildId())}
/>
)}
</Tooltip>
<div className={cl("content")}>
{ }
</div>