mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 17:43:08 -04:00
PluginModals: add plugin website & source code links
This commit is contained in:
parent
76f6912511
commit
3ce241021f
11 changed files with 190 additions and 56 deletions
35
src/webpack/common/types/utils.d.ts
vendored
35
src/webpack/common/types/utils.d.ts
vendored
|
@ -18,6 +18,7 @@
|
|||
|
||||
import { Guild, GuildMember } from "discord-types/general";
|
||||
import type { ReactNode } from "react";
|
||||
import { LiteralUnion } from "type-fest";
|
||||
|
||||
import type { FluxEvents } from "./fluxEvents";
|
||||
import { i18nMessages } from "./i18nMessages";
|
||||
|
@ -221,3 +222,37 @@ export interface Constants {
|
|||
UserFlags: Record<string, number>;
|
||||
FriendsSections: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ExpressionPickerStore {
|
||||
closeExpressionPicker(activeViewType?: any): void;
|
||||
openExpressionPicker(activeView: LiteralUnion<"emoji" | "gif" | "sticker", string>, activeViewType?: any): void;
|
||||
}
|
||||
|
||||
export interface BrowserWindowFeatures {
|
||||
toolbar?: boolean;
|
||||
menubar?: boolean;
|
||||
location?: boolean;
|
||||
directories?: boolean;
|
||||
width?: number;
|
||||
height?: number;
|
||||
defaultWidth?: number;
|
||||
defaultHeight?: number;
|
||||
left?: number;
|
||||
top?: number;
|
||||
defaultAlwaysOnTop?: boolean;
|
||||
movable?: boolean;
|
||||
resizable?: boolean;
|
||||
frame?: boolean;
|
||||
alwaysOnTop?: boolean;
|
||||
hasShadow?: boolean;
|
||||
transparent?: boolean;
|
||||
skipTaskbar?: boolean;
|
||||
titleBarStyle?: string | null;
|
||||
backgroundColor?: string;
|
||||
}
|
||||
|
||||
export interface PopoutActions {
|
||||
open(key: string, render: (windowKey: string) => ReactNode, features?: BrowserWindowFeatures);
|
||||
close(key: string): void;
|
||||
setAlwaysOnTop(key: string, alwaysOnTop: boolean): void;
|
||||
}
|
||||
|
|
|
@ -160,9 +160,15 @@ export const InviteActions = findByPropsLazy("resolveInvite");
|
|||
|
||||
export const IconUtils: t.IconUtils = findByPropsLazy("getGuildBannerURL", "getUserAvatarURL");
|
||||
|
||||
const openExpressionPickerMatcher = canonicalizeMatch(/setState\({activeView:\i/);
|
||||
const openExpressionPickerMatcher = canonicalizeMatch(/setState\({activeView:\i,activeViewType:/);
|
||||
// TODO: type
|
||||
export const ExpressionPickerStore = mapMangledModuleLazy("expression-picker-last-active-view", {
|
||||
export const ExpressionPickerStore: t.ExpressionPickerStore = mapMangledModuleLazy("expression-picker-last-active-view", {
|
||||
closeExpressionPicker: filters.byCode("setState({activeView:null"),
|
||||
openExpressionPicker: m => typeof m === "function" && openExpressionPickerMatcher.test(m.toString()),
|
||||
});
|
||||
|
||||
export const PopoutActions: t.PopoutActions = mapMangledModuleLazy('type:"POPOUT_WINDOW_OPEN"', {
|
||||
open: filters.byCode('type:"POPOUT_WINDOW_OPEN"'),
|
||||
close: filters.byCode('type:"POPOUT_WINDOW_CLOSE"'),
|
||||
setAlwaysOnTop: filters.byCode('type:"POPOUT_WINDOW_SET_ALWAYS_ON_TOP"'),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue