aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/experiments.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/experiments.tsx')
-rw-r--r--src/plugins/experiments.tsx26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/plugins/experiments.tsx b/src/plugins/experiments.tsx
index ed29aa7..cc8309d 100644
--- a/src/plugins/experiments.tsx
+++ b/src/plugins/experiments.tsx
@@ -17,7 +17,10 @@
*/
import { definePluginSettings } from "@api/Settings";
+import ErrorBoundary from "@components/ErrorBoundary";
+import { ErrorCard } from "@components/ErrorCard";
import { Devs } from "@utils/constants";
+import { Margins } from "@utils/margins";
import definePlugin, { OptionType } from "@utils/types";
import { findByPropsLazy } from "@webpack";
import { Forms, React } from "@webpack/common";
@@ -87,6 +90,13 @@ export default definePlugin({
match: /"staging"===window\.GLOBAL_ENV\.RELEASE_CHANNEL/,
replace: "true"
}
+ },
+ {
+ find: 'H1,title:"Experiments"',
+ replacement: {
+ match: 'title:"Experiments",children:[',
+ replace: "$&$self.WarningCard(),"
+ }
}
],
@@ -109,5 +119,19 @@ export default definePlugin({
</Forms.FormText>
</React.Fragment>
);
- }
+ },
+
+ WarningCard: ErrorBoundary.wrap(() => (
+ <ErrorCard id="vc-experiments-warning-card" className={Margins.bottom16}>
+ <Forms.FormTitle tag="h2">Hold on!!</Forms.FormTitle>
+
+ <Forms.FormText>
+ Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled.
+ </Forms.FormText>
+
+ <Forms.FormText className={Margins.top8}>
+ Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments.
+ </Forms.FormText>
+ </ErrorCard>
+ ), { noop: true })
});