mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 10:57:04 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
ae1d98c8cf
6 changed files with 132 additions and 11 deletions
|
@ -26,7 +26,7 @@ import { MessageDecorationFactory } from "@api/MessageDecorations";
|
|||
import { MessageClickListener, MessageEditListener, MessageSendListener } from "@api/MessageEvents";
|
||||
import { MessagePopoverButtonFactory } from "@api/MessagePopover";
|
||||
import { FluxEvents } from "@webpack/types";
|
||||
import { JSX } from "react";
|
||||
import { ReactNode } from "react";
|
||||
import { Promisable } from "type-fest";
|
||||
|
||||
// exists to export default definePlugin({...})
|
||||
|
@ -207,6 +207,10 @@ export const enum ReporterTestable {
|
|||
FluxEvents = 1 << 4
|
||||
}
|
||||
|
||||
export function defineDefault<T = any>(value: T) {
|
||||
return value;
|
||||
}
|
||||
|
||||
export const enum OptionType {
|
||||
STRING,
|
||||
NUMBER,
|
||||
|
@ -339,7 +343,8 @@ export interface IPluginOptionComponentProps {
|
|||
|
||||
export interface PluginSettingComponentDef {
|
||||
type: OptionType.COMPONENT;
|
||||
component: (props: IPluginOptionComponentProps) => JSX.Element;
|
||||
component: (props: IPluginOptionComponentProps) => ReactNode | Promise<ReactNode>;
|
||||
default?: any;
|
||||
}
|
||||
|
||||
/** Maps a `PluginSettingDef` to its value type */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue