Skip to content

Commit

Permalink
breadcrums meow
Browse files Browse the repository at this point in the history
  • Loading branch information
yofukashino committed Nov 6, 2023
1 parent aac9b66 commit 91a9392
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
14 changes: 14 additions & 0 deletions src/renderer/coremods/settings/pages/Addons.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,17 @@
.replugged-addon-icon:hover svg {
color: var(--interactive-hover);
}

.rp-addon-breadcrumbs {
margin-bottom: 20px;
}
.rp-addon-breadcrumbsActive {
color: var(--header-primary);
}
.rp-addon-breadcrumbsInactive {
cursor: pointer;
color: var(--header-secondary);
}
.rp-addon-breadcrumbsInactive:hover {
color: var(--header-primary);
}
12 changes: 2 additions & 10 deletions src/renderer/coremods/settings/pages/Addons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ const logger = Logger.coremod("AddonSettings");
const Breadcrumbs = webpack.getBySource<React.ComponentClass<BreadcrumbProps>>(
/\w+.breadcrumbFinalWrapper/,
)!;
const BreadcrumbClasses =
webpack.getByProps<Record<"breadcrumbActive" | "breadcrumbInactive" | "breadcrumbs", string>>(
"breadcrumbActive",
)!;

export enum AddonType {
Plugin = "plugin",
Expand Down Expand Up @@ -547,7 +543,7 @@ export const Addons = (type: AddonType): React.ReactElement => {
return (
<>
<Flex justify={Flex.Justify.BETWEEN} align={Flex.Align.START}>
<Flex align={Flex.Align.CENTER} className={BreadcrumbClasses.breadcrumbs}>
<Flex align={Flex.Align.CENTER} className={"rp-addon-breadcrumbs"}>
{section === `rp_${type}` ? (
<Text.H2
style={{
Expand Down Expand Up @@ -582,11 +578,7 @@ export const Addons = (type: AddonType): React.ReactElement => {
renderCustomBreadcrumb={(breadcrumb, active) => (
<Text.H2
color={active ? "header-primary" : "inherit"}
className={
active
? BreadcrumbClasses.breadcrumbActive
: BreadcrumbClasses.breadcrumbInactive
}
className={active ? "rp-addon-breadcrumbsActive" : "rp-addon-breadcrumbsInactive"}
style={{
// Do not turn "(num)" into a single symbol
fontVariantLigatures: "none",
Expand Down

0 comments on commit 91a9392

Please sign in to comment.