Fix Conflicts + Invite Button

This commit is contained in:
thororen1234 2025-02-07 15:54:20 -05:00
parent 5c04fac366
commit 9b8ab3bf97
6 changed files with 74 additions and 27 deletions

View file

@ -16,7 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Button } from "@webpack/common";
import { openInviteModal } from "@utils/discord";
import { Button, showToast } from "@webpack/common";
import { ButtonProps } from "@webpack/types";
import { Heart } from "./Heart";
@ -39,3 +40,23 @@ export default function DonateButton({
</Button>
);
}
export function InviteButton({
look = Button.Looks.LINK,
color = Button.Colors.TRANSPARENT,
...props
}: Partial<ButtonProps>) {
return (
<Button
{...props}
look={look}
color={color}
onClick={() => openInviteModal("bFp57wxCkv").catch(() =>
showToast("Invalid or expired invite"),
)}
innerClassName="vc-donate-button"
>
Invite
</Button>
);
}

View file

@ -37,3 +37,4 @@ export function Heart(props: SVGProps<SVGSVGElement>) {
</svg>
);
}

View file

@ -9,7 +9,7 @@ import "./VencordTab.css";
import { openNotificationLogModal } from "@api/Notifications/notificationLog";
import { useSettings } from "@api/Settings";
import { classNameFactory } from "@api/Styles";
import DonateButton from "@components/DonateButton";
import DonateButton, { InviteButton } from "@components/DonateButton";
import { openContributorModal } from "@components/PluginSettings/ContributorModal";
import { openPluginModal } from "@components/PluginSettings/PluginModal";
import { gitRemote } from "@shared/vencordUserAgent";
@ -334,11 +334,16 @@ function EquicordSettings() {
function DonateButtonComponent() {
return (
<DonateButton
look={Button.Looks.FILLED}
color={Button.Colors.TRANSPARENT}
style={{ marginTop: "1em" }}
/>
<Flex>
<DonateButton
look={Button.Looks.FILLED}
color={Button.Colors.TRANSPARENT}
style={{ marginTop: "1em" }} />
<InviteButton
look={Button.Looks.FILLED}
color={Button.Colors.TRANSPARENT}
style={{ marginTop: "1em" }} />
</Flex>
);
}

View file

@ -60,19 +60,19 @@
.vc-special-hyperlink {
margin-top: 1em;
cursor: pointer;
}
.vc-special-hyperlink-text {
color: black;
font-size: 1em;
font-weight: bold;
text-align: center;
transition: text-decoration 0.5s;
cursor: pointer;
}
.vc-special-hyperlink-text {
color: black;
font-size: 1em;
font-weight: bold;
text-align: center;
transition: text-decoration 0.5s;
cursor: pointer;
}
&:hover .vc-special-hyperlink-text {
text-decoration: underline;
}
.vc-special-hyperlink:hover .vc-special-hyperlink-text {
text-decoration: underline;
}
.vc-special-image-container {