mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 10:57:04 -04:00
ConsoleJanitor: Support allowing log levels (#3255)
Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
This commit is contained in:
parent
8f65d3cae9
commit
e88af36be9
4 changed files with 102 additions and 8 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({...})
|
||||
|
@ -202,6 +202,10 @@ export const enum ReporterTestable {
|
|||
FluxEvents = 1 << 4
|
||||
}
|
||||
|
||||
export function defineDefault<T = any>(value: T) {
|
||||
return value;
|
||||
}
|
||||
|
||||
export const enum OptionType {
|
||||
STRING,
|
||||
NUMBER,
|
||||
|
@ -334,7 +338,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