mirror of
https://github.com/System-End/Vencord.git
synced 2026-04-19 19:45:09 +00:00
fix missing Toolbox
This commit is contained in:
parent
b6d727607f
commit
3992f971d0
1 changed files with 13 additions and 9 deletions
|
|
@ -25,7 +25,7 @@ import { Devs } from "@utils/constants";
|
|||
import definePlugin from "@utils/types";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { Menu, Popout, useRef, useState } from "@webpack/common";
|
||||
import type { ReactNode } from "react";
|
||||
import type { PropsWithChildren, ReactNode } from "react";
|
||||
|
||||
const HeaderBarIcon = findComponentByCodeLazy(".HEADER_BAR_BADGE_TOP:", '.iconBadge,"top"');
|
||||
|
||||
|
|
@ -131,16 +131,20 @@ export default definePlugin({
|
|||
{
|
||||
find: '?"BACK_FORWARD_NAVIGATION":',
|
||||
replacement: {
|
||||
// TODO: (?:\.button) is for stable compat and should be removed soon:tm:
|
||||
match: /focusSectionProps:"HELP".{0,20},className:(\i(?:\.button)?)\}\),/,
|
||||
replace: "$& $self.renderVencordPopoutButton($1),"
|
||||
match: /(?<=trailing:.{0,50})\i\.Fragment,\{(?=.+?className:(\i))/,
|
||||
replace: "$self.TrailingWrapper,{className:$1,"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
renderVencordPopoutButton: (buttonClass: string) => (
|
||||
<ErrorBoundary noop>
|
||||
<VencordPopoutButton buttonClass={buttonClass} />
|
||||
</ErrorBoundary>
|
||||
)
|
||||
TrailingWrapper({ children, className }: PropsWithChildren<{ className: string; }>) {
|
||||
return (
|
||||
<>
|
||||
{children}
|
||||
<ErrorBoundary noop>
|
||||
<VencordPopoutButton buttonClass={className} />
|
||||
</ErrorBoundary>
|
||||
</>
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue