mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 02:17:03 -04:00
PetPet: Fix Upload Image Option (#2461)
This commit is contained in:
parent
f4d6461690
commit
4da8b9aad7
8 changed files with 45 additions and 28 deletions
|
@ -27,12 +27,7 @@ export const Flux: t.Flux = findByPropsLazy("connectStores");
|
|||
|
||||
export type GenericStore = t.FluxStore & Record<string, any>;
|
||||
|
||||
export enum DraftType {
|
||||
ChannelMessage = 0,
|
||||
ThreadSettings = 1,
|
||||
FirstThreadMessage = 2,
|
||||
ApplicationLauncherCommand = 3
|
||||
}
|
||||
export const { DraftType }: { DraftType: typeof t.DraftType; } = findByPropsLazy("DraftType");
|
||||
|
||||
export let MessageStore: Omit<Stores.MessageStore, "getMessages"> & {
|
||||
getMessages(chanId: string): any;
|
||||
|
|
9
src/webpack/common/types/stores.d.ts
vendored
9
src/webpack/common/types/stores.d.ts
vendored
|
@ -173,6 +173,15 @@ export class DraftStore extends FluxStore {
|
|||
getThreadSettings(channelId: string): any | null;
|
||||
}
|
||||
|
||||
export enum DraftType {
|
||||
ChannelMessage,
|
||||
ThreadSettings,
|
||||
FirstThreadMessage,
|
||||
ApplicationLauncherCommand,
|
||||
Poll,
|
||||
SlashCommand,
|
||||
}
|
||||
|
||||
export class GuildStore extends FluxStore {
|
||||
getGuild(guildId: string): Guild;
|
||||
getGuildCount(): number;
|
||||
|
|
|
@ -119,6 +119,8 @@ export function showToast(message: string, type = ToastType.MESSAGE) {
|
|||
}
|
||||
|
||||
export const UserUtils = findByPropsLazy("getUser", "fetchCurrentUser") as { getUser: (id: string) => Promise<User>; };
|
||||
|
||||
export const UploadManager = findByPropsLazy("clearAll", "addFile");
|
||||
export const UploadHandler = findByPropsLazy("showUploadFileSizeExceededError", "promptToUpload") as {
|
||||
promptToUpload: (files: File[], channel: Channel, draftType: Number) => void;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue