Merge branch 'main' into dev

This commit is contained in:
pylixonly 2024-11-14 07:53:15 +08:00
commit 92caf89a36
9 changed files with 241 additions and 40 deletions

View file

@ -1,35 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: 'bug: '
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Device Information (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Discord Version [e.g. 222111]
- Bunny Version [e.g e19e89c-main]
**Checklists**
- [ ] I understand that this is a bug report and not a place to request new features or plugins
- [ ] I understand that this is no place to report bugs produced by a plugin
- [ ] I can reproduce this bug in Bunny's safe mode AND unable to reproduce it in vanilla/unmodded Discord

191
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View file

@ -0,0 +1,191 @@
name: Bug report
description: Create a bug report to help us improve
title: "[bug]: <insert title here>"
labels: [bug]
body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> ## Before you submit this issue...
> We might reject any issues that can't be solved within the repository, or reports that are too general. For example:
>
> <details>
> <summary><b>"Bunny crashes upon starting..."</b></summary>
> > There are lots of different things that could be causing this, but it's probably not related to this repository.
> </details>
> <details>
> <summary><b>"Bunny freezes on splash screen..."</b></summary>
> > The issue is too general and should be reported only when it occurs after an update to a specific Discord version or after a specific action or configuration has been made within Bunny.
> </details>
> <details>
> <summary><b>"Bunny refuses to install/stuck on downloading..."</b></summary>
> > This is an external issue (sideloading) that does not have a place in this repository. If it's a problem with Bunny Manager, report it to the <a href="https://github.com/pyoncord/BunnyManager">appropriate repository</a>.
> </details>
>
> If you think that your problem belongs to one of these, you should avoid submitting this report unless you are told to do so.
>
> Please report the problem or ask for help in the appropriate place. For example, if the problem occurs in BunnyManager, report it in the BunnyManager repository. If an error occurs when trying to sideload the prepatched IPA, reach out support for the sideloader you're using.
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: You should ensure the completion of the task before proceeding to check it off the checklist. Neglecting to do so may impede the efficiency of the issue resolution process. The developer has the right to delete the issue directly if you check the list blindly.
options:
- label: I am able to reproduce the bug with the latest version of Bunny and Discord.
required: true
- label: I've checked that there is no open or closed issue about this bug.
required: true
- label: The title of this issue accurately describes the bug.
required: true
- label: This is not a feature request or a general question.
required: true
- label: This bug can be reproduced consistently and is not caused by a plugin.
required: true
- label: I have read the notes above and ensured that my issue is clear and within this repository.
required: true
- type: textarea
id: reproduce-steps
attributes:
label: Steps to reproduce the bug
description: What did you do for the bug to show up?
placeholder: |
Example:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
placeholder: |
Example:
"This should happen..."
validations:
required: true
- type: textarea
id: actual-behavior
attributes:
label: Actual behavior
placeholder: |
Example:
"This happened instead..."
validations:
required: true
- type: textarea
id: sreen-media
attributes:
label: Screenshots/Screen recordings
description: |
A picture or video helps us understand the bug more.
You can upload them directly in the text box.
- type: textarea
id: logs
attributes:
label: Logs
description: |
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: dropdown
id: platform
attributes:
label: What platform did you produce this issue on?
options:
- Android
- iOS
validations:
required: true
- type: input
id: discord-version
attributes:
label: Discord version
description: |
The version of Discord you are using. You can find this in the settings. You may leave both the version number and the build number.
placeholder: |
Example:
"253.2 (66074)"
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: |
The version of Bunny the issue is occuring on. You can find this in the settings. Bunny version is in formatted like the following: `beaf689-main` and NOT like this: `0.2.3`.
placeholder: |
Example:
"beaf689-main"
- type: input
id: loader-version
attributes:
label: Loader version
description: |
The version of the loader you are using. You can find this in the settings.
placeholder: |
Example:
"BunnyTweak (0.3.2)"
validations:
required: true
- type: input
id: device
attributes:
label: Device
description: |
The device model you are using.
placeholder: |
Example:
"iPhone 13 Pro Max"
validations:
required: true
- type: input
id: os-version
attributes:
label: OS version
description: |
The version of the operating system you are using.
placeholder: |
Example:
"iOS 15.0.1"
validations:
required: true
- type: textarea
id: debug-info
attributes:
label: Debug information
description: |
Debug information is important for the developer to understand the environment in which the bug occurred. You can get this information by sending `/debug` in the chat.
placeholder: |
Example:
Bunny: beaf689-main (BunnyXposed 0.2.4)
Discord: 255.2 (255202)
React: 18.3.1 (RN 0.74.5-discord-11)
Hermes: for RN 0.74.5-discord-11 (bcv96)
System: Android 13 (SDK 33)
Device: M2101K7BG (secret)
- type: textarea
id: additional-information
attributes:
label: Additional information
placeholder: |
Example:
"I have tried to do this..."
"This only happens in this situation..."
"This could be related to..."

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1 @@
blank_issues_enabled: false

View file

@ -0,0 +1,41 @@
name: Feature request
description: Suggest an idea for Bunny
title: "[feature]: <insert title here>"
labels: [enhancement]
body:
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: You should ensure the completion of the task before proceeding to check it off the checklist. Neglecting to do so may impede the efficiency of the issue resolution process. The developer has the right to delete the issue directly if you check the list blindly.
options:
- label: I've checked that there is no other issue about this feature request.
required: true
- label: This issue contains only one feature request.
required: true
- label: The title of this issue accurately describes the feature request.
required: true
- type: textarea
id: feature-description
attributes:
label: Feature description
description: What feature you want Bunny to have? Provide detailed description about what it should look like or where it should be added.
validations:
required: true
- type: textarea
id: why-is-the-feature-requested
attributes:
label: Why do you want this feature?
description: Describe the problem or limitation that motivates you to want this feature to be added.
validations:
required: true
- type: textarea
id: additional-information
attributes:
label: Additional information
description: Add any other context or screenshots about the feature request here.
placeholder: |
Additional details and attachments.

View file

@ -7,7 +7,7 @@ import isValidHttpUrl from "@lib/utils/isValidHttpUrl";
import { lazyDestructure } from "@lib/utils/lazy";
import { findByProps } from "@metro";
import { clipboard, NavigationNative } from "@metro/common";
import { AlertActionButton, AlertModal, Button, FlashList, FloatingActionButton, HelpMessage, IconButton, Stack, Text, TextInput } from "@metro/common/components";
import { AlertActionButton, AlertModal, Button, FlashList, FloatingActionButton, HelpMessage, IconButton, Stack, Text, TextInput, useSafeAreaInsets } from "@metro/common/components";
import { ErrorBoundary, Search } from "@ui/components";
import { isNotNil } from "es-toolkit";
import fuzzysort from "fuzzysort";
@ -112,6 +112,7 @@ function InputAlert(props: { label: string, fetchFn: (url: string) => Promise<vo
export default function AddonPage<T extends object>({ CardComponent, ...props }: AddonPageProps<T>) {
const [search, setSearch] = React.useState("");
const [sortFn, setSortFn] = React.useState<((a: T, b: T) => number) | null>(() => null);
const { bottom: bottomInset } = useSafeAreaInsets();
const navigation = NavigationNative.useNavigation();
useEffect(() => {
@ -213,6 +214,7 @@ export default function AddonPage<T extends object>({ CardComponent, ...props }:
renderItem={({ item }: any) => <CardComponent item={item.obj} result={item} />}
/>
{props.installAction && <FloatingActionButton
positionBottom={bottomInset + 8}
icon={findAssetId("PlusLargeIcon")}
onPress={onInstallPress}
/>}

View file

@ -1,5 +1,5 @@
import { createStorage } from "@core/vendetta/storage";
import { BunnyManifest } from "@lib/addons/types";
import { createStorage } from "@lib/api/storage";
import { Logger } from "@lib/utils/logger";
export type PluginRepo = Record<string, {
@ -45,7 +45,7 @@ export interface PluginInstanceInternal extends PluginInstance {
export interface BunnyPluginProperty {
readonly manifest: BunnyPluginManifestInternal;
readonly logger: Logger;
createStorage<T>(): ReturnType<typeof createStorage<T>>;
createStorage<T extends object>(): ReturnType<typeof createStorage<T>>;
}
export type BunnyPluginObject = typeof window.bunny & {

View file

@ -2,7 +2,7 @@ import { RNModules } from "./types";
const nmp = window.nativeModuleProxy;
export const MMKVManager = nmp.MMKVManager as RNModules.MMKVManager;
export const MMKVManager = (nmp.NativeCacheModule ?? nmp.MMKVManager) as RNModules.MMKVManager;
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;

View file

@ -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, SafeAreaProvider } = lazyDestructure(() => findByProps("useSafeAreaInsets"));
export const { SafeAreaView, SafeAreaProvider, useSafeAreaInsets } = lazyDestructure(() => findByProps("useSafeAreaInsets"));
// ActionSheet
export const ActionSheetRow = findProp("ActionSheetRow");

View file

@ -140,6 +140,7 @@ interface FABProps {
icon: ImageSourcePropType | ReactNode;
style?: Style;
onPress: () => void;
positionBottom?: number;
}
export type FloatingActionButton = React.FC<FABProps>;