mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-16 09:57:08 -04:00
feat(plugin): SearchReply (#551)
Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Co-authored-by: Vendicated <vendicated@riseup.net>
This commit is contained in:
parent
b90392576e
commit
0b4ae729a3
6 changed files with 141 additions and 4 deletions
24
src/webpack/common/types/i18nMessages.ts
Normal file
24
src/webpack/common/types/i18nMessages.ts
Normal file
File diff suppressed because one or more lines are too long
28
src/webpack/common/types/utils.d.ts
vendored
28
src/webpack/common/types/utils.d.ts
vendored
|
@ -19,6 +19,7 @@
|
|||
import type { ReactNode } from "react";
|
||||
|
||||
import type { FluxEvents } from "./fluxEvents";
|
||||
import { i18nMessages } from "./i18nMessages";
|
||||
|
||||
export { FluxEvents };
|
||||
|
||||
|
@ -82,3 +83,30 @@ export type RestAPI = Record<"delete" | "get" | "patch" | "post" | "put", (data:
|
|||
V8APIError: Error;
|
||||
getAPIBaseURL(withVersion?: boolean): string;
|
||||
};
|
||||
|
||||
export interface Locale {
|
||||
name: string;
|
||||
value: string;
|
||||
localizedName: string;
|
||||
}
|
||||
|
||||
export interface LocaleInfo {
|
||||
code: string;
|
||||
enabled: boolean;
|
||||
name: string;
|
||||
englishName: string;
|
||||
postgresLang: string;
|
||||
}
|
||||
|
||||
export interface i18n {
|
||||
getAvailableLocales(): Locale[];
|
||||
getLanguages(): LocaleInfo[];
|
||||
getDefaultLocale(): string;
|
||||
getLocale(): string;
|
||||
getLocaleInfo(): LocaleInfo;
|
||||
setLocale(locale: string): void;
|
||||
|
||||
loadPromise: Promise<void>;
|
||||
|
||||
Messages: Record<i18nMessages, string>;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
import type { User } from "discord-types/general";
|
||||
|
||||
// eslint-disable-next-line path-alias/no-relative
|
||||
import { _resolveReady,filters, findByCodeLazy, findByPropsLazy, mapMangledModuleLazy, waitFor } from "../webpack";
|
||||
import { _resolveReady, filters, findByCodeLazy, findByPropsLazy, findLazy, mapMangledModuleLazy, waitFor } from "../webpack";
|
||||
import type * as t from "./types/utils";
|
||||
|
||||
export let FluxDispatcher: t.FluxDispatcher;
|
||||
|
@ -29,6 +29,8 @@ export const moment: typeof import("moment") = findByPropsLazy("parseTwoDigitYea
|
|||
|
||||
export const hljs: typeof import("highlight.js") = findByPropsLazy("highlight");
|
||||
|
||||
export const i18n: t.i18n = findLazy(m => m.Messages?.["en-US"]);
|
||||
|
||||
export let SnowflakeUtils: t.SnowflakeUtils;
|
||||
waitFor(["fromTimestamp", "extractTimestamp"], m => SnowflakeUtils = m);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue