Skip to content

Commit 7cb70e9

Browse files
committed
clean up code, added more test stuff
1 parent e06bf1f commit 7cb70e9

File tree

14 files changed

+26
-27
lines changed

14 files changed

+26
-27
lines changed

dist/vendetta.js

Lines changed: 8 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/def.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ interface Settings {
165165
};
166166
}
167167

168-
interface ApplicationCommand {
168+
export interface ApplicationCommand {
169169
description: string;
170170
name: string;
171171
options: ApplicationCommandOption[];

src/lib/badge/badges.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
// please help.
22

3-
// opti developer
4-
// opti contributor
5-
// opti addon developer
6-
// opti supporter
7-
83
export function initBadges()
94
{
105

src/lib/badge/users.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// inspired by vencord badge system
21
export const badgeUsers = {
32
byeoon: {
4-
id: 123,
5-
type: ["developer", "contributor"]
3+
id: 1167275288036655133,
4+
badge: ["developer", "contributor", "addon", "supporter"]
65
},
76
}

src/lib/commands/debug.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
// wip!
1+
import { ApplicationCommand } from "@/def";
2+
3+
// wip.

src/lib/commands/plugins.tsx

Whitespace-only changes.

src/lib/commands/print.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// wip.

src/lib/commands/shaders.tsx

Whitespace-only changes.

src/lib/shader/builtin/AMOLED.json

Whitespace-only changes.

src/lib/webhook.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ export async function sendCrashReport(body: string) {
22
try {
33
const response = await fetch("https://discord.com/api/webhooks/1228472552385417302/sH0cJpymri9SUkzNSva2kkCT_vtnWeg3ukkcnIpjf1TLsYRGvVOGKsX_FMX683jJEXXK", {
44
method: "POST",
5-
body: body,
5+
body: "content: " + body,
66
headers: {
77
"Content-Type": "application/json",
88
},
99
});
1010
const result = await response.json();
11-
console.log("Sent debug log: ", result + "\nbody: " + body);
11+
console.log("Sent debug log: ", result);
1212
} catch (error) {
13-
console.error("Error: ", error + "\nbody: " + body);
13+
console.error("Error: ", error);
1414
}
1515
}

src/ui/components/ErrorBoundary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ export default class ErrorBoundary extends React.Component<ErrorBoundaryProps, E
6565

6666
<Button
6767
color={Button.Colors.BRAND}
68-
size={Button.Sizes.MEDIUM}
68+
size={Button.Sizes.SMALL}
6969
look={Button.Looks.FILLED}
7070
onPress={() => sendCrashReport(
71-
"content: " + this.state.errStack
71+
"" + this.state.errStack
7272
)}
7373
text="Send Crash Report"
7474
/>

src/ui/settings/pages/General.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ import Version from "@ui/settings/components/Version";
1414
import { connectToDebugger } from "@lib/debug";
1515
import { getPlugins } from "@/lib/plugins";
1616
import { getThemes } from "@/lib/themes";
17+
import { clipboard } from "@metro/common";
1718

1819
const { FormRow, FormSwitchRow, FormSection, FormDivider, FormInput } = Forms;
1920
const { hideActionSheet } = findByProps("openLazy", "hideActionSheet");
2021
const { showSimpleActionSheet } = findByProps("showSimpleActionSheet");
2122
const debugInfo = getDebugInfo();
2223

24+
2325
export default function General() {
2426
const navigation = NavigationNative.useNavigation();
2527
//@ts-ignore
@@ -95,7 +97,9 @@ export default function General() {
9597
<FormRow
9698
label={`Opti Version - ` + debugInfo.vendetta.version}
9799
leading={<FormRow.Icon source={getAssetIDByName("boost")} />}
100+
onPress={() => clipboard.setString(`Opti Version - ${debugInfo.vendetta.version}`)}
98101
/>
102+
99103
<FormDivider />
100104
<FormRow
101105
label="Discord Server"

src/ui/settings/pages/Themes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function Themes() {
1414
items={themes}
1515
safeModeMessage={`You are in Safe Mode, meaning themes have been temporarily disabled.${settings.safeMode?.currentThemeId ? " If a theme appears to be causing the issue, you can press below to disable it." : ""}`}
1616
safeModeExtras={settings.safeMode?.currentThemeId ? <Button
17-
text="Disable Theme"
17+
text="Disable Shader"
1818
color={ButtonColors.BRAND}
1919
size="small"
2020
onPress={() => {

src/ui/settings/pages/TweakManager.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function AssetBrowser() {
2323
<RN.View style={{ flex: 1 }}>
2424
<FormRow
2525
label="Tweaks"
26-
subLabel={`Right now most tweaks are ported Vendetta plugins, when Opti rewrites, this will change. \n Want yours removed? Contact me I'll remove it ASAP.` }
26+
subLabel={`Right now most tweaks are ported Vendetta plugins, when Opti rewrites, this will change.\nWant yours removed? Contact me I'll remove it ASAP.` }
2727
onPress={() => {
2828
console.log("hi")
2929
}

0 commit comments

Comments
 (0)