This commit is contained in:
cocobo1 2025-07-25 17:08:28 +03:00
parent f8c9df9294
commit ac849b6d19
7 changed files with 2624 additions and 8628 deletions

2
.gitignore vendored
View file

@ -4,3 +4,5 @@ yarn.lock
.DS_Store
lib-dist/
/packages/types
dist
.directory

2621
bun.lock Normal file

File diff suppressed because it is too large Load diff

8601
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -13,8 +13,6 @@
"CLEAR": "Clear",
"CLEAR_BUNDLE": "Clear JS Bundle",
"CLEAR_BUNDLE_DESC": "Clear the cached bundle. This will force a re-download of the bundle next app launch.",
"CLEAR_BUNDLE": "Clear JS Bundle",
"CLEAR_BUNDLE_DESC": "Clear the cached bundle. This will force a re-download of the bundle next app launch.",
"CLEAR_DATA": "Clear data",
"CLEAR_DATA_FAILED": "Failed to clear data for {name}",
"CLEAR_DATA_SUCCESSFUL": "Cleared data for {name}",
@ -72,8 +70,6 @@
"MISCELLANEOUS": "Miscellaneous",
"MODAL_RELOAD_REQUIRED": "Reload app?",
"MODAL_RELOAD_REQUIRED_DESC": "A reload is required to see the changes. Do you want to reload now?",
"MODAL_RELOAD_REQUIRED": "Reload app?",
"MODAL_RELOAD_REQUIRED_DESC": "A reload is required to see the changes. Do you want to reload now?",
"MODAL_THEME_REFETCHED": "Theme refetched",
"MODAL_THEME_REFETCHED_DESC": "A reload is required to see the changes. Do you want to reload now?",
"MODAL_UNPROXIED_PLUGIN_DESC": "The plugin you are trying to install has not been proxied/verified by staff. Are you sure you want to continue?",

View file

@ -6,16 +6,13 @@ import { findAssetId } from "@lib/api/assets";
import { isThemeSupported } from "@lib/api/native/loader";
import { after, instead } from "@lib/api/patcher";
import { VD_PROXY_PREFIX, VD_THEMES_CHANNEL_ID } from "@lib/utils/constants";
import { VD_PROXY_PREFIX, VD_THEMES_CHANNEL_ID } from "@lib/utils/constants";
import { lazyDestructure } from "@lib/utils/lazy";
import { channels } from "@metro/common";
import { channels } from "@metro/common";
import { byMutableProp } from "@metro/filters";
import { findExports } from "@metro/finders";
import { findByProps, findByPropsLazy } from "@metro/wrappers";
import { showToast } from "@ui/toasts";
import { Linking } from "react-native";
import { Linking } from "react-native";
const showSimpleActionSheet = findExports(byMutableProp("showSimpleActionSheet"));
const handleClick = findByPropsLazy("handleClick");

View file

@ -10,10 +10,8 @@ import { settings } from "@lib/api/settings";
import { openAlert } from "@lib/ui/alerts";
import { DISCORD_SERVER, GITHUB } from "@lib/utils/constants";
import { NavigationNative } from "@metro/common";
import { NavigationNative } from "@metro/common";
import { AlertActionButton, AlertActions, AlertModal, Stack, TableRow, TableRowGroup, TableSwitchRow } from "@metro/common/components";
import { Linking, ScrollView } from "react-native";
import { Linking, ScrollView } from "react-native";
export default function General() {
useProxy(settings);

View file

@ -1,9 +1,7 @@
import { lazyDestructure } from "@lib/utils/lazy";
import { findByFilePathLazy, findByProps, findByPropsLazy } from "@metro/wrappers";
import { Linking } from "react-native";
import type { Dispatcher } from "./types/flux";
import { Linking } from "react-native";
export * as components from "./components";
@ -12,20 +10,6 @@ export const constants = findByPropsLazy("Fonts", "Permissions");
export const channels = findByPropsLazy("getVoiceChannelId");
export const i18n = findByPropsLazy("Messages");
// Polyfill LinkingUtils
const openURL = (url: string) => Linking.openURL(url);
export const url = nativeModuleProxy.NativeLinkingModule || nativeModuleProxy.DCDLinkingManager ? {
openURL,
openDeeplink: openURL,
handleSupportedURL: openURL,
isDiscordConnectOauth2Deeplink: () => {
console.warn("url.isDiscordConnectOauth2Deeplink is not implemented and will always return false");
return false;
},
showLongPressUrlActionSheet: () => console.warn("url.showLongPressUrlActionSheet is not implemented"),
handleMessageLinking: findByFilePathLazy("modules/links/native/handleContentLinking.tsx", true),
} : findByPropsLazy("openURL", "openDeeplink");
export const clipboard = findByPropsLazy("setString", "getString", "hasString");
export const assets = findByPropsLazy("registerAsset");
export const invites = findByPropsLazy("acceptInviteAndTransitionToInviteChannel");
@ -42,7 +26,6 @@ export const { useToken } = lazyDestructure(() => findByProps("useToken"));
// Polyfill LinkingUtils
const openURL = (url: string) => Linking.openURL(url);
export const url = nativeModuleProxy.NativeLinkingModule || nativeModuleProxy.DCDLinkingManager ? {
openURL,