mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 02:47:03 -04:00
Make Option.Component not require description
Also correctly infers the type from "default"
This commit is contained in:
parent
a2213d4feb
commit
5ad35c36e4
10 changed files with 26 additions and 28 deletions
|
@ -91,15 +91,12 @@ function ThemeSettings() {
|
|||
|
||||
const settings = definePluginSettings({
|
||||
color: {
|
||||
description: "Color your Discord client theme will be based around. Light mode isn't supported",
|
||||
type: OptionType.COMPONENT,
|
||||
default: "313338",
|
||||
component: () => <ThemeSettings />
|
||||
component: ThemeSettings
|
||||
},
|
||||
resetColor: {
|
||||
description: "Reset Theme Color",
|
||||
type: OptionType.COMPONENT,
|
||||
default: "313338",
|
||||
component: () => (
|
||||
<Button onClick={() => onPickColor(0x313338)}>
|
||||
Reset Theme Color
|
||||
|
|
|
@ -17,7 +17,6 @@ import DecorSection from "./ui/components/DecorSection";
|
|||
export const settings = definePluginSettings({
|
||||
changeDecoration: {
|
||||
type: OptionType.COMPONENT,
|
||||
description: "Change your avatar decoration",
|
||||
component() {
|
||||
if (!Vencord.Plugins.plugins.Decor.started) return <Forms.FormText>
|
||||
Enable Decor and restart your client to change your avatar decoration.
|
||||
|
|
|
@ -147,8 +147,7 @@ function IdsListComponent(props: { setValue: (value: string) => void; }) {
|
|||
const settings = definePluginSettings({
|
||||
importCustomRPC: {
|
||||
type: OptionType.COMPONENT,
|
||||
description: "",
|
||||
component: () => <ImportCustomRPCComponent />
|
||||
component: ImportCustomRPCComponent
|
||||
},
|
||||
listMode: {
|
||||
type: OptionType.SELECT,
|
||||
|
@ -168,7 +167,6 @@ const settings = definePluginSettings({
|
|||
},
|
||||
idsList: {
|
||||
type: OptionType.COMPONENT,
|
||||
description: "",
|
||||
default: "",
|
||||
onChange(newValue: string) {
|
||||
const ids = new Set(newValue.split(",").map(id => id.trim()).filter(Boolean));
|
||||
|
|
|
@ -120,11 +120,11 @@ const settings = definePluginSettings({
|
|||
},
|
||||
clearMessageCache: {
|
||||
type: OptionType.COMPONENT,
|
||||
description: "Clear the linked message cache",
|
||||
component: () =>
|
||||
component: () => (
|
||||
<Button onClick={() => messageCache.clear()}>
|
||||
Clear the linked message cache
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ import { cl } from "./utils";
|
|||
export const settings = definePluginSettings({
|
||||
authorize: {
|
||||
type: OptionType.COMPONENT,
|
||||
description: "Authorize with ReviewDB",
|
||||
component: () => (
|
||||
<Button onClick={() => authorize()}>
|
||||
Authorize with ReviewDB
|
||||
|
@ -56,7 +55,6 @@ export const settings = definePluginSettings({
|
|||
},
|
||||
buttons: {
|
||||
type: OptionType.COMPONENT,
|
||||
description: "ReviewDB buttons",
|
||||
component: () => (
|
||||
<div className={cl("button-grid")} >
|
||||
<Button onClick={openBlockModal}>Manage Blocked Users</Button>
|
||||
|
|
|
@ -45,7 +45,6 @@ const makeEmptyRuleArray = () => [makeEmptyRule()];
|
|||
const settings = definePluginSettings({
|
||||
replace: {
|
||||
type: OptionType.COMPONENT,
|
||||
description: "",
|
||||
component: () => {
|
||||
const { stringRules, regexRules } = settings.use(["stringRules", "regexRules"]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue