Merge remote-tracking branch 'origin/main' into dev
This commit is contained in:
commit
bc1a023db5
5 changed files with 27 additions and 26 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
- name: Checkout builds
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "pyoncord/bunny-builds"
|
||||
repository: "bunny-mod/builds"
|
||||
path: "builds"
|
||||
token: ${{ secrets.BUILDS_TOKEN }}
|
||||
ref: ${{ github.ref_name }}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { settings } from "@lib/api/settings";
|
|||
import { Codeblock, ErrorBoundary } from "@lib/ui/components";
|
||||
import { createStyles } from "@lib/ui/styles";
|
||||
import { tokens } from "@metro/common";
|
||||
import { Button, Card, SafeAreaView, Text } from "@metro/common/components";
|
||||
import { Button, Card, SafeAreaProvider, SafeAreaView, Text } from "@metro/common/components";
|
||||
import { ScrollView, View } from "react-native";
|
||||
|
||||
import ErrorComponentStackCard from "./ErrorComponentStackCard";
|
||||
|
|
@ -31,22 +31,24 @@ export default function ErrorBoundaryScreen(props: {
|
|||
const debugInfo = getDebugInfo();
|
||||
|
||||
return <ErrorBoundary>
|
||||
<SafeAreaView style={styles.container}>
|
||||
<View style={{ gap: 4 }}>
|
||||
<Text variant="display-lg">Uh oh.</Text>
|
||||
<Text variant="text-md/normal">A crash occured while rendering a component. This could be caused by a plugin, Bunny or Discord itself.</Text>
|
||||
<Text variant="text-sm/normal" color="text-muted">{debugInfo.os.name}; {debugInfo.discord.build} ({debugInfo.discord.version}); {debugInfo.bunny.version}</Text>
|
||||
</View>
|
||||
<ScrollView fadingEdgeLength={64} contentContainerStyle={{ gap: 12 }}>
|
||||
<Codeblock selectable={true}>{props.error.message}</Codeblock>
|
||||
{hasStack(props.error) && <ErrorStackCard error={props.error} />}
|
||||
{isComponentStack(props.error) ? <ErrorComponentStackCard componentStack={props.error.componentStack} /> : null}
|
||||
</ScrollView>
|
||||
<Card style={{ gap: 6 }}>
|
||||
<Button text="Reload Discord" onPress={() => BundleUpdaterManager.reload()} />
|
||||
{!settings.safeMode?.enabled && <Button text="Reload in Safe Mode" onPress={() => toggleSafeMode()} />}
|
||||
<Button variant="destructive" text="Retry Render" onPress={() => props.rerender()} />
|
||||
</Card>
|
||||
</SafeAreaView>
|
||||
<SafeAreaProvider> {/* for iOS */}
|
||||
<SafeAreaView style={styles.container}>
|
||||
<View style={{ gap: 4 }}>
|
||||
<Text variant="display-lg">Uh oh.</Text>
|
||||
<Text variant="text-md/normal">A crash occurred while rendering a component. This could be caused by a plugin, Bunny or Discord itself.</Text>
|
||||
<Text variant="text-sm/normal" color="text-muted">{debugInfo.os.name}; {debugInfo.discord.build} ({debugInfo.discord.version}); {debugInfo.bunny.version}</Text>
|
||||
</View>
|
||||
<ScrollView fadingEdgeLength={64} contentContainerStyle={{ gap: 12 }}>
|
||||
<Codeblock selectable={true}>{props.error.message}</Codeblock>
|
||||
{hasStack(props.error) && <ErrorStackCard error={props.error} />}
|
||||
{isComponentStack(props.error) ? <ErrorComponentStackCard componentStack={props.error.componentStack} /> : null}
|
||||
</ScrollView>
|
||||
<Card style={{ gap: 6 }}>
|
||||
<Button text="Reload Discord" onPress={() => BundleUpdaterManager.reload()} />
|
||||
{!settings.safeMode?.enabled && <Button text="Reload in Safe Mode" onPress={() => toggleSafeMode()} />}
|
||||
<Button variant="destructive" text="Retry Render" onPress={() => props.rerender()} />
|
||||
</Card>
|
||||
</SafeAreaView>
|
||||
</SafeAreaProvider>
|
||||
</ErrorBoundary>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,8 @@ import { RNModules } from "./types";
|
|||
const nmp = window.nativeModuleProxy;
|
||||
|
||||
export const MMKVManager = nmp.MMKVManager as RNModules.MMKVManager;
|
||||
export const FileManager = (nmp.DCDFileManager ?? nmp.RTNFileManager) as RNModules.FileManager;
|
||||
export const ClientInfoManager = nmp.InfoDictionaryManager ?? nmp.RTNClientInfoManager;
|
||||
export const DeviceManager = nmp.DCDDeviceManager ?? nmp.RTNDeviceManager;
|
||||
export const FileManager = (nmp.NativeFileModule ?? nmp.RTNFileManager ?? nmp.DCDFileManager) as RNModules.FileManager;
|
||||
export const ClientInfoManager = nmp.NativeClientInfoModule ?? nmp.RTNClientInfoManager ?? nmp.InfoDictionaryManager;
|
||||
export const DeviceManager = nmp.NativeDeviceModule ?? nmp.RTNDeviceManager ?? nmp.DCDDeviceManager;
|
||||
export const { BundleUpdaterManager } = nmp;
|
||||
export const ThemeManager = nmp.RTNThemeManager ?? nmp.DCDTheme;
|
||||
|
||||
export const ThemeManager = nmp.NativeThemeModule ?? nmp.RTNThemeManager ?? nmp.DCDTheme;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
export const DISCORD_SERVER = "https://discord.gg/XjYgWXHb9Q";
|
||||
export const GITHUB = "https://github.com/pyoncord";
|
||||
export const GITHUB = "https://github.com/bunny-mod";
|
||||
export const HTTP_REGEX = /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/;
|
||||
export const HTTP_REGEX_MULTI = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*)/g;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export const CompatButton = findByPropsLazy("Looks", "Colors", "Sizes");
|
|||
export const HelpMessage = findByNameLazy("HelpMessage");
|
||||
|
||||
// React Native's included SafeAreaView only adds padding on iOS.
|
||||
export const SafeAreaView = proxyLazy(() => findByProps("useSafeAreaInsets").SafeAreaView);
|
||||
export const { SafeAreaView, SafeAreaProvider } = lazyDestructure(() => findByProps("useSafeAreaInsets"));
|
||||
|
||||
// ActionSheet
|
||||
export const ActionSheetRow = findProp("ActionSheetRow");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue