Skip to content

Commit

Permalink
feat: rounded stuff, fixed error screen to have more info
Browse files Browse the repository at this point in the history
  • Loading branch information
byeoon committed Oct 22, 2024
1 parent 3494338 commit 8746b40
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/entry.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import { ClientInfoManager } from "@lib/native";
import { NavigationNative } from "./lib/metro/common";
import Developer from "./ui/settings/pages/Developer";
import { getDebugInfo } from "./lib/debug";

// This logs in the native logging implementation, e.g. logcat
console.log("Hello from Opti!");

// Make 'freeze' and 'seal' do nothing
Object.freeze = Object;
Object.seal = Object;
const debugInfo = getDebugInfo();

import(".").then((m) => m.default()).catch((e) => {
console.log(e?.stack ?? e.toString());
console.log("Opti encountered an issue. " + e?.stack ?? e.toString());
alert([
"Failed to load Opti!\n",
`Build Number: ${ClientInfoManager.Build}`,
"Failed to load Opti! The error is in console logs.\n",
`Build: ${ClientInfoManager.Build}`,
`Opti: ${__optiVersion}`,
e?.stack || e.toString(),
`Discord Version: ${debugInfo.discord.version}`
].join("\n"));
});
2 changes: 2 additions & 0 deletions src/ui/components/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ const styles = stylesheet.createThemedStyleSheet({
flex: 1,
flexDirection: "column",
margin: 10,
borderRadius: 5,
},
title: {
fontSize: 20,
textAlign: "center",
marginBottom: 5,
borderRadius: 5,
},
});

Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/InputAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function InputAlert({ title, confirmText, confirmColor, onConfirm
secureTextEntry={secureTextEntry}
autoFocus={true}
showBorder={true}
style={{ paddingVertical: 5, alignSelf: "stretch", paddingHorizontal: 0 }}
style={{ paddingVertical: 5, alignSelf: "stretch", paddingHorizontal: 0, borderRadius: 5 }}
/>
</Alert>
);
Expand Down
3 changes: 2 additions & 1 deletion src/ui/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ const styles = stylesheet.createThemedStyleSheet({
search: {
margin: 0,
padding: 0,
width: 16,
borderBottomWidth: 0,
background: "none",
backgroundColor: "none",

}
});

Expand Down

0 comments on commit 8746b40

Please sign in to comment.