Equicord/src/plugins/decor/settings.tsx
2026-03-06 20:59:33 -05:00

57 lines
2 KiB
TypeScript

/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { definePluginSettings } from "@api/Settings";
import { Link } from "@components/Link";
import { Paragraph } from "@components/Paragraph";
import { Margins } from "@utils/margins";
import { classes } from "@utils/misc";
import { closeAllModals } from "@utils/modal";
import { t } from "@utils/translation";
import { OptionType } from "@utils/types";
import { FluxDispatcher } from "@webpack/common";
import DecorPlugin from ".";
import DecorSection from "./ui/components/DecorSection";
export const settings = definePluginSettings({
changeDecoration: {
type: OptionType.COMPONENT,
component() {
if (!DecorPlugin.started) return <Paragraph>
{t("vencord.decor.enableAndRestart")}
</Paragraph>;
return <div>
<DecorSection hideTitle hideDivider noMargin />
<Paragraph className={classes(Margins.top8, Margins.bottom8)}>
{t("decor.accessFromProfiles", {
link: <Link
href="/settings/profile-customization"
onClick={e => {
e.preventDefault();
closeAllModals();
FluxDispatcher.dispatch({ type: "USER_SETTINGS_MODAL_SET_SECTION", section: "Profile Customization" });
}}
>{t("vencord.decor.profilesLink")}</Link>
})}
</Paragraph>
</div>;
}
},
baseUrl: {
type: OptionType.STRING,
hidden: true,
description: t("vencord.decor.baseUrl"),
default: "https://decor.fieryflames.dev"
},
agreedToGuidelines: {
type: OptionType.BOOLEAN,
description: t("vencord.decor.agreedToGuidelines"),
hidden: true,
default: false
}
});