HeaderBarAPI: Fix CSS & Patch

This commit is contained in:
thororen1234 2026-03-11 15:46:37 -04:00
parent 4c801820e4
commit b442f4e675
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ import type { ComponentType, JSX, MouseEventHandler, ReactNode } from "react";
const logger = new Logger("HeaderBarAPI");
const HeaderBarClasses = findCssClassesLazy("clickable", "withHighlight");
const HeaderBarClasses = findCssClassesLazy("clickable", "selected", "badge", "badgeContainer");
const HeaderBarIcon = findComponentByCodeLazy(".HEADER_BAR_BADGE_TOP:", '"aria-haspopup":') as ComponentType<ChannelToolbarButtonProps>;
export interface HeaderBarButtonProps {
@ -101,7 +101,7 @@ export function HeaderBarButton(props: HeaderBarButtonProps & { ref?: React.RefO
{({ onMouseEnter, onMouseLeave }) => (
<Clickable
{...{ innerRef: ref } as any}
className={classes(HeaderBarClasses.clickable, HeaderBarClasses.withHighlight, className)}
className={classes(HeaderBarClasses.clickable, className)}
style={{ width: iconSize, boxSizing: "content-box", justifyContent: "center" }}
onClick={onClick}
onContextMenu={onContextMenu}

View file

@ -16,7 +16,7 @@ export default definePlugin({
{
find: '?"BACK_FORWARD_NAVIGATION":',
replacement: {
match: /(?<="HELP"===.{0,150}className:\i\.\i\}\))(?=\])/,
match: /(?<="HELP"===.{0,75}\{\}\))(?=\])/,
replace: ",...Vencord.Api.HeaderBar._addHeaderBarButtons()"
}
},