mirror of
https://github.com/System-End/Vencord.git
synced 2026-04-19 19:45:09 +00:00
UserVoiceShow: fix showing in wrong location (#3884)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
58815b642e
commit
353a699481
2 changed files with 9 additions and 8 deletions
|
|
@ -25,14 +25,12 @@ const ActionButtonClasses = findByPropsLazy("actionButton", "highlight");
|
|||
|
||||
type IconProps = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
|
||||
size?: number;
|
||||
iconClassName?: string;
|
||||
};
|
||||
|
||||
function Icon(props: PropsWithChildren<IconProps>) {
|
||||
const {
|
||||
size = 16,
|
||||
className,
|
||||
iconClassName,
|
||||
...restProps
|
||||
} = props;
|
||||
|
||||
|
|
@ -42,7 +40,6 @@ function Icon(props: PropsWithChildren<IconProps>) {
|
|||
className={classes(cl("speaker"), className)}
|
||||
>
|
||||
<svg
|
||||
className={iconClassName}
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 24 24"
|
||||
|
|
@ -192,8 +189,12 @@ export const VoiceChannelIndicator = ErrorBoundary.wrap(({ userId, isProfile, is
|
|||
{...props}
|
||||
role="button"
|
||||
onClick={onClick}
|
||||
className={classes(cl("clickable"), isActionButton && ActionButtonClasses.actionButton, isActionButton && shouldHighlight && ActionButtonClasses.highlight)}
|
||||
iconClassName={classes(cl(isProfile && "profile-speaker"))}
|
||||
className={classes(
|
||||
cl("clickable"),
|
||||
isActionButton && ActionButtonClasses.actionButton,
|
||||
isActionButton && shouldHighlight && ActionButtonClasses.highlight,
|
||||
cl(isProfile && "profile-speaker")
|
||||
)}
|
||||
size={isActionButton ? 20 : 16}
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -57,10 +57,10 @@ export default definePlugin({
|
|||
patches: [
|
||||
// User Popout, User Profile Modal, Direct Messages Side Profile
|
||||
{
|
||||
find: "#{intl::USER_PROFILE_LOAD_ERROR}",
|
||||
find: "#{intl::USER_PROFILE_PRONOUNS}",
|
||||
replacement: {
|
||||
match: /(\.fetchError.+?\?)null/,
|
||||
replace: (_, rest) => `${rest}$self.VoiceChannelIndicator({userId:arguments[0]?.userId,isProfile:true})`
|
||||
match: /(\i).isVerifiedBot\(\)}\),/,
|
||||
replace: "$&$self.VoiceChannelIndicator({userId:$1.id,isProfile:true}),"
|
||||
},
|
||||
predicate: () => settings.store.showInUserProfileModal
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue