bun
This commit is contained in:
parent
f8c9df9294
commit
ac849b6d19
7 changed files with 2624 additions and 8628 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -3,4 +3,6 @@ package-lock.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
.DS_Store
|
.DS_Store
|
||||||
lib-dist/
|
lib-dist/
|
||||||
/packages/types
|
/packages/types
|
||||||
|
dist
|
||||||
|
.directory
|
||||||
|
|
|
||||||
8601
pnpm-lock.yaml
generated
8601
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -13,8 +13,6 @@
|
||||||
"CLEAR": "Clear",
|
"CLEAR": "Clear",
|
||||||
"CLEAR_BUNDLE": "Clear JS Bundle",
|
"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_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": "Clear data",
|
||||||
"CLEAR_DATA_FAILED": "Failed to clear data for {name}",
|
"CLEAR_DATA_FAILED": "Failed to clear data for {name}",
|
||||||
"CLEAR_DATA_SUCCESSFUL": "Cleared data for {name}",
|
"CLEAR_DATA_SUCCESSFUL": "Cleared data for {name}",
|
||||||
|
|
@ -72,8 +70,6 @@
|
||||||
"MISCELLANEOUS": "Miscellaneous",
|
"MISCELLANEOUS": "Miscellaneous",
|
||||||
"MODAL_RELOAD_REQUIRED": "Reload app?",
|
"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_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": "Theme refetched",
|
||||||
"MODAL_THEME_REFETCHED_DESC": "A reload is required to see the changes. Do you want to reload now?",
|
"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?",
|
"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?",
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,13 @@ import { findAssetId } from "@lib/api/assets";
|
||||||
import { isThemeSupported } from "@lib/api/native/loader";
|
import { isThemeSupported } from "@lib/api/native/loader";
|
||||||
import { after, instead } from "@lib/api/patcher";
|
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 { VD_PROXY_PREFIX, VD_THEMES_CHANNEL_ID } from "@lib/utils/constants";
|
|
||||||
import { lazyDestructure } from "@lib/utils/lazy";
|
import { lazyDestructure } from "@lib/utils/lazy";
|
||||||
import { channels } from "@metro/common";
|
import { channels } from "@metro/common";
|
||||||
import { channels } from "@metro/common";
|
|
||||||
import { byMutableProp } from "@metro/filters";
|
import { byMutableProp } from "@metro/filters";
|
||||||
import { findExports } from "@metro/finders";
|
import { findExports } from "@metro/finders";
|
||||||
import { findByProps, findByPropsLazy } from "@metro/wrappers";
|
import { findByProps, findByPropsLazy } from "@metro/wrappers";
|
||||||
import { showToast } from "@ui/toasts";
|
import { showToast } from "@ui/toasts";
|
||||||
import { Linking } from "react-native";
|
import { Linking } from "react-native";
|
||||||
import { Linking } from "react-native";
|
|
||||||
|
|
||||||
const showSimpleActionSheet = findExports(byMutableProp("showSimpleActionSheet"));
|
const showSimpleActionSheet = findExports(byMutableProp("showSimpleActionSheet"));
|
||||||
const handleClick = findByPropsLazy("handleClick");
|
const handleClick = findByPropsLazy("handleClick");
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,8 @@ import { settings } from "@lib/api/settings";
|
||||||
import { openAlert } from "@lib/ui/alerts";
|
import { openAlert } from "@lib/ui/alerts";
|
||||||
import { DISCORD_SERVER, GITHUB } from "@lib/utils/constants";
|
import { DISCORD_SERVER, GITHUB } from "@lib/utils/constants";
|
||||||
import { NavigationNative } from "@metro/common";
|
import { NavigationNative } from "@metro/common";
|
||||||
import { NavigationNative } from "@metro/common";
|
|
||||||
import { AlertActionButton, AlertActions, AlertModal, Stack, TableRow, TableRowGroup, TableSwitchRow } from "@metro/common/components";
|
import { AlertActionButton, AlertActions, AlertModal, Stack, TableRow, TableRowGroup, TableSwitchRow } from "@metro/common/components";
|
||||||
import { Linking, ScrollView } from "react-native";
|
import { Linking, ScrollView } from "react-native";
|
||||||
import { Linking, ScrollView } from "react-native";
|
|
||||||
|
|
||||||
export default function General() {
|
export default function General() {
|
||||||
useProxy(settings);
|
useProxy(settings);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
import { lazyDestructure } from "@lib/utils/lazy";
|
import { lazyDestructure } from "@lib/utils/lazy";
|
||||||
import { findByFilePathLazy, findByProps, findByPropsLazy } from "@metro/wrappers";
|
import { findByFilePathLazy, findByProps, findByPropsLazy } from "@metro/wrappers";
|
||||||
import { Linking } from "react-native";
|
import { Linking } from "react-native";
|
||||||
|
|
||||||
import type { Dispatcher } from "./types/flux";
|
import type { Dispatcher } from "./types/flux";
|
||||||
import { Linking } from "react-native";
|
|
||||||
|
|
||||||
export * as components from "./components";
|
export * as components from "./components";
|
||||||
|
|
||||||
|
|
@ -12,20 +10,6 @@ export const constants = findByPropsLazy("Fonts", "Permissions");
|
||||||
export const channels = findByPropsLazy("getVoiceChannelId");
|
export const channels = findByPropsLazy("getVoiceChannelId");
|
||||||
export const i18n = findByPropsLazy("Messages");
|
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 clipboard = findByPropsLazy("setString", "getString", "hasString");
|
||||||
export const assets = findByPropsLazy("registerAsset");
|
export const assets = findByPropsLazy("registerAsset");
|
||||||
export const invites = findByPropsLazy("acceptInviteAndTransitionToInviteChannel");
|
export const invites = findByPropsLazy("acceptInviteAndTransitionToInviteChannel");
|
||||||
|
|
@ -42,7 +26,6 @@ export const { useToken } = lazyDestructure(() => findByProps("useToken"));
|
||||||
|
|
||||||
// Polyfill LinkingUtils
|
// Polyfill LinkingUtils
|
||||||
|
|
||||||
|
|
||||||
const openURL = (url: string) => Linking.openURL(url);
|
const openURL = (url: string) => Linking.openURL(url);
|
||||||
export const url = nativeModuleProxy.NativeLinkingModule || nativeModuleProxy.DCDLinkingManager ? {
|
export const url = nativeModuleProxy.NativeLinkingModule || nativeModuleProxy.DCDLinkingManager ? {
|
||||||
openURL,
|
openURL,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue