Equicord/src/plugins/_api/badges/modals.tsx

126 lines
5 KiB
TypeScript
Raw Normal View History

2025-05-14 14:46:57 -04:00
/*
* Vencord, a Discord client mod
* Copyright (c) 2025 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
2026-02-13 19:30:33 -05:00
import ErrorBoundary from "@components/ErrorBoundary";
2025-05-14 14:46:57 -04:00
import { Flex } from "@components/Flex";
2026-02-13 19:30:33 -05:00
import { HeadingPrimary } from "@components/Heading";
2025-05-14 14:46:57 -04:00
import { Heart } from "@components/Heart";
2026-02-13 19:30:33 -05:00
import { Paragraph } from "@components/Paragraph";
import { DonateButton } from "@components/settings";
2025-05-14 14:46:57 -04:00
import { Margins } from "@utils/margins";
import { closeModal, ModalContent, ModalFooter, ModalHeader, ModalRoot, openModal } from "@utils/modal";
export function VencordDonorModal() {
const modalKey = openModal(props => (
<ErrorBoundary noop onError={() => {
closeModal(modalKey);
VencordNative.native.openExternal("https://github.com/sponsors/Vendicated");
}}>
<ModalRoot {...props}>
<ModalHeader>
2025-10-10 21:11:31 -04:00
<HeadingPrimary
style={{
width: "100%",
textAlign: "center",
margin: 0
}}
>
2025-11-25 23:06:51 -05:00
<Flex justifyContent="center" alignItems="center" gap="0.5em">
2025-05-14 14:46:57 -04:00
<Heart />
Vencord Donor
2025-10-10 21:11:31 -04:00
</Flex>
</HeadingPrimary>
2025-05-14 14:46:57 -04:00
</ModalHeader>
<ModalContent>
<Flex>
<img
role="presentation"
src="https://cdn.discordapp.com/emojis/1026533070955872337.png"
alt=""
style={{ margin: "auto" }}
/>
<img
role="presentation"
src="https://cdn.discordapp.com/emojis/1026533090627174460.png"
alt=""
style={{ margin: "auto" }}
/>
</Flex>
<div style={{ padding: "1em" }}>
2025-10-10 21:27:47 -04:00
<Paragraph>
2025-05-14 14:46:57 -04:00
This Badge is a special perk for Vencord Donors
2025-10-10 21:27:47 -04:00
</Paragraph>
<Paragraph className={Margins.top20}>
2025-10-10 21:11:31 -04:00
Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!
2025-10-10 21:27:47 -04:00
</Paragraph>
2025-05-14 14:46:57 -04:00
</div>
</ModalContent>
<ModalFooter>
2025-11-25 23:06:51 -05:00
<Flex justifyContent="center" style={{ width: "100%" }}>
2025-12-04 18:10:42 -05:00
<DonateButton />
2025-05-14 14:46:57 -04:00
</Flex>
</ModalFooter>
</ModalRoot>
</ErrorBoundary>
));
}
export function EquicordDonorModal() {
const modalKey = openModal(props => (
<ErrorBoundary noop onError={() => {
closeModal(modalKey);
// Will get my own in the future
VencordNative.native.openExternal("https://github.com/sponsors/thororen1234");
}}>
<ModalRoot {...props}>
<ModalHeader>
2025-10-10 21:11:31 -04:00
<HeadingPrimary
style={{
width: "100%",
textAlign: "center",
margin: 0
}}
>
2025-11-25 23:06:51 -05:00
<Flex justifyContent="center" alignItems="center" gap="0.5em">
2025-05-14 14:46:57 -04:00
<Heart />
Equicord Donor
2025-10-10 21:11:31 -04:00
</Flex>
</HeadingPrimary>
2025-05-14 14:46:57 -04:00
</ModalHeader>
<ModalContent>
<Flex>
<img
role="presentation"
src="https://cdn.discordapp.com/emojis/1026533070955872337.png"
alt=""
style={{ margin: "auto" }}
/>
<img
role="presentation"
src="https://cdn.discordapp.com/emojis/1026533090627174460.png"
alt=""
style={{ margin: "auto" }}
/>
</Flex>
<div style={{ padding: "1em" }}>
2025-10-10 21:27:47 -04:00
<Paragraph>
2025-05-14 14:46:57 -04:00
This Badge is a special perk for Equicord (Not Vencord) Donors
2025-10-10 21:27:47 -04:00
</Paragraph>
<Paragraph className={Margins.top20}>
2025-05-14 14:46:57 -04:00
Please consider supporting the development of Equicord by becoming a donor. It would mean a lot! :3
2025-10-10 21:27:47 -04:00
</Paragraph>
2025-05-14 14:46:57 -04:00
</div>
</ModalContent>
<ModalFooter>
2025-11-25 23:06:51 -05:00
<Flex justifyContent="center" style={{ width: "100%" }}>
2025-12-04 18:10:42 -05:00
<DonateButton equicord={true} />
2025-05-14 14:46:57 -04:00
</Flex>
</ModalFooter>
</ModalRoot>
</ErrorBoundary>
));
}