@@ -123,8 +119,8 @@ export default ErrorBoundary.wrap(function () {
padding: ".5em",
border: "1px solid var(--background-modifier-accent)"
}}
- ref={ref}
- defaultValue={settings.themeLinks.join("\n")}
+ value={themeText}
+ onChange={e => setThemeText(e.currentTarget.value)}
className={TextAreaProps.textarea}
placeholder="Theme Links"
spellCheck={false}
diff --git a/src/components/VencordSettings/Updater.tsx b/src/components/VencordSettings/Updater.tsx
index 33690697f..b5243f2d5 100644
--- a/src/components/VencordSettings/Updater.tsx
+++ b/src/components/VencordSettings/Updater.tsx
@@ -16,6 +16,7 @@
* along with this program. If not, see
.
*/
+import { useSettings } from "@api/settings";
import ErrorBoundary from "@components/ErrorBoundary";
import { ErrorCard } from "@components/ErrorCard";
import { Flex } from "@components/Flex";
@@ -23,7 +24,7 @@ import { handleComponentFailed } from "@components/handleComponentFailed";
import { Link } from "@components/Link";
import { classes, useAwaiter } from "@utils/misc";
import { changes, checkForUpdates, getRepo, isNewer, rebuild, update, updateError, UpdateLogger } from "@utils/updater";
-import { Alerts, Button, Card, Forms, Margins, Parser, React, Toasts } from "@webpack/common";
+import { Alerts, Button, Card, Forms, Margins, Parser, React, Switch, Toasts } from "@webpack/common";
import gitHash from "~git-hash";
@@ -69,14 +70,18 @@ interface CommonProps {
repoPending: boolean;
}
+function HashLink({ repo, hash, disabled = false }: { repo: string, hash: string, disabled?: boolean; }) {
+ return
+ {hash}
+ ;
+}
+
function Changes({ updates, repo, repoPending }: CommonProps & { updates: typeof changes; }) {
return (
{updates.map(({ hash, author, message }) => (
-
-
{hash}
-
+
{
@@ -192,16 +199,33 @@ function Updater() {
};
return (
-
+
+ Updater Settings
+ settings.notifyAboutUpdates = v}
+ note="Shows a toast on startup"
+ disabled={settings.autoUpdate}
+ >
+ Get notified about new updates
+
+ settings.autoUpdate = v}
+ note="Automatically update Vencord without confirmation prompt"
+ >
+ Automatically update
+
+
Repo
{repoPending ? repo : err ? "Failed to retrieve - check console" : (
{repo.split("/").slice(-2).join("/")}
- )} ({gitHash})
+ )} ()
-
+
Updates
diff --git a/src/components/VencordSettings/VencordTab.tsx b/src/components/VencordSettings/VencordTab.tsx
index df25e2d85..98808728a 100644
--- a/src/components/VencordSettings/VencordTab.tsx
+++ b/src/components/VencordSettings/VencordTab.tsx
@@ -18,31 +18,73 @@
import { useSettings } from "@api/settings";
+import { classNameFactory } from "@api/Styles";
import DonateButton from "@components/DonateButton";
import ErrorBoundary from "@components/ErrorBoundary";
+import { ErrorCard } from "@components/ErrorCard";
import IpcEvents from "@utils/IpcEvents";
-import { useAwaiter } from "@utils/misc";
-import { Button, Card, Forms, Margins, React, Switch } from "@webpack/common";
+import { Margins } from "@utils/margins";
+import { identity, useAwaiter } from "@utils/misc";
+import { Button, Card, Forms, React, Select, Slider, Switch } from "@webpack/common";
-const st = (style: string) => `vcSettings${style}`;
+const cl = classNameFactory("vc-settings-");
+
+const DEFAULT_DONATE_IMAGE = "https://cdn.discordapp.com/emojis/1026533090627174460.png";
+const SHIGGY_DONATE_IMAGE = "https://media.discordapp.net/stickers/1039992459209490513.png";
+
+type KeysOfType