aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-11-17 00:21:13 +0100
committerVendicated <vendicated@riseup.net>2022-11-17 00:21:20 +0100
commit410613726b7f2da85d653bbf0e9cb662f1abd32e (patch)
treef424d91dc7d93e65431caf28b873c1a0a4a548cf /src/components
parent8b3f290e3ce1b166a3a15019b1f3504e015464c5 (diff)
downloadVencord-410613726b7f2da85d653bbf0e9cb662f1abd32e.tar.gz
Vencord-410613726b7f2da85d653bbf0e9cb662f1abd32e.tar.bz2
Vencord-410613726b7f2da85d653bbf0e9cb662f1abd32e.zip
Donor Badges && Add donate info to settings
Diffstat (limited to 'src/components')
-rw-r--r--src/components/DonateButton.tsx37
-rw-r--r--src/components/Heart.tsx35
-rw-r--r--src/components/Settings.tsx28
3 files changed, 97 insertions, 3 deletions
diff --git a/src/components/DonateButton.tsx b/src/components/DonateButton.tsx
new file mode 100644
index 0000000..6aae8ad
--- /dev/null
+++ b/src/components/DonateButton.tsx
@@ -0,0 +1,37 @@
+/*
+ * Vencord, a modification for Discord's desktop app
+ * Copyright (c) 2022 Vendicated and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
+import IpcEvents from "../utils/IpcEvents";
+import { Button } from "../webpack/common";
+import { Heart } from "./Heart";
+
+export default function DonateButton(props: any) {
+ return (
+ <Button
+ {...props}
+ look={Button.Looks.LINK}
+ color={Button.Colors.TRANSPARENT}
+ onClick={() =>
+ VencordNative.ipc.invoke(IpcEvents.OPEN_EXTERNAL, "https://github.com/sponsors/Vendicated")
+ }
+ >
+ <Heart />
+ Donate
+ </Button>
+ );
+}
diff --git a/src/components/Heart.tsx b/src/components/Heart.tsx
new file mode 100644
index 0000000..b33b836
--- /dev/null
+++ b/src/components/Heart.tsx
@@ -0,0 +1,35 @@
+/*
+ * Vencord, a modification for Discord's desktop app
+ * Copyright (c) 2022 Vendicated and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
+export function Heart() {
+ return (
+ <svg
+ aria-hidden="true"
+ height="16"
+ viewBox="0 0 16 16"
+ width="16"
+ style={{ marginRight: "0.5em", transform: "translateY(2px)" }}
+ >
+ <path
+ fill="#db61a2"
+ fill-rule="evenodd"
+ d="M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"
+ />
+ </svg>
+ );
+}
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx
index 363b1df..fc25901 100644
--- a/src/components/Settings.tsx
+++ b/src/components/Settings.tsx
@@ -20,7 +20,8 @@ import { useSettings } from "../api/settings";
import { ChangeList } from "../utils/ChangeList";
import IpcEvents from "../utils/IpcEvents";
import { useAwaiter } from "../utils/misc";
-import { Alerts, Button, Forms, Margins, Parser, React, Switch } from "../webpack/common";
+import { Alerts, Button, Card, Forms, Margins, Parser, React, Switch } from "../webpack/common";
+import DonateButton from "./DonateButton";
import ErrorBoundary from "./ErrorBoundary";
import { Flex } from "./Flex";
import { handleComponentFailed } from "./handleComponentFailed";
@@ -52,15 +53,36 @@ export default ErrorBoundary.wrap(function Settings() {
return (
<Forms.FormSection tag="h1" title="Vencord">
+ <Card style={{
+ padding: "1em",
+ display: "flex",
+ flexDirection: "row",
+ marginBottom: "1em"
+ }}>
+ <div>
+ <Forms.FormTitle tag="h5">Support the Project</Forms.FormTitle>
+ <Forms.FormText>
+ Please consider supporting the Development of Vencord by donating!
+ </Forms.FormText>
+ <DonateButton style={{ transform: "translateX(-1em)" }} />
+ </div>
+ <img
+ role="presentation"
+ src="https://cdn.discordapp.com/emojis/1026533090627174460.png"
+ alt=""
+ style={{ marginLeft: "auto", transform: "rotate(10deg)" }}
+ />
+ </Card>
+
<Forms.FormTitle tag="h5">
Settings
</Forms.FormTitle>
- <Forms.FormText>
+ <Forms.FormText className={Margins.marginBottom8}>
Settings Directory: <code style={{ userSelect: "text", cursor: "text" }}>{settingsDir}</code>
</Forms.FormText>
- {!IS_WEB && <Flex className={Margins.marginBottom20} style={{ marginTop: 8 }}>
+ {!IS_WEB && <Flex className={Margins.marginBottom20}>
<Button
onClick={() => window.DiscordNative.app.relaunch()}
size={Button.Sizes.SMALL}