aboutsummaryrefslogtreecommitdiff
path: root/src/components/Settings.tsx
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-11-25 19:25:35 +0100
committerVendicated <vendicated@riseup.net>2022-11-25 19:25:35 +0100
commita85ec594a77557e5f48c4cf1aa33680e0da94654 (patch)
treee88fa38f588fef187a0caec884763fc50da8385d /src/components/Settings.tsx
parentc2c6c9fccb3b94340037d2136d647817d0a1c916 (diff)
downloadVencord-a85ec594a77557e5f48c4cf1aa33680e0da94654.tar.gz
Vencord-a85ec594a77557e5f48c4cf1aa33680e0da94654.tar.bz2
Vencord-a85ec594a77557e5f48c4cf1aa33680e0da94654.zip
[skip ci] docs docs docs
Diffstat (limited to 'src/components/Settings.tsx')
-rw-r--r--src/components/Settings.tsx24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx
index e2abff2..f8e7495 100644
--- a/src/components/Settings.tsx
+++ b/src/components/Settings.tsx
@@ -17,11 +17,10 @@
*/
import { useSettings } from "../api/settings";
-import { ChangeList } from "../utils/ChangeList";
import IpcEvents from "../utils/IpcEvents";
import { useAwaiter } from "../utils/misc";
import { downloadSettingsBackup, uploadSettingsBackup } from "../utils/settingsSync";
-import { Alerts, Button, Card, Forms, Margins, Parser, React, Switch } from "../webpack/common";
+import { Button, Card, Forms, Margins, React, Switch } from "../webpack/common";
import DonateButton from "./DonateButton";
import ErrorBoundary from "./ErrorBoundary";
import { Flex } from "./Flex";
@@ -30,27 +29,6 @@ import { handleComponentFailed } from "./handleComponentFailed";
export default ErrorBoundary.wrap(function Settings() {
const [settingsDir, , settingsDirPending] = useAwaiter(() => VencordNative.ipc.invoke<string>(IpcEvents.GET_SETTINGS_DIR), "Loading...");
const settings = useSettings();
- const changes = React.useMemo(() => new ChangeList<string>(), []);
-
- React.useEffect(() => {
- return () => void (changes.hasChanges && Alerts.show({
- title: "Restart required",
- body: (
- <>
- <p>The following plugins require a restart:</p>
- <div>{changes.map((s, i) => (
- <>
- {i > 0 && ", "}
- {Parser.parse("`" + s + "`")}
- </>
- ))}</div>
- </>
- ),
- confirmText: "Restart now",
- cancelText: "Later!",
- onConfirm: () => location.reload()
- }));
- }, []);
return (
<Forms.FormSection tag="h1" title="Vencord">