mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 10:27:03 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
d1455b3761
89 changed files with 369 additions and 285 deletions
|
@ -57,7 +57,7 @@ export let FocusLock: t.FocusLock;
|
|||
export let useToken: t.useToken;
|
||||
|
||||
export const MaskedLink = waitForComponent<t.MaskedLink>("MaskedLink", filters.componentByCode("MASKED_LINK)"));
|
||||
export const Timestamp = waitForComponent<t.Timestamp>("Timestamp", filters.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format"));
|
||||
export const Timestamp = waitForComponent<t.Timestamp>("Timestamp", filters.byCode("#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}"));
|
||||
export const Flex = waitForComponent<t.Flex>("Flex", ["Justify", "Align", "Wrap"]);
|
||||
|
||||
export const { OAuth2AuthorizeModal } = findByPropsLazy("OAuth2AuthorizeModal");
|
||||
|
|
File diff suppressed because one or more lines are too long
1
src/webpack/common/types/index.d.ts
vendored
1
src/webpack/common/types/index.d.ts
vendored
|
@ -19,7 +19,6 @@
|
|||
export * from "./classes";
|
||||
export * from "./components";
|
||||
export * from "./fluxEvents";
|
||||
export * from "./i18nMessages";
|
||||
export * from "./menu";
|
||||
export * from "./passiveupdatestate";
|
||||
export * from "./stores";
|
||||
|
|
14
src/webpack/common/types/utils.d.ts
vendored
14
src/webpack/common/types/utils.d.ts
vendored
|
@ -21,7 +21,6 @@ import type { ReactNode } from "react";
|
|||
import { LiteralUnion } from "type-fest";
|
||||
|
||||
import type { FluxEvents } from "./fluxEvents";
|
||||
import { i18nMessages } from "./i18nMessages";
|
||||
|
||||
export { FluxEvents };
|
||||
|
||||
|
@ -150,19 +149,6 @@ export interface LocaleInfo {
|
|||
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, any>;
|
||||
}
|
||||
|
||||
export interface Clipboard {
|
||||
copy(text: string): void;
|
||||
SUPPORTS_COPY: boolean;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { runtimeHashMessageKey } from "@utils/intlHash";
|
||||
import type { Channel } from "discord-types/general";
|
||||
|
||||
import { _resolveReady, filters, findByCodeLazy, findByPropsLazy, findLazy, mapMangledModuleLazy, waitFor } from "../webpack";
|
||||
|
@ -59,7 +60,10 @@ export const { match, P }: Pick<typeof import("ts-pattern"), "match" | "P"> = ma
|
|||
|
||||
export const lodash: typeof import("lodash") = findByPropsLazy("debounce", "cloneDeep");
|
||||
|
||||
export const i18n: t.i18n = findLazy(m => m.Messages?.["en-US"]);
|
||||
export const i18n = mapMangledModuleLazy('defaultLocale:"en-US"', {
|
||||
intl: filters.byProps("string", "format"),
|
||||
t: filters.byProps(runtimeHashMessageKey("DISCORD"))
|
||||
});
|
||||
|
||||
export let SnowflakeUtils: t.SnowflakeUtils;
|
||||
waitFor(["fromTimestamp", "extractTimestamp"], m => SnowflakeUtils = m);
|
||||
|
@ -133,7 +137,7 @@ export const UserUtils = {
|
|||
|
||||
export const UploadManager = findByPropsLazy("clearAll", "addFile");
|
||||
export const UploadHandler = {
|
||||
promptToUpload: findByCodeLazy(".ATTACHMENT_TOO_MANY_ERROR_TITLE,") as (files: File[], channel: Channel, draftType: Number) => void
|
||||
promptToUpload: findByCodeLazy("#{intl::ATTACHMENT_TOO_MANY_ERROR_TITLE}") as (files: File[], channel: Channel, draftType: Number) => void
|
||||
};
|
||||
|
||||
export const ApplicationAssetUtils = findByPropsLazy("fetchAssetIds", "getAssetImage") as {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue