mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-20 06:30:35 +00:00
Compare commits
1 commit
b77434f582
...
8f1d66a1f1
Author | SHA1 | Date | |
---|---|---|---|
|
8f1d66a1f1 |
14 changed files with 13 additions and 38 deletions
|
@ -292,10 +292,10 @@ export default function PluginSettings() {
|
|||
|
||||
if (!pluginFilter(p)) continue;
|
||||
|
||||
const isRequired = p.required || p.isDependency || depMap[p.name]?.some(d => settings.plugins[d].enabled);
|
||||
const isRequired = p.required || depMap[p.name]?.some(d => settings.plugins[d].enabled);
|
||||
|
||||
if (isRequired) {
|
||||
const tooltipText = p.required || !depMap[p.name]
|
||||
const tooltipText = p.required
|
||||
? "This plugin is required for Vencord to function."
|
||||
: makeDependencyList(depMap[p.name]?.filter(d => settings.plugins[d].enabled));
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ export default definePlugin({
|
|||
required: true,
|
||||
description: "Helps us provide support to you",
|
||||
authors: [Devs.Ven],
|
||||
dependencies: ["UserSettingsAPI", "MessageAccessoriesAPI"],
|
||||
dependencies: ["CommandsAPI", "UserSettingsAPI", "MessageAccessoriesAPI"],
|
||||
|
||||
settings,
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ export default definePlugin({
|
|||
name: "FriendInvites",
|
||||
description: "Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",
|
||||
authors: [Devs.afn, Devs.Dziurwa],
|
||||
dependencies: ["CommandsAPI"],
|
||||
commands: [
|
||||
{
|
||||
name: "create friend invite",
|
||||
|
|
|
@ -105,11 +105,6 @@ for (const p of pluginsValues) if (isPluginEnabled(p.name)) {
|
|||
settings[d].enabled = true;
|
||||
dep.isDependency = true;
|
||||
});
|
||||
|
||||
if (p.commands?.length) {
|
||||
Plugins.CommandsAPI.isDependency = true;
|
||||
settings.CommandsAPI.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (const p of pluginsValues) {
|
||||
|
|
|
@ -82,6 +82,7 @@ export default definePlugin({
|
|||
default: true
|
||||
}
|
||||
},
|
||||
dependencies: ["CommandsAPI"],
|
||||
|
||||
async start() {
|
||||
for (const tag of await getTags()) createTagCommand(tag);
|
||||
|
|
|
@ -33,6 +33,7 @@ export default definePlugin({
|
|||
name: "MoreCommands",
|
||||
description: "echo, lenny, mock",
|
||||
authors: [Devs.Arjix, Devs.echo, Devs.Samu],
|
||||
dependencies: ["CommandsAPI"],
|
||||
commands: [
|
||||
{
|
||||
name: "echo",
|
||||
|
|
|
@ -24,6 +24,7 @@ export default definePlugin({
|
|||
name: "MoreKaomoji",
|
||||
description: "Adds more Kaomoji to discord. ヽ(´▽`)/",
|
||||
authors: [Devs.JacobTm],
|
||||
dependencies: ["CommandsAPI"],
|
||||
commands: [
|
||||
{ name: "dissatisfaction", description: " >﹏<" },
|
||||
{ name: "smug", description: "ಠ_ಠ" },
|
||||
|
|
|
@ -88,6 +88,7 @@ export default definePlugin({
|
|||
name: "petpet",
|
||||
description: "Adds a /petpet slash command to create headpet gifs from any image",
|
||||
authors: [Devs.Ven],
|
||||
dependencies: ["CommandsAPI"],
|
||||
commands: [
|
||||
{
|
||||
inputType: ApplicationCommandInputType.BUILT_IN,
|
||||
|
|
|
@ -88,7 +88,7 @@ export default definePlugin({
|
|||
name: "SilentTyping",
|
||||
authors: [Devs.Ven, Devs.Rini, Devs.ImBanana],
|
||||
description: "Hide that you are typing",
|
||||
dependencies: ["ChatInputButtonAPI"],
|
||||
dependencies: ["CommandsAPI", "ChatInputButtonAPI"],
|
||||
settings,
|
||||
contextMenus: {
|
||||
"textarea-context": ChatBarContextCheckbox
|
||||
|
|
|
@ -76,6 +76,7 @@ export default definePlugin({
|
|||
name: "SpotifyShareCommands",
|
||||
description: "Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",
|
||||
authors: [Devs.katlyn],
|
||||
dependencies: ["CommandsAPI"],
|
||||
commands: [
|
||||
{
|
||||
name: "track",
|
||||
|
|
|
@ -72,13 +72,13 @@ export interface PluginDef {
|
|||
stop?(): void;
|
||||
patches?: Omit<Patch, "plugin">[];
|
||||
/**
|
||||
* List of commands that your plugin wants to register
|
||||
* List of commands. If you specify these, you must add CommandsAPI to dependencies
|
||||
*/
|
||||
commands?: Command[];
|
||||
/**
|
||||
* A list of other plugins that your plugin depends on.
|
||||
* These will automatically be enabled and loaded before your plugin
|
||||
* Generally these will be API plugins
|
||||
* Common examples are CommandsAPI, MessageEventsAPI...
|
||||
*/
|
||||
dependencies?: string[],
|
||||
/**
|
||||
|
|
|
@ -28,8 +28,6 @@ export let Forms = {} as {
|
|||
FormText: t.FormText,
|
||||
};
|
||||
|
||||
export let Icons = {} as t.Icons;
|
||||
|
||||
export let Card: t.Card;
|
||||
export let Button: t.Button;
|
||||
export let Switch: t.Switch;
|
||||
|
@ -87,5 +85,4 @@ waitFor(["FormItem", "Button"], m => {
|
|||
Heading
|
||||
} = m);
|
||||
Forms = m;
|
||||
Icons = m;
|
||||
});
|
||||
|
|
11
src/webpack/common/types/components.d.ts
vendored
11
src/webpack/common/types/components.d.ts
vendored
|
@ -18,8 +18,6 @@
|
|||
|
||||
import type { ComponentType, CSSProperties, FunctionComponent, HtmlHTMLAttributes, HTMLProps, KeyboardEvent, MouseEvent, PropsWithChildren, PropsWithRef, ReactNode, Ref } from "react";
|
||||
|
||||
import { IconNames } from "./iconNames";
|
||||
|
||||
export type TextVariant = "heading-sm/normal" | "heading-sm/medium" | "heading-sm/semibold" | "heading-sm/bold" | "heading-md/normal" | "heading-md/medium" | "heading-md/semibold" | "heading-md/bold" | "heading-lg/normal" | "heading-lg/medium" | "heading-lg/semibold" | "heading-lg/bold" | "heading-xl/normal" | "heading-xl/medium" | "heading-xl/bold" | "heading-xxl/normal" | "heading-xxl/medium" | "heading-xxl/bold" | "eyebrow" | "heading-deprecated-14/normal" | "heading-deprecated-14/medium" | "heading-deprecated-14/bold" | "text-xxs/normal" | "text-xxs/medium" | "text-xxs/semibold" | "text-xxs/bold" | "text-xs/normal" | "text-xs/medium" | "text-xs/semibold" | "text-xs/bold" | "text-sm/normal" | "text-sm/medium" | "text-sm/semibold" | "text-sm/bold" | "text-md/normal" | "text-md/medium" | "text-md/semibold" | "text-md/bold" | "text-lg/normal" | "text-lg/medium" | "text-lg/semibold" | "text-lg/bold" | "display-sm" | "display-md" | "display-lg" | "code";
|
||||
export type FormTextTypes = Record<"DEFAULT" | "INPUT_PLACEHOLDER" | "DESCRIPTION" | "LABEL_BOLD" | "LABEL_SELECTED" | "LABEL_DESCRIPTOR" | "ERROR" | "SUCCESS", string>;
|
||||
export type HeadingTag = `h${1 | 2 | 3 | 4 | 5 | 6}`;
|
||||
|
@ -71,7 +69,7 @@ export type FormText = ComponentType<PropsWithChildren<{
|
|||
}> & TextProps> & { Types: FormTextTypes; };
|
||||
|
||||
export type Tooltip = ComponentType<{
|
||||
text: ReactNode | ComponentType;
|
||||
text: ReactNode;
|
||||
children: FunctionComponent<{
|
||||
onClick(): void;
|
||||
onMouseEnter(): void;
|
||||
|
@ -504,10 +502,3 @@ export type Avatar = ComponentType<PropsWithChildren<{
|
|||
type FocusLock = ComponentType<PropsWithChildren<{
|
||||
containerRef: RefObject<HTMLElement>;
|
||||
}>>;
|
||||
|
||||
export type Icon = ComponentType<JSX.IntrinsicElements["svg"] & {
|
||||
size?: string;
|
||||
colorClass?: string;
|
||||
} & Record<string, any>>;
|
||||
|
||||
export type Icons = Record<IconNames, Icon>;
|
||||
|
|
14
src/webpack/common/types/iconNames.d.ts
vendored
14
src/webpack/common/types/iconNames.d.ts
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue